gdbserver: turn target ops 'multifs_{open, readlink, unlink}' into methods
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's multifs_open, multifs_readlink,
4 multifs_unlink ops into methods of process_target.
5
6 * target.h (struct process_stratum_target): Remove the target ops.
7 (class process_target): Add the target ops. Also add
8 'supports_multifs'.
9 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
10 "sys/stat.h".
11 (process_target::supports_multifs): Define.
12 (process_target::multifs_open): Define.
13 (process_target::multifs_readlink): Define.
14 (process_target::multifs_unlink): Define.
15
16 Update the derived classes and callers below.
17
18 * hostio.cc (handle_setfs): Update.
19 (handle_open): Update.
20 (handle_unlink): Update.
21 (handle_readlink): Update.
22 * linux-low.cc (linux_target_ops): Update.
23 (linux_process_target::supports_multifs): Define.
24 (linux_process_target::multifs_open): Define.
25 (linux_process_target::multifs_readlink): Define.
26 (linux_process_target::multifs_unlink): Define.
27 * linux-low.h (class linux_process_target): Update.
28 * lynx-low.cc (lynx_target_ops): Update.
29 * nto-low.cc (nto_target_ops): Update.
30 * win32-low.cc (win32_target_ops): Update.
31
32 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
33
34 Turn process_stratum_target's pid_to_exec_file op into a method
35 of process_target.
36
37 * target.h (struct process_stratum_target): Remove the target op.
38 (class process_target): Add the target op. Also add
39 'supports_pid_to_exec_file'.
40 * target.cc (process_target::pid_to_exec_file): Define.
41 (process_target::supports_pid_to_exec_file): Define.
42
43 Update the derived classes and callers below.
44
45 * server.cc (handle_qxfer_exec_file): Update.
46 (handle_query): Update.
47 * linux-low.cc (linux_target_ops): Update.
48 (linux_process_target::supports_pid_to_exec_file): Define.
49 (linux_process_target::pid_to_exec_file): Define.
50 * linux-low.h (class linux_process_target): Update.
51 * lynx-low.cc (lynx_target_ops): Update.
52 * nto-low.cc (nto_target_ops): Update.
53 * win32-low.cc (win32_target_ops): Update.
54
55 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
56
57 Turn process_stratum_target's supports_range_stepping op into a
58 method of process_target.
59
60 * target.h (struct process_stratum_target): Remove the target op.
61 (class process_target): Add the target op.
62 (target_supports_range_stepping): Update the macro.
63 * target.cc (process_target::supports_range_stepping): Define.
64
65 Update the derived classes and callers below.
66
67 * linux-low.cc (linux_target_ops): Update.
68 (linux_supports_range_stepping): Turn into ...
69 (linux_process_target::supports_range_stepping): ... this.
70 * linux-low.h (class linux_process_target): Update.
71 * lynx-low.cc (lynx_target_ops): Update.
72 * nto-low.cc (nto_target_ops): Update.
73 * win32-low.cc (win32_target_ops): Update.
74
75 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
76
77 Turn process_stratum_target's btrace-related ops (enable_btrace,
78 disable_btrace, read_btrace, read_btrace_conf) into methods of
79 process_target.
80
81 * target.h (struct process_stratum_target): Remove the target ops.
82 (class process_target): Add the target ops.
83 (target_enable_btrace): Update.
84 (target_disable_btrace): Update.
85 (target_read_btrace): Update.
86 (target_read_btrace_conf): Update.
87 * target.cc (process_target::enable_btrace): Define.
88 (process_target::disable_btrace): Define.
89 (process_target::read_btrace): Define.
90 (process_target::read_btrace_conf): Define.
91
92 Update the derived classes and callers below.
93
94 * linux-low.cc (linux_target_ops): Update.
95 (linux_process_target:enable_btrace): Define as a wrapper around
96 linux_enable_btrace.
97 (linux_low_disable_btrace): Turn into ...
98 (linux_process_target::disable_btrace): ... this.
99 (linux_low_read_btrace): Turn into ...
100 (linux_process_target::read_btrace): ... this.
101 (linux_low_btrace_conf): Turn into ...
102 (linux_process_target::read_btrace_conf): ... this.
103 * linux-low.h (class linux_process_target): Update.
104 * lynx-low.cc (lynx_target_ops): Update.
105 * nto-low.cc (nto_target_ops): Update.
106 * win32-low.cc (win32_target_ops): Update.
107
108 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
109
110 Turn process_stratum_target's supports_agent op into a method of
111 process_target.
112
113 * target.h (struct process_stratum_target): Remove the target op.
114 (class process_target): Add the target op.
115 (target_supports_agent): Update the macro.
116 * target.cc (process_target::supports_agent): Define.
117
118 Update the derived classes and callers below.
119
120 * linux-low.cc (linux_target_ops): Update.
121 (linux_supports_agent): Turn into ...
122 (linux_process_target::supports_agent): ... this.
123 * linux-low.h (class linux_process_target): Update.
124 * lynx-low.cc (lynx_target_ops): Update.
125 * nto-low.cc (nto_target_ops): Update.
126 * win32-low.cc (win32_target_ops): Update.
127
128 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
129
130 Turn process_stratum_target's qxfer_libraries_svr4 op into a
131 method of process_target.
132
133 * target.h (struct process_stratum_target): Remove the target op.
134 (class process_target): Add the target op. Also add
135 'supports_qxfer_libraries_svr4'.
136 * target.cc (process_target::qxfer_libraries_svr4): Define.
137 (process_target::supports_qxfer_libraries_svr4): Define.
138
139 Update the derived classes and callers below.
140
141 * server.cc (handle_qxfer_libraries_svr4): Update.
142 (handle_query): Update.
143 * linux-low.cc (linux_target_ops): Update.
144 (linux_process_target::supports_qxfer_libraries_svr4): Define.
145 (linux_qxfer_libraries_svr4): Turn into ...
146 (linux_process_target::qxfer_libraries_svr4): ... this.
147 * linux-low.h (class linux_process_target): Update.
148 * lynx-low.cc (lynx_target_ops): Update.
149 * nto-low.cc (nto_target_ops): Update.
150 * win32-low.cc (win32_target_ops): Update.
151
152 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
153
154 Turn process_stratum_target's supports_disable_randomization op
155 into a method of process_target.
156
157 * target.h (struct process_stratum_target): Remove the target op.
158 (class process_target): Add the target op.
159 (target_supports_disable_randomization): Update the macro.
160 * target.cc (process_target::supports_disable_randomization): Define.
161
162 Update the derived classes and callers below.
163
164 * linux-low.cc (linux_target_ops): Update.
165 (linux_supports_disable_randomization): Turn into ...
166 (linux_process_target::supports_disable_randomization): ... this.
167 * linux-low.h (class linux_process_target): Update.
168 * lynx-low.cc (lynx_target_ops): Update.
169 * nto-low.cc (nto_target_ops): Update.
170 * win32-low.cc (win32_target_ops): Update.
171
172 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
173
174 Turn process_stratum_target's emit_ops op into a method of
175 process_target.
176
177 * target.h (struct process_stratum_target): Remove the target op.
178 (class process_target): Add the target op.
179 (target_emit_ops): Update the macro.
180 * target.cc (process_target::emit_ops): Define.
181
182 Update the derived classes and callers below.
183
184 * linux-low.cc (linux_target_ops): Update.
185 (linux_emit_ops): Turn into ...
186 (linux_process_target::emit_ops): ... this.
187 * linux-low.h (class linux_process_target): Update.
188 * lynx-low.cc (lynx_target_ops): Update.
189 * nto-low.cc (nto_target_ops): Update.
190 * win32-low.cc (win32_target_ops): Update.
191
192 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
193
194 Turn process_stratum_target's install_fast_tracepoint_jump_pad
195 and get_min_fast_tracepoint_insn_len ops into methods of
196 process_target.
197
198 * target.h (struct process_stratum_target): Remove the target ops.
199 (class process_target): Add the target ops. Also add
200 'supports_fast_tracepoints'.
201 (target_supports_fast_tracepoints): Update the macro.
202 (target_get_min_fast_tracepoint_insn_len): Update the macro.
203 (install_fast_tracepoint_jump_pad): Update and rename the macro
204 to ...
205 (target_install_fast_tracepoint_jump_pad): ... this.
206 * target.cc (process_target::supports_fast_tracepoints): Define.
207 (process_target::install_fast_tracepoint_jump_pad): Define.
208 (process_target::get_min_fast_tracepoint_insn_len): Define.
209
210 Update the derived classes and callers below.
211
212 * tracepoint.cc (install_fast_tracepoint): Update.
213 * linux-low.cc (linux_target_ops): Update.
214 (linux_process_target::supports_fast_tracepoints): Define.
215 (linux_install_fast_tracepoint_jump_pad): Turn into ...
216 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
217 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
218 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
219 * linux-low.h (class linux_process_target): Update.
220 * lynx-low.cc (lynx_target_ops): Update.
221 * nto-low.cc (nto_target_ops): Update.
222 * win32-low.cc (win32_target_ops): Update.
223
224 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
225
226 Turn process_stratum_target's stabilize_threads op into a
227 method of process_target.
228
229 * target.h (struct process_stratum_target): Remove the target op.
230 (class process_target): Add the target op.
231 (target_stabilize_threads): Update the macro.
232 * target.cc (process_target::stabilize_threads): Define.
233
234 Update the derived classes and callers below.
235
236 * server.cc (handle_status): Update.
237 * tracepoint.cc (cmd_qtdp): Update.
238 (cmd_qtstart): Update.
239 * linux-low.cc (linux_target_ops): Update.
240 (linux_stabilize_threads): Turn into ...
241 (linux_process_target::stabilize_threads): ... this.
242 (linux_wait_1): Update.
243 * linux-low.h (class linux_process_target): Update.
244 * lynx-low.cc (lynx_target_ops): Update.
245 * nto-low.cc (nto_target_ops): Update.
246 * win32-low.cc (win32_target_ops): Update.
247
248 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
249
250 Turn process_stratum_target's pause_all and unpause_all ops
251 into methods of process_target.
252
253 * target.h (struct process_stratum_target): Remove the target ops.
254 (class process_target): Add the target ops.
255 (pause_all): Update the macro and rename to...
256 (target_pause_all): ... this.
257 (unpause_all): Update the macro and rename to...
258 (target_unpause_all): ... this.
259 * target.cc (process_target::pause_all): Define.
260 (process_target::unpause_all): Define.
261
262 Update the derived classes and callers below.
263
264 * server.cc (handle_status): Update.
265 * tracepoint.cc (clear_installed_tracepoints): Update.
266 (cmd_qtdp): Update.
267 (cmd_qtstart): Update.
268 (stop_tracing): Update.
269 (cmd_qtstatus): Update.
270 (upload_fast_traceframes): Update.
271 (run_inferior_command): Update.
272 * linux-low.cc (linux_target_ops): Update.
273 (linux_pause_all): Turn into ...
274 (linux_process_target::pause_all): ... this.
275 (linux_unpause_all): Turn into ...
276 (linux_process_target::unpause_all): ... this.
277 (linux_process_target::prepare_to_access_memory): Update.
278 (linux_process_target::done_accessing_memory): Update.
279 * linux-low.h (class linux_process_target): Update.
280 * lynx-low.cc (lynx_target_ops): Update.
281 * nto-low.cc (nto_target_ops): Update.
282 * win32-low.cc (win32_target_ops): Update.
283
284 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
285
286 Turn process_stratum_target's get_tib_address op into a method of
287 process_target.
288
289 * target.h (struct process_stratum_target): Remove the target op.
290 (class process_target): Add the target op. Also add
291 'supports_get_tib_address'.
292 * target.cc (process_target::get_tib_address): Define.
293 (process_target::supports_get_tib_address): Define.
294
295 Update the derived classes and callers below.
296
297 * server.cc (handle_query): Update.
298 * linux-low.cc (win32_target_ops): Update.
299 * lynx-low.cc (lynx_target_ops): Update.
300 * nto-low.cc (nto_target_ops): Update.
301 * win32-low.cc (win32_target_ops): Update.
302 (win32_process_target::supports_get_tib_address): Define.
303 (win32_get_tib_address): Turn into ...
304 (win32_process_target::get_tib_address): ... this.
305 * win32-low.h (class win32_process_target): Update.
306
307 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
308
309 Turn process_stratum_target's thread_stopped op into a method of
310 process_target.
311
312 * target.h (struct process_stratum_target): Remove the target op.
313 (class process_target): Add the target op. Also add
314 'supports_thread_stopped'.
315 (target_thread_stopped): Update the macro.
316 * target.cc (process_target::thread_stopped): Define.
317 (process_target::supports_thread_stopped): Define.
318 (prepare_to_access_memory): Update.
319
320 Update the derived classes and callers below.
321
322 * server.cc (queue_stop_reply_callback): Update.
323 * linux-low.cc (linux_target_ops): Update.
324 (linux_process_target::supports_thread_stopped): Define.
325 (linux_thread_stopped): Turn into ...
326 (linux_process_target::thread_stopped): ... this.
327 * linux-low.h (class linux_process_target): Update.
328 * lynx-low.cc (lynx_target_ops): Update.
329 * nto-low.cc (nto_target_ops): Update.
330 * win32-low.cc (win32_target_ops): Update.
331
332 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
333
334 Turn process_stratum_target's read_pc and write_pc ops into
335 methods of process_target.
336
337 * target.h (struct process_stratum_target): Remove the target ops.
338 (class process_target): Add the target ops.
339 * target.cc (process_target::read_pc): Define.
340 (process_target::write_pc): Define.
341
342 Update the derived classes and callers below.
343
344 * regcache.cc (regcache_read_pc): Update.
345 (regcache_write_pc): Update.
346 * linux-low.cc (linux_target_ops): Update.
347 (linux_read_pc): Turn into ...
348 (linux_process_target::read_pc): ... this.
349 (linux_write_pc): Turn into ...
350 (linux_process_target::write_pc): ... this.
351 * linux-low.h (class linux_process_target): Update.
352 * lynx-low.cc (lynx_target_ops): Update.
353 * nto-low.cc (nto_target_ops): Update.
354 * win32-low.cc (win32_target_ops): Update.
355
356 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
357
358 Turn process_stratum_target's supports_tracepoints op into a
359 method of process_target.
360
361 * target.h (struct process_stratum_target): Remove the target op.
362 (class process_target): Add the target op.
363 (target_supports_tracepoints): Update the macro.
364 * target.cc (process_target::supports_tracepoints): Define.
365
366 Update the derived classes and callers below.
367
368 * linux-low.cc (linux_target_ops): Update.
369 (linux_supports_tracepoints): Turn into ...
370 (linux_process_target::supports_tracepoints): ... this.
371 * linux-low.h (class linux_process_target): Update.
372 * lynx-low.cc (lynx_target_ops): Update.
373 * nto-low.cc (nto_target_ops): Update.
374 * win32-low.cc (win32_target_ops): Update.
375
376 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
377
378 Turn process_stratum_target's process_qsupported op into a method
379 of process_target.
380
381 * target.h (struct process_stratum_target): Remove the target op.
382 (class process_target): Add the target op.
383 (target_process_qsupported): Update the macro.
384 * target.cc (process_target::process_qsupported): Define.
385
386 Update the derived classes and callers below.
387
388 * linux-low.cc (linux_target_ops): Update.
389 (linux_process_qsupported): Turn into ...
390 (linux_process_target::process_qsupported): ... this.
391 * linux-low.h (class linux_process_target): Update.
392 * lynx-low.cc (lynx_target_ops): Update.
393 * nto-low.cc (nto_target_ops): Update.
394 * win32-low.cc (win32_target_ops): Update.
395
396 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
397
398 Turn process_stratum_target's read_loadmap op into a method of
399 process_target.
400
401 * target.h (struct process_stratum_target): Remove the target op.
402 (class process_target): Add the target op. Also add
403 'supports_read_loadmap'.
404 * target.cc (process_target::read_loadmap): Define.
405 (process_target::supports_read_loadmap): Define.
406
407 Update the derived classes and callers below.
408
409 * server.cc (handle_qxfer_fdpic): Update.
410 (handle_query): Update.
411 * linux-low.cc (linux_target_ops): Update.
412 (linux_process_target::supports_read_loadmap): Define.
413 (linux_read_loadmap): Turn into ...
414 (linux_process_target::read_loadmap): ... this.
415 * linux-low.h (class linux_process_target): Update.
416 * lynx-low.cc (lynx_target_ops): Update.
417 * nto-low.cc (nto_target_ops): Update.
418 * win32-low.cc (win32_target_ops): Update.
419
420 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
421
422 Turn process_stratum_target's core_of_thread op into a method of
423 process_target.
424
425 * target.h (struct process_stratum_target): Remove the target op.
426 (class process_target): Add the target op.
427 (target_core_of_thread): Update the macro.
428 * target.cc (process_target::core_of_thread): Define.
429
430 Update the derived classes and callers below.
431
432 * linux-low.cc (linux_target_ops): Update.
433 (linux_process_target::core_of_thread): Define.
434 * linux-low.h (class linux_process_target): Update.
435 * lynx-low.cc (lynx_target_ops): Update.
436 * nto-low.cc (nto_target_ops): Update.
437 * win32-low.cc (win32_target_ops): Update.
438
439 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
440
441 Turn process_stratum_target's handle_monitor_command op into a
442 method of process_target.
443
444 * target.h (struct process_stratum_target): Remove the target op.
445 (class process_target): Add the target op.
446 (target_handle_monitor_command): Update the macro.
447 * target.cc (process_target::handle_monitor_command): Define.
448
449 Update the derived classes and callers below.
450
451 * server.cc (handle_query): Update.
452 * linux-low.cc (linux_target_ops): Update.
453 (linux_process_target::handle_monitor_command): Define.
454 * linux-low.h (class linux_process_target): Update.
455 * lynx-low.cc (lynx_target_ops): Update.
456 * nto-low.cc (nto_target_ops): Update.
457 * win32-low.cc (win32_target_ops): Update.
458
459 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
460
461 Turn process_stratum_target's handle_new_gdb_connection op into a
462 method of process_target.
463
464 * target.h (struct process_stratum_target): Remove the target op.
465 (class process_target): Add the target op.
466 (target_handle_new_gdb_connection): Update the macro.
467 * target.cc (process_target::handle_new_gdb_connection): Define.
468
469 Update the derived classes and callers below.
470
471 * linux-low.cc (linux_target_ops): Update.
472 (linux_handle_new_gdb_connection): Turn into ...
473 (linux_process_target::handle_new_gdb_connection): ... this.
474 * linux-low.h (class linux_process_target): Update.
475 * lynx-low.cc (lynx_target_ops): Update.
476 * nto-low.cc (nto_target_ops): Update.
477 * win32-low.cc (win32_target_ops): Update.
478
479 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
480
481 Turn process_stratum_target's supports_fork_events,
482 supports_vfork_events, and supports_exec_events ops into methods
483 of process_target.
484
485 * target.h (struct process_stratum_target): Remove the target ops.
486 (class process_target): Add the target ops.
487 (target_supports_fork_events): Update the macro.
488 (target_supports_vfork_events): Update the macro.
489 (target_supports_exec_events): Update the macro.
490 * target.cc (process_target::supports_fork_events): Define.
491 (process_target::supports_vfork_events): Define.
492 (process_target::supports_exec_events): Define.
493
494 Update the derived classes and callers below.
495
496 * linux-low.cc (linux_target_ops): Update.
497 (linux_supports_fork_events): Turn into ...
498 (linux_process_target::supports_fork_events): ... this.
499 (linux_supports_vfork_events): Turn into ...
500 (linux_process_target::supports_vfork_events): ... this.
501 (linux_supports_exec_events): Turn into ...
502 (linux_process_target::supports_exec_events): ... this.
503 * linux-low.h (class linux_process_target): Update.
504 * lynx-low.cc (lynx_target_ops): Update.
505 * nto-low.cc (nto_target_ops): Update.
506 * win32-low.cc (win32_target_ops): Update.
507
508 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
509
510 Turn process_stratum_target's supports_multi_process op into a
511 method of process_target.
512
513 * target.h (struct process_stratum_target): Remove the target op.
514 (class process_target): Add the target op.
515 * target.cc (process_target::supports_multi_process): Define.
516 (target_supports_multi_process): Update.
517
518 Update the derived classes and callers below.
519
520 * linux-low.cc (linux_target_ops): Update.
521 (linux_supports_multi_process): Turn into ...
522 (linux_process_target::supports_multi_process): ... 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 * win32-low.cc (win32_target_ops): Update.
527
528 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
529
530 Turn process_stratum_target's supports_non_stop, async, and
531 start_non_stop ops into methods of process_target.
532
533 * target.h (struct process_stratum_target): Remove the target ops.
534 (class process_target): Add the target ops.
535 (target_supports_non_stop): Update the macro.
536 (target_async): Update the macro.
537 (start_non_stop): Remove declaration.
538 * target.cc (process_target::supports_non_stop): Define.
539 (process_target::async): Define.
540 (process_target::start_non_stop): Define.
541 (start_non_stop): Remove.
542
543 Update the derived classes and callers below.
544
545 * server.cc (handle_qxfer_siginfo): Update.
546 (handle_query): Update.
547 * linux-low.cc (linux_target_ops): Update.
548 (linux_supports_non_stop): Turn into ...
549 (linux_process_target::supports_non_stop): ... this.
550 (linux_async): Turn into ...
551 (linux_process_target::async): ... this.
552 (linux_start_non_stop): Turn into ...
553 (linux_process_target::start_non_stop): ... this.
554 * linux-low.h (class linux_process_target): Update.
555 * lynx-low.cc (lynx_target_ops): Update.
556 * nto-low.cc (nto_target_ops): Update.
557 (nto_supports_non_stop): Remove; rely on the default behavior
558 instead.
559 * win32-low.cc (win32_target_ops): Update.
560
561 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
562
563 Turn process_stratum_target's qxfer_siginfo op into a method of
564 process_target.
565
566 * target.h (struct process_stratum_target): Remove the target op.
567 (class process_target): Add the target op. Also add
568 'supports_qxfer_siginfo'.
569 * target.cc (process_target::qxfer_siginfo): Define.
570 (process_target::supports_qxfer_siginfo): Define.
571
572 Update the derived classes and callers below.
573
574 * server.cc (handle_qxfer_siginfo): Update.
575 (handle_query): Update.
576 * linux-low.cc (linux_target_ops): Update.
577 (linux_process_target::supports_qxfer_siginfo): Define.
578 (linux_xfer_siginfo): Turn into ...
579 (linux_process_target::qxfer_siginfo): ... this.
580 * linux-low.h (class linux_process_target): Update.
581 * lynx-low.cc (lynx_target_ops): Update.
582 * nto-low.cc (nto_target_ops): Update.
583 * win32-low.cc (win32_target_ops): Update.
584
585 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
586
587 Turn process_stratum_target's qxfer_osdata op into a method of
588 process_target.
589
590 * target.h (struct process_stratum_target): Remove the target op.
591 (class process_target): Add the target op. Also add
592 'supports_qxfer_osdata'.
593 * target.cc (process_target::qxfer_osdata): Define.
594 (process_target::supports_qxfer_osdata): Define.
595
596 Update the derived classes and callers below.
597
598 * server.cc (handle_qxfer_osdata): Update.
599 (handle_query): Update.
600 * linux-low.cc (linux_target_ops): Update.
601 (linux_process_target::supports_qxfer_osdata): Define.
602 (linux_qxfer_osdata): Turn into ...
603 (linux_process_target::qxfer_osdata): ... this.
604 * linux-low.h (class linux_process_target): Update.
605 * lynx-low.cc (lynx_target_ops): Update.
606 * nto-low.cc (nto_target_ops): Update.
607 * win32-low.cc (win32_target_ops): Update.
608
609 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
610
611 Turn process_stratum_target's hostio_last_error op into a
612 method of process_target.
613
614 * target.h (struct process_stratum_target): Remove the target op.
615 (class process_target): Add the target op.
616 * target.cc: Add "hostio.h" to includes.
617 (process_target::hostio_last_error): Define.
618
619 Update the derived classes and callers below.
620
621 * hostio.cc (hostio_error): Update.
622 * linux-low.cc: Remove "hostio.h" from includes.
623 (linux_target_ops): Update.
624 * lynx-low.cc (lynx_target_ops): Update.
625 * nto-low.cc (nto_target_ops): Update.
626 * win32-low.h (class win32_process_target): Update.
627 * win32-low.cc (win32_target_ops): Update.
628 (wince_hostio_last_error): Turn into ...
629 (win32_process_target::hostio_last_error): ... this.
630
631 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
632
633 Turn process_stratum_target's get_tls_address op into a method of
634 process_target.
635
636 * target.h (struct process_stratum_target): Remove the target op.
637 (class process_target): Add the target op. Also add
638 'supports_get_tls_address'.
639 * target.cc (process_target::get_tls_address): Define.
640 (process_target::supports_get_tls_address): Define.
641
642 Update the derived classes and callers below.
643
644 * server.cc (handle_query): Update.
645 * linux-low.cc (linux_target_ops): Update.
646 (linux_process_target::supports_get_tls_address): Define.
647 (linux_process_target::get_tls_address): Define.
648 * linux-low.h (class linux_process_target): Update.
649 * lynx-low.cc (lynx_target_ops): Update.
650 * nto-low.cc (nto_target_ops): Update.
651 * win32-low.cc (win32_target_ops): Update.
652
653 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
654
655 Turn process_stratum_target's read_offsets op into a method of
656 process_target.
657
658 * target.h (struct process_stratum_target): Remove the target op.
659 (class process_target): Add the target op. Also add
660 'supports_read_offsets'.
661 * target.cc (process_target::read_offsets): Define.
662 (process_target::supports_read_offsets): Define.
663
664 Update the derived classes and callers below.
665
666 * server.cc (handle_query): Update.
667 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
668 (linux_target_ops): Update.
669 (linux_process_target::supports_read_offsets): Define.
670 (linux_read_offsets): Turn into ...
671 (linux_process_target::read_offsets): ... this.
672 * linux-low.h (class linux_process_target): Update.
673 * lynx-low.cc (lynx_target_ops): Update.
674 * nto-low.cc (nto_target_ops): Update.
675 * win32-low.cc (win32_target_ops): Update.
676
677 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
678
679 Turn process_stratum_target's stopped_by_watchpoint and
680 stopped_data_address ops into methods of process_target.
681
682 * target.h (struct process_stratum_target): Remove the target ops.
683 (class process_target): Add the target ops.
684 * target.cc (process_target::stopped_by_watchpoint): Define.
685 (process_target::stopped_data_address): Define.
686
687 Update the derived classes and callers below.
688
689 * remote-utils.cc (prepare_resume_reply): Update.
690 * linux-low.cc (linux_target_ops): Update.
691 (linux_stopped_by_watchpoint): Turn into ...
692 (linux_process_target::stopped_by_watchpoint): ... this.
693 (linux_stopped_data_address): Turn into ...
694 (linux_process_target::stopped_data_address): ... this.
695 * linux-low.h (class linux_process_target): Update.
696 * lynx-low.cc (lynx_target_ops): Update.
697 * nto-low.cc (nto_target_ops): Update.
698 (nto_stopped_by_watchpoint): Turn into ...
699 (nto_process_target::stopped_by_watchpoint): ... this.
700 (nto_stopped_data_address): Turn into ...
701 (nto_process_target::stopped_data_address): ... this.
702 * nto-low.h (class nto_process_target): Update.
703 * win32-low.cc (win32_target_ops): Update.
704 (win32_stopped_by_watchpoint): Turn into ...
705 (win32_process_target::stopped_by_watchpoint): ... this.
706 (win32_stopped_data_address): Turn into ...
707 (win32_process_target::stopped_data_address): ... this.
708 * win32-low.h (class win32_process_target): Update.
709
710 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
711
712 Turn process_stratum_target's supports_hardware_single_step op into
713 a method of process_target.
714
715 * target.h (struct process_stratum_target): Remove the target op.
716 (class process_target): Add the target op.
717 (target_supports_hardware_single_step): Update the macro.
718 (target_can_do_hardware_single_step): Remove declaration.
719 * target.cc (process_target::supports_hardware_single_step): Define.
720 (target_can_do_hardware_single_step): Remove.
721
722 Update the derived classes and callers below.
723
724 * linux-low.h (class linux_process_target): Update.
725 * linux-low.cc (linux_target_ops): Update.
726 (linux_supports_hardware_single_step): Turn into ...
727 (linux_process_target::supports_hardware_single_step): ... this.
728 * lynx-low.h (class lynx_process_target): Update.
729 * lynx-low.cc (lynx_target_ops): Update.
730 (lynx_process_target::supports_hardware_single_step): Define.
731 * nto-low.h (class nto_process_target): Update.
732 * nto-low.cc (nto_target_ops): Update.
733 (nto_process_target::supports_hardware_single_step): Define.
734 * win32-low.h (class win32_process_target): Update.
735 * win32-low.cc (win32_target_ops): Update.
736 (win32_process_target::supports_hardware_single_step): Define.
737
738 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
739
740 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
741 ops into methods of process_target.
742
743 * target.h (struct process_stratum_target): Remove the target ops.
744 (class process_target): Add the target ops.
745 (target_stopped_by_hw_breakpoint): Update the macro.
746 (target_supports_stopped_by_hw_breakpoint): Update the macro.
747 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
748 (process_target::supports_stopped_by_hw_breakpoint): Define.
749
750 Update the derived classes and callers below.
751
752 * linux-low.cc (linux_target_ops): Update.
753 (linux_stopped_by_hw_breakpoint): Turn into ...
754 (linux_process_target::stopped_by_hw_breakpoint): ... this.
755 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
756 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
757 * linux-low.h (class linux_process_target): Update.
758 * lynx-low.cc (lynx_target_ops): Update.
759 * nto-low.cc (nto_target_ops): Update.
760 * win32-low.cc (win32_target_ops): Update.
761
762 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
763
764 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
765 ops into methods of process_target.
766
767 * target.h (struct process_stratum_target): Remove the target ops.
768 (class process_target): Add the target ops.
769 (target_stopped_by_sw_breakpoint): Update the macro.
770 (target_supports_stopped_by_sw_breakpoint): Update the macro.
771 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
772 (process_target::supports_stopped_by_sw_breakpoint): Define.
773
774 Update the derived classes and callers below.
775
776 * linux-low.cc (linux_target_ops): Update.
777 (linux_stopped_by_sw_breakpoint): Turn into ...
778 (linux_process_target::stopped_by_sw_breakpoint): ... this.
779 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
780 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
781 * linux-low.h (class linux_process_target): Update.
782 * lynx-low.cc (lynx_target_ops): Update.
783 * nto-low.cc (nto_target_ops): Update.
784 * win32-low.cc (win32_target_ops): Update.
785
786 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
787
788 Turn process_stratum_target's insert_point and remove_point ops
789 into methods of process_target.
790
791 * target.h (struct process_stratum_target): Remove the target ops.
792 (class process_target): Add the target ops.
793 * target.cc (process_target::insert_point): Define.
794 (process_target::remove_point): Define.
795
796 Update the derived classes and callers below.
797
798 * mem-break.cc (set_raw_breakpoint_at): Update.
799 (delete_raw_breakpoint): Update.
800 (uninsert_raw_breakpoint): Update.
801 (reinsert_raw_breakpoint): Update.
802 * linux-low.cc (linux_target_ops): Update.
803 (linux_insert_point): Turn into ...
804 (linux_process_target::insert_point): ... this.
805 (linux_remove_point): Turn into ...
806 (linux_process_target::remove_point): ... this.
807 * linux-low.h (class linux_process_target): Update.
808 * lynx-low.cc (lynx_target_ops): Update.
809 * nto-low.cc (nto_target_ops): Update.
810 (nto_insert_point): Turn into ...
811 (nto_process_target::insert_point): ... this.
812 (nto_remove_point): Turn into ...
813 (nto_process_target::remove_point): ... this.
814 * nto-low.h (class nto_process_target): Update.
815 * win32-low.cc (win32_target_ops): Update.
816 (win32_insert_point): Turn into ...
817 (win32_process_target::insert_point): ... this.
818 (win32_remove_point): Turn into ...
819 (win32_process_target::remove_point): ... this.
820 * win32-low.h (class win32_process_target): Update.
821
822 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
823
824 Turn process_stratum_target's supports_z_point_type op into a
825 method of process_target.
826
827 * target.h (struct process_stratum_target): Remove the target op.
828 (class process_target): Add the target op.
829 * target.cc (process_target::supports_z_point_type): Define.
830
831 Update the derived classes and callers below.
832
833 * mem-break.cc (z_type_supported): Update.
834 * linux-low.cc (linux_target_ops): Update.
835 (linux_supports_z_point_type): Turn into ...
836 (linux_process_target::supports_z_point_type): ... this.
837 * linux-low.h (class linux_process_target): Update.
838 * lynx-low.cc (lynx_target_ops): Update.
839 * nto-low.cc (nto_target_ops): Update.
840 (nto_supports_z_point_type): Turn into ...
841 (nto_process_target::supports_z_point_type): ... this.
842 * nto-low.h (class nto_process_target): Update.
843 * win32-low.cc (win32_target_ops): Update.
844 (win32_supports_z_point_type): Turn into ...
845 (win32_process_target::supports_z_point_type): ... this.
846 * win32-low.h (class win32_process_target): Update.
847
848 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
849
850 Turn process_stratum_target's read_auxv op into a method of
851 process_target.
852
853 * target.h (class process_stratum_target): Remove the target op.
854 (struct process_target): Add the target op. Also add
855 'supports_read_auxv'.
856 * target.cc (process_target::read_auxv): Define.
857 (process_target::supports_read_auxv): Define.
858
859 Update the derived classes and callers below.
860
861 * server.cc (handle_qxfer_auxv): Update.
862 (handle_query): Update.
863 * linux-low.cc (linux_target_ops): Update.
864 (linux_process_target::supports_read_auxv): Define.
865 (linux_read_auxv): Turn into ...
866 (linux_process_target::read_auxv): ... this.
867 * linux-low.h (class linux_process_target): Update.
868 * lynx-low.cc (lynx_target_ops): Update.
869 * nto-low.cc (nto_target_ops): Update.
870 (nto_process_target::supports_read_auxv): Define.
871 (nto_read_auxv): Turn into ...
872 (nto_process_target::read_auxv): ... this.
873 * nto-low.h (class nto_process_target): Update.
874 * win32-low.cc (win32_target_ops): Update.
875
876 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
877
878 Turn process_stratum_target's request_interrupt 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
884 Update the derived classes and callers below.
885
886 * remote-utils.cc (putpkt_binary_1): Update.
887 (input_interrupt): Update.
888 (getpkt): Update.
889 * server.cc (handle_v_requests): Update.
890 * linux-low.cc (linux_target_ops): Update.
891 (linux_request_interrupt): Turn into ...
892 (linux_process_target::request_interrupt): ... this.
893 * linux-low.h (class linux_process_target): Update.
894 * lynx-low.cc (lynx_target_ops): Update.
895 (lynx_request_interrupt): Turn into ...
896 (lynx_process_target::request_interrupt): ... this.
897 * lynx-low.h (class lynx_process_target): Update.
898 * nto-low.cc (nto_target_ops): Update.
899 (nto_request_interrupt): Turn into ...
900 (nto_process_target::request_interrupt): ... this.
901 * nto-low.h (class nto_process_target): Update.
902 * win32-low.cc (win32_target_ops): Update.
903 (win32_request_interrupt): Turn into ...
904 (win32_process_target::request_interrupt): ... this.
905 * win32-low.h (class win32_process_target): Update.
906
907 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
908
909 Turn process_stratum_target's look_up_symbols op into a method of
910 process_target.
911
912 * target.h (struct process_stratum_target): Remove the target op.
913 (class process_target): Add the target op.
914 * target.cc (process_target::look_up_symbols): Define.
915
916 Update the derived classes and callers below.
917
918 * server.cc (handle_query): Update.
919 * linux-low.cc (linux_target_ops): Update.
920 (linux_look_up_symbols): Turn into ...
921 (linux_process_target::look_up_symbols): ... this.
922 * linux-low.h (class linux_process_target): Update.
923 * lynx-low.cc (lynx_target_ops): Update.
924 * nto-low.cc (nto_target_ops): Update.
925 * win32-low.cc (win32_target_ops): Update.
926
927 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
928
929 Turn process_stratum_target's read_memory and write_memory
930 ops into methods of process_target.
931
932 * target.h (struct process_stratum_target): Remove the target ops.
933 (class process_target): Add the target ops.
934
935 Update the derived classes and callers below.
936
937 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
938 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
939 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
940 (arm_get_syscall_trapinfo): Update.
941 * linux-cris-low.cc (cris_breakpoint_at): Update.
942 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
943 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
944 * linux-mips-low.cc (mips_breakpoint_at): Update.
945 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
946 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
947 * linux-sh-low.cc (sh_breakpoint_at): Update.
948 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
949 (sparc_store_gregset_from_stack): Update.
950 (sparc_breakpoint_at): Update.
951 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
952 * linux-tile-low.cc (tile_breakpoint_at): Update.
953 * linux-x86-low.cc (x86_breakpoint_at): Update.
954 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
955 * mem-brea.cc (insert_memory_breakpoint): Update.
956 (validate_inserted_breakpoint): Update.
957 * target.cc (read_inferior_memory): Update.
958 (target_write_memory): Update.
959 * linux-low.cc (linux_target_ops): Update.
960 (linux_read_memory): Make a wrapper around the read_memory target
961 op call.
962 (linux_process_target::read_memory): Rename from linux_read_memory.
963 (linux_write_memory): Turn into ...
964 (linux_process_target::write_memory): ... this.
965 * linux-low.h (class linux_process_target): Update.
966 * lynx-low.cc (lynx_target_ops): Update.
967 (lynx_read_memory): Turn into ...
968 (lynx_process_target::read_memory): ... this.
969 (lynx_write_memory): Turn into ...
970 (lynx_process_target::write_memory): ... this.
971 * lynx-low.h (class lynx_process_target): Update.
972 * nto-low.cc (nto_target_ops): Update.
973 (nto_read_memory): Turn into ...
974 (nto_process_target::read_memory): ... this.
975 (nto_write_memory): Turn into ...
976 (nto_process_target::write_memory): ... this.
977 * nto-low.h (class nto_process_target): Update.
978 * win32-low.cc (win32_target_ops): Update.
979 (win32_read_inferior_memory): Turn into ...
980 (win32_process_target::read_memory): ... this.
981 (win32_write_inferior_memory): Turn into ...
982 (win32_process_target::write_memory): ... this.
983 * win32-low.h (class win32_process_target): Update.
984
985 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
986
987 Turn process_stratum_target's prepare_to_access_memory and
988 done_accessing_memory ops into methods of process_target.
989
990 * target.h (struct process_stratum_target): Remove the target ops.
991 (class process_target): Add the target ops.
992 * target.cc (process_target::prepare_to_access_memory): Define.
993 (process_target::done_accessing_memory): Define.
994 (prepare_to_access_memory): Update.
995 (done_accessing_memory): Update.
996
997 Update the derived classes and callers below.
998
999 * linux-low.cc (linux_target_ops): Update.
1000 (linux_prepare_to_access_memory): Turn into ...
1001 (linux_process_target::prepare_to_access_memory): ... this.
1002 (linux_done_accessing_memory): Turn into ...
1003 (linux_process_target::done_accessing_memory): ... this.
1004 * linux-low.h (class linux_process_target): Update.
1005 * lynx-low.cc (lynx_target_ops): Update.
1006 * nto-low.cc (nto_target_ops): Update.
1007 * win32-low.cc (win32_target_ops): Update.
1008
1009 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1010
1011 Turn process_stratum_target's fetch_registers and store_registers
1012 ops into methods of process_target.
1013
1014 * target.h (struct process_stratum_target): Remove the target ops.
1015 (class process_target): Add the target ops.
1016 (fetch_inferior_registers): Update the macro.
1017 (store_inferior_registers): Update the macro.
1018
1019 Update the derived classes and callers below.
1020
1021 * linux-low.cc (linux_target_ops): Update.
1022 (linux_fetch_registers): Turn into ...
1023 (linux_process_target::fetch_registers): ... this.
1024 (linux_store_registers): Turn into ...
1025 (linux_process_target::store_registers): ... this.
1026 * linux-low.h (class linux_process_target): Update.
1027 * lynx-low.cc (lynx_target_ops): Update.
1028 (lynx_fetch_registers): Turn into ...
1029 (lynx_process_target::fetch_registers): ... this.
1030 (lynx_store_registers): Turn into ...
1031 (lynx_process_target::store_registers): ... this.
1032 * lynx-low.h (class lynx_process_target): Update.
1033 * nto-low.cc (nto_target_ops): Update.
1034 (nto_fetch_registers): Turn into ...
1035 (nto_process_target::fetch_registers): ... this.
1036 (nto_store_registers): Turn into ...
1037 (nto_process_target::store_registers): ... this.
1038 * nto-low.h (class nto_process_target): Update.
1039 * win32-low.cc (win32_target_ops): Update.
1040 (win32_fetch_inferior_registers): Turn into ...
1041 (win32_process_target::fetch_registers): ... this.
1042 (win32_store_inferior_registers): Turn into ...
1043 (win32_process_target::store_registers): ... this.
1044 * win32-low.h (class win32_process_target): Update.
1045
1046 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1047
1048 Turn process_stratum_target's wait op into a method of
1049 process_target.
1050
1051 * target.h (struct process_stratum_target): Remove the target op.
1052 (class process_target): Add the target op.
1053
1054 Update the derived classes and callers below.
1055
1056 * target.cc (target_wait): Update.
1057 * linux-low.cc (linux_target_ops): Update.
1058 (linux_wait): Turn into ...
1059 (linux_process_target::wait): ... this.
1060 * linux-low.h (class linux_process_target): Update.
1061 * lynx-low.cc (lynx_target_ops): Update.
1062 (lynx_wait): Turn into ...
1063 (lynx_process_target::wait): ... this.
1064 * lynx-low.h (class lynx_process_target): Update.
1065 * nto-low.cc (nto_target_ops): Update.
1066 (nto_wait): Turn into ...
1067 (nto_process_target::wait): ... this.
1068 * nto-low.h (class nto_process_target): Update.
1069 * win32-low.cc (win32_target_ops): Update.
1070 (win32_wait): Turn into ...
1071 (win32_process_target::wait): ... this.
1072 (do_initial_child_stuff): Update.
1073 * win32-low.h (class win32_process_target): Update.
1074
1075 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1076
1077 Turn process_stratum_target's resume op into a method of
1078 process_target.
1079
1080 * target.h (struct process_stratum_target): Remove the target op.
1081 (class process_target): Add the target op.
1082
1083 Update the derived classes and callers below.
1084
1085 * server.cc (resume): Update.
1086 * target.cc (target_stop_and_wait): Update.
1087 (target_continue_no_signal): Update.
1088 (target_continue): Update.
1089 * linux-low.cc (linux_target_ops): Update.
1090 (linux_resume): Turn into ...
1091 (linux_process_target::resume): ... this.
1092 * linux-low.h (class linux_process_target): Update.
1093 * lynx-low.cc (lynx_target_ops): Update.
1094 (lynx_resume): Turn into ...
1095 (lynx_process_target::resume): ... this.
1096 * lynx-low.h (class lynx_process_target): Update.
1097 * nto-low.cc (nto_target_ops): Update.
1098 (nto_resume): Turn into ...
1099 (nto_process_target::resume): ... this.
1100 * nto-low.h (class nto_process_target): Update.
1101 * win32-low.cc (win32_target_ops): Update.
1102 (win32_resume): Turn into ...
1103 (win32_process_target::resume): ... this.
1104 (win32_process_target::detach): Update.
1105 (do_initial_child_stuff): Update.
1106 * win32-low.h (class win32_process_target): Update.
1107
1108 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1109
1110 Turn process_stratum_target's thread_alive op into a method of
1111 process_target.
1112
1113 * target.h (struct process_stratum_target): Remove the target op.
1114 (class process_target): Add the target op.
1115 (mythread_alive): Update the macro.
1116
1117 Update the derived classes and callers below.
1118
1119 * linux-low.cc (linux_target_ops): Update.
1120 (linux_thread_alive): Turn into ...
1121 (linux_process_target::thread_alive): ... this.
1122 (wait_for_sigstop): Update.
1123 * linux-low.h (class linux_process_target): Update.
1124 * lynx-low.cc (lynx_target_ops): Update.
1125 (lynx_thread_alive): Turn into ...
1126 (lynx_process_target::thread_alive): ... this.
1127 * lynx-low.h (class lynx_process_target): Update.
1128 * nto-low.cc (nto_target_ops): Update.
1129 (nto_thread_alive): Turn into ...
1130 (nto_process_target::thread_alive): ... this.
1131 * nto-low.h (class nto_process_target): Update.
1132 * win32-low.cc (win32_target_ops): Update.
1133 (win32_thread_alive): Turn into ...
1134 (win32_process_target::thread_alive): ... this.
1135 * win32-low.h (class win32_process_target): Update.
1136
1137 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1138
1139 Turn process_stratum_target's join op into a method of
1140 process_target.
1141
1142 * target.h (struct process_stratum_target): Remove the target op.
1143 (class process_target): Add the target op.
1144 (join_inferior): Update the macro.
1145
1146 Update the derived classes and callers below.
1147
1148 * linux-low.cc (linux_target_ops): Update.
1149 (linux_join): Turn into ...
1150 (linux_process_target::join): ... this.
1151 * linux-low.h (class linux_process_target): Update.
1152 * lynx-low.cc (lynx_target_ops): Update.
1153 (lynx_join): Turn into ...
1154 (lynx_process_target::join): ... this.
1155 * lynx-low.h (class lynx_process_target): Update.
1156 * nto-low.cc (nto_target_ops): Update.
1157 (nto_process_target::join): Define.
1158 * nto-low.h (class nto_process_target): Update.
1159 * win32-low.cc (win32_target_ops): Update.
1160 (win32_join): Turn into ...
1161 (win32_process_target::join): ... 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 mourn 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
1172 Update the derived classes and callers below.
1173
1174 * target.cc (target_mourn_inferior): Update.
1175 * linux-low.cc (linux_target_ops): Update.
1176 (linux_mourn): Turn into ...
1177 (linux_process_target::mourn): ... this.
1178 (handle_extended_wait): Update.
1179 (linux_process_target::kill): Update.
1180 (linux_process_target::detach): Update.
1181 * linux-low.h (class linux_process_target): Update.
1182 * lynx-low.cc (lynx_target_ops): Update.
1183 (lynx_mourn): Turn into ...
1184 (lynx_process_target::mourn): ... this.
1185 * lynx-low.h (class lynx_process_target): Update.
1186 * nto-low.cc (nto_target_ops): Update.
1187 (nto_mourn): Turn into ...
1188 (nto_process_target::mourn): ... this.
1189 * nto-low.h (class nto_process_target): Update.
1190 * win32-low.cc (win32_target_ops): Update.
1191 (win32_mourn): Turn into ...
1192 (win32_process_target::mourn): ... this.
1193 * win32-low.h (class win32_process_target): Update.
1194
1195 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1196
1197 Turn process_stratum_target's detach op into a method of
1198 process_target.
1199
1200 * target.h (struct process_stratum_target): Remove the target op.
1201 (class process_target): Add the target op.
1202 (detach_inferior): Update the macro.
1203
1204 Update the derived classes and callers below.
1205
1206 * linux-low.cc (linux_target_ops): Update.
1207 (linux_detach): Turn into ...
1208 (linux_process_target::detach): ... this.
1209 * linux-low.h (class linux_process_target): Update.
1210 * lynx-low.cc (lynx_target_ops): Update.
1211 (lynx_detach): Turn into ...
1212 (lynx_process_target::detach): ... this.
1213 * lynx-low.h (class lynx_process_target): Update.
1214 * nto-low.cc (nto_target_ops): Update.
1215 (nto_detach): Turn into ...
1216 (nto_process_target::detach): ... this.
1217 * nto-low.h (class nto_process_target): Update.
1218 * win32-low.cc (win32_target_ops): Update.
1219 (win32_detach): Turn into ...
1220 (win32_process_target::detach): ... this.
1221 * win32-low.h (class win32_process_target): Update.
1222
1223 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1224
1225 Turn process_stratum_target's kill op into a method of
1226 process_target.
1227
1228 * target.h (struct process_stratum_target): Remove the target op.
1229 (class process_target): Add the target op.
1230
1231 Update the derived classes and callers below.
1232
1233 * target.cc (kill_inferior): Update.
1234 * linux-low.cc (linux_target_ops): Update.
1235 (linux_kill): Turn into ...
1236 (linux_process_target::kill): ... this.
1237 * linux-low.h (class linux_process_target): Update.
1238 * lynx-low.cc (lynx_target_ops): Update.
1239 (lynx_kill): Turn into ...
1240 (lynx_process_target::kill): ... this.
1241 * lynx-low.h (class lynx_process_target): Update.
1242 * nto-low.cc (nto_target_ops): Update.
1243 (nto_kill): Turn into ...
1244 (nto_process_target::kill): ... this.
1245 * nto-low.h (class nto_process_target): Update.
1246 * win32-low.cc (win32_target_ops): Update.
1247 (win32_kill): Turn into ...
1248 (win32_process_target::kill): ... this.
1249 * win32-low.h (class win32_process_target): Update.
1250
1251 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1252
1253 Turn process_stratum_target's attach op into a method of
1254 process_target.
1255
1256 * target.h (struct process_stratum_target): Remove the target op.
1257 (class process_target): Add the target op.
1258 (myattach): Update the macro.
1259
1260 Update the derived classes and callers below.
1261
1262 * linux-low.cc (linux_target_ops): Update.
1263 (linux_attach): Turn into ...
1264 (linux_process_target::attach): ... this.
1265 * linux-low.h (class linux_process_target): Update.
1266 * lynx-low.cc (lynx_target_ops): Update.
1267 (lynx_attach): Turn into ...
1268 (lynx_process_target::attach): ... this.
1269 * lynx-low.h (class lynx_process_target): Update.
1270 * nto-low.cc (nto_target_ops): Update.
1271 (nto_attach): Turn into ...
1272 (nto_process_target::attach): ... this.
1273 * nto-low.h (class nto_process_target): Update.
1274 * win32-low.cc (win32_target_ops): Update.
1275 (win32_attach): Turn into ...
1276 (win32_process_target::attach): ... this.
1277 * win32-low.h (class win32_process_target): Update.
1278
1279 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1280
1281 Turn process_stratum_target's post_create_inferior op into a method
1282 of process_target.
1283
1284 * target.h (struct process_stratum_target): Remove the target op.
1285 (class process_target): Add the target op.
1286 (target_post_create_inferior): Update the macro.
1287 * target.cc (process_target::post_create_inferior): Define.
1288
1289 Update the derived classes and callers below.
1290
1291 * linux-low.cc (linux_target_ops): Update.
1292 (linux_post_create_inferior): Turn into ...
1293 (linux_process_target::post_create_inferior): ... this.
1294 * linux-low.h (class linux_process_target): Update.
1295 * lynx-low.cc (lynx_target_ops): Update.
1296 * nto-low.cc (nto_target_ops): Update.
1297 * win32-low.cc (win32_target_ops): Update.
1298
1299 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1300
1301 Turn process_stratum_target's create_inferior op into a method of
1302 process_target.
1303
1304 * target.h (struct process_stratum_target): Remove the target op.
1305 (class process_target): Add the target op.
1306 (create_inferior): Rename the macro to ...
1307 (target_create_inferior): ... this.
1308
1309 Update the derived classes and callers below.
1310
1311 * server.cc (handle_v_run): Update.
1312 (captured_main): Update.
1313 (process_serial_event): Update.
1314 * linux-low.cc (linux_target_ops): Update.
1315 (linux_create_inferior): Turn into ...
1316 (linux_process_target::create_inferior): ... this.
1317 * linux-low.h (class linux_process_target): Update.
1318 * lynx-low.cc (lynx_target_ops): Update.
1319 (lynx_create_inferior): Turn into ...
1320 (lynx_process_target::create_inferior): ... this.
1321 * lynx-low.h (class lynx_process_target): Update.
1322 * nto-low.cc (nto_target_ops): Update.
1323 (nto_create_inferior): Turn into ...
1324 (nto_process_target::create_inferior): ... this.
1325 * nto-low.h (class nto_process_target): Update.
1326 * win32-low.cc (win32_target_ops): Update.
1327 (win32_create_inferior): Turn into ...
1328 (win32_process_target::create_inferior): ... this.
1329 * win32-low.h (class win32_process_target): Update.
1330
1331 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1332
1333 * target.h (class process_target): New class definition.
1334 (struct process_stratum_target) <pt>: New field with type
1335 'process_target*'.
1336 * linux-low.h (class linux_process_target): Define as a derived
1337 class of 'process_target'.
1338 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1339 as the 'pt' field.
1340 * lynx-low.h (class lynx_process_target): Define as a derived
1341 class of 'process_target'.
1342 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1343 as the 'pt' field.
1344 * nto-low.h (class nto_process_target): Define as a derived
1345 class of 'process_target'.
1346 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1347 as the 'pt' field.
1348 * win32-low.h (class win32_process_target): Define as a derived
1349 class of 'process_target'.
1350 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1351 as the 'pt' field.
1352
1353 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1354
1355 * configure: Regenerate.
1356
1357 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1358 Andrew Burgess <andrew.burgess@embecosm.com>
1359
1360 * linux-riscv-low.cc: New file.
1361 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1362 and nat/riscv-linux-tdesc.c.
1363 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1364 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1365 Define.
1366
1367 2020-02-14 Tom Tromey <tom@tromey.com>
1368
1369 * acinclude.m4: Don't include acx_configure_dir.m4.
1370 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1371 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1372 (all, install-only, uninstall, clean-info, clean)
1373 (maintainer-clean): Don't recurse.
1374 (subdir_do, all-lib): Remove.
1375 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1376 (GNULIB_H): Remove.
1377 (generated_files): Update.
1378 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1379 * configure: Rebuild.
1380 * configure.ac: Don't configure gnulib or libiberty.
1381 (GNULIB): Update.
1382
1383 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1384
1385 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1386 preparing the command line for CreateProcess.
1387 (win32_create_inferior): Reflect the program name in debugging
1388 output that shows the process and its command line.
1389
1390 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1391
1392 * Makefile.in: Rename source files from .c to .cc.
1393 * %.c: Rename to %.cc.
1394 * configure.ac: Rename server.c to server.cc.
1395 * configure: Re-generate.
1396
1397 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1398
1399 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1400
1401 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1402
1403 * win32-low.c (win32_create_inferior): Set signal_pid.
1404
1405 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1406 Pedro Alves <palves@redhat.com>
1407
1408 Skip building gdbserver in a cross-configuration.
1409 * configure.srv: Set $gdbserver_host depending on whether $target
1410 is $host. Use $gdbserver_host instead of $host.
1411
1412 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1413
1414 * configure: Re-generate.
1415
1416 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1417
1418 * configure: Re-generate.
1419
1420 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1421
1422 * acinclude.m4: Update warning.m4 path.
1423
1424 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1425
1426 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1427 (handle_exception): Set siginfo_er.
1428 (win32_xfer_siginfo): New function.
1429
1430 2020-02-07 Tom Tromey <tom@tromey.com>
1431 Pedro Alves <palves@redhat.com>
1432
1433 * README: Update build documentation.
1434 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1435 host, not target.
1436 * configure.ac: Update paths.
1437 * configure: Rebuild.
1438 * acinclude.m4: Update paths.
1439 * Makefile.in: Update include paths.
1440 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1441 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1442 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1443 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1444 (%-generated.c): Update paths.
1445 * Move entire directory from ../gdb/gdbserver.
1446
1447 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1448
1449 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1450
1451 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1452
1453 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1454 assignment instead of srv_linux_obj.
1455
1456 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1457
1458 * server.c (handle_qxfer_libraries): Write segment-address with
1459 paddress.
1460
1461 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1462
1463 * Makefile.in (install-strip): New target.
1464 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1465 * aclocal.m4: Regenerate.
1466 * configure: Regenerate.
1467 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1468
1469 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1470
1471 * Makefile.in (SFILES): Adjust paths to point to real files.
1472 (OBS): Move waitstatus.o to target/waitstatus.o.
1473 (TAGS): Transform paths appropriately.
1474 (%.o): Rename to...
1475 (nat/%.o): ... this pattern rule.
1476 (%.o): Rename to...
1477 (target/%.o): ... this pattern rule.
1478 * configure.srv: Adjust paths throughout to include nat/ prefix
1479 with the revant files.
1480 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1481 * configure: Regenerate.
1482
1483 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1484
1485 * Makefile.in (TAGS): Remove config files from the recipe.
1486
1487 2020-01-14 Tom Tromey <tom@tromey.com>
1488
1489 * configure: Rebuild.
1490 * configure.ac: Remove any checks that were added to common.m4.
1491 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1492 lib-link.m4.
1493
1494 2020-01-14 Tom Tromey <tom@tromey.com>
1495
1496 * server.h: Include config.h.
1497 * gdbreplay.c: Include config.h.
1498 * configure: Rebuild.
1499 * configure.ac: Don't source common.host.
1500 * acinclude.m4: Update path.
1501 * Makefile.in (INCSUPPORT): New variable.
1502 (INCLUDE_CFLAGS): Add INCSUPPORT.
1503 (SFILES): Update paths.
1504 (version-generated.c): Update path to create-version.sh.
1505 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1506
1507 2020-01-14 Tom Tromey <tom@tromey.com>
1508
1509 * configure.ac (LIBS): Use WIN32APILIBS.
1510 (USE_WIN32API): Don't define.
1511 * configure: Rebuild.
1512
1513 2020-01-14 Tom Tromey <tom@tromey.com>
1514
1515 * configure: Rebuild.
1516
1517 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1518
1519 * Makefile.in (%-generated.c): Remove rule for files from
1520 regformats/i386.
1521
1522 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1523
1524 * configure: Re-generate.
1525
1526 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1527
1528 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1529 Define to static.
1530 * tracepoint.c (stop_tracing, flush_trace_buffer,
1531 about_to_request_buffer_space, get_trace_state_variable_value,
1532 set_trace_state_variable_value, gdb_collect): Add declaration.
1533
1534 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1535
1536 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1537 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1538 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1539 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1540 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1541 static.
1542
1543 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1544
1545 * inferiors.c: Include gdbsupport/common-inferior.h.
1546
1547 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1548
1549 * hostio-errno.c: Include hostio.h.
1550
1551 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1552
1553 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1554 prerequisite.
1555
1556 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1557
1558 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1559 * linux-arm-tdesc.h: Include arch/arm.h.
1560
1561 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1562
1563 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1564
1565 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1566
1567 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1568 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1569
1570 2020-01-10 Pedro Alves <palves@redhat.com>
1571
1572 * fork-child.c (post_fork_inferior): Pass target down to
1573 startup_inferior.
1574 * inferiors.c (switch_to_thread): Add process_stratum_target
1575 parameter.
1576 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1577 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1578 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1579 * remote-utils.c (prepare_resume_reply): Pass the target to
1580 switch_to_thread.
1581 * target.c (the_target): Now a process_stratum_target.
1582 (done_accessing_memory): Pass the target to switch_to_thread.
1583 (set_target_ops): Ajust to use process_stratum_target.
1584 * target.h (struct target_ops): Rename to ...
1585 (struct process_stratum_target): ... this.
1586 (the_target, set_target_ops): Adjust.
1587 (prepare_to_access_memory): Adjust comment.
1588 * win32-low.c (child_xfer_memory): Adjust to use
1589 process_stratum_target.
1590 (win32_target_ops): Now a process_stratum_target.
1591
1592 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1593 Pedro Alves <palves@redhat.com>
1594
1595 * win32-low.c (get_child_debug_event): Extract the fatal exception
1596 from the exit status and convert to the equivalent Posix signal
1597 number.
1598 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1599 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1600
1601 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1602
1603 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1604
1605 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1606
1607 * server.c (gdbserver_version): Change copyright year to 2020.
1608 * gdbreplay.c (gdbreplay_version): Likewise.
1609
1610 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1611
1612 * configure: Regenerate.
1613 * configure.ac: Quote variable arguments of test.
1614
1615 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1616
1617 * Makefile.in: Fix build with GNU Make 3.81
1618
1619 2019-12-16 Tom Tromey <tromey@adacore.com>
1620
1621 * server.c (get_exec_file): Constify result.
1622
1623 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1624
1625 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1626 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1627 * config.in: Regenerate.
1628 * configure: Regenerate.
1629 * configure.ac: Don't check for strerror.
1630 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1631 Call safe_strerror instead of strerror.
1632 * server.h (strerror): Remove this now-unnecessary declaration.
1633 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1634 strerror.
1635 (gdb_agent_helper_thread): Likewise.
1636 * utils.c (perror_with_name): Likewise.
1637
1638 2019-11-26 Tom Tromey <tom@tromey.com>
1639
1640 * configure, config.in: Rebuild.
1641
1642 2019-11-26 Tom Tromey <tom@tromey.com>
1643
1644 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1645 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1646 gdb_sigmask.
1647 * configure, config.in: Rebuild.
1648
1649 2019-11-26 Tom Tromey <tom@tromey.com>
1650
1651 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1652 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1653 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1654 * acinclude.m4: Include ax_pthread.m4.
1655 * config.in, configure: Rebuild.
1656
1657 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1658
1659 * debug.c (debug_set_output): Call safe_strerror instead of
1660 strerror.
1661 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1662 (linux_kill_one_lwp): Likewise.
1663 (linux_detach_one_lwp): Likewise.
1664 (linux_wait_for_event_filtered): Likewise.
1665 (store_register): Likewise.
1666 * lynx-low.c (lynx_attach): Likewise.
1667 * mem-break.c (insert_memory_breakpoint): Likewise.
1668 (remove_memory_breakpoint): Likewise.
1669 (delete_fast_tracepoint_jump): Likewise.
1670 (set_fast_tracepoint_jump): Likewise.
1671 (uninsert_fast_tracepoint_jumps_at): Likewise.
1672 (reinsert_fast_tracepoint_jumps_at): Likewise.
1673 * nto-low.c (nto_xfer_memory): Likewise.
1674 (nto_resume): Likewise.
1675
1676 2019-11-20 Luis Machado <luis.machado@linaro.org>
1677
1678 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1679 instead of register count.
1680 * tdesc.c (tdesc_contains_feature): New function.
1681 * tdesc.h (tdesc_contains_feature): New prototype.
1682
1683 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1684
1685 * Makefile.in: Add safe-strerror.c.
1686 * configure: Regenerate.
1687 * configure.ac: Don't source common.host.
1688
1689 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1690
1691 * config.in: Regenerate.
1692 * configure: Regenerate.
1693
1694 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1695
1696 * ax.c (ax_printf): Handle size_t_arg.
1697
1698 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1699
1700 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1701 * mi/mi-main.c (output_cores): Likewise.
1702 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1703 (linux_xfer_osdata_modules): Likewise.
1704 * remote.c (register_remote_support_xml): Likewise.
1705 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1706 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1707
1708 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1709
1710 * configure: Regenerate.
1711 * configure.ac: Remove check for strerror_r.
1712
1713 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1714
1715 * config.in: Regenerate.
1716 * configure: Regenerate.
1717 * configure.ac: Also check for strerror_r.
1718
1719 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1720
1721 * ax.h (debug_agent): Remove duplicate declaration.
1722
1723 2019-10-26 Tom de Vries <tdevries@suse.de>
1724
1725 * linux-aarch64-low.c: Fix typos in comments.
1726 * linux-arm-low.c: Same.
1727 * linux-low.c: Same.
1728 * linux-ppc-low.c: Same.
1729 * proc-service.c: Same.
1730 * regcache.h: Same.
1731 * server.c: Same.
1732 * tracepoint.c: Same.
1733 * win32-low.c: Same.
1734
1735 2019-10-25 Tom Tromey <tromey@adacore.com>
1736
1737 * utils.c (xstrdup): Remove.
1738
1739 2019-10-23 Tom Tromey <tom@tromey.com>
1740
1741 * configure, config.in: Rebuild.
1742
1743 2019-10-23 Tom Tromey <tom@tromey.com>
1744
1745 * configure: Rebuild.
1746 * acinclude.m4: Use m4_include, not sinclude.
1747
1748 2019-10-17 Tom Tromey <tromey@adacore.com>
1749
1750 * configure: Rebuild.
1751 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1752 in AC_CONFIG_FILES invocation.
1753 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1754 invocation.
1755
1756 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1757
1758 * server.c: Include xml-builtin.h.
1759 (get_xml_features): Don't declare xml_builtins here.
1760
1761 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1762
1763 * Makefile.in: Remove references to vec-ipa.o.
1764
1765 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1766
1767 * Makefile.in: Remove references to vec.c.
1768
1769 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1770
1771 * server.c (server_waiting): Change to bool.
1772 (extended_protocol): Likewise.
1773 (response_needed): Likewise.
1774 (exit_requested): Likewise.
1775 (run_once): Likewise.
1776 (report_no_resumed): Likewise.
1777 (non_stop): Likewise.
1778 (disable_packet_vCont): Likewise.
1779 (disable_packet_Tthread): Likewise.
1780 (disable_packet_qC): Likewise.
1781 (disable_packet_qfThreadInfo): Likewise.
1782 (handle_general_set): Update.
1783 (handle_detach): Update.
1784 (handle_monitor_command): Update.
1785 (handle_query): Update.
1786 (captured_main): Update.
1787 (process_serial_event): Update.
1788 * server.h (server_waiting): Change to bool.
1789 (disable_packet_vCont): Likewise.
1790 (disable_packet_Tthread): Likewise.
1791 (disable_packet_qC): Likewise.
1792 (disable_packet_qfThreadInfo): Likewise.
1793 (run_once): Likewise.
1794 (non_stop): Likewise.
1795 * target.c (target_stop_and_wait): Update.
1796
1797 2019-10-02 Tom Tromey <tromey@adacore.com>
1798
1799 * Makefile.in (SFILES): Add common-inferior.c.
1800 (OBS): Add common-inferior.o.
1801 * server.c (startup_with_shell): Don't define.
1802
1803 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1804
1805 * linux-low.c (linux_low_read_btrace): Update for change to
1806 std::vector.
1807
1808 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1809
1810 * debug.c (debug_threads): Remove comment in favor of the header.
1811 * debug.h (using_threads): Add declaration.
1812 (debug_threads): Add comment.
1813 * linux-aarch64-low.c: Include debug.h and remove declaration of
1814 debug_threads.
1815 * nto-low.c: Likewise.
1816 * remote-utils.c: Likewise.
1817 * thread-db.c: Likewise.
1818
1819 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1820
1821 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1822 and powerpc-cell64l-ipa.o.
1823 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1824 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1825 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1826 (spu*-*-*): Remove.
1827
1828 * spu-low.c: Remove file.
1829
1830 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1831 (parse_spufs_run): Remove.
1832 (ppc_get_pc): Remove Cell/B.E. support.
1833 (ppc_set_pc): Likewise.
1834 (ppc_breakpoint_at): Likewise.
1835 (ppc_arch_setup): Likewise.
1836 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1837 tdesc_powerpc_cell32l.
1838 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1839 or init_registers_powerpc_cell32l.
1840 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1841 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1842 or init_registers_powerpc_cell32l.
1843 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1844 (init_registers_powerpc_cell32l): Remove prototype.
1845 (init_registers_powerpc_cell64l): Likewise.
1846
1847 * target.h (struct target_ops): Remove qxfer_spu member.
1848 * server.c (handle_qxfer_spu): Remove.
1849 (qxfer_packets): Remove entry for "spu".
1850 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1851 * linux-low.c (SPUFS_MAGIC): Remove.
1852 (spu_enumerate_spu_ids): Remove.
1853 (linux_qxfer_spu): Remove.
1854 (linux_target_ops): Remove qxfer_spu member.
1855 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1856 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1857 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1858
1859 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1860
1861 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1862 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1863 * config.in: Regenerate.
1864 * configure: Regenerate.
1865
1866 2019-08-15 Tom Tromey <tromey@adacore.com>
1867
1868 * target.c (target_write_memory): Use gdb::byte_vector.
1869
1870 2019-08-15 Tom Tromey <tromey@adacore.com>
1871
1872 * tracepoint.c (write_inferior_data_pointer)
1873 (write_inferior_integer, write_inferior_int8)
1874 (write_inferior_uinteger, m_tracepoint_action_download)
1875 (r_tracepoint_action_download, x_tracepoint_action_download)
1876 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1877 (download_agent_expr, download_tracepoint_1)
1878 (download_trace_state_variables, upload_fast_traceframes): Update.
1879 * server.c (gdb_write_memory): Update.
1880 * remote-utils.c (relocate_instruction): Update.
1881 * proc-service.c (ps_pdwrite): Update.
1882 * mem-break.c (remove_memory_breakpoint)
1883 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1884 (uninsert_fast_tracepoint_jumps_at)
1885 (reinsert_fast_tracepoint_jumps_at): Update.
1886 * linux-x86-low.c (append_insns)
1887 (i386_install_fast_tracepoint_jump_pad)
1888 (amd64_write_goto_address, i386_write_goto_address): Update.
1889 * linux-s390-low.c (append_insns, s390_write_goto_address):
1890 Update.
1891 * linux-ppc-low.c (ppc_relocate_instruction)
1892 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1893 (ppc_write_goto_address): Update.
1894 * linux-aarch64-low.c (append_insns): Update.
1895 * target.h (struct target_ops): Update.
1896 (write_inferior_memory): Don't declare.
1897 * target.c (target_write_memory): Rename from
1898 write_inferior_memory. Remove old target_write_memory.
1899
1900 2019-08-15 Tom Tromey <tromey@adacore.com>
1901
1902 * target.c (write_inferior_memory): Use std::vector.
1903
1904 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1905
1906 PR build/24886
1907 * configure.ac: Drop enable-libmcheck support.
1908 * configure, config.in: Rebuild.
1909 * acinclude.m4: Don't include it.
1910
1911 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1912
1913 * configure.srv: Remove Arm xml files.
1914
1915 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1916
1917 * configure.srv: Add new files. Remove xml generated files.
1918 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1919 registers.
1920 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1921 * linux-aarch32-tdesc.c: New file.
1922 * linux-aarch32-tdesc.h: New file.
1923 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1924 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1925 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1926 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1927 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1928 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1929 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1930 (arm_read_description): Call arm_linux_read_description.
1931 (initialize_low_arch): Don't init registers.
1932 * linux-arm-tdesc.c: New file.
1933 * linux-arm-tdesc.h: New file.
1934
1935 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1936
1937 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1938 Move counter inside for.
1939 (arm_read_description): Check ptrace earlier.
1940 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1941
1942 2019-07-09 Tom Tromey <tom@tromey.com>
1943
1944 * configure: Rebuild.
1945 * configure.ac: Change common to gdbsupport.
1946 * acinclude.m4: Change common to gdbsupport.
1947 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1948 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1949 common to gdbsupport.
1950 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1951 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1952 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1953 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1954 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1955 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1956 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1957 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1958 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1959 common to gdbsupport.
1960
1961 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1962
1963 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1964 defines.
1965 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1966
1967 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1968
1969 * configure.srv: Remove legacy xml.
1970 * linux-aarch64-low.c (initialize_low_arch): Remove
1971 initialize_low_tdesc call.
1972 * linux-aarch64-tdesc-selftest.c: Remove file.
1973 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1974 * linux-x86-low.c (initialize_low_arch): Remove
1975 initialize_low_tdesc call.
1976 * linux-x86-tdesc-selftest.c: Remove file.
1977 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1978
1979 2019-06-20 Tom de Vries <tdevries@suse.de>
1980
1981 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1982 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1983
1984 2019-06-19 Tom de Vries <tdevries@suse.de>
1985
1986 * debug.h (debug_write): Change return type to ssize_t.
1987 * debug.c (debug_write): Same.
1988
1989 2019-06-14 Tom Tromey <tom@tromey.com>
1990
1991 * configure.ac: Use new path to gnulib.
1992 * configure: Rebuild.
1993 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1994 to gnulib.
1995
1996 2019-06-11 Tom Tromey <tom@tromey.com>
1997
1998 * Makefile.in (SFILES): Add alloc.c.
1999 (OBS): Add alloc.o.
2000 (IPA_OBJS): Add alloc-ipa.o.
2001 (alloc-ipa.o): New target.
2002 (%.o: ../%.c): New pattern rule.
2003
2004 2019-06-10 Tom Tromey <tromey@adacore.com>
2005
2006 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2007 end warning with a newline.
2008 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2009 newline.
2010 * thread-db.c (attach_thread): Don't end warning with a newline.
2011 (thread_db_notice_clone): Likewise.
2012 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2013 newline.
2014 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2015 end warning with a newline.
2016
2017 2019-06-04 Pedro Alves <palves@redhat.com>
2018
2019 * server.c (captured_main): Use make_unique_xstrdup.
2020
2021 2019-06-02 Tom Tromey <tom@tromey.com>
2022
2023 * gdbreplay.c (fromhex): Remove.
2024 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2025
2026 2019-05-29 Tom Tromey <tromey@adacore.com>
2027
2028 * configure: Rebuild.
2029
2030 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2031
2032 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2033 sign extension code on 32-bit builds.
2034
2035 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2036
2037 * remote-utils.c:
2038 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2039
2040 2019-04-19 Tom Tromey <tom@tromey.com>
2041
2042 * server.c (struct vstop_notif): Derive from notif_event.
2043 <base>: Remove.
2044 (queue_stop_reply): Update.
2045 (remove_all_on_match_ptid): Change type. Rewrite.
2046 (discard_queued_stop_replies): Rewrite.
2047 (in_queued_stop_replies_ptid): Change type.
2048 (in_queued_stop_replies): Rewrite.
2049 (notif_stop): Update.
2050 (queue_stop_reply_callback): Update.
2051 (captured_main): Don't call initialize_notif.
2052 (push_stop_notification): Update.
2053 * notif.c (notif_write_event, handle_notif_ack)
2054 (notif_event_enque, notif_push): Update.
2055 (notif_event_xfree, initialize_notif): Remove.
2056 * notif.h (struct notif_event): Include <list>, not
2057 "common/queue.h".
2058 (struct notif_server) <queue>: Now a std::list.
2059 (notif_event_p): Remove typedef.
2060 (initialize_notif): Don't declare.
2061 (struct notif_event): Add virtual destructor.
2062
2063 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2064
2065 * ax.c (ax_vdebug): Call debug_printf.
2066 * debug.c (debug_write): New function.
2067 * debug.h (debug_write): New declaration.
2068 * linux-low.c (sigchld_handler): Call debug_write.
2069
2070 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2071
2072 * debug.c (debug_set_output): New function.
2073 (debug_vprintf): Send output to debug_file.
2074 (debug_flush): Likewise.
2075 * debug.h (debug_set_output): New declaration.
2076 * server.c (handle_monitor_command): Add debug-file option.
2077 (captured_main): Likewise.
2078
2079 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2080
2081 * debug.c (remote_debug): Add definition.
2082 * debug.h (remote_debug): Add declaration.
2083 * hostio.c (remote_debug): Remove declaration.
2084 * remote-utils.c (struct ui_file): Likewise.
2085 (remote_debug): Likewise.
2086 * remote-utils.h (remote_debug): Likewise,
2087 * server.c (remote_debug): Remove definition.
2088
2089 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2090
2091 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2092 when using a 64-bit gdbserver.
2093
2094 2019-04-09 Tom Tromey <tromey@adacore.com>
2095
2096 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2097
2098 2019-04-08 Tom Tromey <tom@tromey.com>
2099
2100 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2101 throw.
2102 (linux_resume_one_lwp): Likewise.
2103
2104 2019-04-08 Tom Tromey <tom@tromey.com>
2105
2106 * gdbreplay.c: Update.
2107 * linux-low.c: Update.
2108 * server.c: Update.
2109
2110 2019-04-08 Tom Tromey <tom@tromey.com>
2111
2112 * server.c: Use C++ exception handling.
2113 * linux-low.c: Use C++ exception handling.
2114 * gdbreplay.c: Use C++ exception handling.
2115
2116 2019-04-08 Tom Tromey <tom@tromey.com>
2117
2118 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2119 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2120 (captured_main, main): Update.
2121 * gdbreplay.c (main): Update.
2122
2123 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2124
2125 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2126 value in argument pointer, return 1 if the entry is found and 0
2127 otherwise. Move comment.
2128 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2129 * linux-low.h (linux_get_auxv): Declare.
2130 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2131
2132 2019-04-05 Tom Tromey <tromey@adacore.com>
2133
2134 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2135 variables.
2136
2137 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2138
2139 * linux-low.c (AT_HWCAP2): Add define if not already included.
2140
2141 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2142
2143 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2144 (aarch64_arch_setup): Call linux_get_hwcap.
2145 * linux-arm-low.c (arm_get_hwcap): Remove function.
2146 (arm_read_description): Call linux_get_hwcap.
2147 * linux-low.c (linux_get_auxv): New function.
2148 (linux_get_hwcap): Likewise.
2149 (linux_get_hwcap2): Likewise.
2150 * linux-low.h (linux_get_hwcap): New declaration.
2151 (linux_get_hwcap2): Likewise.
2152 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2153 (ppc_arch_setup): Call linux_get_hwcap.
2154 * linux-s390-low.c (s390_get_hwcap): Remove function.
2155 (s390_arch_setup): Call linux_get_hwcap.
2156
2157 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2158 Jiong Wang <jiong.wang@arm.com>
2159
2160 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2161 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2162 to fail.
2163 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2164
2165 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2166 Jiong Wang <jiong.wang@arm.com>
2167
2168 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2169 (aarch64_get_hwcap): New function.
2170 (aarch64_arch_setup): Read APIA hwcap.
2171
2172 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2173 Jiong Wang <jiong.wang@arm.com>
2174
2175 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2176 (initialize_low_tracepoint): Likewise.
2177 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2178 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2179 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2180 (aarch64_linux_read_description): Likewise.
2181 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2182
2183 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2184
2185 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2186 i386_create_target_description for 'segments' parameter.
2187 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2188 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2189 * win32-i386-low.c (i386_arch_setup): Likewise.
2190
2191 2019-03-12 Tom Tromey <tromey@adacore.com>
2192
2193 * linux-low.c (iterate_over_lwps): Update.
2194
2195 2019-03-06 Tom Tromey <tom@tromey.com>
2196
2197 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2198 (captured_main): Use SCOPE_EXIT.
2199
2200 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2201
2202 * configure.srv: Use '$enable_unittest' instead of '$development'
2203 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2204 case.
2205
2206 2019-02-27 Tom Tromey <tromey@adacore.com>
2207
2208 * gdbreplay.c (logchar): Handle \r\n.
2209
2210 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2211
2212 * linux-low.c (linux_attach): Add process before lwp.
2213 * server.c (attach_inferior): Check if already attached.
2214
2215 2019-02-07 Tom Tromey <tom@tromey.com>
2216
2217 * x86-tdesc.h: Rename include guard.
2218 * x86-low.h: Add include guard.
2219 * wincecompat.h: Rename include guard.
2220 * win32-low.h: Add include guard.
2221 * utils.h: Rename include guard.
2222 * tracepoint.h: Rename include guard.
2223 * tdesc.h: Rename include guard.
2224 * target.h: Rename include guard.
2225 * server.h: Rename include guard.
2226 * remote-utils.h: Rename include guard.
2227 * regcache.h: Rename include guard.
2228 * nto-low.h: Rename include guard.
2229 * notif.h: Add include guard.
2230 * mem-break.h: Rename include guard.
2231 * lynx-low.h: Add include guard.
2232 * linux-x86-tdesc.h: Add include guard.
2233 * linux-s390-tdesc.h: Add include guard.
2234 * linux-ppc-tdesc-init.h: Add include guard.
2235 * linux-low.h: Add include guard.
2236 * linux-aarch64-tdesc.h: Add include guard.
2237 * linux-aarch32-low.h: Add include guard.
2238 * inferiors.h: Rename include guard.
2239 * i387-fp.h: Rename include guard.
2240 * hostio.h: Rename include guard.
2241 * gdbthread.h: Rename include guard.
2242 * gdb_proc_service.h: Rename include guard.
2243 * event-loop.h: Rename include guard.
2244 * dll.h: Rename include guard.
2245 * debug.h: Rename include guard.
2246 * ax.h: Rename include guard.
2247
2248 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2249
2250 PR gdb/23985
2251 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2252 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2253
2254 2019-01-25 Tom Tromey <tom@tromey.com>
2255
2256 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2257
2258 2019-01-25 Tom Tromey <tom@tromey.com>
2259
2260 * win32-low.c: Fix common/ includes.
2261 * win32-i386-low.c: Fix common/ includes.
2262 * tracepoint.c: Fix common/ includes.
2263 * thread-db.c: Fix common/ includes.
2264 * target.h: Fix common/ includes.
2265 * symbol.c: Fix common/ includes.
2266 * spu-low.c: Fix common/ includes.
2267 * server.h: Fix common/ includes.
2268 * server.c: Fix common/ includes.
2269 * remote-utils.c: Fix common/ includes.
2270 * regcache.h: Fix common/ includes.
2271 * regcache.c: Fix common/ includes.
2272 * nto-x86-low.c: Fix common/ includes.
2273 * notif.h: Fix common/ includes.
2274 * mem-break.h: Fix common/ includes.
2275 * lynx-low.c: Fix common/ includes.
2276 * lynx-i386-low.c: Fix common/ includes.
2277 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2278 * linux-x86-low.c: Fix common/ includes.
2279 * linux-low.c: Fix common/ includes.
2280 * inferiors.h: Fix common/ includes.
2281 * i387-fp.c: Fix common/ includes.
2282 * hostio.c: Fix common/ includes.
2283 * hostio-errno.c: Fix common/ includes.
2284 * gdbthread.h: Fix common/ includes.
2285 * gdbreplay.c: Fix common/ includes.
2286 * fork-child.c: Fix common/ includes.
2287 * event-loop.c: Fix common/ includes.
2288 * ax.c:
2289 (enum gdb_agent_op): Fix common/ includes.
2290
2291 2019-01-21 Tom Tromey <tom@tromey.com>
2292
2293 * tracepoint.c: Fix includes.
2294 * remote-utils.c: Fix includes.
2295 * linux-x86-low.c: Fix includes.
2296
2297 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2298
2299 * gdbreplay.c (gdbreplay_version): Update copyright year in
2300 version message.
2301 * server.c (gdbserver_version): Likewise.
2302
2303 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2304
2305 * linux-low.c (add_lwp): Switch ordering.
2306
2307 2018-11-29 Tom Tromey <tom@tromey.com>
2308
2309 * win32-low.c (win32_join): Take pid, not process.
2310 * target.h (struct target_ops) <join>: Change argument type.
2311 (join_inferior): Change argument name.
2312 * spu-low.c (spu_join): Take pid, not process.
2313 * server.c (handle_detach): Preserve pid before destroying
2314 process.
2315 * lynx-low.c (lynx_join): Take pid, not process.
2316 * linux-low.c (linux_join): Take pid, not process.
2317
2318 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2319
2320 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2321 (aarch64_cannot_fetch_register): Likewise.
2322 (struct linux_target_ops): Update references.
2323
2324 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2325
2326 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2327
2328 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2329
2330 * configure.srv (ipa_ppc_linux_regobj): Add
2331 powerpc-isa207-htm-vsx32l-ipa.o and
2332 powerpc-isa207-htm-vsx64l-ipa.o.
2333 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2334 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2335 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2336 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2337 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2338 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2339 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2340 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2341 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2342 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2343 (init_registers_powerpc_isa207_htm_vsx32l)
2344 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2345 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2346 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2347 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2348 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2349 (ppc_store_tm_ctarregset): New functions.
2350 (ppc_regsets): Add entries for HTM regsets.
2351 (ppc_arch_setup): Set htm in features struct when needed. Set
2352 sizes for the HTM regsets.
2353 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2354 (initialize_low_arch): Call
2355 init_registers_powerpc_isa207_htm_vsx32l and
2356 init_registers_powerpc_isa207_htm_vsx64l.
2357 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2358 PPC_TDESC_ISA207_HTM_VSX.
2359 (initialize_low_tracepoint): Call
2360 init_registers_powerpc_isa207_htm_vsx32l and
2361 init_registers_powerpc_isa207_htm_vsx64l.
2362
2363 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2364
2365 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2366 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2367 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2368 (ppc_store_pmuregset): New functions.
2369 (ppc_regsets): Add entries for ebb and pmu regsets.
2370 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2371 pmu regsets are available. Set sizes for these regsets.
2372
2373 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2374
2375 * configure.srv (ipa_ppc_linux_regobj): Add
2376 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2377 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2378 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2379 rs6000/powerpc-isa207-vsx32l.xml, and
2380 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2381 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2382 <PPC_TDESC_ISA207_VSX>: New enum value.
2383 (init_registers_powerpc_isa207_vsx32l): Declare.
2384 (init_registers_powerpc_isa207_vsx64l): Declare.
2385 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2386 (ppc_store_tarregset): New function.
2387 (ppc_regsets): Add entry for the TAR regset.
2388 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2389 size for the TAR regsets.
2390 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2391 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2392 and init_registers_powerpc_isa207_vsx64l.
2393 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2394 (initialize_low_tracepoint): Call
2395 init_registers_powerpc_isa207_vsx32l and
2396 init_registers_powerpc_isa207_vsx64l.
2397
2398 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2399 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2400
2401 * configure.srv (ipa_ppc_linux_regobj): Add
2402 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2403 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2404 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2405 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2406 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2407 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2408 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2409 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2410 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2411 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2412 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2413 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2414 (ppc_hwcap): Add comment.
2415 (ppc_hwcap2): New global.
2416 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2417 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2418 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2419 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2420 when needed. Set sizes for the the DSCR and PPR regsets.
2421 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2422 (initialize_low_arch): Call
2423 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2424 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2425 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2426 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2427 (initialize_low_tracepoint): Call
2428 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2429 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2430
2431 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2432
2433 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2434
2435 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2436 Simon Marchi <simark@simark.ca>
2437
2438 * acinclude.m4: Include "../selftest.m4".
2439 * configure: Regenerate.
2440 * configure.ac: Use "GDB_AC_SELFTEST".
2441 * configure.srv: Use "$enable_unittests" instead of
2442 "$development" when checking whether unit tests have been
2443 enabled.
2444 * server.c (captured_main): Update message informing that
2445 selftests have been disabled.
2446
2447 2018-10-04 Tom Tromey <tom@tromey.com>
2448
2449 * configure: Rebuild.
2450
2451 2018-10-04 Tom Tromey <tom@tromey.com>
2452
2453 * server.c (handle_status): Rename inner "thread".
2454 (process_serial_event): Declare "res" in 'm' case.
2455 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2456 (iterate_over_lwps): Rename inner "thread".
2457 (linux_qxfer_libraries_svr4): Rename inner "len".
2458 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2459
2460 2018-10-01 Gary Benson <gbenson@redhat.com>
2461
2462 * gdb_proc_service.h: Moved common code to
2463 common/gdb_proc_service.h.
2464
2465 2018-10-01 Gary Benson <gbenson@redhat.com>
2466
2467 * gdb_proc_service.h: Synchronize comments and whitespace with
2468 GDB's version of this file.
2469
2470 2018-09-25 Tom Tromey <tom@tromey.com>
2471
2472 * configure: Rebuild.
2473 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2474
2475 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2476
2477 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2478 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2479 ($(IPA_LIB)): Sort IPA_OBJS.
2480
2481 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2482
2483 * Makefile.in: Remove references to $(ADD_DEPS).
2484
2485 2018-09-16 Tom Tromey <tom@tromey.com>
2486
2487 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2488 variables.
2489 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2490 variables.
2491
2492 2018-09-05 Tom Tromey <tom@tromey.com>
2493
2494 * configure: Rebuild.
2495
2496 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2497
2498 PR build/23399
2499 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2500
2501 2018-08-27 Tom Tromey <tom@tromey.com>
2502
2503 PR build/23087:
2504 * configure: Rebuild.
2505
2506 2018-08-27 Tom Tromey <tom@tromey.com>
2507
2508 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2509 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2510 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2511 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2512 (s390x_emit_stack_adjust): Add casts to unsigned char.
2513
2514 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2515
2516 PR gdb/23374
2517 PR gdb/23375
2518 * server.h (struct client_state) <disable_randomization>:
2519 Initialize to 1.
2520
2521 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2522
2523 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2524 variable.
2525 (mips_supply_ptrace_register): Likewise.
2526
2527 2018-07-22 Tom Tromey <tom@tromey.com>
2528
2529 * configure: Rebuild.
2530
2531 2018-07-22 Tom Tromey <tom@tromey.com>
2532
2533 * win32-low.c (win32_create_inferior): Remove unused variables.
2534 * gdbreplay.c (remote_open): Remove unused variable.
2535 * remote-utils.c (remote_prepare): Remove unused variable.
2536 * x86-tdesc.h (X86_TDESC_H): Define.
2537 (amd64_expedite_regs): Define conditionally.
2538 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2539 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2540 * remote-utils.c (readchar): Remove unused variable.
2541
2542 2018-07-13 Pedro Alves <palves@redhat.com>
2543
2544 * linux-low.c (linux_kill): Change parameter to process_info
2545 pointer instead of pid. Adjust.
2546 * lynx-low.c (lynx_kill): Likewise.
2547 * nto-low.c (nto_kill): Likewise.
2548 * spu-low.c (spu_kill): Likewise.
2549 * win32-low.c (win32_kill): Likewise.
2550 * server.c (handle_v_kill, kill_inferior_callback)
2551 (detach_or_kill_for_exit): Adjust.
2552 * target.c (kill_inferior): Change parameter to process_info
2553 pointer instead of pid. Adjust.
2554 * target.h (struct target_ops) <kill>: Change parameter to
2555 process_info pointer instead of pid. Adjust all implementations
2556 and callers.
2557 (kill_inferior): Likewise.
2558
2559 2018-07-13 Pedro Alves <palves@redhat.com>
2560
2561 * linux-low.c (linux_detach, linux_join): Change parameter to
2562 process_info pointer instead of pid. Adjust.
2563 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2564 * nto-low.c (nto_detach): Likewise.
2565 * spu-low.c (spu_detach, spu_join): Likewise.
2566 * win32-low.c (win32_detach, win32_join): Likewise.
2567 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2568 * target.h (struct target_ops) <detach, join>: Change parameter to
2569 process_info pointer instead of pid. Adjust all implementations
2570 and callers.
2571 (detach_inferior, join_inferior): Rename 'pid' parameter to
2572 'proc'.
2573
2574 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2575 Jan Kratochvil <jan.kratochvil@redhat.com>
2576 Paul Fertser <fercerpav@gmail.com>
2577 Tsutomu Seki <sekiriki@gmail.com>
2578
2579 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2580 (OBS): Add 'common/netstuff.o'.
2581 (GDBREPLAY_OBS): Likewise.
2582 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2583 (remote_open): Implement support for IPv6
2584 connections.
2585 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2586 and 'wspiapi.h'.
2587 (handle_accept_event): Accept connections from IPv6 sources.
2588 (remote_prepare): Handle IPv6-style hostnames; implement
2589 support for IPv6 connections.
2590 (remote_open): Implement support for printing connections from
2591 IPv6 sources.
2592
2593 2018-07-11 Pedro Alves <palves@redhat.com>
2594
2595 PR gdb/23377
2596 * mem-break.c (any_persistent_commands): Add process_info
2597 parameter and use it instead of relying on the current process.
2598 Change return type to bool.
2599 * mem-break.h (any_persistent_commands): Add process_info
2600 parameter and change return type to bool.
2601 * server.c (handle_detach): Remove require_running_or_return call.
2602 Look up the process_info for the process we're about to detach.
2603 If not found, return back error to GDB. Adjust
2604 any_persistent_commands call to pass down a process pointer.
2605
2606 2018-07-11 Pedro Alves <palves@redhat.com>
2607
2608 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2609 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2610 instead of collect_register_by_name.
2611 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2612 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2613
2614 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2615 Pedro Alves <palves@redhat.com>
2616
2617 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2618
2619 2018-07-03 Tom Tromey <tom@tromey.com>
2620
2621 * linux-low.c: Update.
2622 * lynx-low.c: Update.
2623 * mem-break.c: Update.
2624 * nto-low.c: Update.
2625 * remote-utils.c: Update.
2626 * server.c: Update.
2627 * spu-low.c: Update.
2628 * target.c: Update.
2629 * win32-low.c: Update.
2630
2631 2018-07-03 Tom Tromey <tom@tromey.com>
2632
2633 * server.c: Update.
2634
2635 2018-07-03 Tom Tromey <tom@tromey.com>
2636
2637 * linux-low.c: Update.
2638
2639 2018-07-03 Tom Tromey <tom@tromey.com>
2640
2641 * target.c: Update.
2642
2643 2018-07-03 Tom Tromey <tom@tromey.com>
2644
2645 * linux-low.c: Update.
2646 * linux-mips-low.c: Update.
2647 * lynx-low.c: Update.
2648 * nto-low.c: Update.
2649 * remote-utils.c: Update.
2650 * server.c: Update.
2651 * spu-low.c: Update.
2652 * target.c: Update.
2653 * thread-db.c: Update.
2654
2655 2018-07-03 Tom Tromey <tom@tromey.com>
2656
2657 * linux-low.c: Update.
2658 * linux-mips-low.c: Update.
2659 * lynx-low.c: Update.
2660 * mem-break.c: Update.
2661 * nto-low.c: Update.
2662 * remote-utils.c: Update.
2663 * server.c: Update.
2664 * spu-low.c: Update.
2665 * target.c: Update.
2666 * tracepoint.c: Update.
2667
2668 2018-07-03 Tom Tromey <tom@tromey.com>
2669
2670 * linux-low.c: Update.
2671 * linux-ppc-low.c: Update.
2672 * linux-x86-low.c: Update.
2673 * proc-service.c: Update.
2674 * server.c: Update.
2675 * spu-low.c: Update.
2676 * thread-db.c: Update.
2677 * win32-low.c: Update.
2678
2679 2018-07-03 Tom Tromey <tom@tromey.com>
2680
2681 * linux-low.c: Update.
2682 * lynx-low.c: Update.
2683 * nto-low.c: Update.
2684 * remote-utils.c: Update.
2685 * spu-low.c: Update.
2686 * thread-db.c: Update.
2687 * win32-low.c: Update.
2688
2689 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2690
2691 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2692 parameter in call to 'amd64_create_target_description'.
2693
2694 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2695
2696 * x86-tdesc.h: Remove executable permission flag.
2697
2698 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2699
2700 * configure.ac: Remove AC_PREREQ, add missing quoting.
2701 * configure: Re-generate.
2702 * config.in: Re-generate.
2703 * aclocal.m4: Re-generate.
2704
2705 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2706
2707 * tracepoint.h (current_traceframe): Remove declaration.
2708
2709 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2710
2711 * linux-aarch64-low.c (is_sve_tdesc): New function.
2712 (aarch64_sve_regs_copy_to_regcache): Likewise.
2713 (aarch64_sve_regs_copy_from_regcache): Likewise.
2714 (aarch64_regs_info): Add SVE checks.
2715 (initialize_low_arch): Initialize SVE.
2716
2717 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2718
2719 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2720
2721 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2722
2723 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2724 (initialize_low_tracepoint): Likewise
2725 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2726 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2727 param.
2728 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2729 checks.
2730 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2731
2732 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2733
2734 * server.h (PBUFSIZ): Increase size
2735
2736 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2737
2738 * regcache.c (regcache::raw_compare): New function.
2739 * regcache.h (regcache::raw_compare): New declaration.
2740
2741 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2742
2743 * regcache.c (new_register_cache): Use new.
2744 (free_register_cache): Use delete.
2745 (register_data): Use const.
2746 (supply_register): Move body inside regcache.
2747 (regcache::raw_supply): New override function.
2748 (collect_register): Move body inside regcache.
2749 (regcache::raw_collect): New override function.
2750 (regcache::get_register_status): New override function.
2751 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2752
2753 2018-06-09 Tom Tromey <tom@tromey.com>
2754
2755 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2756 declare queue.
2757 (event_queue): Use std::queue.
2758 (gdb_event_xfree): Remove.
2759 (initialize_event_loop, process_event, wait_for_event): Update.
2760
2761 2018-06-08 Stan Cox <scox@redhat.com>
2762
2763 * win32-low.c (win32_create_inferior): last_ptid and last_status
2764 moved to client_state.
2765
2766 2018-06-08 Pedro Alves <palves@redhat.com>
2767
2768 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2769 common/common-exceptions.o, common/common-utils.o,
2770 common/errors.o, common/print-utils.o and utils.o.
2771 * gdbreplay.c: Include "common-defs.h" instead of the two
2772 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2773 string.h or alloca.h.
2774 (perror_with_name): Delete.
2775 (remote_open): Use xstrdup instead of strdup.
2776 (main): Rename to ...
2777 (captured_main): ... this.
2778 (main): New.
2779
2780 2018-06-08 Tom Tromey <tom@tromey.com>
2781
2782 * linux-low.c (linux_low_read_btrace): Update.
2783
2784 2018-06-04 Stan Cox <scox@redhat.com>
2785
2786 * server.h (struct client_state): New.
2787 * server.c (cont_thread, general_thread, multi_process)
2788 (report_fork_events, report_vfork_events, report_exec_events)
2789 (report_thread_events, swbreak_feature, hwbreak_feature)
2790 (vCont_supported, disable_randomization, pass_signals)
2791 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2792 Moved to client_state.
2793 * remote-utils.c (remote_debug, noack_mode)
2794 (transport_is_reliable): Moved to client_state.
2795 * tracepoint.c (current_traceframe): Moved to client_state.
2796
2797 Update all callers.
2798 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2799 linux-low.c, remote-utils.h, target.c: Use client_state.
2800
2801 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2802
2803 * configure.srv: Add new c/h file.
2804
2805 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2806
2807 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2808 null VQ.
2809
2810 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2811
2812 * gdb.arch/mips-fpregset-core.exp: New test.
2813 * gdb.arch/mips-fpregset-core.c: New test source.
2814
2815 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2816
2817 PR server/23198
2818 * hostio.c (require_int): Do not report overflow for integers
2819 between 0xfffffff and 0x7fffffff.
2820
2821 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2822
2823 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2824 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2825 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2826 functions.
2827 (the_low_target): Wire them.
2828
2829 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2830
2831 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2832 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2833 mode. Call collect_register_by_name with vscr using
2834 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2835 (ppc_store_vrregset): Add and set vscr_offset variable as in
2836 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2837 vscr_offset.
2838
2839 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2840
2841 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2842 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2843 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2844
2845 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2846
2847 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2848 (ppc_store_vsxregset): Likewise.
2849 (ppc_fill_vrregset): Likewise.
2850 (ppc_store_vrregset): Likewise.
2851 (ppc_fill_evrregset): Likewise.
2852 (ppc_store_evrregset): Likewise.
2853 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2854 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2855 needed.
2856
2857 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2858
2859 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2860 wordsize of the inferior. Call ppc_linux_target_wordsize.
2861
2862 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2863
2864 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2865 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2866 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2867 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2868 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2869 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2870 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2871 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2872 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2873 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2874 (tdesc_powerpc_e500l): Remove.
2875 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2876 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2877 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2878 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2879 linux-ppc-tdesc.h.
2880 (ppc_arch_setup): Remove target description matching code. Fill a
2881 ppc_linux_features struct and call ppc_linux_match_description
2882 with it.
2883
2884 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2885
2886 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2887 width of the requested register exceeds the width of the
2888 `ptrace' data type.
2889 (mips_cannot_store_register): Likewise.
2890
2891 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2892
2893 * linux-mips-low.c (mips_fetch_register): New function. Update
2894 preceding comment.
2895 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2896 (the_low_target): Wire `mips_fetch_register'.
2897
2898 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2899
2900 * lynx-i386-low.c (LYNXOS_178): New macro.
2901 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2902 the layout on LynxOS-178.
2903 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2904 handle floating point registers that are not supported by
2905 LynxOS-178.
2906
2907 2018-05-10 Tom Tromey <tom@tromey.com>
2908
2909 * configure: Rebuild.
2910
2911 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2912
2913 PR server/23158:
2914 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2915 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2916 Use it to set the expedite_regs field in the given tdesc.
2917 * x86-tdesc.h: New file.
2918 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2919 Adjust following the addition of the new expedite_regs parameter
2920 to init_target_desc.
2921 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2922 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2923 (i386_linux_read_description, amd64_linux_read_description):
2924 Adjust following the addition of the new expedite_regs parameter
2925 to init_target_desc.
2926 * lynx-i386-low.c: #include "x86-tdesc.h".
2927 (lynx_i386_arch_setup): Adjust following the addition of the new
2928 expedite_regs parameter to init_target_desc.
2929 * nto-x86-low.c: #include "x86-tdesc.h".
2930 (nto_x86_arch_setup): Adjust following the addition of the new
2931 expedite_regs parameter to init_target_desc.
2932 * win32-i386-low.c: #include "x86-tdesc.h".
2933 (i386_arch_setup): Adjust following the addition of the new
2934 expedite_regs parameter to init_target_desc.
2935
2936 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2937
2938 PR server/23158:
2939 * win32-low.c (win32_create_inferior): Add call to my_wait
2940 setting last_status global.
2941
2942 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2943
2944 PR server/23158:
2945 * win32-low.c (create_process): Only call gdb_tilde_expand if
2946 inferior_cwd is not NULL.
2947
2948 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2949
2950 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2951 registers to the cache if their values have changed.
2952 (i387_xsave_to_cache): Provide default values for x87 control
2953 registers when these features are available, but disabled.
2954 * regcache.c (supply_register_by_name_zeroed): New function.
2955 * regcache.h (supply_register_by_name_zeroed): Declare new
2956 function.
2957
2958 2018-05-07 Tom Tromey <tom@tromey.com>
2959
2960 * configure: Rebuild.
2961
2962 2018-05-04 Tom Tromey <tom@tromey.com>
2963
2964 * configure: Rebuild.
2965
2966 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2967 Pedro Alves <palves@redhat.com>
2968
2969 * linux-aarch64-low.c (aarch64_stopped_data_address):
2970 Likewise.
2971
2972 2018-04-27 Tom Tromey <tom@tromey.com>
2973
2974 * configure: Rebuild.
2975
2976 2018-04-23 Tom Tromey <tom@tromey.com>
2977
2978 * configure: Rebuild.
2979
2980 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2981
2982 * Makefile.in (depcomp): Add "..".
2983 (all_deps_files): New and use it.
2984
2985 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2986
2987 * configure.srv (aarch64*-*-linux*): Don't include xml.
2988 (i[34567]86-*-cygwin*): Likewise.
2989 (i[34567]86-*-linux*): Likewise.
2990 (i[34567]86-*-lynxos*): Likewise.
2991 (i[34567]86-*-mingw32ce*): Likewise.
2992 (i[34567]86-*-mingw*): Likewise.
2993 (i[34567]86-*-nto*): Likewise.
2994 (tic6x-*-uclinux): Likewise.
2995 (x86_64-*-linux*): Likewise.
2996 (x86_64-*-mingw*): Likewise.
2997 (x86_64-*-cygwin*): Likewise.
2998
2999 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3000
3001 * tdesc.c: Remove xml parameter.
3002
3003 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3004
3005 * server.c (get_features_xml): Remove cast.
3006 * tdesc.c (void target_desc::accept): Fill in function.
3007 (tdesc_get_features_xml): Remove old xml creation.
3008 (print_xml_feature::visit_pre): Add xml vistor.
3009 * tdesc.h (struct target_desc): Make xmltarget mutable.
3010 (tdesc_get_features_xml): Remove declaration.
3011
3012 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3013
3014 * tdesc.c (tdesc_architecture_name): Add new function.
3015 (tdesc_osabi_name): Likewise.
3016 (tdesc_get_features_xml): Use new functions.
3017
3018 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3019
3020 * tdesc.c (tdesc_create_flags): Remove.
3021 (tdesc_add_flag): Likewise.
3022 (tdesc_named_type): Likewise.
3023 (tdesc_create_union): Likewise.
3024 (tdesc_create_struct): Likewise.
3025 (tdesc_create_vector): Likewise.
3026 (tdesc_add_bitfield): Likewise.
3027 (tdesc_add_field): Likewise.
3028 (tdesc_set_struct_size): Likewise.
3029
3030 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3031
3032 * tdesc.c (~target_desc): Remove implictly deleted items.
3033 (init_target_desc): Iterate all features.
3034 (tdesc_get_features_xml): Use vector.
3035 (tdesc_create_feature): Create feature.
3036 * tdesc.h (tdesc_feature) Remove
3037 (target_desc): Add features.
3038
3039 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3040
3041 * Makefile.in: Add common/tdesc.c
3042 * tdesc.c (init_target_desc): init all reg_defs from register
3043 vector.
3044 (tdesc_create_reg): Create tdesc_reg.
3045 * tdesc.h (tdesc_feature): Add register vector.
3046
3047 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3048
3049 * tdesc.h (struct target_desc) <features>: Change type to
3050 std::vector<std::string>.
3051 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3052 changes.
3053 (tdesc_get_features_xml): Likewise.
3054 (tdesc_create_feature): Likewise.
3055
3056 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3057
3058 * regcache.c (find_register_by_number): Return a ref.
3059 (find_regno): Use references.
3060 (register_size): Likewise.
3061 (register_data): Likewise.
3062 * tdesc.c (target_desc::~target_desc): Remove free calls.
3063 (target_desc::operator==): Use std::vector compare.
3064 (init_target_desc): Use reference.
3065 (tdesc_create_reg): Use reg constructors.
3066 * tdesc.h (struct target_desc): Replace pointer with object.
3067
3068 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3069
3070 * regcache.c (find_register_by_number): Make static.
3071 (find_regno): Use find_register_by_number
3072 * regcache.h (struct reg): Remove declaration.
3073
3074 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3075
3076 * tdesc.c (target_desc::~target_desc): Move to here.
3077 (target_desc::operator==): Likewise.
3078 * tdesc.h (target_desc::~target_desc): Move from here.
3079 (target_desc::operator==): Likewise.
3080
3081 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3082
3083 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3084
3085 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3086
3087 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3088 S390_TDESC_GS.
3089 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3090 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3091 and init_registers_s390_gs_linux64.
3092
3093 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3094
3095 * linux-s390-low.c (s390_fill_gs): Remove function.
3096 (s390_fill_gsbc): Remove function.
3097 (s390_regsets): Set fill functions for the guarded storage regsets
3098 to NULL.
3099
3100 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3101
3102 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3103 the word size. Add comment.
3104 (s390_get_wordsize): New function.
3105 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3106 pswm with it. Instead, use s390_get_wordsize to determine the
3107 word size first and derive the correct tdesc from that directly.
3108
3109 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3110
3111 * Makefile.in: Include silent-rules.mk.
3112 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3113 (COMPILE): Add ECHO_CXX.
3114 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3115 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3116 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3117 (version-generated.c): Add ECHO_GEN.
3118 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3119 (IPAGENT_COMPILE): Add ECHO_CXX.
3120 (%-generated.c): Add ECHO_REGDAT.
3121
3122 2018-03-14 Tom Tromey <tom@tromey.com>
3123
3124 PR cli/14977:
3125 * ax.c (ax_printf): Special case for NULL.
3126
3127 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3128
3129 * linux-low.c (linux_qxfer_libraries_svr4): Use
3130 xml_escape_text_append.
3131
3132 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3133
3134 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3135
3136 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3137
3138 * server.c (handle_general_set): Remove unnecessary xstrdup.
3139
3140 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3141
3142 * server.c (parse_debug_format_options): Adjust to
3143 delim_string_to_char_ptr_vec changes.
3144 * thread-db.c (thread_db_load_search): Adjust to
3145 dirnames_to_char_ptr_vec changes.
3146
3147 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3148
3149 * target.h (target_enable_btrace, target_disable_btrace)
3150 (target_read_btrace, target_read_btrace_conf): Turn macro into
3151 inline function. Throw error if target method is not defined.
3152 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3153 check for btrace target method. Be prepared to handle exceptions
3154 from btrace target methods.
3155
3156 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3157
3158 * server.c (captured_main): Change order of error message printed
3159 when the current working directory cannot be found.
3160
3161 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3162
3163 * server.c: Include "filenames.h" and "pathstuff.h".
3164 (program_name): Delete variable.
3165 (program_path): New anonymous class.
3166 (get_exec_wrapper): Use "program_path" instead of
3167 "program_name".
3168 (handle_v_run): Likewise.
3169 (captured_main): Likewise.
3170 (process_serial_event): Likewise.
3171
3172 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3173
3174 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3175 (OBJS): Add "pathstuff.o".
3176 * server.c (current_directory): New global variable.
3177 (captured_main): Initialize "current_directory".
3178
3179 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3180
3181 * tdesc.c: Use common/tdesc.h.
3182 * tdesc.h: Likewise.
3183
3184 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3185 Simon Marchi <simon.marchi@ericsson.com>
3186
3187 * Makefile.in: Switch order of make rules.
3188
3189 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3190
3191 * Makefile.in: Add common directory in build.
3192 * configure.ac: Add common reference.
3193 * configure: Regenerate.
3194
3195 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3196
3197 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3198 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3199 * spu-low.c (spu_target_ops): Likewise.
3200 * win32-low.c (win32_target_ops): Likewise.
3201 * server.c (supported_btrace_packets): Report packets unconditionally.
3202 * target.h (target_ops) <supports_btrace>: Remove.
3203 (target_supports_btrace): Remove.
3204
3205 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3206
3207 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3208 (handle_btrace_disable): Change return type to void. Use exceptions
3209 to report errors.
3210 (handle_btrace_general_set): Catch exception and copy message to
3211 return message.
3212
3213 2018-02-08 Tom Tromey <tom@tromey.com>
3214
3215 * linux-low.c (install_software_single_step_breakpoints): Use
3216 make_scoped_restore.
3217 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3218 (do_restore_current_thread_cleanup): Remove.
3219 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3220 declare.
3221
3222 2018-02-08 Tom Tromey <tom@tromey.com>
3223
3224 * mem-break.c (set_raw_breakpoint_at): Use
3225 gdb::unique_xmalloc_ptr.
3226
3227 2018-01-30 Pedro Alves <palves@redhat.com>
3228
3229 PR gdb/13211
3230 * target.c (target_terminal::terminal_state): Rename to ...
3231 (target_terminal::m_terminal_state): ... this.
3232
3233 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3234
3235 * linux-low.c (handle_extended_wait): Surround call to
3236 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3237
3238 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3239
3240 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3241 linux_ptrace_attach_fail_reason_string now returning an
3242 std::string.
3243 (linux_attach): Likewise.
3244 * thread-db.c (attach_thread): Likewise.
3245
3246 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3247
3248 PR gdb/21559
3249 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3250 checking for fs_base/gs_base fields in struct user_regs_struct.
3251 * configure: Regenerate.
3252
3253 2018-01-16 Yao Qi <yao.qi@linaro.org>
3254
3255 PR gdb/18749
3256 * linux-low.c (fetch_register): Call supply_register instead of
3257 error.
3258
3259 2018-01-08 Yao Qi <yao.qi@linaro.org>
3260 Simon Marchi <simon.marchi@ericsson.com>
3261
3262 * Makefile.in (OBS): Remove selftest.o.
3263 * configure.ac: Set srv_selftest_objs if $development is true.
3264 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3265 * configure: Re-generated.
3266 * server.c (captured_main): Wrap variable selftest_filter with
3267 GDB_SELF_TEST.
3268
3269 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3270
3271 * server.c (parse_debug_format_options): Return std::string.
3272 (handle_monitor_command, captured_main): Adjust.
3273
3274 2018-01-05 Pedro Alves <palves@redhat.com>
3275
3276 PR gdb/18653
3277 * server.c (captured_main): Pass quiet=false to
3278 save_original_signals_state.
3279
3280 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3281
3282 * gdbreplay.c (gdbreplay_version): Update copyright year in
3283 version message.
3284 * server.c (gdbserver_version): Likewise.
3285
3286 2017-12-08 Tom Tromey <tom@tromey.com>
3287
3288 * ax.c (ax_printf): Update.
3289
3290 2017-12-07 Yao Qi <yao.qi@linaro.org>
3291
3292 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3293 aarch64_linux_read_description.
3294 * linux-amd64-ipa.c (idx2mask): New array.
3295 (get_ipa_tdesc): Move idx2mask out.
3296 (initialize_low_tracepoint): Initialize target descriptions.
3297 * linux-i386-ipa.c (idx2mask): New array.
3298 (get_ipa_tdesc): Move idx2mask out.
3299 (initialize_low_tracepoint): Initialize target descriptions.
3300
3301 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3302
3303 * tdesc.c (struct tdesc_type): Change return type.
3304 (tdesc_add_flag): Change parameter type.
3305 (tdesc_add_bitfield): Likewise.
3306 (tdesc_add_field): Likewise.
3307 (tdesc_set_struct_size): Likewise.
3308
3309 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3310
3311 * regcache.c (registers_to_string): Remove unused variable.
3312
3313 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3314
3315 * inferiors.c (for_each_inferior_with_data): Remove.
3316 * inferiors.h (for_each_inferior_with_data): Remove.
3317 * server.c (handle_qxfer_threads_worker): Change parameter type.
3318 (handle_qxfer_threads_proper): Use for_each_thread.
3319
3320 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3321
3322 * inferiors.c (for_each_inferior): Remove.
3323 (clear_inferiors): Use for_each_thread.
3324 * inferiors.h (for_each_inferior): Remove.
3325 * linux-low.c (linux_wait_for_event_filtered): Use
3326 for_each_thread.
3327 (linux_stabilize_threads): Likewise.
3328 * regcache.c (regcache_release): Likewise.
3329 * server.c (gdb_wants_all_threads_stopped): Likewise.
3330 (clear_pending_status_callback): Remove.
3331 (handle_status): Use for_each_thread.
3332 (captured_main): Likewise.
3333 * win32-low.c (child_init_thread_list): Likewise.
3334 (win32_clear_inferiors): Likewise.
3335 (fake_breakpoint_event): Likewise.
3336
3337 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3338
3339 * inferiors.h (find_inferior): Remove.
3340 * inferiors.c (find_inferior): Remove.
3341
3342 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3343
3344 * linux-low.c (resume_status_pending_p): Update comment.
3345 (need_step_over_p): Update comment.
3346
3347 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3348
3349 * linux-low.c (proceed_one_lwp): Return void, change parameter
3350 type.
3351 (unsuspend_and_proceed_one_lwp): Likewise.
3352 (proceed_all_lwps): Use for_each_thread.
3353 (unstop_all_lwps): Likewise.
3354
3355 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3356
3357 * linux-low.c (linux_resume_one_thread): Return void, take
3358 parameter directly.
3359 (linux_resume): Use for_each_thread.
3360
3361 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3362
3363 * linux-low.c (send_sigstop_callback): Return void, change
3364 parameter type. Rename to...
3365 (send_sigstop): ... this.
3366 (suspend_and_send_sigstop_callback): Return void, change parameter
3367 type. Rename to...
3368 (suspend_and_send_sigstop): ... this.
3369 (stop_all_lwps): Use for_each_thread.
3370
3371 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3372
3373 * linux-low.c (lwp_running): Return bool, remove unused
3374 argument.
3375 (linux_stabilize_threads): Use find_thread.
3376
3377 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3378
3379 * linux-low.c (select_singlestep_lwp_callback): Remove.
3380 (count_events_callback): Remove.
3381 (select_event_lwp_callback): Remove.
3382 (select_event_lwp): Use find_thread/for_each_thread.
3383
3384 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3385
3386 * linux-low.c (not_stopped_callback): Return bool, take filter
3387 argument directly.
3388 (linux_wait_for_event_filtered): Use find_thread.
3389 (linux_wait_1): Likewise.
3390
3391 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3392
3393 * linux-low.c (same_lwp): Remove.
3394 (find_lwp_pid): Use find_thread.
3395
3396 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3397
3398 * linux-low.c (delete_lwp_callback): Remove.
3399 (linux_mourn): Use for_each_thread.
3400
3401 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3402
3403 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3404 args parameter, don't check for pid.
3405 (linux_detach): Use for_each_thread.
3406
3407 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3408
3409 * linux-low.c (struct counter): Remove.
3410 (second_thread_of_pid_p): Remove.
3411 (last_thread_of_process_p): Use find_thread.
3412
3413 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3414
3415 * inferiors.c (find_inferior_in_random): Remove.
3416 * inferiors.h (find_inferior_in_random): Remove.
3417 * linux-low.c (status_pending_p_callback): Return bool, accept
3418 parameter ptid directly.
3419 (linux_wait_for_event_filtered): Use find_thread_in_random.
3420 (linux_wait_1): Likewise.
3421
3422 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3423
3424 * inferiors.c (find_inferior_id): Remove.
3425 (find_thread_ptid): Move implemention from find_inferior_id to
3426 here.
3427 * inferiors.h (find_inferior_id): Remove.
3428 * server.c (handle_status): Use find_thread_ptid.
3429 (process_serial_event): Likewise.
3430 * thread-db.c (find_one_thread): Likewise.
3431 (thread_db_thread_handle): Likewise.
3432 * win32-low.c (thread_rec): Likewise.
3433 (child_delete_thread): Likewise.
3434 (win32_thread_alive): Likewise.
3435 (get_child_debug_event): Likewise.
3436
3437 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3438
3439 * linux-mips-low.c (update_watch_registers_callback): Return
3440 void, remove pid_p parameter, don't check for pid.
3441 (mips_insert_point, mips_remove_point): Use for_each_thread.
3442
3443 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3444
3445 * lynx.low (lynx_delete_thread_callback): Remove.
3446 (lynx_mourn): Use for_each_thread.
3447
3448 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3449
3450 * regcache.c (regcache_invalidate_one): Remove.
3451 (regcache_invalidate_pid): use for_each_thread.
3452
3453 2017-11-26 Tom Tromey <tom@tromey.com>
3454
3455 * linux-low.c (linux_create_inferior): Update.
3456
3457 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3458
3459 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3460
3461 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3462
3463 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3464 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3465 * linux-aarch64-tdesc-selftest.c: New file.
3466 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3467
3468 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3469
3470 * configure.srv: Add new file.
3471 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3472 * linux-aarch64-tdesc-selftest.c: New file.
3473 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3474
3475 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3476
3477 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3478 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3479 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3480
3481 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3482
3483 * configure.srv: Add new files.
3484 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3485 aarch64_linux_read_description.
3486 * linux-aarch64-low.c (aarch64_linux_read_description):
3487 Merge with aarch64_arch_setup.
3488 (aarch64_arch_setup): Call aarch64_linux_read_description.
3489 * linux-aarch64-tdesc.c: New file.
3490 * linux-aarch64-tdesc.h: New file.
3491
3492 2017-11-24 Yao Qi <yao.qi@linaro.org>
3493
3494 * configure.srv: Set $srv_regobj for tic6x-linux.
3495 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3496 (tic6x_read_description): Move some code to tic6x_arch_setup.
3497 (tic6x_tdesc_test): New function.
3498 (initialize_low_arch): Call selftests::register_test.
3499
3500 2017-11-22 Yao Qi <yao.qi@linaro.org>
3501
3502 * remote-utils.c (prepare_resume_reply): Use memcpy.
3503
3504 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3505
3506 * linux-low.c (kill_one_lwp_callback): Return void, take
3507 argument directly, don't filter on pid.
3508 (linux_kill): Use for_each_thread.
3509
3510 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3511
3512 * linux-low.c (need_step_over_p): Return bool, remove dummy
3513 argument.
3514 (linux_resume, proceed_all_lwps): Use find_thread.
3515
3516 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3517
3518 * linux-low.c (resume_status_pending_p): Return bool, remove
3519 flag_p argument.
3520 (linux_resume): Use find_thread.
3521
3522 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3523
3524 * linux-low.c (struct thread_resume_array): Remove.
3525 (linux_set_resume_request): Return void, take arguments
3526 directly.
3527 (linux_resume): Use for_each_thread.
3528
3529 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3530
3531 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3532 return bool, remove data argument.
3533 (linux_stabilize_threads): Use find_thread.
3534
3535 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3536
3537 * linux-low.c (unsuspend_one_lwp): Remove.
3538 (unsuspend_all_lwps): Use for_each_thread, inline code from
3539 unsuspend_one_lwp.
3540
3541 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3542
3543 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3544 * linux-low.c (struct iterate_over_lwps_args): Remove.
3545 (iterate_over_lwps_filter): Remove.
3546 (iterate_over_lwps): Use find_thread.
3547
3548 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3549
3550 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3551 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3552 code from reset_lwp_ptrace_options_callback.
3553
3554 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3555
3556 * linux-arm-low.c (struct update_registers_data): Remove.
3557 (update_registers_callback): Return void, take arguments
3558 directly, don't check thread's pid.
3559 (arm_insert_point, arm_remove_point): Use for_each_thread.
3560
3561 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3562
3563 * win32-low.c (continue_one_thread): Return void, take argument
3564 directly.
3565 (child_continue): Use for_each_thread.
3566
3567 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3568
3569 * win32-i386-low.c (update_debug_registers_callback): Rename
3570 to ...
3571 (update_debug_registers): ... this, return void, remove pid_p arg.
3572 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3573
3574 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3575
3576 * inferiors.h (struct process_info): Add constructor, initialize
3577 fields..
3578 <syscalls_to_catch>: Change type to std::vector<int>.
3579 * inferiors.c (add_process): Allocate process_info with new.
3580 (remove_process): Free process_info with delete.
3581 * linux-low.c (handle_extended_wait): Adjust.
3582 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3583 * server.c (handle_general_set): Adjust.
3584
3585 2017-11-16 Pedro Alves <palves@redhat.com>
3586
3587 * remote-utils.c (remote_close): Block SIGIO signals instead of
3588 uninstalling the SIGIO handler.
3589
3590 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3591
3592 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3593
3594 2017-11-16 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3597 (tic6x_store_gregset): Likewise.
3598 (tic6x_usrregs_info): Move it up.
3599
3600 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3601
3602 * Makefile.in: Update arch rules.
3603 * configure.srv: Explicitly mark arch/ files.
3604
3605 2017-11-13 Andreas Schwab <schwab@suse.de>
3606
3607 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3608 function.
3609 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3610
3611 2017-11-06 Pedro Alves <palves@redhat.com>
3612
3613 * config.in, configure: Regenerate.
3614
3615 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3616
3617 * target.c (struct thread_search): Remove.
3618 (thread_search_callback): Remove.
3619 (prepare_to_access_memory): Use for_each_thread instead of
3620 find_inferior. Inline code from thread_search_callback.
3621
3622 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * server.c (struct visit_actioned_threads_data): Remove.
3625 (visit_actioned_threads): Change prototype to take arguments
3626 directly.
3627 (resume): Use find_thread instead of find_inferior.
3628
3629 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3630
3631 * server.c (queue_stop_reply_callback): Change prototype, return
3632 void.
3633 (find_status_pending_thread_callback): Remove.
3634 (handle_status): Replace find_inferior with find_thread and
3635 for_each_thread.
3636
3637 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3638
3639 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3640 with REGNO.
3641 (aarch64_store_gregset): Likewise.
3642 (aarch64_fill_fpregset): Likewise.
3643 (aarch64_store_fpregset): Likewise.
3644
3645 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3646
3647 * gdbthread.h (find_thread, for_each_thread): New functions.
3648 * inferiors.c (thread_of_pid): Remove.
3649 (find_any_thread_of_pid): Use find_thread.
3650 * linux-low.c (num_lwps): Use for_each_thread.
3651
3652 2017-10-17 Yao Qi <yao.qi@linaro.org>
3653
3654 * Makefile.in: Remove one rule.
3655 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3656
3657 2017-10-17 Yao Qi <yao.qi@linaro.org>
3658
3659 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3660 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3661
3662 2017-10-17 Yao Qi <yao.qi@linaro.org>
3663
3664 * configure.srv: Rename arm.o with arch/arm.o.
3665
3666 2017-10-17 Yao Qi <yao.qi@linaro.org>
3667
3668 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3669 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3670 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3671 (arch-i386.o, arch-amd64.o): Remove rules.
3672 (arch/%.o): New rule.
3673 Update POSTCOMPILE and COMPILE.pre.
3674 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3675 * configure: Re-generated.
3676 * configure.srv: Replace arch-i386.o with arch/i386.o.
3677 Replace arch-amd64.o with arch/amd64.o.
3678
3679 2017-10-16 Yao Qi <yao.qi@linaro.org>
3680
3681 * configure: Regenerated.
3682
3683 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3684
3685 * inferiors.h: (struct inferior_list): Remove.
3686 (struct inferior_list_entry); Remove.
3687 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3688 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3689 get_first_inferior): Remove.
3690 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3691 find_inferior_id, find_inferior_in_random): Change signature.
3692 * inferiors.c (all_threads): Change type to
3693 std::list<thread_info *>.
3694 (get_thread): Remove macro.
3695 (find_inferior, find_inferior_id): Change signature, implement
3696 using find_thread.
3697 (find_inferior_in_random): Change signature, implement using
3698 find_thread_in_random.
3699 (for_each_inferior, for_each_inferior_with_data): Change
3700 signature, implement using for_each_thread.
3701 (add_inferior_to_list, remove_inferior): Remove.
3702 (add_thread, get_first_thread, thread_of_pid,
3703 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3704 (get_first_inferior, one_inferior_p, clear_inferior_list):
3705 Remove.
3706 (clear_inferiors, get_thread_process): Update.
3707 * gdbthread.h: Include <list>.
3708 (struct thread_info) <entry>: Remove field.
3709 <id>: New field.
3710 (all_threads): Change type to std::list<thread_info *>.
3711 (get_first_inferior): Add doc.
3712 (find_thread, for_each_thread, find_thread_in_random): New
3713 functions.
3714 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3715 * linux-arm-low.c (update_registers_callback): Update.
3716 * linux-low.c (second_thread_of_pid_p): Update.
3717 (kill_one_lwp_callback, linux_detach_lwp_callback,
3718 delete_lwp_callback, status_pending_p_callback, same_lwp,
3719 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3720 iterate_over_lwps, not_stopped_callback,
3721 resume_stopped_resumed_lwps, count_events_callback,
3722 select_singlestep_lwp_callback, select_event_lwp_callback,
3723 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3724 suspend_and_send_sigstop_callback, wait_for_sigstop,
3725 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3726 lwp_running, linux_set_resume_request, resume_status_pending_p,
3727 need_step_over_p, start_step_over, linux_resume_one_thread,
3728 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3729 reset_lwp_ptrace_options_callback): Update.
3730 * linux-mips-low.c (update_watch_registers_callback): Update.
3731 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3732 Update.
3733 (free_register_cache_thread_one): Remove.
3734 (regcache_release): Update.
3735 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3736 handle_qxfer_threads_worker): Update.
3737 (handle_query): Update, use list iterator.
3738 (visit_actioned_threads, handle_pending_status,
3739 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3740 clear_pending_status_callback, set_pending_status_callback,
3741 find_status_pending_thread_callback, handle_status,
3742 process_serial_event): Update.
3743 * target.c (thread_search_callback): Update.
3744 * thread-db.c (thread_db_get_tls_address): Update.
3745 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3746 Update.
3747 * win32-i386-low.c (update_debug_registers_callback): Update.
3748 * win32-low.c (delete_thread_info, child_delete_thread,
3749 continue_one_thread, suspend_one_thread,
3750 get_child_debug_event): Adjust.
3751
3752 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3753
3754 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3755 * inferiors.h: Include <list>.
3756 (struct process_info) <entry>: Remove field.
3757 <pid>: New field.
3758 (pid_of): Change macro to function.
3759 (ptid_of, lwpid_of): Remove macro.
3760 (all_processes): Change type to std::list<process_info *>.
3761 (ALL_PROCESSES): Remove macro.
3762 (for_each_process, find_process): New function.
3763 * inferiors.c (all_processes): Change type to
3764 std::list<process_info *>.
3765 (find_thread_process): Adjust.
3766 (add_process): Likewise.
3767 (remove_process): Likewise.
3768 (find_process_pid): Likewise.
3769 (get_first_process): Likewise.
3770 (started_inferior_callback): Remove.
3771 (have_started_inferiors_p): Adjust.
3772 (attached_inferior_callback): Remove.
3773 (have_attached_inferiors_p): Adjust.
3774 * linux-low.c (check_zombie_leaders): Likewise.
3775 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3776 (x86_linux_update_xmltarget): Adjust.
3777 * server.c (handle_query): Likewise.
3778 (gdb_reattached_process): Remove.
3779 (handle_status): Adjust.
3780 (kill_inferior_callback): Likewise.
3781 (detach_or_kill_inferior): Remove.
3782 (print_started_pid): Likewise.
3783 (print_attached_pid): Likewise.
3784 (detach_or_kill_for_exit): Update.
3785 (process_serial_event): Likewise.
3786 * linux-arm-low.c (arm_new_fork): Likewise.
3787
3788 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3789
3790 * dll.h: Include <list>.
3791 (struct dll_info): Add constructor.
3792 <entry>: Remove field.
3793 (all_dlls): Change type to std::list<dll_info>.
3794 * dll.c: Include <algorithm>.
3795 (get_dll): Remove macro.
3796 (all_dlls): Change type to std::list<dll_info *>.
3797 (free_one_dll): Remove.
3798 (match_dll): Likewise.
3799 (loaded_dll): Adjust.
3800 (unloaded_dll): Adjust to all_dlls type change, use
3801 std::find_if. Inline code from match_dll.
3802 (clear_dlls): Adjust to all_dlls type change.
3803 * server.c (emit_dll_description): Remove.
3804 (handle_qxfer_libraries): Adjust to all_dlls type change,
3805 integrate emit_dll_description's functionality.
3806
3807 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3808
3809 * linux-low.h (struct linux_target_ops) <delete_process>: New
3810 field.
3811 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3812 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3813 (struct linux_target_ops): Add delete_process callback.
3814 * linux-arm-low.c (arm_delete_process): New.
3815 (struct linux_target_ops): Add delete_process callback.
3816 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3817 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3818 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3819 * linux-mips-low.c (mips_linux_delete_process): New.
3820 (struct linux_target_ops): Add delete_process callback.
3821 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3822 * linux-s390-low.c (struct linux_target_ops): Likewise.
3823 * linux-sh-low.c (struct linux_target_ops): Likewise.
3824 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3825 * linux-tile-low.c (struct linux_target_ops): Likewise.
3826 * linux-x86-low.c (x86_linux_delete_process): New.
3827 (struct linux_target_ops): Add delete_process callback.
3828 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3829
3830 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3831
3832 * linux-aarch64-low.c (the_low_target): Add thread delete
3833 callback.
3834 * linux-arm-low.c (arm_delete_thread): New function.
3835 (the_low_target): Add thread delete callback.
3836 * linux-bfin-low.c (the_low_target): Likewise.
3837 * linux-crisv32-low.c (the_low_target): Likewise.
3838 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3839 set.
3840 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3841 field.
3842 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3843 * linux-mips-low.c (mips_linux_delete_thread): New function.
3844 (the_low_target): Add thread delete callback.
3845 * linux-ppc-low.c (the_low_target): Likewise.
3846 * linux-s390-low.c (the_low_target): Likewise.
3847 * linux-sh-low.c (the_low_target): Likewise.
3848 * linux-tic6x-low.c (the_low_target): Likewise.
3849 * linux-tile-low.c (the_low_target): Likewise.
3850 * linux-x86-low.c (the_low_target): Likewise.
3851 * linux-xtensa-low.c (the_low_target): Likewise.
3852
3853 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3854
3855 * win32-low.c: Include "common-inferior.h".
3856
3857 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3858
3859 * inferiors.c (set_inferior_cwd): New function.
3860 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3861 (handle_query): Inform that QSetWorkingDir is supported.
3862 * win32-low.c (create_process): Pass the inferior's cwd to
3863 CreateProcess.
3864
3865 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3866
3867 * inferiors.c (current_inferior_cwd): New global variable.
3868 (get_inferior_cwd): New function.
3869 * inferiors.h (struct process_info) <cwd>: New field.
3870
3871 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3872
3873 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3874 (OBS): Add gdb_tilde_expand.o.
3875
3876 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3877
3878 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3879 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3880
3881 2017-09-29 Pedro Alves <palves@redhat.com>
3882
3883 * ax.c (gdb_parse_agent_expr): Constify.
3884 * ax.h (gdb_parse_agent_expr): Constify.
3885 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3886 Constify.
3887 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3888 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3889 * remote-utils.h (read_ptid): Constify.
3890 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3891 (process_point_options, process_serial_event): Constify.
3892 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3893 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3894 (cmd_qtbuffer): Constify.
3895
3896 2017-09-29 Pedro Alves <palves@redhat.com>
3897
3898 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3899 fails.
3900
3901 2017-09-29 Pedro Alves <palves@redhat.com>
3902
3903 * linux-low.c (handle_extended_wait): Pass parent thread instead
3904 of process to thread_db_notice_clone.
3905 * linux-low.h (thread_db_notice_clone): Replace parent process
3906 parameter with parent thread parameter.
3907 * thread-db.c (find_one_thread): Add comment.
3908 (thread_db_notice_clone): Replace parent process parameter with
3909 parent thread parameter. Temporarily switch to the parent thread.
3910
3911 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3912
3913 * gdbthread.h: Include "common-gdbthread.h".
3914 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3915 "if" when validating the ptid.
3916 * remote-utils.c: Include "gdbthread.h".
3917 (prepare_resume_reply): Use "switch_to_thread".
3918 * target.c (done_accessing_memory): Likewise.
3919
3920 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3921
3922 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3923 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3924 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3925 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3926 s390x-gs-linux64-ipa.o to ipa_obj.
3927 * linux-s390-low.c (HWCAP_S390_GS): New define.
3928 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3929 New functions.
3930 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3931 (s390_arch_setup): Check for guarded-storage support and choose
3932 appropriate tdesc.
3933 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3934 init_registers_s390x_gs_linux64.
3935 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3936 enum value.
3937 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3938 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3939
3940 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3941
3942 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3943
3944 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3945
3946 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3947 (thread_db_thread_handle): Declare.
3948 * linux-low.c (linux_target_ops): Initialize thread_handle.
3949 * server.c (handle_qxfer_threads_worker): Add support for
3950 "handle" attribute.
3951 * target.h (struct target_ops): Add new function pointer,
3952 thread_handle.
3953 (target_thread_handle): Define.
3954 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3955 field in lwp.
3956 (thread_db_thread_handle): New function.
3957
3958 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3959
3960 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3961 * linux-low.h (thread_db_notice_clone): Declare.
3962 * thread-db.c (thread_db_notice_clone): New function.
3963
3964 2017-09-21 Pedro Alves <palves@redhat.com>
3965
3966 * server.c (gdb_read_memory, handle_status, process_serial_event)
3967 (handle_serial_event, handle_target_event): Adjust to
3968 set_desired_thread prototype change.
3969 * target.c (set_desired_thread): Remove 'use_general' parameter
3970 and adjust.
3971 * target.h (set_desired_thread): Remove 'use_general' parameter.
3972
3973 2017-09-20 Tom Tromey <tom@tromey.com>
3974
3975 * target.c (target_terminal::terminal_state): Define.
3976 (target_terminal::init): Rename from target_terminal_init.
3977 (target_terminal::inferior): Rename from
3978 target_terminal_inferior.
3979 (target_terminal::ours): Rename from target_terminal_ours.
3980 (target_terminal::ours_for_output, target_terminal::info): New.
3981
3982 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3983
3984 * server.c (accumulate_file_name_length): Remove.
3985 (emit_dll_description): Adjust to std::string change.
3986 (handle_qxfer_libraries): Use std::string to hold document.
3987
3988 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3989
3990 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3991 return type of xml_escape_text.
3992 * server.c (emit_dll_description): Likewise.
3993
3994 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3995
3996 * server.c (captured_main): Accept argument for --selftest.
3997 Update run_tests call.
3998 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3999 when registering selftests.
4000
4001 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4002
4003 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4004 instead of "VEC" for "target_desc.reg_defs".
4005 (regcache_cpy): Likewise.
4006 (registers_to_string): Likewise.
4007 (registers_from_string): Likewise.
4008 (find_regno): Likewise.
4009 (supply_regblock): Likewise.
4010 (regcache_raw_read_unsigned): Likewise.
4011 * tdesc.c (init_target_desc): Likewise.
4012 (tdesc_create_reg): Likewise.
4013 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4014 (struct target_desc) <reg_defs>: Convert to "std::vector".
4015 (target_desc): Do not initialize "reg_defs".
4016 (~target_desc): Update code to use "std::vector" instead of "VEC"
4017 for "target_desc.reg_defs".
4018 (operator==): Likewise.
4019
4020 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4021
4022 * inferiors.h (thread_to_gdb_id): Remove.
4023 * inferiors.c (thread_to_gdb_id): Remove.
4024 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4025 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4026 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4027 Likewise.
4028 * nto-low.c (nto_fetch_registers, nto_store_registers,
4029 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4030
4031 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4032
4033 * inferiors.h (gdb_id_to_thread_id): Remove.
4034 * inferiors.c (gdb_id_to_thread_id): Remove.
4035 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4036 removal. Move pid declaration closer to where it's used.
4037
4038 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4039
4040 * server.c (handle_detach): New function.
4041 (process_serial_event): Move code out, call handle_detach.
4042
4043 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4044
4045 * server.c (require_running): Rename to ...
4046 (require_running_or_return): ... this ...
4047 (require_running_or_break): ... and this.
4048 (handle_query, process_serial_event): Adjust.
4049
4050 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4051
4052 * linux-low.c (linux_set_resume_request): Remove unused
4053 variables.
4054
4055 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 * server.c (first_thread_of): Remove.
4058 (process_serial_event): Replace usage of first_thread_of with
4059 find_any_thread_of_pid.
4060 * tracepoint.c (same_process_p): Remove.
4061 (gdb_agent_about_to_close): Replace usage of same_process_p with
4062 find_any_thread_of_pid.
4063 * linux-x86-low.c (same_process_callback): Remove.
4064 (x86_arch_setup_process_callback): Replace usage of
4065 same_process_callback with find_any_thread_of_pid.
4066 * thread-db.c (any_thread_of): Remove.
4067 (switch_to_process): Replace usage of any_thread_of with
4068 find_any_thread_of_pid.
4069 * inferiors.c (thread_pid_matches_callback): Remove.
4070 (find_thread_process): Adjust to use find_any_thread_of_pid.
4071
4072 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4073
4074 * regcache.c (get_thread_regcache): Guard calls to "memset"
4075 with "!VEC_empty".
4076
4077 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4078
4079 * linux-low.c (handle_extended_wait): Use
4080 "allocate_target_description" instead of "XNEW".
4081 * linux-x86-low.c (initialize_low_arch): Likewise.
4082
4083 2017-09-05 Yao Qi <yao.qi@linaro.org>
4084
4085 * configure.srv (srv_i386_regobj): Remove.
4086 (srv_amd64_regobj): Remove.
4087 (srv_regobj): Set it to "" for x86 non-linux targets.
4088 * linux-x86-tdesc.c (i386_linux_read_description):
4089 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4090 (init_registers_i386): Remove the declaration.
4091 (tdesc_i386): Remove the declaration.
4092 (lynx_i386_arch_setup): Call i386_create_target_description.
4093 * nto-x86-low.c: Likewise.
4094 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4095 [!__x86_64__]: include arch/i386.h.
4096 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4097
4098 2017-09-05 Yao Qi <yao.qi@linaro.org>
4099
4100 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4101 i386/amd64-XXX-linux from it.
4102
4103 2017-09-05 Yao Qi <yao.qi@linaro.org>
4104
4105 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4106 false.
4107 (ipa_amd64_linux_regobj): Remove.
4108 (ipa_x32_linux_regobj): Remove.
4109
4110 2017-09-05 Yao Qi <yao.qi@linaro.org>
4111
4112 * Makefile.in (arch-amd64.o): New rule.
4113 * configure.srv: Append arch-amd64.o.
4114 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4115 (get_ipa_tdesc): Call amd64_linux_read_description.
4116 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4117 and init_registers_amd64_XXX.
4118 * linux-x86-low.c (x86_linux_read_description): Call
4119 amd64_linux_read_description.
4120 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4121 (initialize_low_arch): Don't call init_registers_x32_XXX and
4122 init_registers_amd64_XXX.
4123 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4124 and tdesc_amd64_XXX.
4125 [__x86_64__] (amd64_tdesc_test): New function.
4126 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4127 and init_registers_amd64_XXX.
4128 * linux-x86-tdesc.c: Include arch/amd64.h.
4129 (xcr0_to_tdesc_idx): New function.
4130 (i386_linux_read_description): New function.
4131 (amd64_get_ipa_tdesc_idx): New function.
4132 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4133 (amd64_get_ipa_tdesc): Declare.
4134
4135 2017-09-05 Yao Qi <yao.qi@linaro.org>
4136
4137 * configure.srv (srv_i386_linux_xmlfiles): Remove
4138 i386/i386-XXX-linux.xml from it.
4139
4140 2017-09-05 Yao Qi <yao.qi@linaro.org>
4141
4142 * configure.srv: Set srv_i386_linux_regobj empty if $development
4143 is false.
4144 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4145 initialize_low_tdesc.
4146 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4147 with #if initialize_low_tdesc.
4148 * linux-x86-tdesc-selftest.c: New file.
4149 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4150
4151 2017-09-05 Yao Qi <yao.qi@linaro.org>
4152
4153 * Makefile.in (arch-i386.o): New rule.
4154 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4155 (x86_64-*-linux*): Likewise.
4156 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4157 include arch/i386.h.
4158 (i386_linux_read_description): Remove code and call
4159 i386_create_target_description.
4160 * tdesc.c (allocate_target_description): New function.
4161 * tdesc.h (set_tdesc_architecture): Remove declaration.
4162 (set_tdesc_osabi): Likewise.
4163
4164 2017-09-05 Yao Qi <yao.qi@linaro.org>
4165
4166 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4167 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4168 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4169 .xmltarget.
4170 * server.c (get_features_xml): Call tdesc_get_features_xml.
4171 * tdesc.c (set_tdesc_architecture): New function.
4172 (set_tdesc_osabi): New function.
4173 (tdesc_get_features_xml): New function.
4174 (tdesc_create_feature): Add an argument.
4175 * tdesc.h (struct target_desc) <features>: New field.
4176 <arch, osabi>: New field.
4177 (~target_desc): xfree features, arch, and osabi.
4178 (target_desc::oerator==): Don't compare .xmltarget.
4179 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4180 (set_tdesc_osabi): Likewise.
4181 (tdesc_get_features_xml): Likewise.
4182
4183 2017-09-05 Yao Qi <yao.qi@linaro.org>
4184
4185 * linux-x86-tdesc.c: Include selftest.h.
4186 (i386_tdesc_test): New function.
4187 (initialize_low_tdesc): Call selftests::register_test.
4188 * tdesc.h: Include regdef.h.
4189 (target_desc): Override operator == and !=.
4190
4191 2017-09-05 Yao Qi <yao.qi@linaro.org>
4192
4193 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4194 (ipa_obj): Likewise.
4195 * linux-i386-ipa.c: Include common/x86-xstate.h
4196 (get_ipa_tdesc): Call i386_linux_read_description.
4197 (initialize_low_tracepoint): Don't call init_registers_XXX
4198 functions, call initialize_low_tdesc instead.
4199 * linux-x86-low.c (x86_linux_read_description): Call
4200 i386_linux_read_description.
4201 (initialize_low_arch): Don't call init_registers_i386_XXX
4202 functions, call initialize_low_tdesc.
4203 * linux-x86-tdesc.c: New file.
4204 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4205 (i386_get_ipa_tdesc_idx): Declare.
4206 (i386_get_ipa_tdesc): Declare.
4207 (initialize_low_tdesc): Declare.
4208
4209 2017-09-05 Yao Qi <yao.qi@linaro.org>
4210
4211 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4212 instead of 0.
4213
4214 2017-09-05 Yao Qi <yao.qi@linaro.org>
4215
4216 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4217 * regcache.c (get_thread_regcache): Use VEC_length.
4218 (init_register_cache): Likewise.
4219 (regcache_cpy): Likewise.
4220 (registers_to_string): Iterate reg_defs via VEC_iterate.
4221 (find_regno): Likewise.
4222 (find_register_by_number): Use VEC_index.
4223 (register_size): Call find_register_by_number.
4224 (register_data): Call find_register_by_number.
4225 (supply_regblock): Use VEC_length.
4226 (regcache_raw_read_unsigned): Likewise.
4227 * tdesc.c (init_target_desc): Iterate reg_defs via
4228 VEC_iterate.
4229 (default_description): Update initializer.
4230 (copy_target_description): Don't update field num_registers.
4231 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4232 <num_registers>: Remove.
4233
4234 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4235
4236 * Makefile.in (.SECONDARY): Define target.
4237
4238 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4239
4240 * linux-low.c (linux_wait_1): Adjust.
4241 * server.c (queue_stop_reply_callback): Adjust.
4242
4243 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4244
4245 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4246 QEnvironmentUnset and QEnvironmentReset packets.
4247 (handle_query): Inform remote that QEnvironmentHexEncoded,
4248 QEnvironmentUnset and QEnvironmentReset are supported.
4249
4250 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4251
4252 * inferiors.h (inferior_target_data): Rename to ...
4253 (thread_target_data): ... this.
4254 (inferior_regcache_data): Rename to ...
4255 (thread_regcache_data): ... this.
4256 (set_inferior_regcache_data): Rename to ...
4257 (set_thread_regcache_data): ... this.
4258 * inferiors.c (inferior_target_data): Rename to ...
4259 (thread_target_data): ... this.
4260 (inferior_regcache_data): Rename to ...
4261 (thread_regcache_data): ... this.
4262 (set_inferior_regcache_data): Rename to ...
4263 (set_thread_regcache_data): ... this.
4264 (free_one_thread): Update.
4265 * linux-low.h (get_thread_lwp): Update.
4266 * regcache.c (get_thread_regcache): Update.
4267 (regcache_invalidate_thread): Update.
4268 (free_register_cache_thread): Update.
4269 * win32-i386-low.c (update_debug_registers_callback): Update.
4270 (win32_get_current_dr): Update.
4271 * win32-low.c (thread_rec): Update.
4272 (delete_thread_info): Update.
4273 (continue_one_thread): Update.
4274 (suspend_one_thread): Update.
4275
4276 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4277
4278 * inferiors.c (set_inferior_target_data): Remove.
4279 * inferiors.h (set_inferior_target_data): Remove.
4280
4281 2017-08-18 Yao Qi <yao.qi@linaro.org>
4282
4283 * Makefile.in (OBS): Add selftest.o.
4284 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4285 * configure, config.in: Re-generated.
4286 * server.c: Include common/sefltest.h.
4287 (captured_main): Handle option --selftest.
4288
4289 2017-08-09 Yao Qi <yao.qi@linaro.org>
4290
4291 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4292 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4293 i386-avx-mpx.o and i386-mmx.o.
4294 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4295 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4296 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4297 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4298 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4299 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4300 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4301 i386/amd64-avx-mpx.xml.
4302
4303 2017-08-09 Yao Qi <yao.qi@linaro.org>
4304
4305 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4306 and x32-avx-avx512.o.
4307 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4308 i386/x32-avx-avx512.xml.
4309
4310 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4311
4312 * tracepoint.h (enum class fast_tpoint_collect_result): New
4313 enumeration.
4314 (fast_tracepoint_collecting): Change return type to
4315 fast_tpoint_collect_result.
4316 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4317 * linux-low.h: Include tracepoint.h.
4318 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4319 fast_tpoint_collect_result.
4320 * linux-low.c (handle_tracepoints): Adjust.
4321 (linux_fast_tracepoint_collecting): Change return type to
4322 fast_tpoint_collect_result.
4323 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4324 linux_wait_1, stuck_in_jump_pad_callback,
4325 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4326 proceed_one_lwp): Adjust to type change.
4327
4328 2017-07-10 Yao Qi <yao.qi@linaro.org>
4329
4330 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4331
4332 2017-06-29 Yao Qi <yao.qi@linaro.org>
4333
4334 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4335 Remove.
4336 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4337
4338 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4339
4340 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4341
4342 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4343
4344 * linux-low.c (linux_create_inferior): Adjust code to access the
4345 environment information via 'gdb_environ' class.
4346 * lynx-low.c (lynx_create_inferior): Likewise.
4347 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4348 (get_environ): Return a pointer to 'our_environ'.
4349 (captured_main): Initialize 'our_environ'.
4350 * server.h (get_environ): Adjust prototype.
4351 * spu-low.c (spu_create_inferior): Adjust code to access the
4352 environment information via 'gdb_environ' class.
4353
4354 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4355
4356 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4357 usage of "register" keyword.
4358
4359 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4360
4361 * configure: Re-generate.
4362
4363 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4364
4365 * configure: Re-generate.
4366
4367 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4368
4369 * Makefile.in (COMPILE.pre): Add "-x c++".
4370
4371 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4372
4373 * fork-child.c: Conditionally include <signal.h>.
4374
4375 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4376
4377 * server.c (handle_general_set): Handle new packet
4378 "QStartupWithShell".
4379 (handle_query): Add "QStartupWithShell" to the list of supported
4380 packets.
4381 (gdbserver_usage): Add help text explaining the
4382 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4383 options.
4384 (captured_main): Recognize and act upon the presence of the new
4385 CLI options.
4386
4387 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4388 Pedro Alves <palves@redhat.com>
4389
4390 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4391 * configure: Regenerate.
4392 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4393 "fork-inferior.o".
4394 (i[34567]86-*-lynxos*): Likewise.
4395 (spu*-*-*): Likewise.
4396 * fork-child.c: New file.
4397 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4398 and "environ.h".
4399 (linux_ptrace_fun): New function.
4400 (linux_create_inferior): Adjust function prototype to reflect
4401 change on "target.h". Adjust function code to use
4402 "fork_inferior".
4403 (linux_request_interrupt): Delete "signal_pid".
4404 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4405 (lynx_ptrace_fun): New function.
4406 (lynx_create_inferior): Adjust function prototype to reflect
4407 change on "target.h". Adjust function code to use
4408 "fork_inferior".
4409 * nto-low.c (nto_create_inferior): Adjust function prototype and
4410 code to reflect change on "target.h". Update comments.
4411 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4412 "common-terminal.h" and "environ.h".
4413 (terminal_fd): Moved to fork-child.c.
4414 (old_foreground_pgrp): Likewise.
4415 (restore_old_foreground_pgrp): Likewise.
4416 (last_status): Make it global.
4417 (last_ptid): Likewise.
4418 (our_environ): New variable.
4419 (startup_with_shell): Likewise.
4420 (program_name): Likewise.
4421 (program_argv): Rename to...
4422 (program_args): ...this.
4423 (wrapper_argv): New variable.
4424 (start_inferior): Delete function.
4425 (get_exec_wrapper): New function.
4426 (get_exec_file): Likewise.
4427 (get_environ): Likewise.
4428 (prefork_hook): Likewise.
4429 (post_fork_inferior): Likewise.
4430 (postfork_hook): Likewise.
4431 (postfork_child_hook): Likewise.
4432 (handle_v_run): Update code to deal with arguments coming from the
4433 remote host. Update calls from "start_inferior" to
4434 "create_inferior".
4435 (captured_main): Likewise. Initialize environment variable. Call
4436 "have_job_control".
4437 * server.h (post_fork_inferior): New prototype.
4438 (get_environ): Likewise.
4439 (last_status): Declare.
4440 (last_ptid): Likewise.
4441 (signal_pid): Likewise.
4442 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4443 (spu_ptrace_fun): New function.
4444 (spu_create_inferior): Adjust function prototype to reflect change
4445 on "target.h". Adjust function code to use "fork_inferior".
4446 * target.c (target_terminal_init): New function.
4447 (target_terminal_inferior): Likewise.
4448 (target_terminal_ours): Likewise.
4449 * target.h: Include <vector>.
4450 (struct target_ops) <create_inferior>: Update prototype.
4451 (create_inferior): Update macro.
4452 * utils.c (gdb_flush_out_err): New function.
4453 * win32-low.c (win32_create_inferior): Adjust function prototype
4454 and code to reflect change on "target.h".
4455
4456 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4457
4458 * inferiors.c (switch_to_thread): New function.
4459
4460 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4461
4462 * Makefile.in (SFILE): Add "common/job-control.c".
4463 (OBS): Add "job-control.o".
4464
4465 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4466
4467 * Makefile: Remove "@host_makefile_frag@".
4468
4469 2017-05-05 Pedro Alves <palves@redhat.com>
4470
4471 * configure: Regenerate.
4472
4473 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4474
4475 * configure: Regenerate.
4476
4477 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4478
4479 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4480 software_single_step change of return type to
4481 std::vector<CORE_ADDR>.
4482 * linux-low.c (install_software_single_step_breakpoints):
4483 Likewise.
4484 * linux-low.h (install_software_single_step_breakpoints):
4485 Likewise.
4486
4487 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4488
4489 * remote-utils.c: Include "gdb_termios.h" instead of
4490 "terminal.h".
4491 * terminal.h: Delete file.
4492
4493 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4494
4495 * server.c: Include <vector>.
4496 <program_argv, wrapper_argv>: Convert to std::vector.
4497 (start_inferior): Rewrite function to use C++.
4498 (handle_v_run): Likewise. Update code that calculates the argv
4499 based on the vRun packet; use C++.
4500 (captured_main): Likewise.
4501
4502 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4503
4504 * server.c (handle_v_cont): Initialize thread_resume::thread
4505 with null_ptid.
4506
4507 2017-04-05 Pedro Alves <palves@redhat.com>
4508
4509 * configure: Regenerate.
4510
4511 2017-04-05 Pedro Alves <palves@redhat.com>
4512
4513 * gdbreplay.c (sync_error): Constify.
4514 * linux-x86-low.c (push_opcode): Constify.
4515
4516 2017-04-05 Pedro Alves <palves@redhat.com>
4517
4518 * win32-low.c (get_child_debug_event)
4519 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4520 Report TARGET_WAITKIND_SPURIOUS instead.
4521
4522 2017-04-05 Pedro Alves <palves@redhat.com>
4523
4524 * remote-utils.c (remote_prepare, remote_open): Constify.
4525 * remote-utils.h (remote_prepare, remote_open): Constify.
4526 * server.c (captured_main): Constify 'port' handling.
4527
4528 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4529
4530 * Makefile.in (clean): Clear .deps.
4531
4532 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4533
4534 * .gitignore: Remove generated files, replace with wildcard.
4535 * (clean): Replace removal of generated files with wildcard.
4536 (version.c): Replace with...
4537 (version-generated.c): ...this.
4538 (xml-builtin.c): Replace with...
4539 (xml-builtin-generated.c): ...this.
4540 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4541 (%.c: *regformats*): Replace with...
4542 (%-generated.c: *regformats*): ...this.
4543
4544 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4545
4546 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4547 (xtensa_fill_gregset): Call collect_register_by_name for
4548 threadptr register.
4549 (xtensa_store_gregset): Call supply_register_by_name for
4550 threadptr register.
4551
4552 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4553
4554 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4555 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4556 (xtensa_store_gregset): Call supply_register for all registers in
4557 a0_regnum..a0_regnum + C0_NREGS range.
4558
4559 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4560
4561 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4562 (ax-ipa.o: ax.c): Remove.
4563 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4564 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4565 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4566 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4567 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4568
4569 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4570
4571 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4572 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4573 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4574 (errors-ipa.o: ../common/errors.c): Remove.
4575 (format-ipa.o: ../common/format.c): Remove.
4576 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4577
4578 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4579
4580 * Makefile.in (%-ipa.o: %.c): New rule.
4581 (tracepoint-ipa.o: tracepoint.c): Remove.
4582 (utils-ipa.o: utils.c): Remove.
4583 (remote-utils-ipa.o: remote-utils.c): Remove.
4584 (regcache-ipa.o: regcache.c): Remove.
4585 (i386-linux-ipa.o: i386-linux.c): Remove.
4586 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4587 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4588 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4589 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4590 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4591 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4592 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4593 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4594 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4595 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4596 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4597 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4598 (aarch64-ipa.o: aarch64.c): Remove.
4599 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4600 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4601 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4602 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4603 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4604 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4605 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4606 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4607 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4608 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4609 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4610 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4611 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4612 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4613 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4614 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4615 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4616 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4617 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4618 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4619 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4620 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4621 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4622 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4623 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4624 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4625 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4626 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4627 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4628 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4629 (tdesc-ipa.o: tdesc.c): Remove.
4630 (x32-linux-ipa.o: x32-linux.c): Remove.
4631 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4632 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4633
4634 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4635
4636 * Makefile.in (%.o: ../arch/%.c): New rule.
4637 (arm.o: ../arch/arm.c): Remove.
4638 (arm-linux.o: ../arch/arm-linux.c): Remove.
4639 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4640 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4641
4642 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4643
4644 * Makefile.in (%.o: ../nat/%.c): New rule.
4645 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4646 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4647 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4648 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4649 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4650 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4651 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4652 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4653 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4654 (linux-personality.o: ../nat/linux-personality.c): Remove.
4655 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4656 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4657 (x86-linux.o: ../nat/x86-linux.c): Remove.
4658 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4659 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4660
4661 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4662
4663 * Makefile.in (%.o: ../common/%.c): New rule.
4664 (signals.o: ../common/signals.c): Remove.
4665 (print-utils.o: ../common/print-utils.c): Remove.
4666 (rsp-low.o: ../common/rsp-low.c): Remove.
4667 (common-utils.o: ../common/common-utils.c): Remove.
4668 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4669 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4670 (vec.o: ../common/vec.c): Remove.
4671 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4672 (xml-utils.o: ../common/xml-utils.c): Remove.
4673 (ptid.o: ../common/ptid.c): Remove.
4674 (buffer.o: ../common/buffer.c): Remove.
4675 (format.o: ../common/format.c): Remove.
4676 (filestuff.o: ../common/filestuff.c): Remove.
4677 (agent.o: ../common/agent.c): Remove.
4678 (errors.o: ../common/errors.c): Remove.
4679 (environ.o: ../common/environ.c): Remove.
4680 (common-debug.o: ../common/common-debug.c): Remove.
4681 (cleanups.o: ../common/cleanups.c): Remove.
4682 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4683 (fileio.o: ../common/fileio.c): Remove.
4684 (common-regcache.o: ../common/common-regcache.c): Remove.
4685 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4686 (new-op.o: ../common/new-op.c): Remove.
4687 (btrace-common.o: ../common/btrace-common.c): Remove.
4688
4689 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4690
4691 * Makefile.in (%.o: ../target/%.c): New rule.
4692 (waitstatus.o: ../target/waitstatus.c): Remove.
4693
4694 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4695
4696 * Makefile.in
4697 (%.c: ../regformats/%.dat,
4698 (%.c: ../regformats/arm/%.dat,
4699 (%.c: ../regformats/i386/%.dat,
4700 (%.c: ../regformats/rs6000/%.dat): New rules.
4701 (aarch64.c): Remove.
4702 (reg-arm.c): Remove.
4703 (arm-with-iwmmxt.c): Remove.
4704 (arm-with-vfpv2.c): Remove.
4705 (arm-with-vfpv3.c): Remove.
4706 (arm-with-neon.c): Remove.
4707 (reg-bfin.c): Remove.
4708 (reg-cris.c): Remove.
4709 (reg-crisv32.c): Remove.
4710 (i386.c): Remove.
4711 (i386-linux.c): Remove.
4712 (i386-avx.c): Remove.
4713 (i386-avx-linux.c): Remove.
4714 (i386-avx-avx512.c): Remove.
4715 (i386-avx-avx512-linux.c): Remove.
4716 (i386-mpx.c): Remove.
4717 (i386-mpx-linux.c): Remove.
4718 (i386-avx-mpx-avx512-pku.c): Remove.
4719 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4720 (i386-avx-mpx.c): Remove.
4721 (i386-avx-mpx-linux.c): Remove.
4722 (i386-mmx.c): Remove.
4723 (i386-mmx-linux.c): Remove.
4724 (reg-ia64.c): Remove.
4725 (reg-m32r.c): Remove.
4726 (reg-m68k.c): Remove.
4727 (reg-cf.c): Remove.
4728 (mips-linux.c): Remove.
4729 (mips-dsp-linux.c): Remove.
4730 (mips64-linux.c): Remove.
4731 (mips64-dsp-linux.c): Remove.
4732 (nios2-linux.c): Remove.
4733 (powerpc-32.c): Remove.
4734 (powerpc-32l.c): Remove.
4735 (powerpc-altivec32l.c): Remove.
4736 (powerpc-cell32l.c): Remove.
4737 (powerpc-vsx32l.c): Remove.
4738 (powerpc-isa205-32l.c): Remove.
4739 (powerpc-isa205-altivec32l.c): Remove.
4740 (powerpc-isa205-vsx32l.c): Remove.
4741 (powerpc-e500l.c): Remove.
4742 (powerpc-64l.c): Remove.
4743 (powerpc-altivec64l.c): Remove.
4744 (powerpc-cell64l.c): Remove.
4745 (powerpc-vsx64l.c): Remove.
4746 (powerpc-isa205-64l.c): Remove.
4747 (powerpc-isa205-altivec64l.c): Remove.
4748 (powerpc-isa205-vsx64l.c): Remove.
4749 (s390-linux32.c): Remove.
4750 (s390-linux32v1.c): Remove.
4751 (s390-linux32v2.c): Remove.
4752 (s390-linux64.c): Remove.
4753 (s390-linux64v1.c): Remove.
4754 (s390-linux64v2.c): Remove.
4755 (s390-te-linux64.c): Remove.
4756 (s390-vx-linux64.c): Remove.
4757 (s390-tevx-linux64.c): Remove.
4758 (s390x-linux64.c): Remove.
4759 (s390x-linux64v1.c): Remove.
4760 (s390x-linux64v2.c): Remove.
4761 (s390x-te-linux64.c): Remove.
4762 (s390x-vx-linux64.c): Remove.
4763 (s390x-tevx-linux64.c): Remove.
4764 (tic6x-c64xp-linux.c): Remove.
4765 (tic6x-c64x-linux.c): Remove.
4766 (tic6x-c62x-linux.c): Remove.
4767 (reg-sh.c): Remove.
4768 (reg-sparc64.c): Remove.
4769 (reg-spu.c): Remove.
4770 (amd64.c): Remove.
4771 (amd64-linux.c): Remove.
4772 (amd64-avx.c): Remove.
4773 (amd64-avx-linux.c): Remove.
4774 (amd64-avx-avx512.c): Remove.
4775 (amd64-avx-avx512-linux.c): Remove.
4776 (amd64-mpx.c): Remove.
4777 (amd64-mpx-linux.c): Remove.
4778 (amd64-avx-mpx-avx512-pku.c): Remove.
4779 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4780 (amd64-avx-mpx.c): Remove.
4781 (amd64-avx-mpx-linux.c): Remove.
4782 (x32.c): Remove.
4783 (x32-linux.c): Remove.
4784 (x32-avx.c): Remove.
4785 (x32-avx-linux.c): Remove.
4786 (x32-avx-avx512.c): Remove.
4787 (x32-avx-avx512-linux.c): Remove.
4788 (reg-xtensa.c): Remove.
4789 (reg-tilegx.c): Remove.
4790 (reg-tilegx32.c): Remove.
4791
4792 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4793
4794 * Makefile.in (SFILES): Add "common/environ.c".
4795 (OBJS): Add "common/environ.h".
4796
4797 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4798
4799 * configure.ac: Check if the fs_base and gs_base members of
4800 `struct user_regs_struct' exist.
4801 * config.in: Regenerated.
4802 * configure: Likewise.
4803
4804 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4805
4806 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4807 target_read_memory.
4808 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4809 (get_next_pcs_syscall_next_pc): Likewise.
4810
4811 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4812
4813 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4814 * nto-x86-low.c: Likewise.
4815
4816 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4817
4818 * Makefile.in: Include disable-implicit-rules.mk.
4819
4820 2016-11-23 Pedro Alves <palves@redhat.com>
4821
4822 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4823 (debug_vprintf): Use std::chrono::steady_clock instead of
4824 gettimeofday. Use '.' instead of ':'.
4825 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4826 (get_timestamp): Use std::chrono::steady_clock instead of
4827 gettimeofday.
4828
4829 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4830
4831 * Makefile.in: Fix whitespace formatting.
4832
4833 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4834
4835 * Makefile.in (SFILES, OBS): Flatten list and order
4836 alphabetically.
4837
4838 2016-11-23 Pedro Alves <palves@redhat.com>
4839
4840 * event-loop.c (handle_file_event): Use warning.
4841 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4842 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4843 Use warning.
4844
4845 2016-11-23 Pedro Alves <palves@redhat.com>
4846
4847 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4848 output.
4849 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4850 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4851 debug_printf and debug_flush for debug output.
4852 * server.c (handle_general_set): Likewise.
4853 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4854 output.
4855
4856 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4857
4858 * Makefile.in (.c.o): Replace rule with ...
4859 (%.o: %.c): ... this one.
4860
4861 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4862
4863 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4864 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4865 make.
4866 * configure.ac: Remove checks for the make program.
4867 * configure: Re-generate.
4868
4869 2016-10-28 Pedro Alves <palves@redhat.com>
4870
4871 * Makefile.in (CXX_DIALECT): Get from configure.
4872 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4873 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4874 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4875 * config.in: Regenerate.
4876 * configure: Regenerate.
4877
4878 2016-10-27 Yao Qi <yao.qi@linaro.org>
4879
4880 * linux-low.c (linux_supports_range_stepping): Return true if
4881 can_software_single_step return true.
4882
4883 2016-10-27 Yao Qi <yao.qi@linaro.org>
4884
4885 * inferiors.c (find_inferior_in_random): New function.
4886 * inferiors.h (find_inferior_in_random): Declare.
4887 * linux-low.c (linux_wait_for_event_filtered): Call
4888 find_inferior_in_random instead of find_inferior.
4889
4890 2016-10-27 Yao Qi <yao.qi@linaro.org>
4891
4892 * linux-low.c (linux_wait_1): If single-step breakpoints are
4893 inserted, remove them.
4894
4895 2016-10-26 Pedro Alves <palves@redhat.com>
4896
4897 * linux-low.c (handle_extended_wait): Link parent/child fork
4898 threads.
4899 (linux_wait_1): Unlink them.
4900 (linux_set_resume_request): Ignore resume requests for
4901 already-resumed and unhandled fork child threads.
4902 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4903 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4904 New functions.
4905 (handle_v_requests) <vCont>: Don't call require_running.
4906 * server.h (in_queued_stop_replies): New declaration.
4907
4908 2016-10-24 Yao Qi <yao.qi@linaro.org>
4909
4910 PR server/20733
4911 * linux-aarch64-low.c (append_insns): Cast the return value to
4912 'uint32_t *'.
4913
4914 2016-10-10 Yao Qi <yao.qi@linaro.org>
4915
4916 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4917
4918 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4919
4920 * target.c (target_supports_multi_process): New function, moved
4921 from...
4922 * target.h (target_supports_multi_process): ... here. Remove
4923 macro.
4924
4925 2016-10-05 Tom Tromey <tom@tromey.com>
4926
4927 PR remote/20655:
4928 * tracepoint.c (handle_tracepoint_bkpts): Check
4929 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4930
4931 2016-10-05 Yao Qi <yao.qi@linaro.org>
4932
4933 * configure.srv: Update the path of arm-*.xml files.
4934
4935 2016-10-05 Terry Guo <terry.guo@arm.com>
4936 Yao Qi <yao.qi@linaro.org>
4937
4938 * Makefile.in: Adjust the path of rules.
4939 * configure.srv: Update the path of xml files.
4940 * regformats/arm-with-iwmmxt.dat: Regenerated.
4941 * regformats/arm-with-neon.dat: Likewise.
4942 * regformats/arm-with-vfpv2.dat: Likewise.
4943 * regformats/arm-with-vfpv3.dat Likewise.
4944
4945 2016-09-30 Yao Qi <yao.qi@linaro.org>
4946
4947 PR gdbserver/20627
4948 * target.c (target_stop_and_wait): Don't call
4949 target_continue_no_signal, use resume_stop instead.
4950
4951 2016-09-26 Yao Qi <yao.qi@linaro.org>
4952
4953 * linux-low.c (linux_wait_1): Call debug_exit.
4954
4955 2016-09-23 Pedro Alves <palves@redhat.com>
4956
4957 * Makefile.in (SFILES): Add common/new-op.c.
4958 (OBS): Add common/new-op.o.
4959 (new-op.o): New rule.
4960
4961 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4962
4963 * .gitinore: Ignore more files.
4964
4965 2016-09-21 Yao Qi <yao.qi@linaro.org>
4966
4967 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4968 23.
4969
4970 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4971
4972 * server.c (start_inferior): Call target_mourn_inferior instead of
4973 mourn_inferior; pass ptid_t argument to it.
4974 (resume): Likewise.
4975 (handle_target_event): Likewise.
4976 * target.c (target_mourn_inferior): New function.
4977 * target.h (mourn_inferior): Delete macro.
4978
4979 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4980
4981 * linux-low.c (lwp_is_stepping): New function.
4982
4983 2016-09-06 Carl Love <cel@us.ibm.com>
4984
4985 * server.c (start_inferior): Fixed comment, requested comment change
4986 didn't get updated correctly. Removed reference to ptrace () call as
4987 it is only true on Linux systems.
4988
4989 2016-09-06 Carl Love <cel@us.ibm.com>
4990
4991 * server.c (start_inferior): Do not call
4992 function target_post_create_inferior () if the
4993 inferior process has already exited.
4994
4995 2016-09-05 Pedro Alves <palves@redhat.com>
4996
4997 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4998 (COMPILE.pre, CC_LD): Use CXX directly.
4999 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5000 * acinclude.m4: Don't include build-with-cxx.m4.
5001 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5002 * configure: Regenerate.
5003
5004 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5005
5006 PR gdb/19495
5007 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5008 call writing data to own_buf.
5009
5010 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5011
5012 * target.c (mywait): Call target_wait instead of
5013 the_target->wait.
5014 (target_wait): New function.
5015
5016 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5017
5018 * server.c (start_inferior): New variable 'ptid'. Replace calls
5019 to the_target->resume by target_continue{,_no_signal}, depending
5020 on the case.
5021 * target.c (target_stop_and_wait): Call target_continue_no_signal
5022 instead of the_target->resume.
5023 (target_continue): New function.
5024
5025 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5026
5027 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5028
5029 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5030
5031 PR server/20491
5032 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5033 ps_prochandle.
5034 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5035 * linux-arm-low.c (ps_get_thread_area): Likewise.
5036 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5037 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5038 * linux-mips-low.c (ps_get_thread_area): Likewise.
5039 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5040 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5041 * linux-x86-low.c (ps_get_thread_area): Likewise.
5042 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5043
5044 2016-08-19 Pedro Alves <palves@redhat.com>
5045
5046 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5047
5048 2016-08-19 Pedro Alves <palves@redhat.com>
5049
5050 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5051 comment. Use memcpy instead of casting through unsigned long.
5052
5053 2016-08-19 Pedro Alves <palves@redhat.com>
5054
5055 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5056 allocating around 0x80000000.
5057
5058 2016-08-19 Pedro Alves <palves@redhat.com>
5059
5060 PR gdb/20415
5061 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5062 (x32-avx512-linux-ipa.o): New rules.
5063 * configure.ac (x86_64-*-linux*): New x32 check.
5064 * configure.srv (ipa_x32_linux_regobj): New.
5065 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5066 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5067 descriptions.
5068 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5069 descriptions.
5070 * configure: Regenerate.
5071
5072 2016-08-09 Pedro Alves <palves@redhat.com>
5073
5074 PR gdb/18653
5075 * Makefile.in (OBS): Add signals-state-save-restore.o.
5076 (signals-state-save-restore.o): New rule.
5077 * config.in: Regenerate.
5078 * configure: Regenerate.
5079 * linux-low.c: Include "signals-state-save-restore.h".
5080 (linux_create_inferior): Call
5081 restore_original_signals_state.
5082 * server.c: Include "dispositions-save-restore.h".
5083 (captured_main): Call save_original_signals_state.
5084
5085 2016-08-05 Pedro Alves <palves@redhat.com>
5086
5087 * configure: Regenerate.
5088
5089 2016-08-04 Yao Qi <yao.qi@linaro.org>
5090
5091 * linux-low.c (regsets_fetch_inferior_registers): Check
5092 errno is ESRCH or not.
5093
5094 2016-08-02 Yao Qi <yao.qi@linaro.org>
5095
5096 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5097 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5098 (thread_db_load_search): Update.
5099 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5100 td_ta_set_event and td_ta_event_getmsg.
5101
5102 2016-07-26 Pedro Alves <palves@redhat.com>
5103
5104 PR server/20414
5105 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5106 of unsigned long for 64-bit registers and use uint32_t instead of
5107 unsigned int for 32-bit registers.
5108
5109 2016-07-26 Pedro Alves <palves@redhat.com>
5110
5111 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5112 to 'ptrace'.
5113
5114 2016-07-21 Tom Tromey <tom@tromey.com>
5115
5116 * configure: Rebuild.
5117
5118 2016-07-21 Yao Qi <yao.qi@linaro.org>
5119
5120 * mem-break.c (find_gdb_breakpoint): Cast bp to
5121 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5122
5123 2016-07-21 Yao Qi <yao.qi@linaro.org>
5124
5125 * server.c (handle_v_requests): Support s and S actions
5126 if target_supports_software_single_step return true.
5127
5128 2016-07-21 Yao Qi <yao.qi@linaro.org>
5129
5130 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5131 is resume_step, call maybe_hw_step.
5132 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5133 and unstop them.
5134 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5135 breakpoints or not.
5136 (proceed_one_lwp): If resume request is resume_step, install
5137 reinsert breakpoints and call maybe_hw_step.
5138
5139 2016-07-21 Yao Qi <yao.qi@linaro.org>
5140
5141 * linux-low.c (proceed_one_lwp): Declare.
5142 (linux_resume_one_thread): Remove local variable 'step'.
5143 Lift code enqueue signal. Call proceed_one_lwp instead of
5144 linux_resume_one_lwp.
5145
5146 2016-07-21 Yao Qi <yao.qi@linaro.org>
5147
5148 * linux-low.c (linux_resume_one_thread): Call
5149 enqueue_pending_signal.
5150
5151 2016-07-21 Yao Qi <yao.qi@linaro.org>
5152
5153 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5154 * inferiors.c (do_restore_current_thread_cleanup): New function.
5155 (make_cleanup_restore_current_thread): Likewise.
5156 * linux-low.c (install_software_single_step_breakpoints): Call
5157 make_cleanup_restore_current_thread. Switch current_thread to
5158 thread.
5159
5160 2016-07-21 Yao Qi <yao.qi@linaro.org>
5161
5162 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5163 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5164 (clone_one_breakpoint): Likewise.
5165 (delete_reinsert_breakpoints): Change parameter to thread.
5166 Callers updated.
5167 (has_reinsert_breakpoints): Likewise.
5168 (uninsert_reinsert_breakpoints): Likewise.
5169 (reinsert_reinsert_breakpoints): Likewise.
5170 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5171 (delete_reinsert_breakpoints): Likewise.
5172 (reinsert_reinsert_breakpoints): Likewise.
5173 (uninsert_reinsert_breakpoints): Likewise.
5174 (has_reinsert_breakpoints): Likewise.
5175
5176 2016-07-21 Yao Qi <yao.qi@linaro.org>
5177
5178 * inferiors.c (get_thread_process): Make parameter const.
5179 * inferiors.h (get_thread_process): Update declaration.
5180 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5181 Add new parameters child_thread and parent_thread. Callers
5182 updated.
5183 * mem-break.h (clone_all_breakpoints): Update declaration.
5184
5185 2016-07-21 Yao Qi <yao.qi@linaro.org>
5186
5187 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5188 <command_list, handler>: Remove.
5189 (struct gdb_breakpoint): New.
5190 (struct other_breakpoint): New.
5191 (struct reinsert_breakpoint): New.
5192 (is_gdb_breakpoint): New function.
5193 (any_persistent_commands): Update command_list if
5194 is_gdb_breakpoint returns true.
5195 (set_breakpoint): Create breakpoints according to their types.
5196 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5197 (set_gdb_breakpoint_1): Likewise.
5198 (set_gdb_breakpoint): Likewise.
5199 (clear_breakpoint_conditions): Change parameter type to
5200 'struct gdb_breakpoint *'.
5201 (clear_breakpoint_commands): Likewise.
5202 (clear_breakpoint_conditions_and_commands): Likewise.
5203 (add_condition_to_breakpoint): Likewise.
5204 (add_breakpoint_condition): Likewise.
5205 (add_commands_to_breakpoint): Likewise.
5206 (check_breakpoints): Check other_breakpoint.
5207 (clone_one_breakpoint): Clone breakpopint according to its type.
5208 * mem-break.h (struct gdb_breakpoint): Declare.
5209 (set_gdb_breakpoint): Update declaration.
5210 (clear_breakpoint_conditions_and_commands): Likewise.
5211 (add_breakpoint_condition): Likewise.
5212 (add_breakpoint_commands): Likewise.
5213 * server.c (process_point_options): Change parameter type to
5214 'struct gdb_breakpoint *'.
5215
5216 2016-07-21 Yao Qi <yao.qi@linaro.org>
5217
5218 * mem-break.c (set_breakpoint_at): Rename it to ...
5219 (set_breakpoint_type_at): ... it.
5220 (set_breakpoint_at): Call set_breakpoint_type_at.
5221 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5222 * mem-break.h (set_breakpoint_at): Update comments.
5223
5224 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5225
5226 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5227 to buf parameter.
5228 (nios2_store_gregset): Likewise.
5229
5230 2016-07-01 Pedro Alves <palves@redhat.com>
5231 Antoine Tremblay <antoine.tremblay@ericsson.com>
5232
5233 * linux-low.c: Change interface to take the target lwp_info
5234 pointer directly and return void. Handle detaching from a zombie
5235 thread.
5236 (linux_detach_lwp_callback): New function.
5237 (linux_detach): Detach from the leader thread after detaching from
5238 the clone threads.
5239
5240 2016-06-28 Yao Qi <yao.qi@linaro.org>
5241
5242 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5243 for variable new_offset.
5244 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5245 (aarch64_ftrace_insn_reloc_cb): Likewise.
5246 (aarch64_ftrace_insn_reloc_tb): Likewise.
5247 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5248 PRIx64 instead of PRIx32.
5249
5250 2016-06-28 Yao Qi <yao.qi@linaro.org>
5251
5252 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5253 (the_low_target): Install arm_get_syscall_trapinfo.
5254
5255 2016-06-28 Yao Qi <yao.qi@linaro.org>
5256
5257 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5258 function.
5259 (the_low_target): Install aarch64_get_syscall_trapinfo.
5260
5261 2016-06-28 Yao Qi <yao.qi@linaro.org>
5262
5263 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5264 Callers updated.
5265 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5266 Remove parameter sysno.
5267 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5268 sysret.
5269
5270 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5271
5272 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5273 (s390_emit_ne_goto): Likewise.
5274 (s390_emit_lt_goto): Likewise.
5275 (s390_emit_le_goto): Likewise.
5276 (s390_emit_gt_goto): Likewise.
5277 (s390_emit_ge_goto): Likewise.
5278 (s390x_emit_eq_goto): Likewise.
5279 (s390x_emit_ne_goto): Likewise.
5280 (s390x_emit_lt_goto): Likewise.
5281 (s390x_emit_le_goto): Likewise.
5282 (s390x_emit_gt_goto): Likewise.
5283 (s390x_emit_ge_goto): Likewise.
5284 (s390_emit_ops_impl): Mark variable static.
5285 (s390x_emit_ops): Likewise.
5286
5287 2016-06-17 Yao Qi <yao.qi@linaro.org>
5288
5289 * linux-low.c (handle_extended_wait): Call
5290 uninsert_reinsert_breakpoints for the parent process. Remove
5291 reinsert breakpoints from the child process. Reinsert them to
5292 the parent process when vfork is done.
5293 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5294 (reinsert_reinsert_breakpoints): New function.
5295 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5296 (reinsert_reinsert_breakpoints): Declare.
5297
5298 2016-06-17 Yao Qi <yao.qi@linaro.org>
5299
5300 * linux-low.c (handle_extended_wait): If the parent is doing
5301 step-over, remove the reinsert breakpoints from the forked child.
5302
5303 2016-06-17 Yao Qi <yao.qi@linaro.org>
5304
5305 * linux-low.c (unsuspend_all_lwps): Declare.
5306 (linux_low_filter_event): If thread exited, call finish_step_over.
5307 If step-over is finished, unsuspend other threads.
5308
5309 2016-06-17 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-low.c (linux_resume_one_lwp_throw): Assert
5312 has_reinsert_breakpoints returns false.
5313 * mem-break.c (delete_disabled_breakpoints): Assert
5314 bp type isn't reinsert_breakpoint.
5315
5316 2016-06-17 Yao Qi <yao.qi@linaro.org>
5317
5318 * linux-low.c (maybe_hw_step): New function.
5319 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5320 (finish_step_over): Switch current_thread to lwp temporarily,
5321 and assert has_reinsert_breakpoints returns true.
5322 (proceed_one_lwp): Call maybe_hw_step.
5323 * mem-break.c (has_reinsert_breakpoints): New function.
5324 * mem-break.h (has_reinsert_breakpoints): Declare.
5325
5326 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5327
5328 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5329
5330 2016-05-17 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5333 instead of find_inferior.
5334
5335 2016-05-05 Yao Qi <yao.qi@linaro.org>
5336
5337 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5338 Initialize res to zero.
5339
5340 2016-05-05 Yao Qi <yao.qi@linaro.org>
5341
5342 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5343 to uint32_t.
5344
5345 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5346
5347 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5348 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5349 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5350
5351 2016-04-28 Par Olsson <par.olsson@windriver.com>
5352 Simon Marchi <simon.marchi@ericsson.com>
5353
5354 * tracepoint.c (write_inferior_int8): New function.
5355 (cmd_qtenable_disable): Write enable flag using
5356 write_inferior_int8.
5357
5358 2016-04-25 Yao Qi <yao.qi@linaro.org>
5359
5360 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5361 (need_step_over_p): Return zero if the LWP has pending signals
5362 can be delivered on software single step target.
5363
5364 2016-04-25 Yao Qi <yao.qi@linaro.org>
5365
5366 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5367 return instead of error.
5368
5369 2016-04-22 Yao Qi <yao.qi@linaro.org>
5370
5371 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5372 to 23.
5373
5374 2016-04-22 Yao Qi <yao.qi@linaro.org>
5375
5376 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5377 signal when stepping over breakpoint with software single
5378 step.
5379
5380 2016-04-21 Pedro Alves <palves@redhat.com>
5381
5382 * linux-s390-low.c (s390_collect_ptrace_register)
5383 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5384 add casts.
5385 (s390_check_regset): Use void * instead of gdb_byte *.
5386
5387 2016-04-20 Pedro Alves <palves@redhat.com>
5388
5389 * configure: Renegerate.
5390
5391 2016-04-20 Yao Qi <yao.qi@linaro.org>
5392
5393 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5394 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5395 number 16.
5396 (arm_store_gregset): Likewise.
5397
5398 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5399
5400 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5401 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5402 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5403 (amd64-avx-mpx-linux.c): New rules.
5404 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5405 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5406 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5407 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5408 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5409 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5410 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5411 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5412 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5413 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5414 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5415 * linux-x86-low.c (x86_linux_read_description): Add case for
5416 X86_XSTATE_AVX_MPX_MASK.
5417 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5418 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5419 init_registers_i386_avx_mpx_linux.
5420 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5421 (initialize_low_tracepoint): Call
5422 init_registers_i386_avx_mpx_linux.
5423 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5424 (initialize_low_tracepoint): Call
5425 init_registers_amd64_avx_mpx_linux.
5426 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5427 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5428 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5429 declarations.
5430
5431 2016-04-18 Pedro Alves <palves@redhat.com>
5432
5433 * configure: Regenerate.
5434
5435 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5436
5437 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5438 (aarch64_emit_sub): Likewise.
5439
5440 2016-04-12 Pedro Alves <palves@redhat.com>
5441
5442 * utils.c (prepare_to_throw_exception): Delete.
5443
5444 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5445
5446 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5447
5448 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5449
5450 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5451
5452 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5453
5454 * linux-aarch64-ipa.c: Add <elf.h> include.
5455 * linux-ppc-ipa.c: Add <elf.h> include.
5456 * linux-s390-ipa.c: Add <elf.h> include.
5457
5458 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5459
5460 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5461 (get_raw_reg_ptr): Likewise.
5462 (get_trace_state_variable_value_ptr): Likewise.
5463 (set_trace_state_variable_value_ptr): Likewise.
5464 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5465 char *.
5466
5467 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5468 Marcin Kościelnicki <koriakin@0x04.net>
5469
5470 PR/17221
5471 * linux-ppc-low.c (emit_insns): New function.
5472 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5473 (ppc_emit_prologue): New function.
5474 (ppc_emit_epilogue): New function.
5475 (ppc_emit_add): New function.
5476 (ppc_emit_sub): New function.
5477 (ppc_emit_mul): New function.
5478 (ppc_emit_lsh): New function.
5479 (ppc_emit_rsh_signed): New function.
5480 (ppc_emit_rsh_unsigned): New function.
5481 (ppc_emit_ext): New function.
5482 (ppc_emit_zero_ext): New function.
5483 (ppc_emit_log_not): New function.
5484 (ppc_emit_bit_and): New function.
5485 (ppc_emit_bit_or): New function.
5486 (ppc_emit_bit_xor): New function.
5487 (ppc_emit_bit_not): New function.
5488 (ppc_emit_equal): New function.
5489 (ppc_emit_less_signed): New function.
5490 (ppc_emit_less_unsigned): New function.
5491 (ppc_emit_ref): New function.
5492 (ppc_emit_const): New function.
5493 (ppc_emit_reg): New function.
5494 (ppc_emit_pop): New function.
5495 (ppc_emit_stack_flush): New function.
5496 (ppc_emit_swap): New function.
5497 (ppc_emit_stack_adjust): New function.
5498 (ppc_emit_call): New function.
5499 (ppc_emit_int_call_1): New function.
5500 (ppc_emit_void_call_2): New function.
5501 (ppc_emit_if_goto): New function.
5502 (ppc_emit_goto): New function.
5503 (ppc_emit_eq_goto): New function.
5504 (ppc_emit_ne_goto): New function.
5505 (ppc_emit_lt_goto): New function.
5506 (ppc_emit_le_goto): New function.
5507 (ppc_emit_gt_goto): New function.
5508 (ppc_emit_ge_goto): New function.
5509 (ppc_write_goto_address): New function.
5510 (ppc_emit_ops_impl): New static variable.
5511 (ppc64v1_emit_prologue): New function.
5512 (ppc64v2_emit_prologue): New function.
5513 (ppc64_emit_epilogue): New function.
5514 (ppc64_emit_add): New function.
5515 (ppc64_emit_sub): New function.
5516 (ppc64_emit_mul): New function.
5517 (ppc64_emit_lsh): New function.
5518 (ppc64_emit_rsh_signed): New function.
5519 (ppc64_emit_rsh_unsigned): New function.
5520 (ppc64_emit_ext): New function.
5521 (ppc64_emit_zero_ext): New function.
5522 (ppc64_emit_log_not): New function.
5523 (ppc64_emit_bit_and): New function.
5524 (ppc64_emit_bit_or): New function.
5525 (ppc64_emit_bit_xor): New function.
5526 (ppc64_emit_bit_not): New function.
5527 (ppc64_emit_equal): New function.
5528 (ppc64_emit_less_signed): New function.
5529 (ppc64_emit_less_unsigned): New function.
5530 (ppc64_emit_ref): New function.
5531 (ppc64_emit_const): New function.
5532 (ppc64v1_emit_reg): New function.
5533 (ppc64v2_emit_reg): New function.
5534 (ppc64_emit_pop): New function.
5535 (ppc64_emit_stack_flush): New function.
5536 (ppc64_emit_swap): New function.
5537 (ppc64v1_emit_call): New function.
5538 (ppc64v2_emit_call): New function.
5539 (ppc64v1_emit_int_call_1): New function.
5540 (ppc64v2_emit_int_call_1): New function.
5541 (ppc64v1_emit_void_call_2): New function.
5542 (ppc64v2_emit_void_call_2): New function.
5543 (ppc64_emit_if_goto): New function.
5544 (ppc64_emit_eq_goto): New function.
5545 (ppc64_emit_ne_goto): New function.
5546 (ppc64_emit_lt_goto): New function.
5547 (ppc64_emit_le_goto): New function.
5548 (ppc64_emit_gt_goto): New function.
5549 (ppc64_emit_ge_goto): New function.
5550 (ppc64v1_emit_ops_impl): New static variable.
5551 (ppc64v2_emit_ops_impl): New static variable.
5552 (ppc_emit_ops): New function.
5553 (linux_low_target): Wire in ppc_emit_ops.
5554
5555 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5556 Marcin Kościelnicki <koriakin@0x04.net>
5557
5558 PR/17221
5559 * Makefile.in: Add powerpc-*-ipa.o
5560 * configure.srv: Add ipa_obj for powerpc*-linux.
5561 * linux-ppc-ipa.c: New file.
5562 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5563 includes.
5564 (PPC_FIELD): New macro.
5565 (PPC_SEXT): New macro.
5566 (PPC_OP6): New macro.
5567 (PPC_BO): New macro.
5568 (PPC_LI): New macro.
5569 (PPC_BD): New macro.
5570 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5571 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5572 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5573 (ppc_get_thread_area): New function.
5574 (is_elfv2_inferior): New function.
5575 (gen_ds_form): New function.
5576 (GEN_STD): New macro.
5577 (GEN_STDU): New macro.
5578 (GEN_LD): New macro.
5579 (GEN_LDU): New macro.
5580 (gen_d_form): New function.
5581 (GEN_ADDI): New macro.
5582 (GEN_ADDIS): New macro.
5583 (GEN_LI): New macro.
5584 (GEN_LIS): New macro.
5585 (GEN_ORI): New macro.
5586 (GEN_ORIS): New macro.
5587 (GEN_LWZ): New macro.
5588 (GEN_STW): New macro.
5589 (GEN_STWU): New macro.
5590 (gen_xfx_form): New function.
5591 (GEN_MFSPR): New macro.
5592 (GEN_MTSPR): New macro.
5593 (GEN_MFCR): New macro.
5594 (GEN_MTCR): New macro.
5595 (GEN_SYNC): New macro.
5596 (GEN_LWSYNC): New macro.
5597 (gen_x_form): New function.
5598 (GEN_OR): New macro.
5599 (GEN_MR): New macro.
5600 (GEN_LWARX): New macro.
5601 (GEN_STWCX): New macro.
5602 (GEN_CMPW): New macro.
5603 (gen_md_form): New function.
5604 (GEN_RLDICL): New macro.
5605 (GEN_RLDICR): New macro.
5606 (gen_i_form): New function.
5607 (GEN_B): New macro.
5608 (GEN_BL): New macro.
5609 (gen_b_form): New function.
5610 (GEN_BNE): New macro.
5611 (GEN_LOAD): New macro.
5612 (GEN_STORE): New macro.
5613 (gen_limm): New function.
5614 (gen_atomic_xchg): New function.
5615 (gen_call): New function.
5616 (ppc_relocate_instruction): New function.
5617 (ppc_install_fast_tracepoint_jump_pad): New function.
5618 (ppc_get_min_fast_tracepoint_insn_len): New function.
5619 (ppc_get_ipa_tdesc_idx): New function.
5620 (the_low_target): Wire in the new functions.
5621 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5622 tdescs.
5623 * linux-ppc-tdesc.h: New file.
5624
5625 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5626
5627 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5628 (alloc_jump_pad_buffer): New function.
5629 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5630 (alloc_jump_pad_buffer): New function.
5631 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5632 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5633 (alloc_jump_pad_buffer): New function.
5634 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5635 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5636 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5637 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5638
5639 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5640
5641 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5642 * linux-amd64-ipa.c: Likewise.
5643 * linux-i386-ipa.c: Likewise.
5644 * linux-s390-ipa.c: Likewise.
5645 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5646 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5647 set_trace_state_variable_value_ptr.
5648 (struct ipa_sym_addresses): Likewise.
5649 (symbol_list): Likewise.
5650 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5651 accessing gdb_collect directly.
5652 (gdb_collect_ptr_type): New typedef.
5653 (get_raw_reg_ptr_type): New typedef.
5654 (get_trace_state_variable_value_ptr_type): New typedef.
5655 (set_trace_state_variable_value_ptr_type): New typedef.
5656 (gdb_collect_ptr): New global.
5657 (get_raw_reg_ptr): New global.
5658 (get_trace_state_variable_value_ptr): New global.
5659 (set_trace_state_variable_value_ptr): New global.
5660 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5661 accessing get_raw_reg directly.
5662 (get_get_tsv_func_addr): Likewise for
5663 get_trace_state_variable_value_ptr.
5664 (get_set_tsv_func_addr): Likewise for
5665 set_trace_state_variable_value_ptr.
5666 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5667
5668 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5669
5670 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5671
5672 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5673
5674 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5675 packets.
5676 (relocate_instruction): Remove own_buf.
5677 * server.c (own_buf): Make global.
5678 (handle_v_requests): Make global.
5679 * server.h (own_buf): New declaration.
5680 (handle_v_requests): New prototype.
5681
5682 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5683
5684 PR 18377
5685 * linux-s390-low.c (add_insns): New function.
5686 (s390_emit_prologue): New function.
5687 (s390_emit_epilogue): New function.
5688 (s390_emit_add): New function.
5689 (s390_emit_sub): New function.
5690 (s390_emit_mul): New function.
5691 (s390_emit_lsh): New function.
5692 (s390_emit_rsh_signed): New function.
5693 (s390_emit_rsh_unsigned): New function.
5694 (s390_emit_ext): New function.
5695 (s390_emit_log_not): New function.
5696 (s390_emit_bit_and): New function.
5697 (s390_emit_bit_or): New function.
5698 (s390_emit_bit_xor): New function.
5699 (s390_emit_bit_not): New function.
5700 (s390_emit_equal): New function.
5701 (s390_emit_less_signed): New function.
5702 (s390_emit_less_unsigned): New function.
5703 (s390_emit_ref): New function.
5704 (s390_emit_if_goto): New function.
5705 (s390_emit_goto): New function.
5706 (s390_write_goto_address): New function.
5707 (s390_emit_litpool): New function.
5708 (s390_emit_const): New function.
5709 (s390_emit_call): New function.
5710 (s390_emit_reg): New function.
5711 (s390_emit_pop): New function.
5712 (s390_emit_stack_flush): New function.
5713 (s390_emit_zero_ext): New function.
5714 (s390_emit_swap): New function.
5715 (s390_emit_stack_adjust): New function.
5716 (s390_emit_set_r2): New function.
5717 (s390_emit_int_call_1): New function.
5718 (s390_emit_void_call_2): New function.
5719 (s390_emit_eq_goto): New function.
5720 (s390_emit_ne_goto): New function.
5721 (s390_emit_lt_goto): New function.
5722 (s390_emit_le_goto): New function.
5723 (s390_emit_gt_goto): New function.
5724 (s390_emit_ge_goto): New function.
5725 (s390x_emit_prologue): New function.
5726 (s390x_emit_epilogue): New function.
5727 (s390x_emit_add): New function.
5728 (s390x_emit_sub): New function.
5729 (s390x_emit_mul): New function.
5730 (s390x_emit_lsh): New function.
5731 (s390x_emit_rsh_signed): New function.
5732 (s390x_emit_rsh_unsigned): New function.
5733 (s390x_emit_ext): New function.
5734 (s390x_emit_log_not): New function.
5735 (s390x_emit_bit_and): New function.
5736 (s390x_emit_bit_or): New function.
5737 (s390x_emit_bit_xor): New function.
5738 (s390x_emit_bit_not): New function.
5739 (s390x_emit_equal): New function.
5740 (s390x_emit_less_signed): New function.
5741 (s390x_emit_less_unsigned): New function.
5742 (s390x_emit_ref): New function.
5743 (s390x_emit_if_goto): New function.
5744 (s390x_emit_const): New function.
5745 (s390x_emit_call): New function.
5746 (s390x_emit_reg): New function.
5747 (s390x_emit_pop): New function.
5748 (s390x_emit_stack_flush): New function.
5749 (s390x_emit_zero_ext): New function.
5750 (s390x_emit_swap): New function.
5751 (s390x_emit_stack_adjust): New function.
5752 (s390x_emit_int_call_1): New function.
5753 (s390x_emit_void_call_2): New function.
5754 (s390x_emit_eq_goto): New function.
5755 (s390x_emit_ne_goto): New function.
5756 (s390x_emit_lt_goto): New function.
5757 (s390x_emit_le_goto): New function.
5758 (s390x_emit_gt_goto): New function.
5759 (s390x_emit_ge_goto): New function.
5760 (s390_emit_ops): New function.
5761 (struct linux_target_ops): Fill in emit_ops hook.
5762
5763 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5764
5765 PR 18377
5766 * Makefile.in: Add s390 IPA files.
5767 * configure.srv: Build IPA for s390.
5768 * linux-s390-ipa.c: New file.
5769 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5770 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5771 (tdesc_s390_linux32): Likewise.
5772 (init_registers_s390_linux32v1): Likewise.
5773 (tdesc_s390_linux32v1): Likewise.
5774 (init_registers_s390_linux32v2): Likewise.
5775 (tdesc_s390_linux32v2): Likewise.
5776 (init_registers_s390_linux64): Likewise.
5777 (tdesc_s390_linux64): Likewise.
5778 (init_registers_s390_linux64v1): Likewise.
5779 (tdesc_s390_linux64v1): Likewise.
5780 (init_registers_s390_linux64v2): Likewise.
5781 (tdesc_s390_linux64v2): Likewise.
5782 (init_registers_s390_te_linux64): Likewise.
5783 (tdesc_s390_te_linux64): Likewise.
5784 (init_registers_s390_vx_linux64): Likewise.
5785 (tdesc_s390_vx_linux64): Likewise.
5786 (init_registers_s390_tevx_linux64): Likewise.
5787 (tdesc_s390_tevx_linux64): Likewise.
5788 (init_registers_s390x_linux64): Likewise.
5789 (tdesc_s390x_linux64): Likewise.
5790 (init_registers_s390x_linux64v1): Likewise.
5791 (tdesc_s390x_linux64v1): Likewise.
5792 (init_registers_s390x_linux64v2): Likewise.
5793 (tdesc_s390x_linux64v2): Likewise.
5794 (init_registers_s390x_te_linux64): Likewise.
5795 (tdesc_s390x_te_linux64): Likewise.
5796 (init_registers_s390x_vx_linux64): Likewise.
5797 (tdesc_s390x_vx_linux64): Likewise.
5798 (init_registers_s390x_tevx_linux64): Likewise.
5799 (tdesc_s390x_tevx_linux64): Likewise.
5800 (have_hwcap_s390_vx): New static variable.
5801 (s390_arch_setup): Fill have_hwcap_s390_vx.
5802 (s390_get_thread_area): New function.
5803 (s390_ft_entry_gpr_esa): New const.
5804 (s390_ft_entry_gpr_zarch): New const.
5805 (s390_ft_entry_misc): New const.
5806 (s390_ft_entry_fr): New const.
5807 (s390_ft_entry_vr): New const.
5808 (s390_ft_main_31): New const.
5809 (s390_ft_main_64): New const.
5810 (s390_ft_exit_fr): New const.
5811 (s390_ft_exit_vr): New const.
5812 (s390_ft_exit_misc): New const.
5813 (s390_ft_exit_gpr_esa): New const.
5814 (s390_ft_exit_gpr_zarch): New const.
5815 (append_insns): New function.
5816 (s390_relocate_instruction): New function.
5817 (s390_install_fast_tracepoint_jump_pad): New function.
5818 (s390_get_min_fast_tracepoint_insn_len): New function.
5819 (s390_get_ipa_tdesc_idx): New function.
5820 (struct linux_target_ops): Wire in the above functions.
5821 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5822 * linux-s390-tdesc.h: New file.
5823
5824 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5825
5826 * linux-s390-low.c (s390_supports_tracepoints): New function.
5827 (struct linux_target_ops): Fill supports_tracepoints hook.
5828
5829 2016-03-18 Yao Qi <yao.qi@linaro.org>
5830
5831 * linux-low.c (lwp_signal_can_be_delivered): New function.
5832 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5833
5834 2016-03-18 Yao Qi <yao.qi@linaro.org>
5835
5836 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5837 0 if signal is enqueued. Remove 'signal' from one debugging
5838 message. Move one debugging message to some lines below.
5839 Remove code setting 'signal' to 0.
5840
5841 2016-03-18 Yao Qi <yao.qi@linaro.org>
5842
5843 * linux-low.c (linux_low_filter_event): Remove redundant
5844 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5845
5846 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5847
5848 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5849 (struct linux_target_ops): Wire in the above.
5850
5851 2016-03-03 Yao Qi <yao.qi@linaro.org>
5852
5853 * linux-low.c: Update comments to start_step_over.
5854
5855 2016-03-03 Yao Qi <yao.qi@linaro.org>
5856
5857 PR server/19736
5858 * linux-low.c (handle_extended_wait): Set child suspended
5859 if event_lwp->bp_reinsert isn't zero.
5860
5861 2016-03-02 Yao Qi <yao.qi@linaro.org>
5862
5863 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5864 enqueue_pending_signal.
5865
5866 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5867
5868 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5869 is actually loaded.
5870
5871 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5872
5873 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5874 (s390_regmap_3264) [!__s390x__]: New global.
5875 (s390_collect_ptrace_register): Skip map entries containing -1.
5876 (s390_supply_ptrace_register): Ditto.
5877 (s390_fill_gprs_high): New function.
5878 (s390_store_gprs_high): New function.
5879 (s390_regsets): Add NT_S390_HIGH_GPRS.
5880 (s390_get_hwcap): Enable on 31-bit.
5881 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5882 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5883 Detect NT_S390_HIGH_GPRS.
5884 (s390_usrregs_info_3264): Enable on 31-bit.
5885 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5886 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5887
5888 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5889
5890 PR gdb/13808
5891 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5892 * configure.srv: Ditto.
5893 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5894 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5895 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5896 (init_registers_amd64_linux): Remove prototype.
5897 (tdesc_amd64_linux): Remove declaration.
5898 (get_ipa_tdesc): New function.
5899 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5900 initialize remaining tdescs.
5901 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5902 (init_registers_i386_linux): Remove prototype.
5903 (tdesc_i386_linux): Remove declaration.
5904 (get_ipa_tdesc): New function.
5905 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5906 initialize remaining tdescs.
5907 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5908 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5909 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5910 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5911 (x86_get_ipa_tdesc_idx): New function.
5912 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5913 * linux-x86-tdesc.h: New file.
5914 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5915 (target_get_ipa_tdesc_idx): New macro.
5916 * tracepoint.c (ipa_tdesc_idx): New macro.
5917 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5918 (symbol_list): Add ipa_tdesc_idx.
5919 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5920 (ipa_tdesc): Remove.
5921 (ipa_tdesc_idx): New variable.
5922 (get_context_regcache): Use get_ipa_tdesc.
5923 (gdb_collect): Ditto.
5924 (gdb_probe): Ditto.
5925 * tracepoint.h (get_ipa_tdesc): New prototype.
5926 (ipa_tdesc): Remove.
5927
5928 2016-02-24 Pedro Alves <palves@redhat.com>
5929
5930 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5931 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5932 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5933 Factor out common code between the USE_SIGTRAP_SIGINFO and
5934 !USE_SIGTRAP_SIGINFO blocks.
5935 (linux_low_filter_event): Call save_stop_reason instead of
5936 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5937 Update comments.
5938 (linux_wait_1): Update comments.
5939
5940 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5941
5942 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5943 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5944 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5945 ppc_insert_point, ppc_remove_point.
5946
5947 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5948
5949 * linux-s390-low.c (s390_supports_z_point_type): New function.
5950 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5951
5952 2016-02-16 Yao Qi <yao.qi@linaro.org>
5953
5954 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5955 PC. Get pc from regcache_read_pc.
5956
5957 2016-02-12 Yao Qi <yao.qi@linaro.org>
5958
5959 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5960 or linux_get_pc_32bit.
5961 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5962
5963 2016-02-12 Yao Qi <yao.qi@linaro.org>
5964
5965 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5966 arm_linux_get_next_pcs_fixup.
5967
5968 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5969
5970 * tracepoint.c (x_tracepoint_action_download): Change
5971 write_inferior_data_ptr to write_inferior_data_pointer.
5972 (cmd_qtstart): Likewise.
5973 (write_inferior_data_ptr): Remove.
5974 (download_agent_expr): Change write_inferior_data_ptr to
5975 write_inferior_data_pointer.
5976 (download_tracepoint_1): Likewise.
5977 (download_tracepoint): Likewise.
5978 (download_trace_state_variables): Likewise.
5979
5980 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5981 Marcin Kościelnicki <koriakin@0x04.net>
5982
5983 * tracepoint.c (struct tracepoint_action_ops): Remove.
5984 (struct tracepoint_action): Remove ops.
5985 (m_tracepoint_action_download, r_tracepoint_action_download)
5986 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5987 size and offset accordingly.
5988 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5989 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5990 (tracepoint_action_send, tracepoint_action_download): New functions.
5991 Helpers for trace action handlers.
5992 (add_tracepoint_action): Remove setup actions ops.
5993 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5994
5995 2016-02-10 Yao Qi <yao.qi@linaro.org>
5996
5997 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5998
5999 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6000
6001 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6002 to AC_OUTPUT.
6003 * configure: Regenerate.
6004
6005 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6006
6007 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6008 void * to gdb_byte *.
6009 * linux-low.c (siginfo_fixup): Likewise.
6010 (linux_xfer_siginfo): Likewise.
6011 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6012 Likewise.
6013 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6014
6015 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6016
6017 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6018 to srv_tgtobj.
6019 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6020 to srv_tgtobj.
6021 * linux-x86-low.c [__x86_64__]: Include
6022 "nat/amd64-linux-siginfo.h".
6023 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6024 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6025 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6026 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6027 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6028 (cpt_si_fd, si_timerid, si_overrun): Move from
6029 nat/amd64-linux-siginfo.c.
6030 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6031
6032 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6033
6034 * server.c (skip_to_semicolon): Remove.
6035 (process_point_options): Use strchrnul instead of
6036 skip_to_semicolon.
6037
6038 2016-01-26 Yao Qi <yao.qi@linaro.org>
6039
6040 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6041 * linux-low.c (install_software_single_step_breakpoints): Don't
6042 call regcache_read_pc.
6043 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6044 argument pc.
6045
6046 2016-01-26 Yao Qi <yao.qi@linaro.org>
6047
6048 * linux-low.c (install_software_single_step_breakpoints): Call
6049 regcache_read_pc instead of get_pc.
6050
6051 2016-01-26 Yao Qi <yao.qi@linaro.org>
6052
6053 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6054 (unblock_async_io): Rename to ...
6055 (block_unblock_async_io): ... it. New function.
6056 (enable_async_io): Don't install SIGIO handler. Unblock it
6057 instead.
6058 (disable_async_io): Don't ignore SIGIO. Block it instead.
6059 (initialize_async_io): Install SIGIO handler. Don't call
6060 unblock_async_io.
6061
6062 2016-01-26 Yao Qi <yao.qi@linaro.org>
6063
6064 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6065 first character is '\003', call *the_target->request_interrupt.
6066
6067 2016-01-25 Yao Qi <yao.qi@linaro.org>
6068
6069 * remote-utils.c (new_thread_notify): Remove.
6070 (dead_thread_notify): Likewise.
6071 * remote-utils.h (new_thread_notify): Remove declaration.
6072 (dead_thread_notify): Likewise.
6073
6074 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6075
6076 * gdb.trace/pending.exp: Fix expected message on continue.
6077
6078 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6079
6080 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6081 it works properly on big-endian machines where sizeof (CORE_ADDR)
6082 != sizeof (void *).
6083
6084 2016-01-21 Pedro Alves <palves@redhat.com>
6085
6086 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6087 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6088 * configure: Regenerate.
6089
6090 2016-01-21 Yao Qi <yao.qi@linaro.org>
6091
6092 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6093 is_thumb and set it according to CPSR saved on the stack.
6094 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6095 arm_sigreturn_next_pc.
6096
6097 2016-01-18 Yao Qi <yao.qi@linaro.org>
6098
6099 * linux-low.c (linux_set_pc_64bit): New function.
6100 (linux_get_pc_64bit): New function.
6101 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6102 Declare.
6103 * linux-sparc-low.c (debug_threads): Remove declaration.
6104 (sparc_get_pc): Remove.
6105 (the_low_target): Use linux_get_pc_64bit instead of
6106 sparc_get_pc.
6107 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6108 (the_low_target): Use linux_get_pc_64bit and
6109 linux_set_pc_64bit.
6110
6111 2016-01-18 Yao Qi <yao.qi@linaro.org>
6112
6113 * linux-arm-low.c (debug_threads): Remove declaration.
6114 (arm_get_pc, arm_set_pc): Remove.
6115 (the_low_target): Use linux_get_pc_32bit and
6116 linux_set_pc_32bit.
6117 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6118 (the_low_target): Use linux_get_pc_32bit and
6119 linux_set_pc_32bit.
6120 * linux-cris-low.c (debug_threads): Remove declaration.
6121 (cris_get_pc, cris_set_pc,): Remove.
6122 (the_low_target): Use linux_get_pc_32bit and
6123 linux_set_pc_32bit.
6124 * linux-crisv32-low.c (debug_threads): Remove declaration.
6125 (cris_get_pc, cris_set_pc): Remove.
6126 (the_low_target): Use linux_get_pc_32bit and
6127 linux_set_pc_32bit.
6128 * linux-low.c: Include inttypes.h.
6129 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6130 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6131 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6132 (the_low_target): Use linux_get_pc_32bit and
6133 linux_set_pc_32bit.
6134 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6135 (the_low_target): Use linux_get_pc_32bit and
6136 linux_set_pc_32bit.
6137 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6138 (the_low_target): Use linux_get_pc_32bit and
6139 linux_set_pc_32bit.
6140 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6141 (the_low_target): Use linux_get_pc_32bit and
6142 linux_set_pc_32bit.
6143 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6144 (the_low_target): Use linux_get_pc_32bit and
6145 linux_set_pc_32bit.
6146
6147 2016-01-18 Gary Benson <gbenson@redhat.com>
6148
6149 * configure.ac (AC_FUNC_FORK): New check.
6150 * config.in: Regenerate.
6151 * configure: Likewise.
6152
6153 2016-01-14 Yao Qi <yao.qi@linaro.org>
6154
6155 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6156 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6157 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6158 arm_get_next_pcs_ctor.
6159
6160 2016-01-12 Josh Stone <jistone@redhat.com>
6161 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6162
6163 * inferiors.h: Include "gdb_vecs.h".
6164 (struct process_info): Add syscalls_to_catch.
6165 * inferiors.c (remove_process): Free syscalls_to_catch.
6166 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6167 syscall_return stops.
6168 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6169 * server.c (handle_general_set): Handle QCatchSyscalls.
6170 (handle_query): Report support for QCatchSyscalls.
6171 * target.h (struct target_ops): Add supports_catch_syscall.
6172 (target_supports_catch_syscall): New macro.
6173 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6174 (struct lwp_info): Add syscall_state.
6175 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6176 Maintain syscall_state and syscalls_to_catch across exec.
6177 (get_syscall_trapinfo): New function, proxy to the_low_target.
6178 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6179 (linux_low_filter_event): Toggle syscall_state entry/return for
6180 syscall traps, and set it ignored for all others.
6181 (gdb_catching_syscalls_p): New function.
6182 (gdb_catch_this_syscall_p): New function.
6183 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6184 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6185 (linux_supports_catch_syscall): New function.
6186 (linux_target_ops): Install it.
6187 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6188 (the_low_target): Install it.
6189
6190 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6191
6192 * acinclude.m4: Include new ../warning.m4 file.
6193 * configure: Regenerated.
6194 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6195
6196 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6197
6198 * ax.c (is_goto_target): Mark static.
6199 * linux-low.c (register_addr): Likewise.
6200 (linux_fetch_registers, linux_store_registers): Likewise.
6201 * mem-break.c (any_persistent_commands): Fix old prototype.
6202 (add_commands_to_breakpoint): Mark static.
6203 * regcache.c (find_register_by_name): Delete unused func.
6204 * remote-utils.c (hex_or_minus_one): Mark static.
6205 * server.c (monitor_show_help): Mark static.
6206 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6207 handle_v_requests): Likewise.
6208
6209 2016-01-12 Pedro Alves <palves@redhat.com>
6210
6211 Remove use of the registered trademark symbol throughout.
6212
6213 2016-01-08 Yao Qi <yao.qi@linaro.org>
6214
6215 * remote-utils.c (getpkt): If c is '\003', call target hook
6216 request_interrupt.
6217
6218 2016-01-06 Yao Qi <yao.qi@linaro.org>
6219
6220 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6221 linux-aarch32-low.c.
6222 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6223 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6224 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6225 (thumb2_breakpoint): Declare.
6226 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6227 linux-aarch32-low.h.
6228 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6229 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6230 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6231
6232 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6233
6234 * gdbreplay.c (gdbreplay_version): Change copyright year in
6235 version message.
6236 * server.c (gdbserver_version): Likewise.
6237
6238 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6239
6240 * server.c (crc32_table): Delete.
6241 (crc32): Use libiberty's xcrc32 function.
6242
6243 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6244
6245 * lynx-low.c (lynx_delete_thread_callback): New function.
6246 (lynx_mourn): Properly delete our process and all of its
6247 threads. Remove call to clear_inferiors.
6248
6249 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6250
6251 * target.c (thread_search_callback): Add check that
6252 the thread_stopped target callback is not NULL before
6253 calling it.
6254
6255 2015-12-21 Yao Qi <yao.qi@linaro.org>
6256
6257 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6258 arm breakpoint.
6259
6260 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6261
6262 * server.c (handle_query): Call target_supports_software_single_step.
6263
6264 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6265
6266 * linux-low.c (single_step): New function.
6267 (linux_resume_one_lwp_throw): Call single_step.
6268 (start_step_over): Likewise.
6269
6270 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6271
6272 * Makefile.in (SFILES): Append arch/arm-linux.c,
6273 arch/arm-get-next-pcs.c.
6274 (arm-linux.o): New rule.
6275 (arm-get-next-pcs.o): New rule.
6276 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6277 arm-linux.o.
6278 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6279 to linux-aarch32-low.c.
6280 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6281 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6282 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6283 (thumb2_breakpoint_len): Likewise.
6284 (arm_is_thumb_mode): Make non-static.
6285 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6286 from linux-aarch32-low.c.
6287 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6288 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6289 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6290 (thumb2_breakpoint_len): Likewise.
6291 (arm_is_thumb_mode): New declaration.
6292 * linux-arm-low.c: Include arch/arm-linux.h
6293 aarch/arm-get-next-pcs.h, sys/syscall.h.
6294 (get_next_pcs_ops): New struct.
6295 (get_next_pcs_addr_bits_remove): New function.
6296 (get_next_pcs_is_thumb): New function.
6297 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6298 (arm_sigreturn_next_pc): Likewise.
6299 (get_next_pcs_syscall_next_pc): Likewise.
6300 (arm_gdbserver_get_next_pcs): Likewise.
6301 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6302 Initialize.
6303 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6304 * server.h: Include gdb_vecs.h.
6305
6306 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6307
6308 * Makefile.in (SFILES): Append common/common-regcache.c.
6309 (OBS): Append common-regcache.o.
6310 (common-regcache.o): New rule.
6311 * regcache.c (init_register_cache): Initialize cache to
6312 REG_UNAVAILABLE.
6313 (regcache_raw_read_unsigned): New function.
6314 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6315 register_status enum.
6316
6317 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6318
6319 * linux-aarch64-low.c (the_low_targets): Rename
6320 breakpoint_reinsert_addr to get_next_pcs.
6321 * linux-arm-low.c (the_low_targets): Likewise.
6322 * linux-bfin-low.c (the_low_targets): Likewise.
6323 * linux-cris-low.c (the_low_targets): Likewise.
6324 * linux-crisv32-low.c (the_low_targets): Likewise.
6325 * linux-low.c (can_software_single_step): Likewise.
6326 (install_software_single_step_breakpoints): New function.
6327 (start_step_over): Use install_software_single_step_breakpoints.
6328 * linux-low.h: New CORE_ADDR vector.
6329 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6330 get_next_pcs.
6331 * linux-mips-low.c (the_low_targets): Likewise.
6332 * linux-nios2-low.c (the_low_targets): Likewise.
6333 * linux-sparc-low.c (the_low_targets): Likewise.
6334
6335 2015-12-17 Pedro Alves <palves@redhat.com>
6336
6337 * linux-low.c (linux_kill_one_lwp): Remove references to
6338 LinuxThreads.
6339 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6340 to 'kill'.
6341 (linux_init_signals): Delete.
6342 (initialize_low): Adjust.
6343 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6344
6345 2015-12-16 Pedro Alves <palves@redhat.com>
6346
6347 * configure.ac (compiler warning flags): When testing a
6348 -Wno-foo option, check whether -Wfoo works instead.
6349 * configure: Regenerate.
6350
6351 2015-12-11 Don Breazeal <donb@codesourcery.com>
6352
6353 * server.c (process_serial_event): Don't exit from gdbserver
6354 in remote mode if there are still active inferiors.
6355
6356 2015-12-11 Yao Qi <yao.qi@linaro.org>
6357
6358 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6359 arm_breakpoint_at if the process is 32-bit.
6360
6361 2015-12-11 Yao Qi <yao.qi@linaro.org>
6362
6363 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6364 arm breakpoint.
6365
6366 2015-12-07 Yao Qi <yao.qi@linaro.org>
6367
6368 * configure.srv: Append arm.o to srv_tgtobj for
6369 aarch64*-*-linux* target.
6370 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6371 from linux-arm-low.c.
6372 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6373 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6374 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6375 (thumb2_breakpoint_len): Likewise.
6376 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6377 (arm_breakpoint_kinds): Likewise.
6378 (arm_breakpoint_kind_from_pc): Likewise.
6379 (arm_sw_breakpoint_from_kind): Likewise.
6380 (arm_breakpoint_kind_from_current_state): Likewise.
6381 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6382 (arm_sw_breakpoint_from_kind): Declare.
6383 (arm_breakpoint_kind_from_current_state): Declare.
6384 (arm_breakpoint_at): Declare.
6385 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6386 arm_sw_breakpoint_from_kind if process is 32-bit.
6387 (aarch64_breakpoint_kind_from_pc): New function.
6388 (aarch64_breakpoint_kind_from_current_state): New function.
6389 (the_low_target): Initialize fields breakpoint_kind_from_pc
6390 and breakpoint_kind_from_current_state.
6391 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6392 linux-aarch32-low.c.
6393 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6394 (arm_breakpoint, arm_breakpoint_len): Likewise.
6395 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6396 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6397 (arm_is_thumb_mode): Likewise.
6398 (arm_breakpoint_at): Likewise.
6399 (arm_breakpoint_kind_from_pc): Likewise.
6400 (arm_sw_breakpoint_from_kind): Likewise.
6401 (arm_breakpoint_kind_from_current_state): Likewise.
6402
6403 Revert:
6404 2015-08-04 Yao Qi <yao.qi@linaro.org>
6405
6406 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6407 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6408 * server.c (extended_protocol): Remove "static".
6409 * server.h (extended_protocol): Declare it.
6410
6411 2015-12-04 Josh Stone <jistone@redhat.com>
6412
6413 * target.h (struct target_ops) <arch_setup>: Rename to ...
6414 (struct target_ops) <post_create_inferior>: ... this.
6415 (target_arch_setup): Rename to ...
6416 (target_post_create_inferior): ... this, calling post_create_inferior.
6417 * server.c (start_inferior): Update target_arch_setup calls to
6418 target_post_create_inferior.
6419 * linux-low.c (linux_low_ptrace_options): Forward declare.
6420 (linux_arch_setup): Update its comment for general use.
6421 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6422 (struct linux_target_ops): Use linux_post_create_inferior.
6423 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6424 to post_create_inferior.
6425 * nto-low.c (struct nto_target_ops): Likewise.
6426 * spu-low.c (struct spu_target_ops): Likewise.
6427 * win32-low.c (struct win32_target_ops): Likewise.
6428
6429 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6430
6431 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6432
6433 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6434
6435 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6436 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6437 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6438 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6439 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6440 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6441 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6442 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6443 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6444 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6445 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6446 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6447
6448 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6449
6450 * linux-low.c (linux_look_up_symbols): Don't call
6451 linux_supports_traceclone.
6452 * linux-low.h (thread_db_init): Remove use_events argument.
6453 * thread-db.c (thread_db_use_event): Remove global variable.
6454 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6455 (struct thread_db) <td_create_bp>: Remove field.
6456 (thread_db_create_event): Remove function.
6457 (thread_db_enable_reporting): Likewise.
6458 (find_one_thread): Don't check for thread_db_use_events.
6459 (attach_thread): Likewise.
6460 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6461 (try_thread_db_load_1): Don't check for thread_db_use_events.
6462 (thread_db_init): Remove use_events argument and thread events
6463 handling.
6464 (remove_thread_event_breakpoints): Remove function.
6465 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6466
6467 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6468
6469 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6470 New function.
6471 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6472 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6473 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6474 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6475 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6476 Initialize.
6477 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6478 New function.
6479 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6480 * linux-low.c (can_hardware_single_step): Use
6481 supports_hardware_single_step.
6482 (can_software_single_step): New function.
6483 (start_step_over): Call can_software_single_step.
6484 (linux_supports_hardware_single_step): New function.
6485 (struct target_ops) <supports_software_single_step>: Initialize.
6486 * linux-low.h (struct linux_target_ops)
6487 <supports_hardware_single_step>: Initialize.
6488 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6489 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6490 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6491 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6492 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6493 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6494 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6496 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6497 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6498 Initialize.
6499 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6500 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6501 Initialize.
6502 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6503 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6504 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6505 New function.
6506 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6507 * target.h (struct target_ops): <supports_software_single_step>:
6508 New field.
6509 (target_supports_software_single_step): New macro.
6510
6511 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6512
6513 * linux-low.c (linux_wait_1): Fix pc advance condition.
6514 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6515 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6516
6517 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6518
6519 * linux-arm-low.c (arm_is_thumb_mode): New function.
6520 (arm_breakpoint_at): Use arm_is_thumb_mode.
6521 (arm_breakpoint_kind_from_current_state): New function.
6522 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6523 Initialize.
6524 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6525 (linux_breakpoint_kind_from_current_state): New function.
6526 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6527 * linux-low.h (struct linux_target_ops)
6528 <breakpoint_kind_from_current_state>: New field.
6529 * target.h (struct target_ops): Likewise.
6530 (target_breakpoint_kind_from_current_state): New macro.
6531
6532 2015-11-30 Pedro Alves <palves@redhat.com>
6533
6534 * linux-low.c (linux_resume): Wake up the event loop before
6535 returning.
6536
6537 2015-11-30 Pedro Alves <palves@redhat.com>
6538
6539 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6540 check.
6541 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6542 to -1.
6543 * target.c (struct thread_search): New structure.
6544 (thread_search_callback): New function.
6545 (prev_general_thread): New global.
6546 (prepare_to_access_memory, done_accessing_memory): New functions.
6547 * target.h (prepare_to_access_memory, done_accessing_memory):
6548 Replace macros with function declarations.
6549
6550 2015-11-30 Pedro Alves <palves@redhat.com>
6551
6552 PR 14618
6553 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6554 report TARGET_WAITKIND_NO_RESUMED.
6555 * remote-utils.c (prepare_resume_reply): Handle
6556 TARGET_WAITKIND_NO_RESUMED.
6557 * server.c (report_no_resumed): New global.
6558 (handle_query) <qSupported>: Handle "no-resumed+". Report
6559 "no-resumed+" support.
6560 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6561 return error if the client doesn't support no-resumed events.
6562 (push_stop_notification): New function.
6563 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6564 events if the client supports them.
6565
6566 2015-11-30 Pedro Alves <palves@redhat.com>
6567
6568 * linux-low.c (thread_still_has_status_pending_p): Don't check
6569 vCont;t here.
6570 (lwp_resumed): New function.
6571 (status_pending_p_callback): Return early if the LWP is not
6572 supposed to be resumed.
6573
6574 2015-11-30 Pedro Alves <palves@redhat.com>
6575
6576 * linux-low.c (handle_extended_wait): Assert that the LWP's
6577 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6578 thread create events, leave the new child's status pending.
6579 (linux_low_filter_event): If GDB wants to hear about thread exit
6580 events, leave the LWP marked dead and don't delete it.
6581 (linux_wait_for_event_filtered): Don't check for thread exit.
6582 (filter_exit_event): New function.
6583 (linux_wait_1): Use it, when returning an exit event.
6584 (linux_resume_one_lwp_throw): Assert that the LWP's
6585 waitstatus is TARGET_WAITKIND_IGNORE.
6586 * remote-utils.c (prepare_resume_reply): Handle
6587 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6588 * server.c (report_thread_events): New global.
6589 (handle_general_set): Handle QThreadEvents.
6590 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6591 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6592 TARGET_WAITKIND_THREAD_EXITED.
6593 * server.h (report_thread_events): Declare.
6594
6595 2015-11-30 Pedro Alves <palves@redhat.com>
6596
6597 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6598 the thread's last_resume_kind was resume_stop.
6599
6600 2015-11-30 Pedro Alves <palves@redhat.com>
6601
6602 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6603 before returning.
6604
6605 2015-11-30 Pedro Alves <palves@redhat.com>
6606
6607 * server.c (handle_v_requests): Handle vCtrlC.
6608
6609 2015-11-30 Pedro Alves <palves@redhat.com>
6610
6611 * gdbthread.h (find_any_thread_of_pid): Declare.
6612 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6613 functions.
6614 * server.c (handle_query): If current_thread is NULL, look for
6615 another thread of the selected process.
6616
6617 2015-11-26 Daniel Colascione <dancol@dancol.org>
6618 Simon Marchi <simon.marchi@ericsson.com>
6619
6620 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6621 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6622 name in reply.
6623 * target.h (struct target_ops) <thread_name>: New field.
6624 (target_thread_name): New macro.
6625
6626 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6627
6628 * regcache.h (regcache_invalidate_pid): Add declaration.
6629 * regcache.c (regcache_invalidate_pid): New function, extracted
6630 from regcache_invalidate.
6631 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6632 Add trivial documentation comment.
6633 * lynx-low.c: Use regcache_invalidate_pid instead of
6634 regcache_invalidate.
6635
6636 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6637
6638 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6639 and Elf64_auxv_t if the target is Android.
6640
6641 2015-11-22 Doug Evans <xdje42@gmail.com>
6642
6643 * target.h: #include <sys/types.h>.
6644
6645 2015-11-19 Pedro Alves <palves@redhat.com>
6646
6647 * linux-low.c (linux_process_qsupported): Change prototype.
6648 Adjust.
6649 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6650 Change prototype.
6651 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6652 and adjust to loop over all features.
6653 * server.c (handle_query) <qSupported>: Adjust to call
6654 target_process_qsupported once, passing it a vector of unprocessed
6655 features.
6656 * target.h (struct target_ops) <process_qsupported>: Change
6657 prototype.
6658 (target_process_qsupported): Adjust.
6659
6660 2015-11-19 Pedro Alves <palves@redhat.com>
6661
6662 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6663 mode.
6664 * configure: Regenerate.
6665
6666 2015-11-19 Pedro Alves <palves@redhat.com>
6667
6668 * configure: Regenerate.
6669
6670 2015-11-19 Yao Qi <yao.qi@linaro.org>
6671
6672 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6673 type to uint32_t.
6674
6675 2015-11-19 Yao Qi <yao.qi@linaro.org>
6676
6677 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6678 (struct aarch64_operand): Move enum out.
6679
6680 2015-11-19 Yao Qi <yao.qi@linaro.org>
6681
6682 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6683 struct user_fpsimd_state *.
6684 (aarch64_store_fpregset): Likewise.
6685
6686 2015-11-19 Yao Qi <yao.qi@linaro.org>
6687
6688 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6689 struct user_pt_regs *.
6690 (aarch64_store_gregset): Likewise.
6691
6692 2015-11-18 Pedro Alves <palves@redhat.com>
6693
6694 * Makefile.in (all_object_files): Add $IPA_OBJS.
6695
6696 2015-11-17 Pedro Alves <palves@redhat.com>
6697
6698 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6699 GDB_SIGNAL_0 and gdb_signal_to_string.
6700
6701 2015-11-17 Pedro Alves <palves@redhat.com>
6702
6703 * win32-low.c (handle_output_debug_string): Remove parameter.
6704 (win32_kill): Remove our_status local and adjust call to
6705 handle_output_debug_string.
6706 (get_child_debug_event): Adjust call to
6707 handle_output_debug_string.
6708
6709 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6710
6711 * linux-mips-low.c (mips_fill_gregset): Add cast.
6712 (mips_store_gregset): Likewise.
6713 (mips_fill_fpregset): Likewise.
6714 (mips_store_fpregset): Likewise.
6715
6716 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6717
6718 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6719 priv.
6720
6721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6722
6723 * linux-mips-low.c (mips_linux_new_thread): Change type of
6724 watch_type to enum target_hw_bp_type.
6725
6726 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6727
6728 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6729 Change return type to arm_hwbp_type.
6730
6731 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6732
6733 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6734 (arm_store_gregset): Likewise.
6735 * linux-arm-low.c (arm_get_hwcap): Likewise.
6736 (arm_read_description): Likewise.
6737
6738 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6739
6740 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6741
6742 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6743
6744 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6745 (ppc_fill_vsxregset): Likewise.
6746 (ppc_store_vsxregset): Likewise.
6747 (ppc_fill_vrregset): Likewise.
6748 (ppc_store_vrregset): Likewise.
6749 (ppc_fill_evrregset): Likewise.
6750 (ppc_store_evrregset): Likewise.
6751
6752 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6753
6754 * linux-ppc-low.c (ppc_usrregs_info): Remove
6755 forward-declaration.
6756 (ppc_arch_setup): Move lower in file.
6757
6758 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6759
6760 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6761 (ps_pdwrite): Likewise.
6762
6763 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6764
6765 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6766 to after assert checks.
6767
6768 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6769
6770 * proc-service.c (ps_pdread): Add/adjust casts.
6771 (ps_pdwrite): Add/adjust casts.
6772
6773 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6774
6775 * server.c (handle_search_memory_1): Cast return value of
6776 memmem.
6777
6778 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6779
6780 * server.c (write_qxfer_response): Change type of data to
6781 gdb_byte *.
6782
6783 2015-10-29 Pedro Alves <palves@redhat.com>
6784
6785 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6786
6787 2015-10-29 Pedro Alves <palves@redhat.com>
6788
6789 * tracepoint.c (clear_installed_tracepoints): Add casts.
6790
6791 2015-10-29 Pedro Alves <palves@redhat.com>
6792
6793 * server.c (handle_v_cont, process_serial_event): Add enum
6794 gdb_signal casts to signal parsing code.
6795
6796 2015-10-29 Pedro Alves <palves@redhat.com>
6797
6798 * linux-low.h (NULL_REGSET): Define.
6799 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6800 * linux-arm-low.c (arm_regsets): Likewise.
6801 * linux-crisv32-low.c (cris_regsets): Likewise.
6802 * linux-m68k-low.c (m68k_regsets): Likewise.
6803 * linux-mips-low.c (mips_regsets): Likewise.
6804 * linux-nios2-low.c (nios2_regsets): Likewise.
6805 * linux-ppc-low.c (ppc_regsets): Likewise.
6806 * linux-s390-low.c (s390_regsets): Likewise.
6807 * linux-sh-low.c (sh_regsets): Likewise.
6808 * linux-sparc-low.c (sparc_regsets): Likewise.
6809 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6810 * linux-tile-low.c (tile_regsets): Likewise.
6811 * linux-x86-low.c (x86_regsets): Likewise.
6812 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6813
6814 2015-10-29 Pedro Alves <palves@redhat.com>
6815
6816 * linux-low.h (NULL_REGSET): Define.
6817 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6818 * linux-arm-low.c (arm_regsets): Likewise.
6819 * linux-crisv32-low.c (cris_regsets): Likewise.
6820 * linux-m68k-low.c (m68k_regsets): Likewise.
6821 * linux-mips-low.c (mips_regsets): Likewise.
6822 * linux-nios2-low.c (nios2_regsets): Likewise.
6823 * linux-ppc-low.c (ppc_regsets): Likewise.
6824 * linux-s390-low.c (s390_regsets): Likewise.
6825 * linux-sh-low.c (sh_regsets): Likewise.
6826 * linux-sparc-low.c (sparc_regsets): Likewise.
6827 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6828 * linux-tile-low.c (tile_regsets): Likewise.
6829 * linux-x86-low.c (x86_regsets): Likewise.
6830 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6831
6832 2015-10-26 Doug Evans <dje@google.com>
6833
6834 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6835
6836 2015-10-26 Doug Evans <dje@google.com>
6837
6838 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6839
6840 2015-10-26 Doug Evans <dje@google.com>
6841
6842 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6843 for debug_printf.
6844 (attach_thread, find_new_threads_callback): Ditto.
6845
6846 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6847
6848 * mem-break.h (set_breakpoint_data): Remove.
6849
6850 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6851
6852 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6853 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6854 (initialize_low): Remove set_breakpoint_data call.
6855 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6856 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6857 (initialize_low): Remove set_breakpoint_data call.
6858 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6859 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6860 (initialize_low): Remove set_breakpoint_data call.
6861
6862 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6863
6864 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6865 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6866 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6867 * target.h (target_breakpoint_kind_from_pc): New macro.
6868
6869 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6870
6871 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6872 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6873 the default breakpoint kind.
6874
6875 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6876
6877 * linux-arm-low.c (arm_supports_z_point_type): Add software
6878 breakpoint support.
6879
6880 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6881
6882 * linux-arm-low.c: Refactor breakpoint definitions.
6883 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6884 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6885
6886 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6887
6888 * Makefile.in: Add arm.c/o.
6889 * configure.srv: Likewise.
6890 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6891 (arm_breakpoint_kind_from_pc): New function.
6892 (arm_sw_breakpoint_from_kind): Return proper kind.
6893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6894
6895 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6896
6897 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6898 removal.
6899 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6900 (struct raw_breakpoint) <size>: Remove.
6901 (struct raw_breakpoint) <kind>: Add.
6902 (bp_size): New function.
6903 (bp_opcode): Likewise.
6904 (find_raw_breakpoint_at): Adjust for kind.
6905 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6906 (remove_memory_breakpoint): Adjust for kind call bp_size.
6907 (set_raw_breakpoint_at): Adjust for kind.
6908 (set_breakpoint): Likewise.
6909 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6910 (delete_raw_breakpoint): Adjust for kind.
6911 (delete_breakpoint): Likewise.
6912 (find_gdb_breakpoint): Likewise.
6913 (set_gdb_breakpoint_1): Likewise.
6914 (set_gdb_breakpoint): Likewise.
6915 (delete_gdb_breakpoint_1): Likewise.
6916 (delete_gdb_breakpoint): Likewise.
6917 (uninsert_raw_breakpoint): Likewise.
6918 (reinsert_raw_breakpoint): Likewise.
6919 (set_breakpoint_data): Remove.
6920 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6921 (check_mem_read): Adjust for kind call bp_size.
6922 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6923 (clone_one_breakpoint): Adjust for kind.
6924 * mem-break.h (set_gdb_breakpoint): Likewise.
6925 (delete_gdb_breakpoint): Likewise.
6926 * server.c (process_serial_event): Likewise.
6927
6928 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6929
6930 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6931 (struct linux_target_ops) <breakpoint>: Remove.
6932 (struct linux_target_ops) <breakpoint_len>: Remove.
6933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6935 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6936 (arm_sw_breakpoint_from_kind): New function.
6937 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6938 (struct linux_target_ops) <breakpoint>: Remove.
6939 (struct linux_target_ops) <breakpoint_len>: Remove.
6940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6942 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6943 (struct linux_target_ops) <breakpoint>: Remove.
6944 (struct linux_target_ops) <breakpoint_len>: Remove.
6945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6947 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6948 (struct linux_target_ops) <breakpoint>: Remove.
6949 (struct linux_target_ops) <breakpoint_len>: Remove.
6950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6952 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6953 and sw_breakpoint_from_kind to increment the pc.
6954 (linux_breakpoint_kind_from_pc): New function.
6955 (linux_sw_breakpoint_from_kind): New function.
6956 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6957 (initialize_low): Call breakpoint_kind_from_pc and
6958 sw_breakpoint_from_kind to replace breakpoint_data/len.
6959 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6960 New field.
6961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6962 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6963 (struct linux_target_ops) <breakpoint>: Remove.
6964 (struct linux_target_ops) <breakpoint_len>: Remove.
6965 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6966 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6967 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6968 (struct linux_target_ops) <breakpoint>: Remove.
6969 (struct linux_target_ops) <breakpoint_len>: Remove.
6970 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6971 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6972 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6973 (struct linux_target_ops) <breakpoint>: Remove.
6974 (struct linux_target_ops) <breakpoint_len>: Remove.
6975 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6976 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6977 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_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 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6988 (struct linux_target_ops) <breakpoint>: Remove.
6989 (struct linux_target_ops) <breakpoint_len>: Remove.
6990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6992 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6993 (struct linux_target_ops) <breakpoint>: Remove.
6994 (struct linux_target_ops) <breakpoint_len>: Remove.
6995 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6996 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6997 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6998 (struct linux_target_ops) <breakpoint>: Remove.
6999 (struct linux_target_ops) <breakpoint_len>: Remove.
7000 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7002 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7003 (struct linux_target_ops) <breakpoint>: Remove.
7004 (struct linux_target_ops) <breakpoint_len>: Remove.
7005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7007 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7008 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7009 (struct linux_target_ops) <breakpoint>: Remove.
7010 (struct linux_target_ops) <breakpoint_len>: Remove.
7011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7013 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7014 (struct linux_target_ops) <breakpoint>: Remove.
7015 (struct linux_target_ops) <breakpoint_len>: Remove.
7016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7018
7019 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7020
7021 * linux-cris-low.c (cris_get_pc): Remove void arg.
7022
7023 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7024
7025 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7026 variable name.
7027
7028 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7029
7030 * inferiors.c (thread_pid_matches_callback): New function.
7031 (find_thread_process): New function.
7032 (remove_thread): Reset current_thread.
7033 (remove_process): Assert threads have been removed first.
7034
7035 2015-10-15 Yao Qi <yao.qi@linaro.org>
7036
7037 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7038 if it is 3.
7039 (aarch64_remove_point): Likewise.
7040 * regcache.c (regcache_register_size): New function.
7041
7042 2015-10-12 Yao Qi <yao.qi@linaro.org>
7043
7044 * linux-aarch64-low.c: Update all callers as emit_load_store
7045 is renamed to aarch64_emit_load_store.
7046
7047 2015-10-12 Yao Qi <yao.qi@linaro.org>
7048
7049 * linux-aarch64-low.c: Update all callers of function renaming
7050 from emit_insn to aarch64_emit_insn.
7051
7052 2015-10-12 Yao Qi <yao.qi@linaro.org>
7053
7054 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7055 arch/aarch64-insn.h.
7056 (struct aarch64_memory_operand): Likewise.
7057 (ENCODE): Likewise.
7058 (emit_insn): Move to arch/aarch64-insn.c.
7059 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7060 (emit_load_store): Move to arch/aarch64-insn.c.
7061 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7062 (can_encode_int32): Remove.
7063
7064 2015-10-12 Yao Qi <yao.qi@linaro.org>
7065
7066 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7067 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7068 (aarch64_relocate_instruction): Likewise.
7069 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7070 (struct aarch64_insn_visitor): Likewise.
7071
7072 2015-10-12 Yao Qi <yao.qi@linaro.org>
7073
7074 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7075 (struct aarch64_insn_visitor): New.
7076 (struct aarch64_insn_relocation_data): New.
7077 (aarch64_ftrace_insn_reloc_b): New function.
7078 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7079 (aarch64_ftrace_insn_reloc_cb): Likewise.
7080 (aarch64_ftrace_insn_reloc_tb): Likewise.
7081 (aarch64_ftrace_insn_reloc_adr): Likewise.
7082 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7083 (aarch64_ftrace_insn_reloc_others): Likewise.
7084 (visitor): New.
7085 (aarch64_relocate_instruction): Use visitor.
7086
7087 2015-10-12 Yao Qi <yao.qi@linaro.org>
7088
7089 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7090 int. Add argument buf.
7091 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7092 aarch64_relocate_instruction.
7093
7094 2015-10-12 Yao Qi <yao.qi@linaro.org>
7095
7096 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7097 argument insn. Remove local variable insn. Don't call
7098 target_read_uint32.
7099 (aarch64_install_fast_tracepoint_jump_pad): Call
7100 target_read_uint32.
7101
7102 2015-09-30 Yao Qi <yao.qi@linaro.org>
7103
7104 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7105 (emit_load_store_pair): Likewise.
7106
7107 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7108
7109 * dll.c (match_dll): Add cast(s).
7110 (unloaded_dll): Likewise.
7111 * linux-low.c (second_thread_of_pid_p): Likewise.
7112 (delete_lwp_callback): Likewise.
7113 (count_events_callback): Likewise.
7114 (select_event_lwp_callback): Likewise.
7115 (linux_set_resume_request): Likewise.
7116 * server.c (accumulate_file_name_length): Likewise.
7117 (emit_dll_description): Likewise.
7118 (handle_qxfer_threads_worker): Likewise.
7119 (visit_actioned_threads): Likewise.
7120 * thread-db.c (any_thread_of): Likewise.
7121 * tracepoint.c (same_process_p): Likewise.
7122 (match_blocktype): Likewise.
7123 (build_traceframe_info_xml): Likewise.
7124
7125 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7126
7127 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7128 assignment.
7129 (gdb_unparse_agent_expr): Likewise.
7130 * hostio.c (require_data): Likewise.
7131 (handle_pread): Likewise.
7132 * linux-low.c (disable_regset): Likewise.
7133 (fetch_register): Likewise.
7134 (store_register): Likewise.
7135 (get_dynamic): Likewise.
7136 (linux_qxfer_libraries_svr4): Likewise.
7137 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7138 (set_fast_tracepoint_jump): Likewise.
7139 (uninsert_fast_tracepoint_jumps_at): Likewise.
7140 (reinsert_fast_tracepoint_jumps_at): Likewise.
7141 (validate_inserted_breakpoint): Likewise.
7142 (clone_agent_expr): Likewise.
7143 * regcache.c (init_register_cache): Likewise.
7144 * remote-utils.c (putpkt_binary_1): Likewise.
7145 (decode_M_packet): Likewise.
7146 (decode_X_packet): Likewise.
7147 (look_up_one_symbol): Likewise.
7148 (relocate_instruction): Likewise.
7149 (monitor_output): Likewise.
7150 * server.c (handle_search_memory): Likewise.
7151 (handle_qxfer_exec_file): Likewise.
7152 (handle_qxfer_libraries): Likewise.
7153 (handle_qxfer): Likewise.
7154 (handle_query): Likewise.
7155 (handle_v_cont): Likewise.
7156 (handle_v_run): Likewise.
7157 (captured_main): Likewise.
7158 * target.c (write_inferior_memory): Likewise.
7159 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7160 * tracepoint.c (init_trace_buffer): Likewise.
7161 (add_tracepoint_action): Likewise.
7162 (add_traceframe): Likewise.
7163 (add_traceframe_block): Likewise.
7164 (cmd_qtdpsrc): Likewise.
7165 (cmd_qtdv): Likewise.
7166 (cmd_qtstatus): Likewise.
7167 (response_source): Likewise.
7168 (response_tsv): Likewise.
7169 (cmd_qtnotes): Likewise.
7170 (gdb_collect): Likewise.
7171 (initialize_tracepoint): Likewise.
7172
7173 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7174
7175 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7176 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7177 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7178 <NOP>: New.
7179 (enum aarch64_condition_codes): New enum.
7180 (w0): New static global.
7181 (fp): Likewise.
7182 (lr): Likewise.
7183 (struct aarch64_memory_operand) <type>: New
7184 MEMORY_OPERAND_POSTINDEX type.
7185 (postindex_memory_operand): New helper function.
7186 (emit_ret): New function.
7187 (emit_load_store_pair): New function, factored out of emit_stp
7188 with support for MEMORY_OPERAND_POSTINDEX.
7189 (emit_stp): Rewrite using emit_load_store_pair.
7190 (emit_ldp): New function.
7191 (emit_load_store): Likewise.
7192 (emit_ldr): Mention post-index instruction in comment.
7193 (emit_ldrh): New function.
7194 (emit_ldrb): New function.
7195 (emit_ldrsw): Mention post-index instruction in comment.
7196 (emit_str): Likewise.
7197 (emit_subs): New function.
7198 (emit_cmp): Likewise.
7199 (emit_and): Likewise.
7200 (emit_orr): Likewise.
7201 (emit_orn): Likewise.
7202 (emit_eor): Likewise.
7203 (emit_mvn): Likewise.
7204 (emit_lslv): Likewise.
7205 (emit_lsrv): Likewise.
7206 (emit_asrv): Likewise.
7207 (emit_mul): Likewise.
7208 (emit_sbfm): Likewise.
7209 (emit_sbfx): Likewise.
7210 (emit_ubfm): Likewise.
7211 (emit_ubfx): Likewise.
7212 (emit_csinc): Likewise.
7213 (emit_cset): Likewise.
7214 (emit_nop): Likewise.
7215 (emit_ops_insns): New helper function.
7216 (emit_pop): Likewise.
7217 (emit_push): Likewise.
7218 (aarch64_emit_prologue): New function.
7219 (aarch64_emit_epilogue): Likewise.
7220 (aarch64_emit_add): Likewise.
7221 (aarch64_emit_sub): Likewise.
7222 (aarch64_emit_mul): Likewise.
7223 (aarch64_emit_lsh): Likewise.
7224 (aarch64_emit_rsh_signed): Likewise.
7225 (aarch64_emit_rsh_unsigned): Likewise.
7226 (aarch64_emit_ext): Likewise.
7227 (aarch64_emit_log_not): Likewise.
7228 (aarch64_emit_bit_and): Likewise.
7229 (aarch64_emit_bit_or): Likewise.
7230 (aarch64_emit_bit_xor): Likewise.
7231 (aarch64_emit_bit_not): Likewise.
7232 (aarch64_emit_equal): Likewise.
7233 (aarch64_emit_less_signed): Likewise.
7234 (aarch64_emit_less_unsigned): Likewise.
7235 (aarch64_emit_ref): Likewise.
7236 (aarch64_emit_if_goto): Likewise.
7237 (aarch64_emit_goto): Likewise.
7238 (aarch64_write_goto_address): Likewise.
7239 (aarch64_emit_const): Likewise.
7240 (aarch64_emit_call): Likewise.
7241 (aarch64_emit_reg): Likewise.
7242 (aarch64_emit_pop): Likewise.
7243 (aarch64_emit_stack_flush): Likewise.
7244 (aarch64_emit_zero_ext): Likewise.
7245 (aarch64_emit_swap): Likewise.
7246 (aarch64_emit_stack_adjust): Likewise.
7247 (aarch64_emit_int_call_1): Likewise.
7248 (aarch64_emit_void_call_2): Likewise.
7249 (aarch64_emit_eq_goto): Likewise.
7250 (aarch64_emit_ne_goto): Likewise.
7251 (aarch64_emit_lt_goto): Likewise.
7252 (aarch64_emit_le_goto): Likewise.
7253 (aarch64_emit_gt_goto): Likewise.
7254 (aarch64_emit_ge_got): Likewise.
7255 (aarch64_emit_ops_impl): New static global variable.
7256 (aarch64_emit_ops): New target function, return
7257 &aarch64_emit_ops_impl.
7258 (struct linux_target_ops): Install it.
7259
7260 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7261
7262 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7263 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7264 aarch64-ipa.o.
7265 * linux-aarch64-ipa.c: New file.
7266 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7267 and endian.h.
7268 (aarch64_get_thread_area): New target method.
7269 (extract_signed_bitfield): New helper function.
7270 (aarch64_decode_ldr_literal): New function.
7271 (enum aarch64_opcodes): New enum.
7272 (struct aarch64_register): New struct.
7273 (struct aarch64_operand): New struct.
7274 (x0): New static global.
7275 (x1): Likewise.
7276 (x2): Likewise.
7277 (x3): Likewise.
7278 (x4): Likewise.
7279 (w2): Likewise.
7280 (ip0): Likewise.
7281 (sp): Likewise.
7282 (xzr): Likewise.
7283 (aarch64_register): New helper function.
7284 (register_operand): Likewise.
7285 (immediate_operand): Likewise.
7286 (struct aarch64_memory_operand): New struct.
7287 (offset_memory_operand): New helper function.
7288 (preindex_memory_operand): Likewise.
7289 (enum aarch64_system_control_registers): New enum.
7290 (ENCODE): New macro.
7291 (emit_insn): New helper function.
7292 (emit_b): New function.
7293 (emit_bcond): Likewise.
7294 (emit_cb): Likewise.
7295 (emit_tb): Likewise.
7296 (emit_blr): Likewise.
7297 (emit_stp): Likewise.
7298 (emit_ldp_q_offset): Likewise.
7299 (emit_stp_q_offset): Likewise.
7300 (emit_load_store): Likewise.
7301 (emit_ldr): Likewise.
7302 (emit_ldrsw): Likewise.
7303 (emit_str): Likewise.
7304 (emit_ldaxr): Likewise.
7305 (emit_stxr): Likewise.
7306 (emit_stlr): Likewise.
7307 (emit_data_processing_reg): Likewise.
7308 (emit_data_processing): Likewise.
7309 (emit_add): Likewise.
7310 (emit_sub): Likewise.
7311 (emit_mov): Likewise.
7312 (emit_movk): Likewise.
7313 (emit_mov_addr): Likewise.
7314 (emit_mrs): Likewise.
7315 (emit_msr): Likewise.
7316 (emit_sevl): Likewise.
7317 (emit_wfe): Likewise.
7318 (append_insns): Likewise.
7319 (can_encode_int32_in): New helper function.
7320 (aarch64_relocate_instruction): New function.
7321 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7322 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7323 (struct linux_target_ops): Install aarch64_get_thread_area,
7324 aarch64_install_fast_tracepoint_jump_pad and
7325 aarch64_get_min_fast_tracepoint_insn_len.
7326
7327 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7328
7329 * Makefile.in (aarch64-insn.o): New rule.
7330 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7331
7332 2015-09-21 Yao Qi <yao.qi@linaro.org>
7333
7334 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7335
7336 2015-09-21 Yao Qi <yao.qi@linaro.org>
7337
7338 * tracepoint.c (max_jump_pad_size): Remove.
7339
7340 2015-09-18 Yao Qi <yao.qi@linaro.org>
7341
7342 * linux-aarch64-low.c: Don't include sys/uio.h.
7343 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7344
7345 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7346
7347 * tracepoint.c (eval_result_type): Change prototype.
7348 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7349
7350 2015-09-15 Pedro Alves <palves@redhat.com>
7351
7352 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7353 Check whether to report exec events instead of checking whether
7354 multiprocess is enabled.
7355
7356 2015-09-15 Pedro Alves <palves@redhat.com>
7357
7358 PR remote/18965
7359 * remote-utils.c (prepare_resume_reply): Merge
7360 TARGET_WAITKIND_VFORK_DONE switch case with the
7361 TARGET_WAITKIND_FORKED case.
7362
7363 2015-09-15 Yao Qi <yao.qi@linaro.org>
7364
7365 * server.c (handle_query): Check string comparison using
7366 "else if" instead of "if".
7367
7368 2015-09-15 Yao Qi <yao.qi@linaro.org>
7369
7370 * server.c (vCont_supported): New global variable.
7371 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7372 matches. Append ";vContSupported+" to own_buf.
7373 (handle_v_requests): Append ";s;S" to own_buf if target supports
7374 hardware single step or vCont_supported is false.
7375 (capture_main): Set vCont_supported to zero.
7376
7377 2015-09-15 Yao Qi <yao.qi@linaro.org>
7378
7379 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7380 it to ...
7381 (linux_supports_hardware_single_step): ... New function.
7382 (linux_target_ops): Update.
7383 * lynx-low.c (lynx_target_ops): Set field
7384 supports_hardware_single_step to target_can_do_hardware_single_step.
7385 * nto-low.c (nto_target_ops): Likewise.
7386 * spu-low.c (spu_target_ops): Likewise.
7387 * win32-low.c (win32_target_ops): Likewise.
7388 * target.c (target_can_do_hardware_single_step): New function.
7389 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7390 Remove. <supports_hardware_single_step>: New field.
7391 (target_supports_conditional_breakpoints): Remove.
7392 (target_supports_hardware_single_step): New macro.
7393 (target_can_do_hardware_single_step): Declare.
7394 * server.c (handle_query): Use target_supports_hardware_single_step
7395 instead of target_supports_conditional_breakpoints.
7396
7397 2015-09-15 Yao Qi <yao.qi@linaro.org>
7398
7399 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7400 function.
7401 (struct linux_target_ops the_low_target): Install
7402 aarch64_linux_siginfo_fixup.
7403
7404 2015-09-11 Don Breazeal <donb@codesourcery.com>
7405 Luis Machado <lgustavo@codesourcery.com>
7406
7407 * linux-low.c (linux_mourn): Static declaration.
7408 (linux_arch_setup): Move in front of
7409 handle_extended_wait.
7410 (linux_arch_setup_thread): New function.
7411 (handle_extended_wait): Handle exec events. Call
7412 linux_arch_setup_thread. Make event_lwp argument a
7413 pointer-to-a-pointer.
7414 (check_zombie_leaders): Do not check stopped threads.
7415 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7416 (linux_low_filter_event): Add lwp and thread for exec'ing
7417 non-leader thread if leader thread has been deleted.
7418 Refactor code into linux_arch_setup_thread and call it.
7419 Pass child lwp pointer by reference to handle_extended_wait.
7420 (linux_wait_for_event_filtered): Update comment.
7421 (linux_wait_1): Prevent clobbering exec event status.
7422 (linux_supports_exec_events): New function.
7423 (linux_target_ops) <supports_exec_events>: Initialize new member.
7424 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7425 new member.
7426 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7427 * server.c (report_exec_events): New global variable.
7428 (handle_query): Handle qSupported query for exec-events feature.
7429 (captured_main): Initialize report_exec_events.
7430 * server.h (report_exec_events): Declare new global variable.
7431 * target.h (struct target_ops) <supports_exec_events>: New
7432 member.
7433 (target_supports_exec_events): New macro.
7434 * win32-low.c (win32_target_ops) <supports_exec_events>:
7435 Initialize new member.
7436
7437 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7438
7439 * linux-low.c (linux_low_enable_btrace): Remove.
7440 (linux_target_ops): Replace linux_low_enable_btrace with
7441 linux_enable_btrace.
7442
7443 2015-09-03 Yao Qi <yao.qi@linaro.org>
7444
7445 * linux-aarch64-low.c (aarch64_insert_point): Call
7446 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7447 returns true.
7448
7449 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7450
7451 * linux-low.c (check_stopped_by_breakpoint): Use
7452 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7453
7454 2015-08-27 Pedro Alves <palves@redhat.com>
7455
7456 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7457
7458 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7459
7460 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7461 the XNEW-family equivalent.
7462 (compile_bytecodes): Likewise.
7463 * dll.c (loaded_dll): Likewise.
7464 * event-loop.c (append_callback_event): Likewise.
7465 (create_file_handler): Likewise.
7466 (create_file_event): Likewise.
7467 * hostio.c (handle_open): Likewise.
7468 * inferiors.c (add_thread): Likewise.
7469 (add_process): Likewise.
7470 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7471 * linux-arm-low.c (arm_new_process): Likewise.
7472 (arm_new_thread): Likewise.
7473 * linux-low.c (add_to_pid_list): Likewise.
7474 (linux_add_process): Likewise.
7475 (handle_extended_wait): Likewise.
7476 (add_lwp): Likewise.
7477 (enqueue_one_deferred_signal): Likewise.
7478 (enqueue_pending_signal): Likewise.
7479 (linux_resume_one_lwp_throw): Likewise.
7480 (linux_resume_one_thread): Likewise.
7481 (linux_read_memory): Likewise.
7482 (linux_write_memory): Likewise.
7483 * linux-mips-low.c (mips_linux_new_process): Likewise.
7484 (mips_linux_new_thread): Likewise.
7485 (mips_add_watchpoint): Likewise.
7486 * linux-x86-low.c (initialize_low_arch): Likewise.
7487 * lynx-low.c (lynx_add_process): Likewise.
7488 * mem-break.c (set_raw_breakpoint_at): Likewise.
7489 (set_breakpoint): Likewise.
7490 (add_condition_to_breakpoint): Likewise.
7491 (add_commands_to_breakpoint): Likewise.
7492 (clone_agent_expr): Likewise.
7493 (clone_one_breakpoint): Likewise.
7494 * regcache.c (new_register_cache): Likewise.
7495 * remote-utils.c (look_up_one_symbol): Likewise.
7496 * server.c (queue_stop_reply): Likewise.
7497 (start_inferior): Likewise.
7498 (queue_stop_reply_callback): Likewise.
7499 (handle_target_event): Likewise.
7500 * spu-low.c (fetch_ppc_memory): Likewise.
7501 (store_ppc_memory): Likewise.
7502 * target.c (set_target_ops): Likewise.
7503 * thread-db.c (thread_db_load_search): Likewise.
7504 (try_thread_db_load_1): Likewise.
7505 * tracepoint.c (add_tracepoint): Likewise.
7506 (add_tracepoint_action): Likewise.
7507 (create_trace_state_variable): Likewise.
7508 (cmd_qtdpsrc): Likewise.
7509 (cmd_qtro): Likewise.
7510 (add_while_stepping_state): Likewise.
7511 * win32-low.c (child_add_thread): Likewise.
7512 (get_image_name): Likewise.
7513
7514 2015-08-25 Yao Qi <yao.qi@linaro.org>
7515
7516 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7517
7518 2015-08-25 Yao Qi <yao.qi@linaro.org>
7519
7520 * Makefile.in (aarch64-linux.o): New rule.
7521 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7522 srv_tgtobj.
7523 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7524 (aarch64_init_debug_reg_state): Make it extern.
7525 (aarch64_linux_prepare_to_resume): Remove.
7526
7527 2015-08-25 Yao Qi <yao.qi@linaro.org>
7528
7529 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7530 lwp_arch_private_info and ptid_of_lwp.
7531
7532 2015-08-25 Yao Qi <yao.qi@linaro.org>
7533
7534 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7535 Find proc_info by find_process_pid. All callers updated.
7536
7537 2015-08-25 Yao Qi <yao.qi@linaro.org>
7538
7539 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7540 Remove.
7541 (debug_reg_change_callback): Remove.
7542 (aarch64_notify_debug_reg_change): Remove.
7543
7544 2015-08-25 Yao Qi <yao.qi@linaro.org>
7545
7546 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7547 Call current_lwp_ptid.
7548
7549 2015-08-25 Yao Qi <yao.qi@linaro.org>
7550
7551 * linux-aarch64-low.c (debug_reg_change_callback): Use
7552 debug_printf.
7553
7554 2015-08-25 Yao Qi <yao.qi@linaro.org>
7555
7556 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7557
7558 2015-08-25 Yao Qi <yao.qi@linaro.org>
7559
7560 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7561
7562 2015-08-25 Yao Qi <yao.qi@linaro.org>
7563
7564 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7565 the code.
7566
7567 2015-08-25 Yao Qi <yao.qi@linaro.org>
7568
7569 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7570 Remove.
7571 (debug_reg_change_callback): Remove argument entry and add argument
7572 lwp. Remove local variable thread. Don't print thread id in the
7573 debugging output. Don't check whether pid of thread equals to pid.
7574 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7575 iterate_over_lwps instead find_inferior.
7576
7577 2015-08-24 Pedro Alves <palves@redhat.com>
7578
7579 * inferiors.c (get_first_process): New function.
7580 * inferiors.h (get_first_process): New declaration.
7581 * remote-utils.c (read_ptid): Default to the first process in the
7582 list, instead of to the current thread's process.
7583
7584 2015-08-24 Pedro Alves <palves@redhat.com>
7585
7586 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7587 * event-loop.c: Likewise.
7588 * remote-utils.c: Likewise.
7589 * tracepoint.c: Likewise.
7590
7591 2015-08-24 Pedro Alves <palves@redhat.com>
7592
7593 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7594 ptid_get_lwp.
7595
7596 2015-08-21 Pedro Alves <palves@redhat.com>
7597
7598 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7599 instead of literal 1.
7600
7601 2015-08-21 Pedro Alves <palves@redhat.com>
7602
7603 * tdesc.c (default_description): Explicitly zero-initialize.
7604
7605 2015-08-21 Pedro Alves <palves@redhat.com>
7606
7607 PR gdb/18749
7608 * inferiors.c (remove_thread): Discard any pending stop reply for
7609 this thread.
7610 * server.c (remove_all_on_match_pid): Rename to ...
7611 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7612 instead of a pid.
7613 (discard_queued_stop_replies): Change parameter to a ptid. Now
7614 extern.
7615 (handle_v_kill, kill_inferior_callback, captured_main)
7616 (process_serial_event): Adjust.
7617 * server.h (discard_queued_stop_replies): Declare.
7618
7619 2015-08-21 Pedro Alves <palves@redhat.com>
7620
7621 * linux-low.c (wait_for_sigstop): Always switch to no thread
7622 selected if the previously current thread dies.
7623 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7624 process instead of the current thread's.
7625 * remote-utils.c (input_interrupt): Don't check if there's no
7626 current thread.
7627 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7628 current thread to the general thread fails, error out.
7629 (handle_qxfer_auxv, handle_qxfer_libraries)
7630 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7631 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7632 (handle_query): Check if there's a thread selected instead of
7633 checking whether there's any thread in the thread list.
7634 (handle_qxfer_threads, handle_qxfer_btrace)
7635 (handle_qxfer_btrace_conf): Don't error out early if there's no
7636 thread in the thread list.
7637 (handle_v_cont, myresume): Don't set the current thread to the
7638 continue thread.
7639 (process_serial_event) <Hg handling>: Also set thread_id if the
7640 previous general thread is still alive.
7641 (process_serial_event) <g/G handling>: If setting the current
7642 thread to the general thread fails, error out.
7643 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7644 thread's lwp instead of the current thread's.
7645 * target.c (set_desired_thread): If the desired thread was not
7646 found, leave the current thread pointing to NULL. Return an int
7647 (boolean) indicating success.
7648 * target.h (set_desired_thread): Change return type to int.
7649
7650 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7651
7652 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7653 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7654 #includes.
7655 (ps_get_thread_area): New function.
7656
7657 2015-08-19 Gary Benson <gbenson@redhat.com>
7658
7659 * hostio.c (handle_pread): Do not attempt to read more data
7660 than hostio_reply_with_data can fit in a packet.
7661
7662 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7663
7664 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7665
7666 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7667
7668 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7669
7670 2015-08-06 Pedro Alves <palves@redhat.com>
7671
7672 * tracepoint.c (expr_eval_result): Now an int.
7673
7674 2015-08-06 Pedro Alves <palves@redhat.com>
7675
7676 * gdbthread.h (struct regcache): Forward declare.
7677 (struct thread_info) <regcache_data>: Now a struct regcache
7678 pointer.
7679 * inferiors.c (inferior_regcache_data)
7680 (set_inferior_regcache_data): Now work with struct regcache
7681 pointers.
7682 * inferiors.h (struct regcache): Forward declare.
7683 (inferior_regcache_data, set_inferior_regcache_data): Now work
7684 with struct regcache pointers.
7685 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7686 (free_register_cache_thread): Remove struct regcache pointer
7687 casts.
7688
7689 2015-08-06 Pedro Alves <palves@redhat.com>
7690
7691 * server.c (captured_main): On error, print the exception message
7692 to stderr, and if run_once is set, throw a quit.
7693
7694 2015-08-06 Pedro Alves <palves@redhat.com>
7695
7696 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7697 the current thread.
7698
7699 2015-08-06 Pedro Alves <palves@redhat.com>
7700
7701 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7702 reading beyond the passed in buffer length.
7703
7704 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7705
7706 * tracepoint.c (symbol_list) <required>: Remove.
7707
7708 2015-08-06 Pedro Alves <palves@redhat.com>
7709
7710 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7711 count if stopping and suspending threads.
7712 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7713 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7714 (linux_detach): Complete an ongoing step-over.
7715 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7716 throughout.
7717 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7718 (linux_wait_1): If passing a signal to the inferior after
7719 finishing a step-over, unsuspend and re-resume all lwps. If we
7720 see a single-step event but the thread should be continuing, don't
7721 pass the trap to gdb.
7722 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7723 internal_error instead of gdb_assert.
7724 (enqueue_pending_signal): New function.
7725 (check_ptrace_stopped_lwp_gone): Add debug output.
7726 (start_step_over): Use internal_error instead of gdb_assert.
7727 (complete_ongoing_step_over): New function.
7728 (linux_resume_one_thread): Don't resume a suspended thread.
7729 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7730 it stepping.
7731
7732 2015-08-06 Pedro Alves <palves@redhat.com>
7733
7734 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7735 (linux_thread_alive): Use lwp_is_marked_dead.
7736 (extended_event_reported): Delete.
7737 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7738 instead of extended_event_reported.
7739 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7740 as well.
7741 (lwp_is_marked_dead): New function.
7742 (lwp_running): Use lwp_is_marked_dead.
7743 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7744 comment.
7745
7746 2015-08-06 Pedro Alves <palves@redhat.com>
7747
7748 * linux-low.c (linux_wait_1): Move fork event output out of the
7749 !report_to_gdb check. Pass event_child->waitstatus to
7750 target_waitstatus_to_string instead of ourstatus.
7751
7752 2015-08-04 Yao Qi <yao.qi@linaro.org>
7753
7754 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7755 if current_thread is 32 bit.
7756
7757 2015-08-04 Yao Qi <yao.qi@linaro.org>
7758
7759 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7760 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7761 * server.c (extended_protocol): Remove "static".
7762 * server.h (extended_protocol): Declare it.
7763
7764 2015-08-04 Yao Qi <yao.qi@linaro.org>
7765
7766 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7767 both aarch64 and aarch32.
7768 (aarch64_set_pc): Likewise.
7769
7770 2015-08-04 Yao Qi <yao.qi@linaro.org>
7771
7772 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7773 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7774 arm-with-neon.xml to srv_xmlfiles.
7775 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7776 (is_64bit_tdesc): New function.
7777 (aarch64_linux_read_description): New function.
7778 (aarch64_arch_setup): Call aarch64_linux_read_description.
7779 (regs_info): Rename to regs_info_aarch64.
7780 (aarch64_regs_info): Return right regs_info.
7781 (initialize_low_arch): Call initialize_low_arch_aarch32.
7782
7783 2015-08-04 Yao Qi <yao.qi@linaro.org>
7784
7785 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7786 * linux-aarch32-low.c: New file.
7787 * linux-aarch32-low.h: New file.
7788 * linux-arm-low.c (arm_fill_gregset): Move it to
7789 linux-aarch32-low.c.
7790 (arm_store_gregset): Likewise.
7791 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7792 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7793 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7794 (regs_info): Rename to regs_info_arm.
7795 (arm_regs_info): Return regs_info_aarch32 if
7796 have_ptrace_getregset is 1 and target description is
7797 arm_with_neon or arm_with_vfpv3.
7798 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7799 Call initialize_low_arch_aarch32 instead.
7800
7801 2015-08-04 Yao Qi <yao.qi@linaro.org>
7802
7803 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7804 * linux-low.c: ... here.
7805 * linux-low.h (have_ptrace_getregset): Declare it.
7806
7807 2015-08-04 Pedro Alves <palves@redhat.com>
7808
7809 * thread-db.c (struct thread_db): Use new typedefs.
7810 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7811 CHK calls.
7812 (disable_thread_event_reporting): Cast result of dlsym to
7813 destination function pointer type.
7814 (thread_db_mourn): Use td_ta_delete_ftype.
7815
7816 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7817
7818 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7819 arch variant.
7820 (CDX_BREAKPOINT): Define for R2.
7821 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7822 (the_low_target): Add comments.
7823
7824 2015-07-30 Yao Qi <yao.qi@linaro.org>
7825
7826 * linux-arm-low.c (arm_hwcap): Remove it.
7827 (arm_read_description): New local variable arm_hwcap. Don't
7828 set arm_hwcap to zero.
7829
7830 2015-07-30 Yao Qi <yao.qi@linaro.org>
7831
7832 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7833 Use regcache->tdesc instead.
7834 (arm_store_wmmxregset): Likewise.
7835 (arm_fill_vfpregset): Likewise.
7836 (arm_store_vfpregset): Likewise.
7837
7838 2015-07-30 Yao Qi <yao.qi@linaro.org>
7839
7840 * linux-arm-low.c: Include arch/arm.h.
7841 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7842 (arm_store_gregset): Likewise.
7843
7844 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7845
7846 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7847 ptrace's 4th parameter.
7848
7849 2015-07-27 Yao Qi <yao.qi@linaro.org>
7850
7851 * configure.srv (case aarch64*-*-linux*): Don't set
7852 srv_linux_usrregs.
7853
7854 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7855
7856 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7857 sys/ptrace.h.
7858 * linux-arm-low.c: Likewise.
7859 * linux-cris-low.c: Likewise.
7860 * linux-crisv32-low.c: Likewise.
7861 * linux-low.c: Likewise.
7862 * linux-m68k-low.c: Likewise.
7863 * linux-mips-low.c: Likewise.
7864 * linux-nios2-low.c: Likewise.
7865 * linux-s390-low.c: Likewise.
7866 * linux-sparc-low.c: Likewise.
7867 * linux-tic6x-low.c: Likewise.
7868 * linux-tile-low.c: Likewise.
7869 * linux-x86-low.c: Likewise.
7870
7871 2015-07-24 Pedro Alves <palves@redhat.com>
7872
7873 * config.in: Regenerate.
7874 * configure: Regenerate.
7875
7876 2015-07-24 Pedro Alves <palves@redhat.com>
7877
7878 * acinclude.m4: Include ../ptrace.m4.
7879 * configure.ac: Call GDB_AC_PTRACE.
7880 * config.in, configure: Regenerate.
7881
7882 2015-07-24 Yao Qi <yao.qi@linaro.org>
7883
7884 * linux-low.c (linux_create_inferior): Remove setting to
7885 proc->priv->new_inferior.
7886 (linux_attach): Likewise.
7887 (linux_low_filter_event): Likewise.
7888 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7889
7890 2015-07-24 Yao Qi <yao.qi@linaro.org>
7891
7892 * linux-low.c (linux_arch_setup): New function.
7893 (linux_low_filter_event): If proc->tdesc is NULL and
7894 proc->attached is true, call the_low_target.arch_setup.
7895 Otherwise, keep status pending, and return.
7896 (linux_resume_one_lwp_throw): Don't call get_pc if
7897 thread->while_stepping isn't NULL. Don't call
7898 get_thread_regcache if proc->tdesc is NULL.
7899 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7900 (linux_target_ops): Install arch_setup.
7901 * server.c (start_inferior): Call the_target->arch_setup.
7902 * target.h (struct target_ops) <arch_setup>: New field.
7903 (target_arch_setup): New marco.
7904 * lynx-low.c (lynx_target_ops): Update.
7905 * nto-low.c (nto_target_ops): Update.
7906 * spu-low.c (spu_target_ops): Update.
7907 * win32-low.c (win32_target_ops): Update.
7908
7909 2015-07-24 Yao Qi <yao.qi@linaro.org>
7910
7911 * linux-low.c (linux_add_process): Don't set
7912 proc->priv->new_inferior.
7913 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7914 (linux_attach): Likewise.
7915
7916 2015-07-24 Yao Qi <yao.qi@linaro.org>
7917
7918 * server.c (start_inferior): Code refactor.
7919
7920 2015-07-24 Yao Qi <yao.qi@linaro.org>
7921
7922 * server.c (process_serial_event): Set general_thread.
7923
7924 2015-07-21 Yao Qi <yao.qi@linaro.org>
7925
7926 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7927 aarch64_linux_get_debug_reg_capacity.
7928
7929 2015-07-17 Yao Qi <yao.qi@linaro.org>
7930
7931 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7932 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7933 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7934 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7935 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7936 (AARCH64_HWP_ALIGNMENT): Likewise.
7937 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7938 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7939 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7940 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7941 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7942 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7943 (struct aarch64_debug_reg_state): Likewise.
7944 (struct arch_lwp_info): Likewise.
7945 (aarch64_align_watchpoint): Likewise.
7946 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7947 (aarch64_watchpoint_length): Likewise.
7948 (aarch64_point_encode_ctrl_reg): Likewise
7949 (aarch64_point_is_aligned): Likewise.
7950 (aarch64_align_watchpoint): Likewise.
7951 (aarch64_linux_set_debug_regs):
7952 (aarch64_dr_state_insert_one_point): Likewise.
7953 (aarch64_dr_state_remove_one_point): Likewise.
7954 (aarch64_handle_breakpoint): Likewise.
7955 (aarch64_handle_aligned_watchpoint): Likewise.
7956 (aarch64_handle_unaligned_watchpoint): Likewise.
7957 (aarch64_handle_watchpoint): Likewise.
7958
7959 2015-07-17 Yao Qi <yao.qi@linaro.org>
7960
7961 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7962 and don't aarch64_get_debug_reg_state. All callers update.
7963 (aarch64_handle_aligned_watchpoint): Likewise.
7964 (aarch64_handle_unaligned_watchpoint): Likewise.
7965 (aarch64_handle_watchpoint): Likewise.
7966 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7967 (aarch64_remove_point): Likewise.
7968
7969 2015-07-17 Yao Qi <yao.qi@linaro.org>
7970
7971 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7972 debug_printf.
7973 (aarch64_handle_unaligned_watchpoint): Likewise.
7974
7975 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7976
7977 Revert the previous 3 commits:
7978 Move gdb_regex* to common/
7979 Move linux_find_memory_regions_full & co.
7980 gdbserver build-id attribute generator
7981
7982 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7983 Jan Kratochvil <jan.kratochvil@redhat.com>
7984
7985 gdbserver build-id attribute generator.
7986 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7987 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7988 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7989 (find_phdr): New.
7990 (get_dynamic): Use find_pdhr to traverse program headers.
7991 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7992 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7993 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7994 (get_hex_build_id): New.
7995 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7996 to reply XML document.
7997
7998 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7999 Jan Kratochvil <jan.kratochvil@redhat.com>
8000
8001 * target.c: Include target/target-utils.h and fcntl.h.
8002 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8003 (target_fileio_read_stralloc): New functions.
8004
8005 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8006
8007 * Makefile.in (OBS): Add gdb_regex.o.
8008 (gdb_regex.o): New.
8009 * config.in: Rebuilt.
8010 * configure: Rebuilt.
8011
8012 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8013 Jan Kratochvil <jan.kratochvil@redhat.com>
8014
8015 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8016 * Makefile.in (OBS): Add target-utils.o.
8017 (linux-maps.o, target-utils.o): New.
8018 * configure.srv (srv_linux_obj): Add linux-maps.o.
8019
8020 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8021
8022 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8023 function, return 1.
8024 (the_low_target): Install it.
8025
8026 2015-07-14 Pedro Alves <palves@redhat.com>
8027
8028 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8029 Instead, ignore ECHILD, and throw an error for other errnos.
8030
8031 2015-07-10 Pedro Alves <palves@redhat.com>
8032
8033 * event-loop.c (struct callback_event) <data>: Change type to
8034 gdb_client_data instance instead of gdb_client_data pointer.
8035 (append_callback_event): Adjust.
8036
8037 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8038
8039 * linux-aarch64-low.c: Add comments for each linux_target_ops
8040 method. Remove comments already covered in target_ops and
8041 linux_target_ops definitions.
8042 (the_low_target): Add comments for each unimplemented method.
8043
8044 2015-07-09 Yao Qi <yao.qi@linaro.org>
8045
8046 * linux-aarch64-low.c (aarch64_regmap): Remove.
8047 (aarch64_usrregs_info): Remove.
8048 (regs_info): Set field usrregs to NULL.
8049
8050 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8051
8052 * linux-low.c: Include "rsp-low.h"
8053 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8054 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8055 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8056 (handle_btrace_enable_pt): New.
8057 (handle_btrace_general_set): Support "pt".
8058 (handle_btrace_conf_general_set): Support "pt:size".
8059
8060 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8061
8062 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8063 Z_PACKET_SW_BP.
8064
8065 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8066
8067 * linux-aarch64-low.c: Remove comment about endianness.
8068 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8069 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8070 memcmp.
8071
8072 2015-06-24 Gary Benson <gbenson@redhat.com>
8073
8074 * linux-i386-ipa.c (stdint.h): Do not include.
8075 * lynx-i386-low.c (stdint.h): Likewise.
8076 * lynx-ppc-low.c (stdint.h): Likewise.
8077 * mem-break.c (stdint.h): Likewise.
8078 * thread-db.c (stdint.h): Likewise.
8079 * tracepoint.c (stdint.h): Likewise.
8080 * win32-low.c (stdint.h): Likewise.
8081
8082 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8083
8084 * server.c (write_qxfer_response): Update call to
8085 remote_escape_output.
8086
8087 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8088 Jan Kratochvil <jan.kratochvil@redhat.com>
8089
8090 Merge multiple hex conversions.
8091 * gdbreplay.c (tohex): Rename to 'fromhex'.
8092 (logchar): Use fromhex.
8093
8094 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8095
8096 * server.c (handle_qxfer_libraries): Set `version' attribute for
8097 <library-list>.
8098
8099 2015-06-10 Gary Benson <gbenson@redhat.com>
8100
8101 * target.h (struct target_ops) <multifs_open>: New field.
8102 <multifs_unlink>: Likewise.
8103 <multifs_readlink>: Likewise.
8104 * linux-low.c (nat/linux-namespaces.h): New include.
8105 (linux_target_ops): Initialize the_target->multifs_open,
8106 the_target->multifs_unlink and the_target->multifs_readlink.
8107 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8108 * hostio.c (hostio_fs_pid): New static variable.
8109 (hostio_handle_new_gdb_connection): New function.
8110 (handle_setfs): Likewise.
8111 (handle_open): Use the_target->multifs_open as appropriate.
8112 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8113 (handle_readlink): Use the_target->multifs_readlink as
8114 appropriate.
8115 (handle_vFile): Handle vFile:setfs packets.
8116 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8117 after target_handle_new_gdb_connection.
8118
8119 2015-06-10 Gary Benson <gbenson@redhat.com>
8120
8121 * configure.ac (AC_CHECK_FUNCS): Add setns.
8122 * config.in: Regenerate.
8123 * configure: Likewise.
8124 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8125 (linux-namespaces.o): New rule.
8126 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8127
8128 2015-06-09 Gary Benson <gbenson@redhat.com>
8129
8130 * hostio.c (handle_open): Process mode argument with
8131 fileio_to_host_mode.
8132
8133 2015-06-01 Yao Qi <yao.qi@linaro.org>
8134
8135 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8136 * linux-x86-low.c: Likewise.
8137
8138 2015-05-28 Don Breazeal <donb@codesourcery.com>
8139
8140 * linux-low.c (handle_extended_wait): Initialize
8141 thread_info.last_resume_kind for new fork children.
8142
8143 2015-05-15 Pedro Alves <palves@redhat.com>
8144
8145 * target.h (target_handle_new_gdb_connection): Rewrite using if
8146 wrapped in do/while.
8147
8148 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8149
8150 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8151 * configure, config.in: Regenerate.
8152 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8153 Declare typedef.
8154
8155 2015-05-12 Don Breazeal <donb@codesourcery.com>
8156
8157 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8158 PTRACE_EVENT_VFORK_DONE.
8159 (linux_low_ptrace_options, extended_event_reported): Add vfork
8160 events.
8161 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8162 and "vforkdone" for RSP 'T' Stop Reply Packet.
8163 * server.h (report_vfork_events): Declare
8164 global variable.
8165
8166 2015-05-12 Don Breazeal <donb@codesourcery.com>
8167
8168 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8169 (the_low_target) <new_fork>: Initialize new member.
8170 * linux-arm-low.c (arm_new_fork): New function.
8171 (the_low_target) <new_fork>: Initialize new member.
8172 * linux-low.c (handle_extended_wait): Call new target function
8173 new_fork.
8174 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8175 * linux-mips-low.c (mips_add_watchpoint): New function
8176 extracted from mips_insert_point.
8177 (the_low_target) <new_fork>: Initialize new member.
8178 (mips_linux_new_fork): New function.
8179 (mips_insert_point): Call mips_add_watchpoint.
8180 * linux-x86-low.c (x86_linux_new_fork): New function.
8181 (the_low_target) <new_fork>: Initialize new member.
8182
8183 2015-05-12 Don Breazeal <donb@codesourcery.com>
8184
8185 * linux-low.c (handle_extended_wait): Implement return value,
8186 rename argument 'event_child' to 'event_lwp', handle
8187 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8188 (linux_low_ptrace_options): New function.
8189 (linux_low_filter_event): Call linux_low_ptrace_options,
8190 use different argument fo linux_enable_event_reporting,
8191 use return value from handle_extended_wait.
8192 (extended_event_reported): New function.
8193 (linux_wait_1): Call extended_event_reported and set
8194 status to report fork events.
8195 (linux_write_memory): Add pid to debug message.
8196 (reset_lwp_ptrace_options_callback): New function.
8197 (linux_handle_new_gdb_connection): New function.
8198 (linux_target_ops): Initialize new structure member.
8199 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8200 * lynx-low.c: Initialize new structure member.
8201 * remote-utils.c (prepare_resume_reply): Implement stop reason
8202 "fork" for "T" stop message.
8203 * server.c (handle_query): Call handle_new_gdb_connection.
8204 * server.h (report_fork_events): Declare global flag.
8205 * target.h (struct target_ops) <handle_new_gdb_connection>:
8206 New member.
8207 (target_handle_new_gdb_connection): New macro.
8208 * win32-low.c: Initialize new structure member.
8209
8210 2015-05-12 Don Breazeal <donb@codesourcery.com>
8211
8212 * mem-break.c (APPEND_TO_LIST): Define macro.
8213 (clone_agent_expr): New function.
8214 (clone_one_breakpoint): New function.
8215 (clone_all_breakpoints): New function.
8216 * mem-break.h: Declare new functions.
8217
8218 2015-05-12 Don Breazeal <donb@codesourcery.com>
8219
8220 * linux-low.c (linux_supports_fork_events): New function.
8221 (linux_supports_vfork_events): New function.
8222 (linux_target_ops): Initialize new structure members.
8223 (initialize_low): Call linux_check_ptrace_features.
8224 * lynx-low.c (lynx_target_ops): Initialize new structure
8225 members.
8226 * server.c (report_fork_events, report_vfork_events):
8227 New global flags.
8228 (handle_query): Add new features to qSupported packet and
8229 response.
8230 (captured_main): Initialize new global variables.
8231 * target.h (struct target_ops) <supports_fork_events>:
8232 New member.
8233 <supports_vfork_events>: New member.
8234 (target_supports_fork_events): New macro.
8235 (target_supports_vfork_events): New macro.
8236 * win32-low.c (win32_target_ops): Initialize new structure
8237 members.
8238
8239 2015-05-12 Gary Benson <gbenson@redhat.com>
8240
8241 * server.c (handle_qxfer_exec_file): Use current process
8242 if annex is empty.
8243
8244 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8245
8246 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8247 Remove HAVE_PTRACE_GETREGS conditionals.
8248 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8249 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8250
8251 2015-05-08 Yao Qi <yao.qi@linaro.org>
8252
8253 * linux-low.c (linux_supports_conditional_breakpoints): New
8254 function.
8255 (linux_target_ops): Install new target method.
8256 * lynx-low.c (lynx_target_ops): Install NULL hook for
8257 supports_conditional_breakpoints.
8258 * nto-low.c (nto_target_ops): Likewise.
8259 * spu-low.c (spu_target_ops): Likewise.
8260 * win32-low.c (win32_target_ops): Likewise.
8261 * server.c (handle_query): Check
8262 target_supports_conditional_breakpoints.
8263 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8264 New field.
8265 (target_supports_conditional_breakpoints): New macro.
8266
8267 2015-05-06 Pedro Alves <palves@redhat.com>
8268
8269 PR server/18081
8270 * server.c (start_inferior): If the process exits, mourn it.
8271
8272 2015-04-21 Gary Benson <gbenson@redhat.com>
8273
8274 * hostio.c (fileio_open_flags_to_host): Factored out to
8275 fileio_to_host_openflags in common/fileio.c. Single use
8276 updated.
8277
8278 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8279
8280 * linux-xtensa-low.c (xtensa_fill_gregset)
8281 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8282 XCHAL_HAVE_LOOP.
8283
8284 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8285
8286 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8287 (regs_info): Replace usrregs pointer with NULL.
8288
8289 2015-04-17 Gary Benson <gbenson@redhat.com>
8290
8291 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8292 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8293 * server.c (handle_qxfer_exec_file): New function.
8294 (qxfer_packets): Add exec-file entry.
8295 (handle_query): Report qXfer:exec-file:read as supported packet.
8296
8297 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8298
8299 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8300
8301 2015-04-09 Gary Benson <gbenson@redhat.com>
8302
8303 * hostio-errno.c (errno_to_fileio_error): Remove function.
8304 Update caller to use remote_fileio_to_fio_error.
8305
8306 2015-04-09 Yao Qi <yao.qi@linaro.org>
8307
8308 * linux-low.c (linux_insert_point): Call
8309 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8310 (linux_remove_point): Call remove_memory_breakpoint if type is
8311 raw_bkpt_type_sw.
8312 * linux-x86-low.c (x86_insert_point): Don't call
8313 insert_memory_breakpoint.
8314 (x86_remove_point): Don't call remove_memory_breakpoint.
8315
8316 2015-04-01 Pedro Alves <palves@redhat.com>
8317 Cleber Rosa <crosa@redhat.com>
8318
8319 * server.c (gdbserver_usage): Reorganize and extend the usage
8320 message.
8321
8322 2015-03-24 Pedro Alves <palves@redhat.com>
8323
8324 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8325 output. Also dump TRAP_TRACE.
8326 (linux_low_filter_event): In debug output, distinguish a
8327 resume_stop SIGSTOP from a delayed SIGSTOP.
8328
8329 2015-03-24 Gary Benson <gbenson@redhat.com>
8330
8331 * linux-x86-low.c (x86_linux_new_thread): Moved to
8332 nat/x86-linux.c.
8333 (x86_linux_prepare_to_resume): Likewise.
8334
8335 2015-03-24 Gary Benson <gbenson@redhat.com>
8336
8337 * Makefile.in (x86-linux-dregs.o): New rule.
8338 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8339 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8340 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8341 (x86_linux_dr_get): Likewise.
8342 (x86_linux_dr_set): Likewise.
8343 (update_debug_registers_callback): Likewise.
8344 (x86_linux_dr_set_addr): Likewise.
8345 (x86_linux_dr_get_addr): Likewise.
8346 (x86_linux_dr_set_control): Likewise.
8347 (x86_linux_dr_get_control): Likewise.
8348 (x86_linux_dr_get_status): Likewise.
8349 (x86_linux_update_debug_registers): Likewise.
8350
8351 2015-03-24 Gary Benson <gbenson@redhat.com>
8352
8353 * linux-x86-low.c (x86_linux_update_debug_registers):
8354 New function, factored out from...
8355 (x86_linux_prepare_to_resume): ...this.
8356
8357 2015-03-24 Gary Benson <gbenson@redhat.com>
8358
8359 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8360 (x86_linux_dr_set): Likewise.
8361 (update_debug_registers_callback): Likewise.
8362 (x86_linux_dr_set_addr): Likewise.
8363 (x86_linux_dr_get_addr): Likewise.
8364 (x86_linux_dr_set_control): Likewise.
8365 (x86_linux_dr_get_control): Likewise.
8366 (x86_linux_dr_get_status): Likewise.
8367 (x86_linux_prepare_to_resume): Likewise.
8368
8369 2015-03-24 Gary Benson <gbenson@redhat.com>
8370
8371 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8372 Use perror_with_name. Pass string through gettext.
8373 (x86_linux_dr_set): Likewise.
8374
8375 2015-03-24 Gary Benson <gbenson@redhat.com>
8376
8377 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8378 (x86_linux_dr_set_addr): ...this.
8379 (x86_dr_low_get_addr): Rename to...
8380 (x86_linux_dr_get_addr): ...this.
8381 (x86_dr_low_set_control): Rename to...
8382 (x86_linux_dr_set_control): ...this.
8383 (x86_dr_low_get_control): Rename to...
8384 (x86_linux_dr_get_control): ...this.
8385 (x86_dr_low_get_status): Rename to...
8386 (x86_linux_dr_get_status): ...this.
8387 (x86_dr_low): Update with new function names.
8388
8389 2015-03-24 Gary Benson <gbenson@redhat.com>
8390
8391 * Makefile.in (x86-linux.o): New rule.
8392 * configure.srv: Add x86-linux.o to relevant targets.
8393 * linux-low.c (lwp_set_arch_private_info): New function.
8394 (lwp_arch_private_info): Likewise.
8395 * linux-x86-low.c: Include nat/x86-linux.h.
8396 (arch_lwp_info): Removed structure.
8397 (update_debug_registers_callback):
8398 Use lwp_set_debug_registers_changed.
8399 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8400 and lwp_set_debug_registers_changed.
8401 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8402
8403 2015-03-24 Gary Benson <gbenson@redhat.com>
8404
8405 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8406 * linux-arm-low.c (arm_new_thread): Likewise.
8407 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8408 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8409 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8410 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8411
8412 2015-03-24 Gary Benson <gbenson@redhat.com>
8413
8414 * linux-low.c (ptid_of_lwp): New function.
8415 (lwp_is_stopped): Likewise.
8416 (lwp_stop_reason): Likewise.
8417 * linux-x86-low.c (update_debug_registers_callback):
8418 Use lwp_is_stopped.
8419 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8420 lwp_stop_reason.
8421
8422 2015-03-24 Gary Benson <gbenson@redhat.com>
8423
8424 * linux-low.h (linux_stop_lwp): Remove declaration.
8425
8426 2015-03-24 Gary Benson <gbenson@redhat.com>
8427
8428 * linux-low.h: Include nat/linux-nat.h.
8429 * linux-low.c (iterate_over_lwps_args): New structure.
8430 (iterate_over_lwps_filter): New function.
8431 (iterate_over_lwps): Likewise.
8432 * linux-x86-low.c (update_debug_registers_callback):
8433 Update signature to what iterate_over_lwps expects.
8434 Remove PID check that iterate_over_lwps now performs.
8435 (x86_dr_low_set_addr): Use iterate_over_lwps.
8436 (x86_dr_low_set_control): Likewise.
8437
8438 2015-03-24 Gary Benson <gbenson@redhat.com>
8439
8440 * linux-x86-low.c (x86_debug_reg_state): New function.
8441 (x86_linux_prepare_to_resume): Use the above.
8442
8443 2015-03-24 Gary Benson <gbenson@redhat.com>
8444
8445 * linux-low.c (current_lwp_ptid): New function.
8446 * linux-x86-low.c: Include nat/linux-nat.h.
8447 (x86_dr_low_get_addr): Use current_lwp_ptid.
8448 (x86_dr_low_get_control): Likewise.
8449 (x86_dr_low_get_status): Likewise.
8450
8451 2015-03-20 Pedro Alves <palves@redhat.com>
8452
8453 * tracepoint.c (cmd_qtstatus): Make "str" const.
8454
8455 2015-03-20 Pedro Alves <palves@redhat.com>
8456
8457 * server.c (handle_general_set): Make "req_str" const.
8458
8459 2015-03-19 Pedro Alves <palves@redhat.com>
8460
8461 * linux-low.c (linux_resume_one_lwp): Rename to ...
8462 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8463 instead call perror_with_name.
8464 (check_ptrace_stopped_lwp_gone): New function.
8465 (linux_resume_one_lwp): Reimplement as wrapper around
8466 linux_resume_one_lwp_throw that swallows errors if the LWP is
8467 gone.
8468
8469 2015-03-19 Pedro Alves <palves@redhat.com>
8470
8471 * linux-low.c (count_events_callback, select_event_lwp_callback):
8472 No longer check whether the thread has resume_stop as last resume
8473 kind.
8474
8475 2015-03-19 Pedro Alves <palves@redhat.com>
8476
8477 * linux-low.c (count_events_callback, select_event_lwp_callback):
8478 Use the lwp's status_pending_p field, not the thread's.
8479
8480 2015-03-19 Pedro Alves <palves@redhat.com>
8481
8482 * linux-low.c (select_event_lwp_callback): Update comments to
8483 no longer mention SIGTRAP.
8484
8485 2015-03-18 Gary Benson <gbenson@redhat.com>
8486
8487 * server.c (handle_query): Do not report vFile:fstat as supported.
8488
8489 2015-03-11 Gary Benson <gbenson@redhat.com>
8490
8491 * hostio.c (sys/types.h): New include.
8492 (sys/stat.h): Likewise.
8493 (common-remote-fileio.h): Likewise.
8494 (handle_fstat): New function.
8495 (handle_vFile): Handle vFile:fstat packets.
8496
8497 2015-03-11 Gary Benson <gbenson@redhat.com>
8498
8499 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8500 struct stat.st_blocks and struct stat.st_blksize.
8501 * configure: Regenerate.
8502 * config.in: Likewise.
8503 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8504 (OBS): Add common-remote-fileio.o.
8505 (common-remote-fileio.o): New rule.
8506
8507 2015-03-09 Pedro Alves <palves@redhat.com>
8508
8509 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8510 'struct sockaddr' pointer in 'accept' call.
8511
8512 2015-03-09 Pedro Alves <palves@redhat.com>
8513
8514 Revert:
8515 2015-03-07 Pedro Alves <palves@redhat.com>
8516 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8517 or <winsock2.h> here. Instead include "gdb_socket.h".
8518 (remote_open): Use union gdb_sockaddr_u.
8519 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8520 or <winsock2.h> here. Instead include "gdb_socket.h".
8521 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8522 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8523 or <sys/un.h>.
8524 (init_named_socket, gdb_agent_helper_thread): Use union
8525 gdb_sockaddr_u.
8526
8527 2015-03-07 Pedro Alves <palves@redhat.com>
8528
8529 * configure.ac (build_warnings): Move
8530 -Wdeclaration-after-statement to the C-specific set.
8531 * configure: Regenerate.
8532
8533 2015-03-07 Pedro Alves <palves@redhat.com>
8534
8535 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8536 or <winsock2.h> here. Instead include "gdb_socket.h".
8537 (remote_open): Use union gdb_sockaddr_u.
8538 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8539 or <winsock2.h> here. Instead include "gdb_socket.h".
8540 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8541 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8542 or <sys/un.h>.
8543 (init_named_socket, gdb_agent_helper_thread): Use union
8544 gdb_sockaddr_u.
8545
8546 2015-03-07 Pedro Alves <palves@redhat.com>
8547
8548 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8549 instead.
8550
8551 2015-03-06 Yao Qi <yao.qi@linaro.org>
8552
8553 * linux-aarch64-low.c (aarch64_insert_point): Use
8554 show_debug_regs as a boolean.
8555 (aarch64_remove_point): Likewise.
8556
8557 2015-03-05 Pedro Alves <palves@redhat.com>
8558
8559 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8560 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8561 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8562 * nto-low.c (nto_target_ops): Likewise.
8563 * spu-low.c (spu_target_ops): Likewise.
8564 * win32-low.c (win32_target_ops): Likewise.
8565
8566 2015-03-04 Pedro Alves <palves@redhat.com>
8567
8568 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8569 Decide whether a breakpoint triggered based on the SIGTRAP's
8570 siginfo.si_code.
8571 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8572 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8573 (linux_low_filter_event): Check for breakpoints before checking
8574 watchpoints.
8575 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8576 siginfo.si_code.
8577 (linux_stopped_by_sw_breakpoint)
8578 (linux_supports_stopped_by_sw_breakpoint)
8579 (linux_stopped_by_hw_breakpoint)
8580 (linux_supports_stopped_by_hw_breakpoint): New functions.
8581 (linux_target_ops): Install new target methods.
8582
8583 2015-03-04 Pedro Alves <palves@redhat.com>
8584
8585 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8586 * server.c (swbreak_feature, hwbreak_feature): New globals.
8587 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8588 (captured_main): Clear swbreak_feature and hwbreak_feature.
8589 * server.h (swbreak_feature, hwbreak_feature): Declare.
8590 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8591 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8592 supports_stopped_by_hw_breakpoint>: New fields.
8593 (target_supports_stopped_by_sw_breakpoint)
8594 (target_stopped_by_sw_breakpoint)
8595 (target_supports_stopped_by_hw_breakpoint)
8596 (target_stopped_by_hw_breakpoint): Declare.
8597
8598 2015-03-04 Pedro Alves <palves@redhat.com>
8599
8600 enum lwp_stop_reason -> enum target_stop_reason
8601 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8602 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8603 (linux_wait_1, stuck_in_jump_pad_callback)
8604 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8605 (linux_stopped_by_watchpoint):
8606 * linux-low.h (enum lwp_stop_reason): Delete.
8607 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8608 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8609
8610 2015-03-04 Yao Qi <yao.qi@linaro.org>
8611
8612 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8613
8614 2015-03-03 Gary Benson <gbenson@redhat.com>
8615
8616 * hostio.c (handle_vFile): Fix prefix lengths.
8617
8618 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8619
8620 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8621 ptr_bits.
8622
8623 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8624
8625 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8626 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8627 (clean): Add "rm -f" for above C files.
8628 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8629 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8630 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8631 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8632 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8633 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8634 (init_registers_s390x_vx_linux64)
8635 (init_registers_s390x_tevx_linux64)
8636 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8637 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8638 declarations.
8639 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8640 (s390_store_vxrs_high): New functions.
8641 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8642 NT_S390_VXRS_HIGH.
8643 (s390_arch_setup): Add logic for selecting one of the new target
8644 descriptions. Activate the new vector regsets if applicable.
8645 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8646 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8647 and init_registers_s390x_tevx_linux64.
8648
8649 2015-03-01 Pedro Alves <palves@redhat.com>
8650
8651 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8652 parameter.
8653
8654 2015-02-27 Pedro Alves <palves@redhat.com>
8655
8656 * linux-x86-low.c (u_debugreg_offset): New function.
8657 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8658
8659 2015-02-27 Pedro Alves <palves@redhat.com>
8660
8661 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8662 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8663 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8664 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8665 (ps_lsetfpregs, ps_getpid)
8666 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8667 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8668 (ps_lsetxregs, ps_plog): Declare.
8669
8670 2015-02-27 Pedro Alves <palves@redhat.com>
8671
8672 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8673 IP_AGENT_EXPORT_FUNC.
8674 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8675 IP_AGENT_EXPORT_FUNC.
8676 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8677 (IP_AGENT_EXPORT): Delete.
8678 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8679 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8680 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8681 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8682 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8683 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8684 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8685 (traceframe_read_count, traceframe_write_count)
8686 (traceframes_created, trace_state_variables, get_raw_reg)
8687 (get_trace_state_variable_value, set_trace_state_variable_value)
8688 (ust_loaded, helper_thread_id, cmd_buf): Use
8689 IPA_SYM_EXPORTED_NAME.
8690 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8691 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8692 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8693 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8694 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8695 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8696 EXTERN_C_PUSH/EXTERN_C_POP.
8697 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8698 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8699 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8700 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8701 (traceframe_write_count, traceframe_read_count)
8702 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8703 (about_to_request_buffer_space, get_trace_state_variable_value)
8704 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8705 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8706 EXTERN_C_PUSH/EXTERN_C_POP.
8707 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8708 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8709 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8710 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8711 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8712 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8713 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8714 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8715 Define.
8716 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8717 (IP_AGENT_EXPORT_VAR_DECL): Define.
8718 (tracing): Declare.
8719 (gdb_agent_get_raw_reg): Declare.
8720
8721 2015-02-27 Tom Tromey <tromey@redhat.com>
8722 Pedro Alves <palves@redhat.com>
8723
8724 Rename symbols whose names are reserved C++ keywords throughout.
8725
8726 2015-02-27 Pedro Alves <palves@redhat.com>
8727
8728 * Makefile.in (COMPILER): New, get it from autoconf.
8729 (CXX): Get from autoconf instead.
8730 (COMPILE.pre): Use COMPILER.
8731 (CC-LD): Rename to ...
8732 (CC_LD): ... this. Use COMPILER.
8733 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8734 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8735 * acinclude.m4: Include build-with-cxx.m4.
8736 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8737 Disable -Werror by default if building in C++ mode.
8738 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8739 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8740 the C++ compiler. Save/restore CXXFLAGS too.
8741 * configure: Regenerate.
8742
8743 2015-02-27 Pedro Alves <palves@redhat.com>
8744
8745 * acinclude.m4: Include libiberty.m4.
8746 * configure.ac: Call libiberty_INIT.
8747 * config.in, configure: Regenerate.
8748
8749 2015-02-26 Pedro Alves <palves@redhat.com>
8750
8751 * linux-low.c (linux_wait_1): When incrementing the PC past a
8752 program breakpoint always use the_low_target.breakpoint_len as
8753 increment, rather than the maximum between that and
8754 the_low_target.decr_pc_after_break.
8755
8756 2015-02-23 Pedro Alves <palves@redhat.com>
8757
8758 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8759 thread was doing a step-over; always adjust the PC if
8760 we stepped over a permanent breakpoint.
8761 (linux_wait_1): If we stepped over breakpoint that was on top of a
8762 permanent breakpoint, manually advance the PC past it.
8763
8764 2015-02-23 Pedro Alves <palves@redhat.com>
8765
8766 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8767 modes.
8768 (x86_fill_gregset, x86_store_gregset): Use it when handling
8769 $orig_eax.
8770
8771 2015-02-20 Pedro Alves <palves@redhat.com>
8772
8773 * thread-db.c: Include "nat/linux-procfs.h".
8774 (thread_db_init): Skip listing new threads if the kernel supports
8775 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8776
8777 2015-02-20 Pedro Alves <palves@redhat.com>
8778
8779 * linux-low.c (status_pending_p_callback): Use ptid_match.
8780
8781 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8782
8783 PR breakpoints/16812
8784 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8785 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8786 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8787
8788 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8789
8790 PR breakpoints/15956
8791 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8792
8793 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8794
8795 * linux-low.c (linux_low_btrace_conf): Print size.
8796 * server.c (handle_btrace_conf_general_set): New.
8797 (hanle_general_set): Call handle_btrace_conf_general_set.
8798 (handle_query): Report Qbtrace-conf:bts:size as supported.
8799
8800 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8801
8802 * linux-low.c (linux_low_enable_btrace): Update parameters.
8803 (linux_low_btrace_conf): New.
8804 (linux_target_ops)<to_btrace_conf>: Initialize.
8805 * server.c (current_btrace_conf): New.
8806 (handle_btrace_enable): Rename to ...
8807 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8808 to target_enable_btrace. Update comment. Update users.
8809 (handle_qxfer_btrace_conf): New.
8810 (qxfer_packets): Add btrace-conf entry.
8811 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8812 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8813 (target_ops)<read_btrace_conf>: New.
8814 (target_enable_btrace): Update parameters.
8815 (target_read_btrace_conf): New.
8816
8817 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8818
8819 * server.c (handle_btrace_general_set): Remove call to
8820 target_supports_btrace.
8821 (supported_btrace_packets): New.
8822 (handle_query): Call supported_btrace_packets.
8823 * target.h: include btrace-common.h.
8824 (btrace_target_info): Removed.
8825 (supports_btrace, target_supports_btrace): Update parameters.
8826
8827 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8828
8829 * Makefile.in (SFILES): Add common/btrace-common.c.
8830 (OBS): Add common/btrace-common.o.
8831 (btrace-common.o): Add build rules.
8832 * linux-low: Include btrace-common.h.
8833 (linux_low_read_btrace): Use struct btrace_data. Call
8834 btrace_data_init and btrace_data_fini.
8835
8836 2015-02-06 Pedro Alves <palves@redhat.com>
8837
8838 * thread-db.c (find_new_threads_callback): Add debug output.
8839
8840 2015-02-04 Pedro Alves <palves@redhat.com>
8841
8842 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8843 (resume_stopped_resumed_lwps): New function.
8844 (linux_wait_for_event_filtered): Use it.
8845
8846 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8847
8848 * Makefile.in (SFILES): Add linux-personality.c.
8849 (linux-personality.o): New rule.
8850 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8851 list of objects to be built.
8852 * linux-low.c: Include nat/linux-personality.h.
8853 (linux_create_inferior): Remove code to disable address space
8854 randomization (moved to ../nat/linux-personality.c). Create
8855 cleanup to disable address space randomization.
8856
8857 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8858
8859 * Makefile.in (posix-strerror.o): New rule.
8860 (mingw-strerror.o): Likewise.
8861 * configure: Regenerated.
8862 * configure.ac: Source file ../common/common.host. Initialize new
8863 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8864
8865 2015-01-14 Yao Qi <yao@codesourcery.com>
8866
8867 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8868 (ppc-linux.o): New rule.
8869 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8870 * configure.ac: AC_CHECK_FUNCS(getauxval).
8871 * config.in: Re-generated.
8872 * configure: Re-generated.
8873 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8874 ppc64_64bit_inferior_p
8875
8876 2015-01-14 Yao Qi <yao@codesourcery.com>
8877
8878 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8879 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8880 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8881 (PT_ORIG_R3, PT_TRAP): Likewise.
8882 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8883 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8884 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8885
8886 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8887
8888 * i387-fp.c (i387_cache_to_xsave): In look over
8889 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8890 zmmh_low_space field by use of zmmh_high_space.
8891
8892 2015-01-09 Pedro Alves <palves@redhat.com>
8893
8894 * linux-low.c (step_over_bkpt): Move higher up in the file.
8895 (handle_extended_wait): Don't store the stop_pc here.
8896 (get_stop_pc): Adjust comments and rename to ...
8897 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8898 stopped for a software breakpoint or hardware breakpoint.
8899 (thread_still_has_status_pending_p): New function.
8900 (status_pending_p_callback): Use
8901 thread_still_has_status_pending_p. If the event is no longer
8902 interesting, resume the LWP.
8903 (handle_tracepoints): Add assert.
8904 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8905 (wstatus_maybe_breakpoint): New function.
8906 (cancel_breakpoint): Delete function.
8907 (check_stopped_by_watchpoint): New function, factored out from
8908 linux_low_filter_event.
8909 (lp_status_maybe_breakpoint): Delete function.
8910 (linux_low_filter_event): Remove filter_ptid argument.
8911 Leave thread group exits pending here. Store the LWP's stop PC.
8912 Always leave events pending.
8913 (linux_wait_for_event_filtered): Pull all events out of the
8914 kernel, and leave them all pending.
8915 (count_events_callback, select_event_lwp_callback): Consider all
8916 events.
8917 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8918 (select_event_lwp): Only give preference to the stepping LWP in
8919 all-stop mode. Adjust comments.
8920 (ignore_event): New function.
8921 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8922 references to cancel_breakpoints. Adjust to renames. Also give
8923 equal priority to all LWPs that have had events in non-stop mode.
8924 If reporting a software breakpoint event, unadjust the LWP's PC.
8925 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8926 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8927 Adjust.
8928 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8929 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8930 (linux_stopped_by_watchpoint): Adjust.
8931 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8932 * linux-low.h (enum lwp_stop_reason): New.
8933 (struct lwp_info) <stop_pc>: Adjust comment.
8934 <stopped_by_watchpoint>: Delete field.
8935 <stop_reason>: New field.
8936 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8937 * mem-break.c (software_breakpoint_inserted_here)
8938 (hardware_breakpoint_inserted_here): New function.
8939 * mem-break.h (software_breakpoint_inserted_here)
8940 (hardware_breakpoint_inserted_here): Declare.
8941 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8942 (cancel_breakpoints): Delete.
8943 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8944 (upload_fast_traceframes): Remove references to
8945 cancel_breakpoints.
8946
8947 2015-01-09 Pedro Alves <palves@redhat.com>
8948
8949 * thread-db.c (find_new_threads_callback): Ignore thread if the
8950 kernel thread ID is -1.
8951
8952 2015-01-09 Pedro Alves <palves@redhat.com>
8953
8954 * linux-low.c (linux_attach_fail_reason_string): Move to
8955 nat/linux-ptrace.c, and rename.
8956 (linux_attach_lwp): Update comment.
8957 (attach_proc_task_lwp_callback): New function.
8958 (linux_attach): Adjust to rename and use
8959 linux_proc_attach_tgid_threads.
8960 (linux_attach_fail_reason_string): Delete declaration.
8961
8962 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8963
8964 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8965 * server.c (gdbserver_version): Likewise.
8966
8967 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8968
8969 * remote-utils.c: Include ctype.h.
8970 (input_interrupt): Explicitly handle the case when the char
8971 received is the NUL byte. Improve the printing of non-ASCII
8972 characters.
8973
8974 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8975
8976 * linux-low.c (linux_low_filter_event): Update call to
8977 linux_enable_event_reporting following the addition of
8978 a new parameter to that function.
8979
8980 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8981
8982 PR server/17457
8983 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8984 (AARCH64_FPCR_REGNO): Likewise.
8985 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8986 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8987 (aarch64_store_fpregset): Likewise.
8988
8989 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8990
8991 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8992 Remove FIXME comment about assumption about N.
8993
8994 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8995
8996 * configure.ac: If large-file support is disabled in GDBserver,
8997 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8998 * configure: Regenerate.
8999
9000 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9001
9002 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9003 warning upon ENODATA from ptrace.
9004 * linux-s390-low.c (s390_store_tdb): New.
9005 (s390_regsets): Add regset for NT_S390_TDB.
9006
9007 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9008
9009 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9010 without a fill_function.
9011 * linux-s390-low.c (s390_fill_last_break): Remove.
9012 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9013 (s390_arch_setup): Use regset's size instead of fill_function for
9014 loop end condition.
9015
9016 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9017
9018 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9019 the regset's store function when ptrace returned an error.
9020 * regcache.c (get_thread_regcache): Invalidate register cache
9021 before fetching inferior's registers.
9022
9023 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9024
9025 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9026 while-loop as for-loop.
9027 (regsets_store_inferior_registers): Likewise.
9028
9029 2014-11-28 Yao Qi <yao@codesourcery.com>
9030
9031 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9032 * config.in, configure: Re-generate.
9033 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9034 is defined.
9035
9036 2014-11-21 Yao Qi <yao@codesourcery.com>
9037
9038 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9039 (AC_CHECK_HEADERS): Remove malloc.h.
9040 * configure: Re-generated.
9041 * config.in: Re-generated.
9042 * server.h: Don't include alloca.h and malloc.h.
9043 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9044 Don't include malloc.h.
9045
9046 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9047
9048 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9049 corresponding ERRNO check in same block.
9050
9051 2014-11-12 Pedro Alves <palves@redhat.com>
9052
9053 * server.c (cont_thread): Update comment.
9054 (start_inferior, attach_inferior): No longer clear cont_thread.
9055 (handle_v_cont): No longer set cont_thread.
9056 (captured_main): Clear cont_thread each time a GDB connects.
9057
9058 2014-11-12 Pedro Alves <palves@redhat.com>
9059
9060 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9061 thread, and don't resume all threads if the Hc thread has exited.
9062
9063 2014-11-12 Pedro Alves <palves@redhat.com>
9064
9065 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9066 the process group instead of to a specific LWP.
9067
9068 2014-10-15 Pedro Alves <palves@redhat.com>
9069
9070 PR server/17487
9071 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9072 parameter.
9073 (arm_set_thread_context): Delete.
9074 (the_low_target): Adjust.
9075 * win32-i386-low.c (debug_registers_changed)
9076 (debug_registers_used): Delete.
9077 (update_debug_registers_callback): New function.
9078 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9079 needing to update their debug registers.
9080 (win32_get_current_dr): New function.
9081 (x86_dr_low_get_addr, x86_dr_low_get_control)
9082 (x86_dr_low_get_status): Fetch the debug register from the thread
9083 record's context.
9084 (i386_initial_stuff): Adjust.
9085 (i386_get_thread_context): Remove current_event parameter. Don't
9086 clear debug_registers_changed nor copy DR values to
9087 debug_reg_state.
9088 (i386_set_thread_context): Delete.
9089 (i386_prepare_to_resume): New function.
9090 (i386_thread_added): Mark the thread as needing to update irs
9091 debug registers.
9092 (the_low_target): Remove i386_set_thread_context and install
9093 i386_prepare_to_resume.
9094 * win32-low.c (win32_get_thread_context): Adjust.
9095 (win32_set_thread_context): Use SetThreadContext
9096 directly.
9097 (win32_prepare_to_resume): New function.
9098 (win32_require_context): New function, factored out from ...
9099 (thread_rec): ... this.
9100 (continue_one_thread): Call win32_prepare_to_resume on each thread
9101 we're about to continue.
9102 (win32_resume): Call win32_prepare_to_resume on the event thread.
9103 * win32-low.h (struct win32_thread_info)
9104 <debug_registers_changed>: New field.
9105 (struct win32_target_ops): Change prototype of set_thread_context,
9106 delete set_thread_context and add prepare_to_resume.
9107 (win32_require_context): New declaration.
9108
9109 2014-10-08 Gary Benson <gbenson@redhat.com>
9110
9111 * server.h: Do not include common-exceptions.h.
9112
9113 2014-10-08 Gary Benson <gbenson@redhat.com>
9114
9115 * server.h: Do not include cleanups.h.
9116
9117 2014-09-30 James Hogan <james.hogan@imgtec.com>
9118
9119 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9120 mips64-dsp-linux.c.
9121
9122 2014-09-23 Yao Qi <yao@codesourcery.com>
9123
9124 * linux-low.c (lp_status_maybe_breakpoint): New function.
9125 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9126 (count_events_callback): Likewise.
9127 (select_event_lwp_callback): Likewise.
9128 (cancel_breakpoints_callback): Likewise.
9129
9130 2014-09-19 Don Breazeal <donb@codesourcery.com>
9131
9132 * linux-low.c (handle_extended_wait): Call
9133 linux_ptrace_get_extended_event.
9134 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9135 linux_is_extended_waitstatus.
9136
9137 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9138
9139 * Makefile.in (CPPFLAGS): Define.
9140 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9141 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9142
9143 2014-09-16 Gary Benson <gbenson@redhat.com>
9144
9145 * inferiors.h (current_inferior): Renamed as...
9146 (current_thread): New variable. All uses updated.
9147 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9148 (maybe_move_out_of_jump_pad): Likewise.
9149 (cancel_breakpoint): Likewise.
9150 (linux_low_filter_event): Likewise.
9151 (wait_for_sigstop): Likewise.
9152 (linux_resume_one_lwp): Likewise.
9153 (need_step_over_p): Likewise.
9154 (start_step_over): Likewise.
9155 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9156 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9157 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9158 and save_inferior as saved_thread.
9159 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9160 saved_thread.
9161 (regcache_invalidate_thread): Likewise.
9162 * remote-utils.c (prepare_resume_reply): Likewise.
9163 * thread-db.c (thread_db_get_tls_address): Likewise.
9164 (disable_thread_event_reporting): Likewise.
9165 (remove_thread_event_breakpoints): Likewise.
9166 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9167 as saved_thread.
9168 * target.h (set_desired_inferior): Renamed as...
9169 (set_desired_thread): New declaration. All uses updated.
9170 * server.c (myresume): Updated comment to reference thread instead
9171 of inferior.
9172 (handle_serial_event): Likewise.
9173 (handle_target_event): Likewise.
9174
9175 2014-09-12 Tom Tromey <tromey@redhat.com>
9176 Gary Benson <gbenson@redhat.com>
9177
9178 * regcache.h: Include common-regcache.h.
9179 (regcache_read_pc): Don't declare.
9180 * regcache.c (get_thread_regcache_for_ptid): New function.
9181
9182 2014-09-11 Tom Tromey <tromey@redhat.com>
9183 Gary Benson <gbenson@redhat.com>
9184
9185 * symbol.c: New file.
9186 * Makefile.in (SFILES): Add symbol.c.
9187 (OBS): Add symbol.o.
9188
9189 2014-09-11 Gary Benson <gbenson@redhat.com>
9190
9191 * target.c (target_stop_ptid, target_continue_ptid): New
9192 functions.
9193
9194 2014-09-11 Tom Tromey <tromey@redhat.com>
9195 Gary Benson <gbenson@redhat.com>
9196
9197 * target.h: Include target/target.h.
9198 * target.c (target_read_memory, target_read_uint32)
9199 (target_write_memory): New functions.
9200
9201 2014-09-11 Gary Benson <gbenson@redhat.com>
9202
9203 * server.h (debug_hw_points): Don't declare.
9204 * server.c (debug_hw_points): Don't define. Replace all uses
9205 with show_debug_regs.
9206 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9207 all uses with show_debug_regs.
9208
9209 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9210
9211 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9212 endianness into account.
9213 (ppc_supply_ptrace_register): Likewise.
9214
9215 2014-09-03 James Hogan <james.hogan@imgtec.com>
9216
9217 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9218 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9219
9220 2014-09-03 Gary Benson <gbenson@redhat.com>
9221
9222 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9223 ALL_DEBUG_ADDRESS_REGISTERS.
9224
9225 2014-09-02 Gary Benson <gbenson@redhat.com>
9226
9227 * i386-low.h: Renamed as...
9228 * x86-low.h: New file. All type, function and variable name
9229 prefixes changed from "i386_" to "x86_". All references updated.
9230 * i386-low.c: Renamed as...
9231 * x86-low.c: New file. All type, function and variable name
9232 prefixes changed from "i386_" to "x86_". All references updated.
9233
9234 2014-09-02 Gary Benson <gbenson@redhat.com>
9235
9236 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9237 (x86_linux_new_thread): Likewise.
9238
9239 2014-08-29 Gary Benson <gbenson@redhat.com>
9240
9241 * server.h (setjmp.h): Do not include.
9242 (toplevel): Do not declare.
9243 (common-exceptions.h): Include.
9244 (cleanups.h): Likewise.
9245 * server.c (toplevel): Do not define.
9246 (exit_code): New static global.
9247 (detach_or_kill_for_exit_cleanup): New function.
9248 (main): New function. Original main renamed to...
9249 (captured_main): New function.
9250 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9251
9252 2014-08-29 Gary Benson <gbenson@redhat.com>
9253
9254 * Makefile.in (SFILES): Add common/common-exceptions.c.
9255 (OBS): Add common-exceptions.o.
9256 (common-exceptions.o): New rule.
9257 * utils.c (prepare_to_throw_exception): New function.
9258
9259 2014-08-29 Gary Benson <gbenson@redhat.com>
9260
9261 * config.in: Regenerate.
9262 * configure: Likewise.
9263
9264 2014-08-29 Gary Benson <gbenson@redhat.com>
9265
9266 * Makefile.in (SFILES): Add common/cleanups.c.
9267 (OBS): cleanups.o.
9268 (cleanups.o): New rule.
9269
9270 2014-08-29 Gary Benson <gbenson@redhat.com>
9271
9272 * utils.c (internal_vwarning): New function.
9273
9274 2014-08-28 Gary Benson <gbenson@redhat.com>
9275
9276 * utils.h (fatal): Remove declaration.
9277 * utils.c (fatal): Remove function.
9278
9279 2014-08-28 Gary Benson <gbenson@redhat.com>
9280
9281 * tracepoint.c (gdb_agent_init): Replace fatal with
9282 perror_with_name.
9283 (initialize_tracepoint): Likewise.
9284
9285 2014-08-28 Gary Benson <gbenson@redhat.com>
9286
9287 * remote-utils.c (remote_prepare): Replace fatal with error.
9288
9289 2014-08-28 Gary Benson <gbenson@redhat.com>
9290
9291 * linux-low.c (linux_async): Replace fatal with warning.
9292 Tidy up and return.
9293 (linux_start_non_stop): Return -1 if linux_async failed.
9294
9295 2014-08-28 Gary Benson <gbenson@redhat.com>
9296
9297 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9298 gdb_assert.
9299 (i386_dr_low_get_addr): Remove vague comment.
9300 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9301 gdb_assert.
9302
9303 2014-08-28 Gary Benson <gbenson@redhat.com>
9304
9305 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9306 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9307 internal_error.
9308 (linux_resume_one_lwp): Likewise.
9309 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9310 gdb_assert.
9311 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9312 with internal_error.
9313 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9314 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9315 (find_register_by_name): Replace fatal with internal_error.
9316 (find_regno): Likewise.
9317 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9318 * thread-db.c (thread_db_create_event): Likewise.
9319 (thread_db_load_search): Likewise.
9320 (try_thread_db_load_1): Likewise.
9321 * tracepoint.c (get_jump_space_head): Replace fatal with
9322 internal_error.
9323 (claim_trampoline_space): Likewise.
9324 (have_fast_tracepoint_trampoline_buffer): Likewise.
9325 (cmd_qtstart): Likewise.
9326 (stop_tracing): Likewise.
9327 (fast_tracepoint_collecting): Likewise.
9328 (target_malloc): Likewise.
9329 (download_tracepoint): Likewise.
9330 (download_trace_state_variables): Replace check with gdb_assert.
9331 (upload_fast_traceframes): Replace fatal with internal_error.
9332
9333 2014-08-19 Tom Tromey <tromey@redhat.com>
9334 Gary Benson <gbenson@redhat.com>
9335
9336 * Makefile.in (SFILES): Add common/common-debug.c.
9337 (OBS): Add common-debug.o.
9338 (common-debug.o): New rule.
9339 * debug.h (debug_printf): Don't declare.
9340 * debug.c (debug_printf): Renamed and rewritten as...
9341 (debug_vprintf): New function.
9342
9343 2014-08-19 Gary Benson <gbenson@redhat.com>
9344
9345 * utils.h: Do not include print-utils.h.
9346
9347 2014-08-19 Tom Tromey <tromey@redhat.com>
9348 Gary Benson <gbenson@redhat.com>
9349
9350 * server.h: Add static assertion.
9351 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9352
9353 2014-08-19 Tom Tromey <tromey@redhat.com>
9354 Gary Benson <gbenson@redhat.com>
9355
9356 * Makefile.in (SFILES): Add common/errors.c.
9357 (OBS): Add errors.o.
9358 (IPA_OBS): Add errors-ipa.o.
9359 (errors.o): New rule.
9360 (errors-ipa.o): Likewise.
9361 * utils.h (perror_with_name, error, warning): Don't declare.
9362 * utils.c (warning): Renamed and rewritten as...
9363 (vwarning): New function.
9364 (error): Renamed and rewritten as...
9365 (verror): New function.
9366 (internal_error): Renamed and rewritten as...
9367 (internal_verror): New function.
9368
9369 2014-08-07 Gary Benson <gbenson@redhat.com>
9370
9371 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9372 * configure: Regenerate.
9373 * config.in: Likewise.
9374 * server.h: Do not include errno.h.
9375 * event-loop.c: Likewise.
9376 * hostio-errno.c: Likewise.
9377 * linux-low.c: Likewise.
9378 * remote-utils.c: Likewise.
9379 * spu-low.c: Likewise.
9380 * utils.c: Likewise.
9381 * gdbreplay.c: Unconditionally include errno.h.
9382
9383 2014-08-07 Gary Benson <gbenson@redhat.com>
9384
9385 * server.h: Do not include string.h.
9386 * event-loop.c: Likewise.
9387 * linux-low.c: Likewise.
9388 * regcache.c: Likewise.
9389 * remote-utils.c: Likewise.
9390 * spu-low.c: Likewise.
9391 * utils.c: Likewise.
9392
9393 2014-08-07 Gary Benson <gbenson@redhat.com>
9394
9395 * server.h: Do not include gdb_assert.h.
9396
9397 2014-08-07 Gary Benson <gbenson@redhat.com>
9398
9399 * server.h: Do not include common-utils.h.
9400
9401 2014-08-07 Gary Benson <gbenson@redhat.com>
9402
9403 * server.h: Do not include ptid.h.
9404 * notif.h: Likewise.
9405
9406 2014-08-07 Gary Benson <gbenson@redhat.com>
9407
9408 * server.h: Do not include gdb_locale.h.
9409
9410 2014-08-07 Gary Benson <gbenson@redhat.com>
9411
9412 * server.h: Do not include gdb/signals.h.
9413 * win32-low.c: Likewise.
9414
9415 2014-08-07 Gary Benson <gbenson@redhat.com>
9416
9417 * server.h: Do not include pathmax.h.
9418
9419 2014-08-07 Gary Benson <gbenson@redhat.com>
9420
9421 * server.h: Do not include libiberty.h.
9422 * linux-bfin-low.c: Likewise.
9423
9424 2014-08-07 Gary Benson <gbenson@redhat.com>
9425
9426 * server.h: Do not include ansidecl.h.
9427
9428 2014-08-07 Gary Benson <gbenson@redhat.com>
9429
9430 * linux-x86-low.c: Do not include stddef.h.
9431 * lynx-ppc-low.c: Likewise.
9432 * tracepoint.c: Likewise.
9433
9434 2014-08-07 Gary Benson <gbenson@redhat.com>
9435
9436 * server.h: Do not include stdarg.h.
9437 * nto-low.c: Likewise.
9438
9439 2014-08-07 Gary Benson <gbenson@redhat.com>
9440
9441 * server.h: Do not include stdlib.h.
9442 * inferiors.c: Likewise.
9443 * linux-low.c: Likewise.
9444 * regcache.c: Likewise.
9445 * spu-low.c: Likewise.
9446 * tracepoint.c: Likewise.
9447 * utils.c: Likewise.
9448
9449 2014-08-07 Gary Benson <gbenson@redhat.com>
9450
9451 * server.h: Do not include stdio.h.
9452 * linux-low.c: Likewise.
9453 * remote-utils.c: Likewise.
9454 * spu-low.c: Likewise.
9455 * utils.c: Likewise.
9456 * wincecompat.c: Likewise.
9457
9458 2014-08-06 Gary Benson <gbenson@redhat.com>
9459
9460 * regcache.c (init_register_cache): Move conditionals inside if.
9461
9462 2014-08-06 Gary Benson <gbenson@redhat.com>
9463
9464 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9465
9466 2014-07-31 Gary Benson <gbenson@redhat.com>
9467
9468 * ax.h: Do not include server.h.
9469 * gdbthread.h: Likewise.
9470 * lynx-low.h: Likewise.
9471 * notif.h: Likewise.
9472
9473 2014-07-30 Gary Benson <gbenson@redhat.com>
9474
9475 * server.h: Include common-defs.h.
9476 Do not include config.h or build-gnulib-gdbserver/config.h.
9477
9478 2014-07-30 Gary Benson <gbenson@redhat.com>
9479
9480 * hostio-errno.c: Move server.h to top of includes list.
9481 * inferiors.c: Likewise.
9482 * linux-x86-low.c: Likewise.
9483 * notif.c: Include server.h.
9484
9485 2014-07-24 Tom Tromey <tromey@redhat.com>
9486 Gary Benson <gbenson@redhat.com>
9487
9488 * server.h (CORE_ADDR): Now unsigned.
9489
9490 2014-07-16 Pedro Alves <palves@redhat.com>
9491
9492 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9493
9494 2014-07-15 Pedro Alves <palves@redhat.com>
9495
9496 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9497 copy.
9498
9499 2014-07-11 Pedro Alves <palves@redhat.com>
9500
9501 * linux-low.c (kill_wait_lwp): New function, based on
9502 kill_one_lwp_callback, but use my_waitpid directly.
9503 (kill_one_lwp_callback, linux_kill): Use it.
9504
9505 2014-06-23 Pedro Alves <palves@redhat.com>
9506
9507 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9508 before setting DR0..DR3.
9509
9510 2014-06-20 Gary Benson <gbenson@redhat.com>
9511
9512 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9513 * configure: Regenerated.
9514 * config.in: Likewise.
9515
9516 2014-06-20 Gary Benson <gbenson@redhat.com>
9517
9518 * Makefile.in (SFILES): Update locations for files moved
9519 from common to nat.
9520 (object file files): Reordered.
9521
9522 2014-06-20 Gary Benson <gbenson@redhat.com>
9523
9524 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9525 (i386_dr_low_set_addr): Likewise.
9526 (i386_dr_low_get_addr): Likewise.
9527 (i386_dr_low_can_set_control): Likewise.
9528 (i386_dr_low_set_control): Likewise.
9529 (i386_dr_low_get_control): Likewise.
9530 (i386_dr_low_get_status): Likewise.
9531 (i386_get_debug_register_length): Likewise.
9532 * linux-x86-low.c (i386_dr_low_set_addr):
9533 Changed signature. Made static.
9534 (i386_dr_low_get_addr): Likewise.
9535 (i386_dr_low_set_control): Likewise.
9536 (i386_dr_low_get_control): Likewise.
9537 (i386_dr_low_get_status): Likewise.
9538 (i386_dr_low): New global variable.
9539 * win32-i386-low.c (i386_dr_low_set_addr):
9540 Changed signature. Made static.
9541 (i386_dr_low_get_addr): Likewise.
9542 (i386_dr_low_set_control): Likewise.
9543 (i386_dr_low_get_control): Likewise.
9544 (i386_dr_low_get_status): Likewise.
9545 (i386_dr_low): New global variable.
9546
9547 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9548
9549 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9550 * Makefile.in (AR, AR_FLAGS): Define.
9551 * configure: Regenerate.
9552
9553 2014-06-19 Gary Benson <gbenson@redhat.com>
9554
9555 * Makefile.in (i386-dregs.o): New rule.
9556 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9557 * i386-low.c (target.h): Remove include.
9558 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9559 (DR_CONTROL_SHIFT): Likewise.
9560 (DR_CONTROL_SIZE): Likewise.
9561 (DR_RW_EXECUTE): Likewise.
9562 (DR_RW_WRITE): Likewise.
9563 (DR_RW_READ): Likewise.
9564 (DR_RW_IORW): Likewise.
9565 (DR_LEN_1): Likewise.
9566 (DR_LEN_2): Likewise.
9567 (DR_LEN_4): Likewise.
9568 (DR_LEN_8): Likewise.
9569 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9570 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9571 (DR_ENABLE_SIZE): Likewise.
9572 (DR_LOCAL_SLOWDOWN): Likewise.
9573 (DR_GLOBAL_SLOWDOWN): Likewise.
9574 (DR_CONTROL_RESERVED): Likewise.
9575 (I386_DR_CONTROL_MASK): Likewise.
9576 (I386_DR_VACANT): Likewise.
9577 (I386_DR_LOCAL_ENABLE): Likewise.
9578 (I386_DR_GLOBAL_ENABLE): Likewise.
9579 (I386_DR_DISABLE): Likewise.
9580 (I386_DR_SET_RW_LEN): Likewise.
9581 (I386_DR_GET_RW_LEN): Likewise.
9582 (I386_DR_WATCH_HIT): Likewise.
9583 (i386_wp_op_t): Likewise.
9584 (i386_show_dr): Likewise.
9585 (i386_length_and_rw_bits): Likewise.
9586 (i386_insert_aligned_watchpoint): Likewise.
9587 (i386_remove_aligned_watchpoint): Likewise.
9588 (i386_handle_nonaligned_watchpoint): Likewise.
9589 i386_update_inferior_debug_regs(): Likewise.
9590 (i386_dr_insert_watchpoint): Likewise.
9591 (i386_dr_remove_watchpoint): Likewise.
9592 (i386_dr_region_ok_for_watchpoint): Likewise.
9593 (i386_dr_stopped_data_address): Likewise.
9594 (i386_dr_stopped_by_watchpoint): Likewise.
9595
9596 2014-06-19 Gary Benson <gbenson@redhat.com>
9597
9598 * i386-low.c (i386_dr_show): Renamed to
9599 i386_show_dr and made static. All uses updated.
9600 (i386_dr_length_and_rw_bits): Renamed to
9601 i386_length_and_rw_bits and made static.
9602 All uses updated.
9603 (i386_dr_insert_aligned_watchpoint): Renamed to
9604 i386_insert_aligned_watchpoint and made static.
9605 All uses updated.
9606 (i386_dr_remove_aligned_watchpoint): Renamed to
9607 i386_remove_aligned_watchpoint and made static.
9608 All uses updated.
9609 (i386_dr_update_inferior_debug_regs): Renamed to
9610 i386_update_inferior_debug_regs and made static.
9611 All uses updated.
9612
9613 2014-06-18 Gary Benson <gbenson@redhat.com>
9614
9615 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9616 (i386_dr_low_can_set_control): Likewise.
9617 (i386_get_debug_register_length): Likewise.
9618 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9619 (i386_dr_low_can_set_control): Likewise.
9620 (i386_get_debug_register_length): Likewise.
9621
9622 2014-06-17 Gary Benson <gbenson@redhat.com>
9623
9624 * i386-low.h (i386-dregs.h): New include.
9625 (DR_FIRSTADDR): Now in i386-dregs.h.
9626 (DR_LASTADDR): Likewise.
9627 (DR_NADDR): Likewise.
9628 (DR_STATUS): Likewise.
9629 (DR_CONTROL): Likewise.
9630 (i386_debug_reg_state): Likewise.
9631 (i386_dr_insert_watchpoint): Likewise.
9632 (i386_dr_remove_watchpoint): Likewise.
9633 (i386_dr_region_ok_for_watchpoint): Likewise.
9634 (i386_dr_stopped_data_address): Likewise.
9635 (i386_dr_stopped_by_watchpoint): Likewise.
9636 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9637
9638 2014-06-18 Gary Benson <gbenson@redhat.com>
9639
9640 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9641 i386_dr_insert_watchpoint.
9642 (i386_low_remove_watchpoint): Renamed to
9643 i386_dr_remove_watchpoint.
9644 (i386_low_region_ok_for_watchpoint): Renamed to
9645 i386_dr_region_ok_for_watchpoint.
9646 (i386_low_stopped_data_address): Renamed to
9647 i386_dr_stopped_data_address.
9648 (i386_low_stopped_by_watchpoint): Renamed to
9649 i386_dr_stopped_by_watchpoint.
9650 * i386-low.c (i386_show_dr): Renamed to
9651 i386_dr_show and made nonstatic. All uses updated.
9652 (i386_length_and_rw_bits): Renamed to
9653 i386_dr_length_and_rw_bits and made nonstatic.
9654 All uses updated.
9655 (i386_insert_aligned_watchpoint): Renamed to
9656 i386_dr_insert_aligned_watchpoint and made nonstatic.
9657 All uses updated.
9658 (i386_remove_aligned_watchpoint): Renamed to
9659 i386_dr_remove_aligned_watchpoint and made nonstatic.
9660 All uses updated.
9661 (i386_update_inferior_debug_regs): Renamed to
9662 i386_dr_update_inferior_debug_regs and made nonstatic.
9663 All uses updated.
9664 (i386_low_insert_watchpoint): Renamed to
9665 i386_dr_insert_watchpoint. All uses updated.
9666 (i386_low_remove_watchpoint): Renamed to
9667 i386_dr_remove_watchpoint. All uses updated.
9668 (i386_low_region_ok_for_watchpoint): Renamed to
9669 i386_dr_region_ok_for_watchpoint. All uses updated.
9670 (i386_low_stopped_data_address): Renamed to
9671 i386_dr_stopped_data_address. All uses updated.
9672 (i386_low_stopped_by_watchpoint): Renamed to
9673 i386_dr_stopped_by_watchpoint. All uses updated.
9674
9675 2014-06-18 Gary Benson <gbenson@redhat.com>
9676
9677 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9678 (i386_dr_low_can_set_control): Likewise.
9679 (i386_insert_aligned_watchpoint): New check.
9680
9681 2014-06-18 Gary Benson <gbenson@redhat.com>
9682
9683 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9684 Renamed to state.
9685
9686 2014-06-18 Gary Benson <gbenson@redhat.com>
9687
9688 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9689 instead of fatal and error.
9690 (i386_handle_nonaligned_watchpoint): Likewise.
9691
9692 2014-06-18 Gary Benson <gbenson@redhat.com>
9693
9694 * i386-low.c (i386_get_debug_register_length): New macro.
9695 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9696 (i386_show_dr): Use debug_printf instead of fprintf. Use
9697 phex to format values.
9698
9699 2014-06-18 Gary Benson <gbenson@redhat.com>
9700
9701 * i386-low.h: Comment changes.
9702 * i386-low.c: Likewise.
9703
9704 2014-06-18 Gary Benson <gbenson@redhat.com>
9705
9706 * i386-low.c: Whitespace changes.
9707
9708 2014-06-12 Tom Tromey <tromey@redhat.com>
9709
9710 * utils.c (freeargv): Remove.
9711
9712 2014-06-12 Tom Tromey <tromey@redhat.com>
9713
9714 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9715 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9716 (parse_debug_format_options): Likewise.
9717 (gdbserver_usage): Likewise.
9718 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9719 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9720 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9721 against libiberty.
9722 ($(LIBGNU)): Depend on libiberty.
9723 (all-lib): Recurse into all subdirs.
9724 (install-only): Invoke "install" target in subdirs.
9725 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9726 targets.
9727 * configure: Rebuild.
9728 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9729 for vasprintf, vsnprintf, or gettimeofday.
9730 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9731 srv_tgtobj.
9732
9733 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9734
9735 * development.sh: Delete.
9736 * Makefile.in (config.status): Adjust dependency on development.sh.
9737 * configure.ac: Adjust development.sh source call.
9738 * configure: Regenerate.
9739
9740 2014-06-02 Pedro Alves <palves@redhat.com>
9741
9742 * ax.c (gdb_free_agent_expr): New function.
9743 * ax.h (gdb_free_agent_expr): New declaration.
9744 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9745 list.
9746 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9747 static.
9748 (clear_breakpoint_conditions_and_commands): New function.
9749 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9750 (clear_breakpoint_conditions_and_commands): New declaration.
9751
9752 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9753
9754 * linux-aarch64-low.c (asm/ptrace.h): Include.
9755
9756 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9757
9758 Fix TLS access for -static -pthread.
9759 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9760 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9761 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9762
9763 2014-05-20 Pedro Alves <palves@redhat.com>
9764
9765 * linux-aarch64-low.c (aarch64_insert_point)
9766 (aarch64_remove_point): No longer check whether the type is
9767 supported here. Adjust to new interface.
9768 (the_low_target): Install aarch64_supports_z_point_type as
9769 supports_z_point_type method.
9770 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9771 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9772 instead of a Z packet char. Adjust.
9773 (arm_supports_z_point_type): New function.
9774 (arm_insert_point, arm_remove_point): Adjust to new interface.
9775 (the_low_target): Install arm_supports_z_point_type.
9776 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9777 (cris_insert_point, cris_remove_point): Adjust to new interface.
9778 Don't check whether the type is supported here.
9779 (the_low_target): Install cris_supports_z_point_type.
9780 * linux-low.c (linux_supports_z_point_type): New function.
9781 (linux_insert_point, linux_remove_point): Adjust to new interface.
9782 * linux-low.h (struct linux_target_ops) <insert_point,
9783 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9784 raw_breakpoint pointer parameter.
9785 <supports_z_point_type>: New method.
9786 * linux-mips-low.c (mips_supports_z_point_type): New function.
9787 (mips_insert_point, mips_remove_point): Adjust to new interface.
9788 Use mips_supports_z_point_type.
9789 (the_low_target): Install mips_supports_z_point_type.
9790 * linux-ppc-low.c (the_low_target): Install NULL as
9791 supports_z_point_type method.
9792 * linux-s390-low.c (the_low_target): Install NULL as
9793 supports_z_point_type method.
9794 * linux-sparc-low.c (the_low_target): Install NULL as
9795 supports_z_point_type method.
9796 * linux-x86-low.c (x86_supports_z_point_type): New function.
9797 (x86_insert_point): Adjust to new insert_point interface. Use
9798 insert_memory_breakpoint. Adjust to new
9799 i386_low_insert_watchpoint interface.
9800 (x86_remove_point): Adjust to remove_point interface. Use
9801 remove_memory_breakpoint. Adjust to new
9802 i386_low_remove_watchpoint interface.
9803 (the_low_target): Install x86_supports_z_point_type.
9804 * lynx-low.c (lynx_target_ops): Install NULL as
9805 supports_z_point_type callback.
9806 * nto-low.c (nto_supports_z_point_type): New.
9807 (nto_insert_point, nto_remove_point): Adjust to new interface.
9808 (nto_target_ops): Install nto_supports_z_point_type.
9809 * mem-break.c: Adjust intro comment.
9810 (struct raw_breakpoint) <raw_type, size>: New fields.
9811 <inserted>: Update comment.
9812 <shlib_disabled>: Delete field.
9813 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9814 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9815 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9816 (raw_bkpt_type_to_target_hw_bp_type): New function.
9817 (find_enabled_raw_code_breakpoint_at): New function.
9818 (find_raw_breakpoint_at): New type and size parameters. Use them.
9819 (insert_memory_breakpoint): New function, based off
9820 set_raw_breakpoint_at.
9821 (remove_memory_breakpoint): New function.
9822 (set_raw_breakpoint_at): Reimplement.
9823 (set_breakpoint): New, based on set_breakpoint_at.
9824 (set_breakpoint_at): Reimplement.
9825 (delete_raw_breakpoint): Go through the_target->remove_point
9826 instead of assuming memory breakpoints.
9827 (find_gdb_breakpoint_at): Delete.
9828 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9829 (find_gdb_breakpoint): New function.
9830 (set_gdb_breakpoint_at): Delete.
9831 (z_type_supported): New function.
9832 (set_gdb_breakpoint_1): New function, loosely based off
9833 set_gdb_breakpoint_at.
9834 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9835 (delete_gdb_breakpoint_at): Delete.
9836 (delete_gdb_breakpoint_1): New function, loosely based off
9837 delete_gdb_breakpoint_at.
9838 (delete_gdb_breakpoint): New function.
9839 (clear_gdb_breakpoint_conditions): Rename to ...
9840 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9841 breakpoint.
9842 (add_condition_to_breakpoint): Make static.
9843 (add_breakpoint_condition): Take a struct breakpoint pointer
9844 instead of an address. Adjust.
9845 (gdb_condition_true_at_breakpoint): Rename to ...
9846 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9847 z_type parameter.
9848 (gdb_condition_true_at_breakpoint): Reimplement.
9849 (add_breakpoint_commands): Take a struct breakpoint pointer
9850 instead of an address. Adjust.
9851 (gdb_no_commands_at_breakpoint): Rename to ...
9852 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9853 parameter. Return true if no breakpoint was found. Change debug
9854 output.
9855 (gdb_no_commands_at_breakpoint): Reimplement.
9856 (run_breakpoint_commands): Rename to ...
9857 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9858 and change return type to boolean.
9859 (run_breakpoint_commands): New function.
9860 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9861 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9862 breakpoint. Go through the_target->remove_point instead of
9863 assuming memory breakpoint.
9864 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9865 software and hardware breakpoints.
9866 (reinsert_raw_breakpoint): Go through the_target->insert_point
9867 instead of assuming memory breakpoint.
9868 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9869 software and hardware breakpoints.
9870 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9871 Check both software and hardware breakpoints.
9872 (validate_inserted_breakpoint): Assert the breakpoint is a
9873 software breakpoint. Set the inserted flag to -1 instead of
9874 setting shlib_disabled.
9875 (delete_disabled_breakpoints): Adjust.
9876 (validate_breakpoints): Only validate software breakpoints.
9877 Adjust to inserted flag change.
9878 (check_mem_read, check_mem_write): Skip breakpoint types other
9879 than software breakpoints. Adjust to inserted flag change.
9880 * mem-break.h (enum raw_bkpt_type): New enum.
9881 (raw_breakpoint, struct process_info): Forward declare.
9882 (Z_packet_to_target_hw_bp_type): Delete declaration.
9883 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9884 (set_gdb_breakpoint, delete_gdb_breakpoint)
9885 (clear_breakpoint_conditions): New declarations.
9886 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9887 (breakpoint_inserted_here): Update comment.
9888 (add_breakpoint_condition, add_breakpoint_commands): Replace
9889 address parameter with a breakpoint pointer parameter.
9890 (gdb_breakpoint_here): Update comment.
9891 (delete_gdb_breakpoint_at): Delete.
9892 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9893 * server.c (process_point_options): Take a struct breakpoint
9894 pointer instead of an address. Adjust.
9895 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9896 delete_gdb_breakpoint.
9897 * spu-low.c (spu_target_ops): Install NULL as
9898 supports_z_point_type method.
9899 * target.h: Include mem-break.h.
9900 (struct target_ops) <prepare_to_access_memory>: Update comment.
9901 <supports_z_point_type>: New field.
9902 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9903 instead of a char. Also take a raw breakpoint pointer.
9904 * win32-arm-low.c (the_low_target): Install NULL as
9905 supports_z_point_type.
9906 * win32-i386-low.c (i386_supports_z_point_type): New function.
9907 (i386_insert_point, i386_remove_point): Adjust to new interface.
9908 (the_low_target): Install i386_supports_z_point_type.
9909 * win32-low.c (win32_supports_z_point_type): New function.
9910 (win32_insert_point, win32_remove_point): Adjust to new interface.
9911 (win32_target_ops): Install win32_supports_z_point_type.
9912 * win32-low.h (struct win32_target_ops):
9913 <supports_z_point_type>: New method.
9914 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9915 instead of a char. Also take a raw breakpoint pointer.
9916
9917 2014-05-20 Pedro Alves <palves@redhat.com>
9918
9919 * mem-break.h: Include break-common.h.
9920 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9921 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9922 (Z_packet_to_target_hw_bp_type): New declaration.
9923 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9924 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9925 (Z_PACKET_ACCESS_WP): Delete macros.
9926 (Z_packet_to_hw_type): Delete function.
9927 * i386-low.h: Don't include break-common.h here.
9928 (Z_packet_to_hw_type): Delete declaration.
9929 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9930 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9931 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9932 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9933 * linux-aarch64-low.c: Don't include break-common.h here.
9934 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9935 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9936 (Z_packet_to_target_hw_bp_type): Delete function.
9937 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9938 function.
9939 (mips_insert_point, mips_remove_point): Use
9940 Z_packet_to_target_hw_bp_type.
9941
9942 2014-05-20 Pedro Alves <palves@redhat.com>
9943
9944 * linux-aarch64-low.c: Include break-common.h.
9945 (enum target_point_type): Delete.
9946 (Z_packet_to_point_type): Rename to ...
9947 (Z_packet_to_target_hw_bp_type): ... this, and return a
9948 target_hw_bp_type instead.
9949 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9950 instead of an enum target_point_type.
9951 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9952 breakpoint type.
9953 (aarch64_dr_state_insert_one_point)
9954 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9955 (aarch64_handle_aligned_watchpoint)
9956 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9957 Take an enum target_hw_bp_type instead of an enum
9958 target_point_type.
9959 (aarch64_supports_z_point_type): New function.
9960 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9961 use Z_packet_to_target_hw_bp_type.
9962
9963 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9964
9965 * configure.ac: Only use -Werror by default when DEVELOPMENT
9966 is true.
9967 * configure: Regenerate.
9968
9969 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9970
9971 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9972 * linux-x86-low.c (X86_64_USER_REGS): New.
9973 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9974
9975 2014-04-28 Yao Qi <yao@codesourcery.com>
9976
9977 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9978 name.
9979
9980 2014-04-25 Pedro Alves <palves@redhat.com>
9981
9982 PR server/16255
9983 * linux-low.c (linux_attach_fail_reason_string): New function.
9984 (linux_attach_lwp): Delete.
9985 (linux_attach_lwp_1): Rename to ...
9986 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9987 argument. Remove "initial" parameter. Return int instead of
9988 void. Don't error or warn here.
9989 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9990 failure to attach to the tgid. Call warning when failing to
9991 attach to an lwp.
9992 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9993 argument. Remove "initial" parameter. Return int instead of
9994 void. Don't error or warn here.
9995 (linux_attach_fail_reason_string): New declaration.
9996 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9997 interface change. Use linux_attach_fail_reason_string.
9998
9999 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10000 Walfred Tedeschi <walfred.tedeschi@intel.com>
10001
10002 * Makefile.in: Added rules to handle new files
10003 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10004 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10005 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10006 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10007 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10008 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10009 x32-avx512-linux.o.
10010 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10011 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10012 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10013 i386/x32-avx512.xml.
10014 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10015 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10016 i386/x32-avx512-linux.xml.
10017 * i387-fp.c (num_avx512_k_registers): New constant for number
10018 of K registers.
10019 (num_avx512_zmmh_low_registers): New constant for number of
10020 lower ZMM registers (0-15).
10021 (num_avx512_zmmh_high_registers): New constant for number of
10022 higher ZMM registers (16-31).
10023 (num_avx512_ymmh_registers): New contant for number of higher
10024 YMM registers (ymm16-31 added by avx521 on x86_64).
10025 (num_avx512_xmm_registers): New constant for number of higher
10026 XMM registers (xmm16-31 added by AVX512 on x86_64).
10027 (struct i387_xsave): Add space for AVX512 registers.
10028 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10029 Add code to handle AVX512 registers.
10030 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10031 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10032 prototypei from generated file.
10033 (tdesc_amd64_avx512_linux): Likewise.
10034 (init_registers_x32_avx512_linux): Likewise.
10035 (tdesc_x32_avx512_linux): Likewise.
10036 (init_registers_i386_avx512_linux): Likewise.
10037 (tdesc_i386_avx512_linux): Likewise.
10038 (x86_64_regmap): Add AVX512 registers.
10039 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10040 mask.
10041 (initialize_low_arch): Add code to initialize AVX512 registers.
10042
10043 2014-04-23 Pedro Alves <palves@redhat.com>
10044
10045 * mem-break.c (find_gdb_breakpoint_at): Make static.
10046 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10047
10048 2014-04-23 Pedro Alves <palves@redhat.com>
10049
10050 * i386-low.c: Don't include break-common.h here.
10051 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10052 prototype to take target_hw_bp_type as argument instead of a Z
10053 packet char.
10054 * i386-low.h: Include break-common.h here.
10055 (Z_packet_to_hw_type): Declare.
10056 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10057 prototypes.
10058 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10059 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10060 (x86_remove_point): Convert the packet number to a
10061 target_hw_bp_type before calling i386_low_remove_watchpoint.
10062 * win32-i386-low.c (i386_insert_point): Convert the packet number
10063 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10064 (i386_remove_point): Convert the packet number to a
10065 target_hw_bp_type before calling i386_low_remove_watchpoint.
10066
10067 2014-04-23 Pedro Alves <palves@redhat.com>
10068
10069 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10070
10071 2014-04-10 Pedro Alves <palves@redhat.com>
10072
10073 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10074 Check if the condition or command is NULL before checking if the
10075 breakpoint is known. On success, return true.
10076 * mem-break.h (add_breakpoint_condition): Document return.
10077 (add_breakpoint_commands): Add describing comment.
10078 * server.c (skip_to_semicolon): New function.
10079 (process_point_options): Use it.
10080
10081 2014-04-09 Pedro Alves <palves@redhat.com>
10082
10083 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10084 to lwpid_of.
10085
10086 2014-02-27 Pedro Alves <palves@redhat.com>
10087
10088 PR 12702
10089 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10090 macros.
10091 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10092 output.
10093 (last_thread_of_process_p): Take a PID argument instead of a
10094 thread pointer.
10095 (linux_wait_for_lwp): Delete.
10096 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10097 functions.
10098 (linux_low_filter_event): New function, party factored out from
10099 linux_wait_for_event.
10100 (linux_wait_for_event): Rename to ...
10101 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10102 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10103 sigsuspend. Check for zombie leaders.
10104 (linux_wait_for_event): Reimplement as wrapper around
10105 linux_wait_for_event_filtered.
10106 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10107 a normal or signal exit is seen, it's the whole process exiting.
10108 (wait_for_sigstop): No longer a for_each_inferior callback.
10109 Rewrite on top of linux_wait_for_event_filtered.
10110 (stop_all_lwps): Call wait_for_sigstop directly.
10111 * server.c (resume, handle_target_event): Handle
10112 TARGET_WAITKIND_NO_RESUMED.
10113
10114 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10115
10116 * win32-low.c (psapi_get_dll_name,
10117 * win32_CreateToolhelp32Snapshot): Delete.
10118 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10119 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10120 Delete.
10121 (handle_load_dll): Add function description.
10122 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10123
10124 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10125
10126 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10127 Add comment.
10128 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10129 base address when calling win32_add_one_solib.
10130 (handle_load_dll): Delete local variable load_addr.
10131 Remove 0x1000 offset applied to DLL base address when calling
10132 win32_add_one_solib.
10133 (handle_unload_dll): Add comment.
10134
10135 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10136
10137 * win32-low.c (win32_add_all_dlls): Renames
10138 win32_ensure_ntdll_loaded. Rewrite function documentation.
10139 Adjust implementation to always load all DLLs.
10140 Add 0x1000 offset to DLL base address when calling
10141 win32_add_one_solib.
10142 (child_initialization_done): New static global.
10143 (do_initial_child_stuff): Set child_initialization_done to
10144 zero during child initialization, and 1 after. Replace call
10145 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10146 Add comment.
10147 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10148 (handle_unload_dll): Add function documentation.
10149 (get_child_debug_event): Ignore load and unload DLL events
10150 during child initialization.
10151
10152 2014-02-20 Doug Evans <dje@google.com>
10153
10154 Remove global all_lwps.
10155 * inferiors.h (ptid_of): Move here from linux-low.h.
10156 (pid_of, lwpid_of): Ditto.
10157 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10158 parameter is a struct thread_info * now.
10159 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10160 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10161 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10162 directly.
10163 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10164 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10165 * linux-arm-low.c (update_registers_callback): Update, "entry"
10166 parameter is a struct thread_info * now.
10167 Fetch lwpid from current_inferior directly.
10168 (arm_insert_point): Pass &all_threads to find_inferior instead of
10169 &all_lwps.
10170 (arm_remove_point): Ditto.
10171 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10172 (arm_prepare_to_resume): Fetch pid from thread.
10173 (arm_read_description): Fetch lwpid from current_inferior directly.
10174 * linux-low.c (all_lwps): Delete.
10175 (delete_lwp): Delete call to remove_inferior.
10176 (handle_extended_wait): Fetch lwpid from thread.
10177 (add_lwp): Don't set lwp->entry.id. Remove call to
10178 add_inferior_to_list.
10179 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10180 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10181 (kill_one_lwp_callback): Ditto.
10182 (linux_kill): Don't dereference NULL pointer.
10183 Fetch ptid,lwpid from thread.
10184 (get_detach_signal): Fetch ptid from thread.
10185 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10186 Simplify call to regcache_invalidate_thread.
10187 (delete_lwp_callback): Update, "entry" parameter is a
10188 struct thread_info * now. Fetch pid from thread.
10189 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10190 (status_pending_p_callback): Update, "entry" parameter is a
10191 struct thread_info * now. Fetch ptid from thread.
10192 (find_lwp_pid): Update, "entry" parameter is a
10193 struct thread_info * now.
10194 (linux_wait_for_lwp): Fetch pid from thread.
10195 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10196 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10197 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10198 (dequeue_one_deferred_signal): Ditto.
10199 (cancel_breakpoint): Fetch ptid from current_inferior.
10200 (linux_wait_for_event): Pass &all_threads to find_inferior,
10201 not &all_lwps. Fetch ptid, lwpid from thread.
10202 (count_events_callback): Update, "entry" parameter is a
10203 struct thread_info * now.
10204 (select_singlestep_lwp_callback): Ditto.
10205 (select_event_lwp_callback): Ditto.
10206 (cancel_breakpoints_callback): Ditto.
10207 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10208 not &all_lwps.
10209 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10210 (unsuspend_one_lwp): Update, "entry" parameter is a
10211 struct thread_info * now.
10212 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10213 not &all_lwps.
10214 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10215 Fetch lwpid from thread, not lwp.
10216 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10217 Pass &all_threads to find_inferior, not &all_lwps.
10218 (send_sigstop): Fetch lwpid from thread, not lwp.
10219 (send_sigstop_callback): Update, "entry" parameter is a
10220 struct thread_info * now.
10221 (suspend_and_send_sigstop_callback): Ditto.
10222 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10223 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10224 struct thread_info * now.
10225 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10226 from thread, lwp.
10227 (lwp_running): Update, "entry" parameter is a
10228 struct thread_info * now.
10229 (stop_all_lwps): Fetch ptid from thread.
10230 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10231 (linux_resume_one_lwp): Fetch lwpid from thread.
10232 (linux_set_resume_request): Update, "entry" parameter is a
10233 struct thread_info * now. Fetch pid, lwpid from thread.
10234 (resume_status_pending_p): Update, "entry" parameter is a
10235 struct thread_info * now.
10236 (need_step_over_p): Ditto. Fetch lwpid from thread.
10237 (start_step_over): Fetch lwpid from thread.
10238 (linux_resume_one_thread): Update, "entry" parameter is a
10239 struct thread_info * now. Fetch lwpid from thread.
10240 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10241 (proceed_one_lwp): Update, "entry" parameter is a
10242 struct thread_info * now. Fetch lwpid from thread.
10243 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10244 struct thread_info * now.
10245 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10246 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10247 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10248 directly.
10249 (regsets_store_inferior_registers): Ditto.
10250 (fetch_register, store_register): Ditto.
10251 (linux_read_memory, linux_write_memory): Ditto.
10252 (linux_request_interrupt): Ditto.
10253 (linux_read_auxv): Ditto.
10254 (linux_xfer_siginfo): Ditto.
10255 (linux_qxfer_spu): Ditto.
10256 (linux_qxfer_libraries_svr4): Ditto.
10257 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10258 moved to inferiors.h.
10259 (get_lwp): Delete.
10260 (get_thread_lwp): Update.
10261 (struct lwp_info): Delete member "entry". Simplify comment for
10262 member "thread".
10263 (all_lwps): Delete.
10264 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10265 current_inferior directly.
10266 (update_watch_registers_callback): Update, "entry" parameter is a
10267 struct thread_info * now. Fetch pid from thread.
10268 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10269 (mips_insert_point): Fetch lwpid from current_inferior.
10270 Pass &all_threads to find_inferior, not &all_lwps.
10271 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10272 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10273 directly.
10274 (mips_stopped_data_address): Ditto.
10275 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10276 directly.
10277 * linux-tile-low.c (tile_arch_setup): Ditto.
10278 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10279 (update_debug_registers_callback): Update, "entry" parameter is a
10280 struct thread_info * now. Fetch pid from thread.
10281 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10282 Pass &all_threads to find_inferior, not &all_lwps.
10283 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10284 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10285 Pass &all_threads to find_inferior, not &all_lwps.
10286 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10287 (i386_dr_low_get_status): Ditto.
10288 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10289 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10290 (x86_linux_read_description): Ditto.
10291 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10292
10293 2014-02-20 Doug Evans <dje@google.com>
10294
10295 * inferiors.c (get_first_inferior): Fix buglet.
10296
10297 2014-02-19 Doug Evans <dje@google.com>
10298
10299 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10300 * inferiors.c (add_thread): Change result type to struct thread_info *.
10301 All callers updated.
10302 (add_lwp): Call add_thread here instead of in callers.
10303 All callers updated.
10304 * linux-low.h (get_lwp_thread): Rewrite.
10305 (struct lwp_info): New member "thread".
10306
10307 2014-02-19 Doug Evans <dje@google.com>
10308
10309 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10310 All callers updated.
10311
10312 2014-02-19 Doug Evans <dje@google.com>
10313
10314 * inferiors.c (add_thread): Fix whitespace.
10315
10316 2014-02-19 Doug Evans <dje@google.com>
10317
10318 * dll.c (clear_dlls): Replace accessing list implemention details
10319 with API function.
10320 * gdbthread.h (get_first_thread): Declare.
10321 * inferiors.c (for_each_inferior_with_data): New function.
10322 (get_first_thread): New function.
10323 (find_thread_ptid): Simplify.
10324 (get_first_inferior): New function.
10325 (clear_list): Delete.
10326 (one_inferior_p): New function.
10327 (clear_inferior_list): New function.
10328 (clear_inferiors): Update.
10329 * inferiors.h (for_each_inferior_with_data): Declare.
10330 (clear_inferior_list): Declare.
10331 (one_inferior_p): Declare.
10332 (get_first_inferior): Declare.
10333 * linux-low.c (linux_wait_for_event): Replace accessing list
10334 implemention details with API function.
10335 * server.c (target_running): Ditto.
10336 (accumulate_file_name_length): New function.
10337 (emit_dll_description): New function.
10338 (handle_qxfer_libraries): Replace accessing list implemention
10339 details with API function.
10340 (handle_qxfer_threads_worker): New function.
10341 (handle_qxfer_threads_proper): Replace accessing list implemention
10342 details with API function.
10343 (handle_query): Ditto.
10344 (visit_actioned_threads_callback_ftype): New typedef.
10345 (visit_actioned_threads_data): New struct.
10346 (visit_actioned_threads): Rewrite to be find_inferior callback.
10347 (resume): Call find_inferior.
10348 (handle_status): Replace accessing list implemention
10349 details with API function.
10350 (process_serial_event): Replace accessing list implemention details
10351 with API function.
10352 * target.c (set_desired_inferior): Replace accessing list implemention
10353 details with API function.
10354 * tracepoint.c (same_process_p): New function.
10355 (gdb_agent_about_to_close): Replace accessing list implemention
10356 details with API function.
10357 * win32-low.c (child_delete_thread): Replace accessing list
10358 implemention details with API function.
10359 (match_dll_by_basename): New function.
10360 (dll_is_loaded_by_basename): New function.
10361 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10362 details call to dll_is_loaded_by_basename.
10363
10364 2014-02-19 Doug Evans <dje@google.com>
10365
10366 * dll.h (struct dll_info): Add comment.
10367 * gdbthread.h (struct thread_info): Add comment.
10368 (current_ptid): Simplify.
10369 * inferiors.c (add_process): Update.
10370 (remove_process): Update.
10371 * inferiors.h (struct process_info): Rename member "head" to "entry".
10372 * linux-low.c (delete_lwp): Update.
10373 (add_lwp): Update.
10374 (last_thread_of_process_p): Update.
10375 (kill_one_lwp_callback, linux_kill): Update.
10376 (status_pending_p_callback): Update.
10377 (wait_for_sigstop): Update. Simplify read of ptid.
10378 (start_step_over): Update.
10379 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10380 (get_lwp_thread): Update.
10381 (struct lwp_info): Rename member "head" to "entry".
10382 * regcache.h (inferior_list_entry): Delete.
10383 * server.c (kill_inferior_callback): Update.
10384 (detach_or_kill_inferior_callback): Update.
10385 (print_started_pid): Update.
10386 (print_attached_pid): Update.
10387 (process_serial_event): Simplify read of ptid.
10388 * thread-db.c (thread_db_create_event): Update.
10389 (thread_db_get_tls_address): Update.
10390 * win32-low.c (current_inferior_ptid): Simplify.
10391
10392 2014-02-19 Tom Tromey <tromey@redhat.com>
10393
10394 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10395 argument.
10396 (target_supports_btrace): Update.
10397
10398 2014-02-14 Yao Qi <yao@codesourcery.com>
10399
10400 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10401 (rsp-low-ipa.o): New target.
10402
10403 2014-02-12 Tom Tromey <tromey@redhat.com>
10404
10405 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10406 convert_ascii_to_int.
10407 * regcache.c (registers_to_string): Likewise.
10408 * remote-utils.c (decode_M_packet): Likewise.
10409 * server.c (process_serial_event): Likewise.
10410
10411 2014-02-12 Tom Tromey <tromey@redhat.com>
10412
10413 * server.c (handle_query, handle_v_run): Use hex2bin, not
10414 unhexify.
10415 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10416
10417 2014-02-12 Tom Tromey <tromey@redhat.com>
10418
10419 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10420 convert_int_to_ascii.
10421 * regcache.c (registers_to_string, collect_register_as_string):
10422 Likewise.
10423 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10424 Likewise.
10425 * server.c (process_serial_event): Likewise.
10426 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10427 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10428
10429 2014-02-12 Tom Tromey <tromey@redhat.com>
10430
10431 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10432 bin2hex, not hexify.
10433 * tracepoint.c (cmd_qtstatus): Likewise.
10434
10435 2014-02-12 Tom Tromey <tromey@redhat.com>
10436
10437 * remote-utils.c (monitor_output): Pass explicit length to
10438 hexify.
10439
10440 2014-02-12 Tom Tromey <tromey@redhat.com>
10441
10442 * tracepoint.c: Include rsp-low.h.
10443 * server.c: Include rsp-low.h.
10444 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10445 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10446 declare.
10447 * remote-utils.c: Include rsp-low.h.
10448 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10449 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10450 (convert_int_to_ascii, convert_ascii_to_int): Move to
10451 common/rsp-low.c.
10452 * regcache.c: Include rsp-low.h.
10453 * ax.c: Include rsp-low.h.
10454 * Makefile.in (SFILES): Add common/rsp-low.c.
10455 (OBS): Add rsp-low.o.
10456 (rsp-low.o): New target.
10457
10458 2014-02-12 Tom Tromey <tromey@redhat.com>
10459
10460 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10461 Include print-utils.h.
10462 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10463 (plongest, thirty_two, phex_nz): Remove.
10464 * Makefile.in (SFILES): Add common/print-utils.c.
10465 (OBS): Add print-utils.o.
10466 (print-utils-ipa.o): New target.
10467 (print-utils.o): New target.
10468 (IPA_OBJS): Add print-utils-ipa.o.
10469
10470 2014-02-06 Tom Tromey <tromey@redhat.com>
10471
10472 * Makefile.in (SFILES): Fix indentation.
10473
10474 2014-02-05 Doug Evans <dje@google.com>
10475
10476 * linux-low.c (linux_wait_for_event): Improve comment.
10477 (linux_wait_1): Keep current_inferior in sync with event_child.
10478
10479 2014-01-22 Doug Evans <dje@google.com>
10480
10481 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10482
10483 2014-01-22 Doug Evans <dje@google.com>
10484
10485 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10486 * configure: Regenerate.
10487 * config.in: Regenerate.
10488 * Makefile.in (SFILES): Add debug.c.
10489 (OBS): Add debug.o.
10490 * debug.c: New file.
10491 * debug.h: New file.
10492 * linux-aarch64-low.c (*): Update all debugging printfs to use
10493 debug_printf instead of fprintf.
10494 * linux-arm-low.c (*): Ditto.
10495 * linux-cris-low.c (*): Ditto.
10496 * linux-crisv32-low.c (*): Ditto.
10497 * linux-m32r-low.c (*): Ditto.
10498 * linux-sparc-low.c (*): Ditto.
10499 * linux-x86.c (*): Ditto.
10500 * linux-low.c (*): Ditto.
10501 (linux_wait_1): Add calls to debug_enter, debug_exit.
10502 (linux_wait): Remove redundant debugging printf.
10503 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10504 (linux_resume, unstop_all_lwps): Ditto.
10505 * mem-break.c (*): Update all debugging printfs to use
10506 debug_printf instead of fprintf.
10507 * remote-utils.c (*): Ditto.
10508 * thread-db.c (*): Ditto.
10509 * server.c #include <ctype.h>, "gdb_vecs.h".
10510 (debug_threads): Moved to debug.c.
10511 (*): Update all debugging printfs to use debug_printf instead of
10512 fprintf.
10513 (start_inferior): Replace call to fflush with call to debug_flush.
10514 (monitor_show_help): Mention set debug-format.
10515 (parse_debug_format_options): New function.
10516 (handle_monitor_command): Handle "monitor set debug-format".
10517 (gdbserver_usage): Mention --debug-format.
10518 (main): Parse --debug-format.
10519 * server.h (debug_threads): Declaration moved to debug.h.
10520 #include "debug.h".
10521 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10522 trace_debug_1 that uses debug_printf.
10523 (tracepoint_look_up_symbols): Update all debugging printfs to use
10524 debug_printf instead of fprintf.
10525
10526 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10527
10528 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10529 sys/ptrace.h.
10530
10531 2014-01-17 Pedro Alves <palves@redhat.com>
10532
10533 PR build/16445
10534 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10535 defined after including gdb_proc_service.h.
10536
10537 2014-01-16 Doug Evans <dje@google.com>
10538
10539 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10540 (match_dll): Use it.
10541
10542 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10543
10544 * target.h (target_ops) <read_btrace>: Change parameters and
10545 return type to allow error reporting.
10546 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10547 trace reading errors on.
10548 * linux-low.c (linux_low_read_btrace): Pass trace reading
10549 errors on.
10550 (linux_low_disable_btrace): New.
10551
10552 2014-01-15 Doug Evans <dje@google.com>
10553
10554 * inferiors.c (thread_id_to_gdb_id): Delete.
10555 * inferiors.h (thread_id_to_gdb_id): Delete.
10556
10557 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10558
10559 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10560 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10561 versions.
10562
10563 2014-01-08 Pedro Alves <palves@redhat.com>
10564
10565 * server.c (handle_status): Don't discard previous queued stop
10566 replies or thread's pending status here.
10567 (main) <disconnection>: Do it here instead.
10568
10569 2014-01-08 Pedro Alves <palves@redhat.com>
10570
10571 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10572 * server.c (visit_actioned_threads, handle_pending_status): New
10573 function.
10574 (handle_v_cont): Factor out parts to ...
10575 (resume): ... this new function. If in all-stop, and a thread
10576 being resumed has a pending status, report it without actually
10577 resuming.
10578 (myresume): Adjust to use the new 'resume' function.
10579 (clear_pending_status_callback, set_pending_status_callback)
10580 (find_status_pending_thread_callback): New functions.
10581 (handle_status): Handle the case of multiple threads having
10582 interesting statuses to report. Report threads' real last signal
10583 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10584 with an interesting thread to report the status for, instead of
10585 always reporting the status of the first thread.
10586
10587 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10588
10589 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10590 * gdbreplay.c (gdbreplay_version): Likewise.
10591
10592 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10593
10594 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10595 iov.iov_len with the real length in use.
10596
10597 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10598
10599 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10600 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10601 for all targets that use win32-low.c.
10602 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10603 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10604
10605 2013-12-13 Pedro Alves <palves@redhat.com>
10606
10607 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10608 if equal to TARGET_WAITKIND_LOADED.
10609 * win32-low.c (cached_status): New static global.
10610 (win32_wait): Add declaration.
10611 (do_initial_child_stuff): Flush all initial pending debug events
10612 up to the initial breakpoint.
10613 (win32_wait): If CACHED_STATUS was set, return that instead
10614 of doing a real wait. Remove the code resuming the execution
10615 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10616 during the initial phase. Also remove the code changing
10617 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10618 TARGET_WAITKIND_STOPPED.
10619
10620 2013-12-11 Yao Qi <yao@codesourcery.com>
10621
10622 * notif.c (handle_notif_ack): Return 0 if no notification
10623 matches.
10624
10625 2013-11-20 Doug Evans <dje@google.com>
10626
10627 * linux-low.c (linux_set_resume_request): Fix comment.
10628
10629 2013-11-20 Doug Evans <dje@google.com>
10630
10631 * linux-low.c (resume_status_pending_p): Tweak comment.
10632
10633 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10634
10635 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10636 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10637 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10638 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10639 (srv_amd64_regobj): Add amd64-mpx.o.
10640 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10641 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10642 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10643 * i387-fp.c (num_pl_bnd_register) Added constant.
10644 (num_pl_bnd_cfg_registers) Added constant.
10645 (struct i387_xsave) Added reserved area and MPX fields.
10646 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10647 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10648 function.
10649 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10650 (init_registers_amd64_mpx_linux): Declare new function.
10651 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10652 (x86_64_regmap): Add MPX registers.
10653 (x86_linux_read_description): Add MPX case.
10654 (initialize_low_arch): Initialize MPX targets.
10655
10656 2013-11-18 Tom Tromey <tromey@redhat.com>
10657
10658 * configure: Rebuild.
10659 * configure.ac: Don't check for stdlib.h.
10660 * gdbreplay.c: Unconditionally include stdlib.h.
10661
10662 2013-11-18 Tom Tromey <tromey@redhat.com>
10663
10664 * config.in: Rebuild.
10665 * configure: Rebuild.
10666 * configure.ac: Don't use AC_HEADER_DIRENT.
10667
10668 2013-11-18 Tom Tromey <tromey@redhat.com>
10669
10670 * server.h: Don't check HAVE_STRING_H.
10671 * gdbreplay.c: Don't check HAVE_STRING_H.
10672 * configure: Rebuild.
10673
10674 2013-11-18 Tom Tromey <tromey@redhat.com>
10675
10676 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10677 LIBGNU.
10678
10679 2013-11-08 Tom Tromey <tromey@redhat.com>
10680
10681 * configure, config.in: Rebuild.
10682 * configure.ac: Remove unused configury.
10683
10684 2013-11-08 Tom Tromey <tromey@redhat.com>
10685
10686 * acinclude.m4: Include common.m4, codeset.m4.
10687 * configure, config.in: Rebuild.
10688 * configure.ac: Use GDB_AC_COMMON.
10689
10690 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10691
10692 * linux-s390-low.c (HWCAP_S390_TE): New define.
10693 (s390_arch_setup): Consider the TE field in the HWCAP for
10694 determining 'have_regset_tdb'.
10695
10696 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10697
10698 PR gdb/16014
10699 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10700 call to sizeof.
10701
10702 2013-10-02 Pedro Alves <palves@redhat.com>
10703
10704 * server.c (process_serial_event): Don't output "GDBserver
10705 exiting" if GDB is connected through stdio.
10706 * target.c (mywait): Likewise, be silent if GDB is connected
10707 through stdio.
10708
10709 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10710
10711 * lynx-low.c (lynx_add_threads_after_attach): New function.
10712 (lynx_attach): Remove call to add_thread. Add call to
10713 lynx_add_threads_after_attach instead.
10714
10715 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10716
10717 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10718 * config.in, configure: Regenerated.
10719
10720 2013-09-18 Yao Qi <yao@codesourcery.com>
10721
10722 PR server/15959
10723 * server.c (start_inferior): Clear 'resume_info'.
10724
10725 2013-09-16 Jiong Wang <jiwang@tilera.com>
10726
10727 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10728 for each register.
10729
10730 2013-09-16 Jiong Wang <jiwang@tilera.com>
10731
10732 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10733 linux-tile-low.o to srv_tgtobj.
10734
10735 2013-09-16 Will Newton <will.newton@linaro.org>
10736
10737 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10738 out regs.
10739
10740 2013-09-06 Pedro Alves <palves@redhat.com>
10741
10742 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10743 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10744 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10745 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10746 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10747 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10748
10749 2013-09-06 Pedro Alves <palves@redhat.com>
10750
10751 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10752 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10753
10754 2013-09-06 Pedro Alves <palves@redhat.com>
10755
10756 * linux-amd64-ipa.c: Include tracepoint.h.
10757 * linux-i386-ipa.c: Include tracepoint.h.
10758
10759 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10760
10761 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10762 (ps_get_thread_area): New function.
10763
10764 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10765
10766 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10767 (initialize_low_arch): Call init_registers_crisv32 rather than
10768 init_register_crisv32.
10769
10770 2013-09-05 Pedro Alves <palves@redhat.com>
10771
10772 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10773 to ...
10774 * hostio.h: ... this new file.
10775 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10776 win32-low.c: Include hostio.h.
10777
10778 2013-09-05 Pedro Alves <palves@redhat.com>
10779
10780 * server.h (gdb_client_data, handler_func, callback_handler_func)
10781 (delete_file_handler, add_file_handler, append_callback_event)
10782 (delete_callback_event, start_event_loop, initialize_event_loop):
10783 Move to event-loop.h and include it.
10784 * event-loop.h: New file.
10785
10786 2013-09-05 Pedro Alves <palves@redhat.com>
10787
10788 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10789 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10790 (loaded_dll, unloaded_dll): Move to ...
10791 * dll.h: ... this new file.
10792 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10793
10794 2013-09-05 Pedro Alves <palves@redhat.com>
10795
10796 * server.h (current_process, get_thread_process, all_processes)
10797 (add_inferior_to_list, for_each_inferior, current_inferior)
10798 (remove_inferior, add_process, remove_process, find_process_pid)
10799 (have_started_inferiors_p, have_attached_inferiors_p)
10800 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10801 (clear_inferiors, find_inferior, find_inferior_id)
10802 (inferior_target_data, set_inferior_target_data)
10803 (inferior_regcache_data, set_inferior_regcache_data): Move to
10804 inferiors.h, and include it.
10805 * inferiors.h: New file.
10806
10807 2013-09-05 Pedro Alves <palves@redhat.com>
10808
10809 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10810 Move ...
10811 * ax.h: ... here.
10812
10813 2013-09-05 Pedro Alves <palves@redhat.com>
10814
10815 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10816 tracepoint.h.
10817 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10818 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10819 (handle_tracepoint_general_set, handle_tracepoint_query)
10820 (tracepoint_finished_step, tracepoint_was_hit)
10821 (release_while_stepping_state_list, current_traceframe)
10822 (in_readonly_region, traceframe_read_mem)
10823 (fetch_traceframe_registers, traceframe_read_sdata)
10824 (traceframe_read_info, struct fast_tpoint_collect_status)
10825 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10826 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10827 (supply_fast_tracepoint_registers)
10828 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10829 (ipa_tdesc, claim_trampoline_space)
10830 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10831 (agent_mem_read, agent_get_trace_state_variable_value)
10832 (agent_set_trace_state_variable_value, agent_tsv_read)
10833 (agent_mem_read_string, get_raw_reg_func_addr)
10834 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10835 * tracepoint.h: ... this new file.
10836
10837 2013-09-05 Pedro Alves <palves@redhat.com>
10838
10839 * server.h (perror_with_name, error, fatal, warning, paddress)
10840 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10841 include it.
10842 * utils.h: New file.
10843
10844 2013-09-05 Pedro Alves <palves@redhat.com>
10845
10846 * server.h (remote_debug, noack_mode, transport_is_reliable)
10847 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10848 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10849 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10850 (write_enn, initialize_async_io, enable_async_io)
10851 (disable_async_io, check_remote_input_interrupt_request)
10852 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10853 (dead_thread_notify, prepare_resume_reply)
10854 (decode_address_to_semicolon, decode_address, decode_m_packet)
10855 (decode_M_packet, decode_X_packet, decode_xfer_write)
10856 (decode_search_memory_packet, unhexify, hexify)
10857 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10858 (look_up_one_symbol, relocate_instruction)
10859 (monitor_output): Move to remote-utils.h, and include it.
10860 * remote-utils.h: New file.
10861
10862 2013-09-05 Pedro Alves <palves@redhat.com>
10863
10864 * server.h (_): Delete.
10865
10866 2013-09-02 Pedro Alves <palves@redhat.com>
10867
10868 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10869 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10870 allocated.
10871 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10872
10873 2013-09-02 Pierre Muller <muller@sourceware.org>
10874
10875 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10876 or WriteProcessMemory complete successfully and handle
10877 ERROR_PARTIAL_COPY error.
10878
10879 2013-09-02 Pedro Alves <palves@redhat.com>
10880
10881 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10882 error instead of EIO.
10883
10884 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10885
10886 PR server/15604
10887 * linux-low.c: Include filestuff.h.
10888 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10889 * lynx-low.c: Include filestuff.h.
10890 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10891 * server.c: Include filestuff.h.
10892 (main): Call notice_open_fds.
10893 * spu-low.c: Include filestuff.h.
10894 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10895
10896 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10897
10898 * Makefile.in: Explain why ../target and ../nat are not
10899 listed as include file search paths.
10900 (linux-waitpid.o): New object file rule.
10901 * configure.srv (srv_native_linux_obj): New variable.
10902 Replace all occurrences of linux native object files with
10903 $srv_native_linux_obj.
10904 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10905 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10906 (linux_enable_event_reporting): Remove declaration.
10907 (my_waitpid): Moved to common/linux-waitpid.c.
10908 (linux_wait_for_event): Pass ptid when calling
10909 linux_enable_event_reporting.
10910 (linux_supports_tracefork_flag): Remove.
10911 (linux_enable_event_reporting): Likewise.
10912 (linux_tracefork_grandchild): Remove.
10913 (STACK_SIZE): Moved to common/linux-ptrace.c.
10914 (linux_tracefork_child): Remove.
10915 (linux_test_for_tracefork): Remove.
10916 (linux_look_up_symbols): Call linux_supports_traceclone.
10917 (initialize_low): Remove call to linux_test_for_tracefork.
10918 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10919 common/linux-ptrace.h.
10920 (PTRACE_TYPE_ARG4): Likewise.
10921 Include linux-ptrace.h.
10922
10923 2013-08-21 Pedro Alves <palves@redhat.com>
10924
10925 * config.in: Renegerate.
10926
10927 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10928
10929 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10930 (SFILES): Remove $(srcdir)/common/target-common.c and
10931 add $(srcdir)/target/waitstatus.c.
10932 (OBS): Remove target-common.o and add waitstatus.o.
10933 (server_h): Remove $(srcdir)/../common/target-common.h and
10934 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10935 and $(srcdir)/../target/waitstatus.h.
10936 (target-common.o): Remove.
10937 (waitstatus.o): New target object file.
10938 * target.h: Do not include target-common.h and
10939 include target/resume.h, target/wait.h and
10940 target/waitstatus.h.
10941
10942 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10943
10944 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10945 to PTRACE_TYPE_ARG3.
10946 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10947 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10948 PTRACE_TYPE_ARG4.
10949 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10950 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10951
10952 2013-07-27 Jie Zhang <jie@codesourcery.com>
10953 Daniel Jacobowitz <dan@codesourcery.com>
10954 Yao Qi <yao@codesourcery.com>
10955
10956 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10957 (mips-linux-watch.o): New rule.
10958 (mips_linux_watch_h): New variable.
10959 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10960 srv_tgtobj.
10961 * linux-mips-low.c: Include mips-linux-watch.h.
10962 (struct arch_process_info, struct arch_lwp_info): New.
10963 (update_watch_registers_callback): New function.
10964 (mips_linux_new_process, mips_linux_new_thread) New functions.
10965 (mips_linux_prepare_to_resume, mips_insert_point): New
10966 functions.
10967 (mips_remove_point, mips_stopped_by_watchpoint): New
10968 functions.
10969 (rsp_bp_type_to_target_hw_bp_type): New function.
10970 (mips_stopped_data_address): New function.
10971 (the_low_target): Add watchpoint support functions.
10972
10973 2013-07-27 Yao Qi <yao@codesourcery.com>
10974
10975 * i386-low.c: Include break-common.h.
10976 (enum target_hw_bp_type): Remove.
10977
10978 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10979
10980 * Makefile.in (SFILES): /common/target-common.c.
10981 (OBS): Add target-common.o.
10982 (server_h): Add $(srcdir)/../common/target-common.h.
10983 (target-common.o): New target.
10984 * server.c (queue_stop_reply_callback): Free
10985 status string after use.
10986 * target.c (target_waitstatus_to_string): Remove.
10987 * target.h: Include target-common.h.
10988 (resume_kind): Likewise.
10989 (target_waitkind): Likewise.
10990 (target_waitstatus): Likewise.
10991 (TARGET_WNOHANG): Likewise.
10992
10993 2013-07-04 Yao Qi <yao@codesourcery.com>
10994
10995 * Makefile.in (host_alias): Use @host_noncanonical@.
10996 (target_alias): Use @target_noncanonical@.
10997 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10998 ACX_NONCANONICAL_HOST.
10999 * configure: Regenerated.
11000
11001 Revert:
11002 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11003
11004 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11005 * configure: Rebuild.
11006 * Makefile.in (version_host, version_target): Get from configure.
11007 (version.c): Use $(version_host) and $(version_target).
11008
11009 2013-07-03 Pedro Alves <palves@redhat.com>
11010
11011 * Makefile.in (config.status): Depend on development.sh.
11012 * acinclude.m4: Include libmcheck.m4.
11013 * configure: Regenerate.
11014
11015 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11016
11017 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11018 attribute inside the parentheses.
11019 (winapi_DebugSetProcessKillOnExit): Ditto.
11020 (winapi_DebugBreakProcess): Ditto.
11021 (winapi_GenerateConsoleCtrlEvent): Ditto.
11022
11023 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11024
11025 * notif.h (notif_event): Add a dummy member to avoid compiler
11026 errors.
11027
11028 2013-07-01 Pedro Alves <palves@redhat.com>
11029
11030 * hostio.c (HOSTIO_PATH_MAX): Define.
11031 (require_filename, handle_open, handle_unlink, handle_readlink):
11032 Use it.
11033
11034 2013-07-01 Pedro Alves <palves@redhat.com>
11035
11036 * server.h: Include "pathmax.h".
11037 * linux-low.c: Don't include sys/param.h.
11038 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11039 MAXPATHLEN.
11040 * win32-low.c: Don't include sys/param.h.
11041 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11042
11043 2013-07-01 Pedro Alves <palves@redhat.com>
11044
11045 * event-loop.c: Don't check HAVE_UNISTD_H before including
11046 <unistd.h>.
11047 * gdbreplay.c: Likewise.
11048 * remote-utils.c: Likewise.
11049 * server.c: Likewise.
11050 * configure.ac: Don't check for unistd.h.
11051 * configure: Regenerate.
11052
11053 2013-06-28 Tom Tromey <tromey@redhat.com>
11054
11055 * Makefile.in (version.c): Use version.in, not
11056 common/version.in.
11057
11058 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11059
11060 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11061 * configure: Rebuild.
11062 * Makefile.in (version_host, version_target): Get from configure.
11063 (version.c): Use $(version_host) and $(version_target).
11064
11065 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11066
11067 Fix trace-status to output user name without trailing colon.
11068 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11069
11070 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11071
11072 Fix trace-status to output proper start-time and stop-time.
11073 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11074 output start time and stop time in hex as gdb expects.
11075
11076 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11077
11078 * tracepoint.c (build_traceframe_info_xml): Output trace state
11079 variables present in the trace buffer.
11080
11081 2013-06-24 Tom Tromey <tromey@redhat.com>
11082
11083 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11084 create-version.sh.
11085 (version.o): Remove.
11086 * gdbreplay.c: Include version.h.
11087 (version, host_name): Don't declare.
11088 * server.h: Include version.h.
11089 (version, host_name): Don't declare.
11090
11091 2013-06-12 Pedro Alves <palves@redhat.com>
11092
11093 * linux-x86-low.c (linux_is_elf64): Delete global.
11094 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11095 with local linux_pid_exe_is_elf_64_file use.
11096
11097 2013-06-11 Pedro Alves <palves@redhat.com>
11098
11099 * linux-low.c (regset_disabled, disable_regset): New functions.
11100 (regsets_fetch_inferior_registers)
11101 (regsets_store_inferior_registers): Use them.
11102 (initialize_regsets_info); Don't allocate the disabled_regsets
11103 array here.
11104 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11105 comment.
11106
11107 2013-06-11 Pedro Alves <palves@redhat.com>
11108
11109 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11110 xmalloc.
11111
11112 2013-06-11 Pedro Alves <palves@redhat.com>
11113
11114 * linux-x86-low.c (initialize_low_arch): Call
11115 init_registers_x32_avx_linux.
11116
11117 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11118
11119 Fix compatibility with Android Bionic.
11120 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11121 it is not empty.
11122
11123 2013-06-07 Pedro Alves <palves@redhat.com>
11124
11125 PR server/14823
11126 * Makefile.in (OBS): Add tdesc.o.
11127 (IPA_OBJS): Add tdesc-ipa.o.
11128 (tdesc-ipa.o): New rule.
11129 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11130 interface.
11131 * linux-low.c (new_inferior): Delete.
11132 (disabled_regsets, num_regsets): Delete.
11133 (linux_add_process): Adjust to set the new per-process
11134 new_inferior flag.
11135 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11136 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11137 was a stop. When calling arch_setup, switch the current inferior
11138 to the thread that got an event.
11139 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11140 (regsets_fetch_inferior_registers)
11141 (regsets_store_inferior_registers): New regsets_info parameter.
11142 Adjust to use it.
11143 (linux_register_in_regsets): New regs_info parameter. Adjust to
11144 use it.
11145 (register_addr, fetch_register, store_register): New usrregs_info
11146 parameter. Adjust to use it.
11147 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11148 parameter regs_info. Adjust to use it.
11149 (linux_fetch_registers): Get the current inferior's regs_info, and
11150 adjust to use it.
11151 (linux_store_registers): Ditto.
11152 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11153 (initialize_low): Don't initialize the target_regsets here. Call
11154 initialize_low_arch.
11155 * linux-low.h (target_regsets): Delete declaration.
11156 (struct regsets_info): New.
11157 (struct usrregs_info): New.
11158 (struct regs_info): New.
11159 (struct process_info_private) <new_inferior>: New field.
11160 (struct linux_target_ops): Delete the num_regs, regmap, and
11161 regset_bitmap fields. New field regs_info.
11162 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11163 * i387-fp.c (num_xmm_registers): Delete.
11164 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11165 calls to new interface.
11166 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11167 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11168 Infer the number of xmm registers from the regcache's target
11169 description.
11170 * i387-fp.h (num_xmm_registers): Delete.
11171 * inferiors.c (add_thread): Don't install the thread's regcache
11172 here.
11173 * proc-service.c (gregset_info): Fetch the current inferior's
11174 regs_info. Adjust to use it.
11175 * regcache.c: Include tdesc.h.
11176 (register_bytes, reg_defs, num_registers)
11177 (gdbserver_expedite_regs): Delete.
11178 (get_thread_regcache): If the thread doesn't have a regcache yet,
11179 create one, instead of aborting gdbserver.
11180 (regcache_invalidate_one): Rename to ...
11181 (regcache_invalidate_thread): ... this.
11182 (regcache_invalidate_one): New.
11183 (regcache_invalidate): Only invalidate registers of the current
11184 process.
11185 (init_register_cache): Add target_desc parameter, and use it.
11186 (new_register_cache): Ditto. Assert the target description has a
11187 non zero registers_size.
11188 (regcache_cpy): Add assertions. Adjust.
11189 (realloc_register_cache, set_register_cache): Delete.
11190 (registers_to_string, registers_from_string): Adjust.
11191 (find_register_by_name, find_regno, find_register_by_number)
11192 (register_cache_size): Add target_desc parameter, and use it.
11193 (free_register_cache_thread, free_register_cache_thread_one)
11194 (regcache_release, register_cache_size): New.
11195 (register_size): Add target_desc parameter, and use it.
11196 (register_data, supply_register, supply_register_zeroed)
11197 (supply_regblock, supply_register_by_name, collect_register)
11198 (collect_register_as_string, collect_register_by_name): Adjust.
11199 * regcache.h (struct target_desc): Forward declare.
11200 (struct regcache) <tdesc>: New field.
11201 (init_register_cache, new_register_cache): Add target_desc
11202 parameter.
11203 (regcache_invalidate_thread): Declare.
11204 (regcache_invalidate_one): Delete declaration.
11205 (regcache_release): Declare.
11206 (find_register_by_number, register_cache_size, register_size)
11207 (find_regno): Add target_desc parameter.
11208 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11209 declarations.
11210 * remote-utils.c: Include tdesc.h.
11211 (outreg, prepare_resume_reply): Adjust.
11212 * server.c: Include tdesc.h.
11213 (gdbserver_xmltarget): Delete declaration.
11214 (get_features_xml, process_serial_event): Adjust.
11215 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11216 declare.
11217 (struct process_info) <tdesc>: New field.
11218 (ipa_tdesc): Declare.
11219 * tdesc.c: New file.
11220 * tdesc.h: New file.
11221 * tracepoint.c: Include tdesc.h.
11222 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11223 (get_context_regcache): Adjust to pass ipa_tdesc down.
11224 (do_action_at_tracepoint): Adjust to get the register cache size
11225 from the context regcache's description.
11226 (traceframe_walk_blocks): Adjust to get the register cache size
11227 from the current trace frame's description.
11228 (traceframe_get_pc): Adjust to get current trace frame's
11229 description and pass it down.
11230 (gdb_collect): Adjust to get the register cache size from the
11231 IPA's description.
11232 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11233 (gdbserver_xmltarget): Delete.
11234 (initialize_low_tracepoint): Set the ipa's target description.
11235 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11236 (initialize_low_tracepoint): Set the ipa's target description.
11237 * linux-x86-low.c: Include tdesc.h.
11238 [__x86_64__] (is_64bit_tdesc): New.
11239 (ps_get_thread_area, x86_get_thread_area): Use it.
11240 (i386_cannot_store_register): Rename to ...
11241 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11242 (i386_cannot_fetch_register): Rename to ...
11243 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11244 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11245 to new interface.
11246 (target_regsets): Rename to ...
11247 (x86_regsets): ... this.
11248 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11249 interface.
11250 (x86_siginfo_fixup): Use is_64bit_tdesc.
11251 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11252 (tdesc_x32_avx_linux, tdesc_x32_linux)
11253 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11254 Declare.
11255 (x86_linux_update_xmltarget): Delete.
11256 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11257 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11258 (AMD64_LINUX_USER64_CS): New.
11259 (x86_linux_read_description): New, based on
11260 x86_linux_update_xmltarget.
11261 (same_process_callback): New.
11262 (x86_arch_setup_process_callback): New.
11263 (x86_linux_update_xmltarget): New.
11264 (x86_regsets_info): New.
11265 (amd64_linux_regs_info): New.
11266 (i386_linux_usrregs_info): New.
11267 (i386_linux_regs_info): New.
11268 (x86_linux_regs_info): New.
11269 (x86_arch_setup): Reimplement.
11270 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11271 (x86_emit_ops): Ditto.
11272 (the_low_target): Adjust. Install x86_linux_regs_info,
11273 x86_cannot_fetch_register, and x86_cannot_store_register.
11274 (initialize_low_arch): New.
11275 * linux-ia64-low.c (tdesc_ia64): Declare.
11276 (ia64_fetch_register): Adjust.
11277 (ia64_usrregs_info, regs_info): New globals.
11278 (ia64_regs_info): New function.
11279 (the_low_target): Adjust.
11280 (initialize_low_arch): New function.
11281 * linux-sparc-low.c (tdesc_sparc64): Declare.
11282 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11283 Adjust.
11284 (sparc_arch_setup): New function.
11285 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11286 (the_low_target): Adjust.
11287 (initialize_low_arch): New function.
11288 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11289 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11290 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11291 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11292 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11293 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11294 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11295 (tdesc_powerpc_isa205_vsx64l): Declare.
11296 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11297 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11298 (ppc_set_pc, ppc_get_hwcap): Adjust.
11299 (ppc_usrregs_info): Forward declare.
11300 (!__powerpc64__) ppc_regmap_adjusted: New global.
11301 (ppc_arch_setup): Adjust to the current process'es target
11302 description.
11303 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11304 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11305 (ppc_store_evrregset): Adjust.
11306 (target_regsets): Rename to ...
11307 (ppc_regsets): ... this, and make static.
11308 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11309 (ppc_regs_info): New function.
11310 (the_low_target): Adjust.
11311 (initialize_low_arch): New function.
11312 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11313 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11314 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11315 (tdesc_s390x_linux64v2): Declare.
11316 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11317 (s390_fill_gregset, s390_store_last_break): Adjust.
11318 (target_regsets): Rename to ...
11319 (s390_regsets): ... this, and make static.
11320 (s390_get_pc, s390_set_pc): Adjust.
11321 (s390_get_hwcap): New target_desc parameter, and use it.
11322 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11323 (s390_arch_setup): Adjust to set the current process'es target
11324 description. Don't adjust the regmap.
11325 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11326 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11327 (regs_info_3264): New globals.
11328 (s390_regs_info): New function.
11329 (the_low_target): Adjust.
11330 (initialize_low_arch): New function.
11331 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11332 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11333 [__mips64] (init_registers_mips_linux)
11334 (init_registers_mips_dsp_linux): Delete defines.
11335 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11336 (have_dsp): New global.
11337 (mips_read_description): New, based on mips_arch_setup.
11338 (mips_arch_setup): Reimplement.
11339 (get_usrregs_info): New function.
11340 (mips_cannot_fetch_register, mips_cannot_store_register)
11341 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11342 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11343 (target_regsets): Rename to ...
11344 (mips_regsets): ... this, and make static.
11345 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11346 (dsp_regs_info, regs_info): New globals.
11347 (mips_regs_info): New function.
11348 (the_low_target): Adjust.
11349 (initialize_low_arch): New function.
11350 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11351 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11352 Declare.
11353 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11354 (arm_read_description): New, with bits factored from
11355 arm_arch_setup.
11356 (arm_arch_setup): Reimplement.
11357 (target_regsets): Rename to ...
11358 (arm_regsets): ... this, and make static.
11359 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11360 (arm_regs_info): New function.
11361 (the_low_target): Adjust.
11362 (initialize_low_arch): New function.
11363 * linux-m68k-low.c (tdesc_m68k): Declare.
11364 (target_regsets): Rename to ...
11365 (m68k_regsets): ... this, and make static.
11366 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11367 (m68k_regs_info): New function.
11368 (m68k_arch_setup): New function.
11369 (the_low_target): Adjust.
11370 (initialize_low_arch): New function.
11371 * linux-sh-low.c (tdesc_sharch): Declare.
11372 (target_regsets): Rename to ...
11373 (sh_regsets): ... this, and make static.
11374 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11375 (sh_regs_info, sh_arch_setup): New functions.
11376 (the_low_target): Adjust.
11377 (initialize_low_arch): New function.
11378 * linux-bfin-low.c (tdesc_bfin): Declare.
11379 (bfin_arch_setup): New function.
11380 (bfin_usrregs_info, regs_info): New globals.
11381 (bfin_regs_info): New function.
11382 (the_low_target): Adjust.
11383 (initialize_low_arch): New function.
11384 * linux-cris-low.c (tdesc_cris): Declare.
11385 (cris_arch_setup): New function.
11386 (cris_usrregs_info, regs_info): New globals.
11387 (cris_regs_info): New function.
11388 (the_low_target): Adjust.
11389 (initialize_low_arch): New function.
11390 * linux-cris-low.c (tdesc_crisv32): Declare.
11391 (cris_arch_setup): New function.
11392 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11393 (cris_regs_info): New function.
11394 (the_low_target): Adjust.
11395 (initialize_low_arch): New function.
11396 * linux-m32r-low.c (tdesc_m32r): Declare.
11397 (m32r_arch_setup): New function.
11398 (m32r_usrregs_info, regs_info): New globals.
11399 (m32r_regs_info): Adjust.
11400 (initialize_low_arch): New function.
11401 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11402 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11403 (tic6x_usrregs_info): Forward declare.
11404 (tic6x_read_description): New function, based on ...
11405 (tic6x_arch_setup): ... this. Reimplement.
11406 (target_regsets): Rename to ...
11407 (tic6x_regsets): ... this, and make static.
11408 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11409 (tic6x_regs_info): New function.
11410 (the_low_target): Adjust.
11411 (initialize_low_arch): New function.
11412 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11413 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11414 (target_regsets): Rename to ...
11415 (xtensa_regsets): ... this, and make static.
11416 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11417 globals.
11418 (xtensa_arch_setup, xtensa_regs_info): New functions.
11419 (the_low_target): Adjust.
11420 (initialize_low_arch): New function.
11421 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11422 (nios2_arch_setup): Set the current process'es tdesc.
11423 (target_regsets): Rename to ...
11424 (nios2_regsets): ... this.
11425 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11426 (nios2_regs_info): New function.
11427 (the_low_target): Adjust.
11428 (initialize_low_arch): New function.
11429 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11430 (aarch64_arch_setup): Set the current process'es tdesc.
11431 (target_regsets): Rename to ...
11432 (aarch64_regsets): ... this.
11433 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11434 (aarch64_regs_info): New function.
11435 (the_low_target): Adjust.
11436 (initialize_low_arch): New function.
11437 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11438 globals.
11439 (target_regsets): Rename to ...
11440 (tile_regsets): ... this.
11441 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11442 (tile_regs_info): New function.
11443 (tile_arch_setup): Set the current process'es tdesc.
11444 (the_low_target): Adjust.
11445 (initialize_low_arch): New function.
11446 * spu-low.c (tdesc_spu): Declare.
11447 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11448 * win32-arm-low.c (tdesc_arm): Declare.
11449 (arm_arch_setup): New function.
11450 (the_low_target): Install arm_arch_setup instead of
11451 init_registers_arm.
11452 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11453 (init_windows_x86): Rename to ...
11454 (i386_arch_setup): ... this. Set `win32_tdesc'.
11455 (the_low_target): Adjust.
11456 * win32-low.c (win32_tdesc): New global.
11457 (child_add_thread): Don't create the thread cache here.
11458 (do_initial_child_stuff): Set the new process'es tdesc.
11459 * win32-low.h (struct target_desc): Forward declare.
11460 (win32_tdesc): Declare.
11461 * lynx-i386-low.c (tdesc_i386): Declare global.
11462 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11463 * lynx-low.c (lynx_tdesc): New global.
11464 (lynx_add_process): Set the new process'es tdesc.
11465 * lynx-low.h (struct target_desc): Forward declare.
11466 (lynx_tdesc): Declare global.
11467 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11468 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11469 * nto-low.c (nto_tdesc): New global.
11470 (do_attach): Set the new process'es tdesc.
11471 * nto-low.h (struct target_desc): Forward declare.
11472 (nto_tdesc): Declare.
11473 * nto-x86-low.c (tdesc_i386): Declare.
11474 (nto_x86_arch_setup): Set `nto_tdesc'.
11475
11476 2013-06-04 Gary Benson <gbenson@redhat.com>
11477
11478 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11479 to qSupported response when appropriate.
11480 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11481 with nonzero-length annex.
11482 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11483 arguments supplied in annex.
11484
11485 2013-05-31 Doug Evans <dje@google.com>
11486
11487 PR server/15594
11488 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11489 64 bits in 64-cross-32 environment.
11490
11491 2013-05-28 Pedro Alves <palves@redhat.com>
11492
11493 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11494 (aarch64-without-fpu.c): Delete rule.
11495 * configure.srv (aarch64*-*-linux*): Remove references to
11496 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11497 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11498 declaration.
11499
11500 2013-05-24 Pedro Alves <palves@redhat.com>
11501
11502 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11503 instead of strchr/decode_address. Error if the range isn't split
11504 with a ','. Don't assume there's be a ':' in the action.
11505
11506 2013-05-23 Yao Qi <yao@codesourcery.com>
11507 Pedro Alves <palves@redhat.com>
11508
11509 * linux-low.c (lwp_in_step_range): New function.
11510 (linux_wait_1): If the thread was range stepping and stopped
11511 outside the stepping range, report the stop to GDB. Otherwise,
11512 continue stepping. Add range stepping debug output.
11513 (linux_set_resume_request): Copy the step range from the resume
11514 request to the lwp.
11515 (linux_supports_range_stepping): New.
11516 (linux_target_ops) <supports_range_stepping>: Set to
11517 linux_supports_range_stepping.
11518 * linux-low.h (struct linux_target_ops)
11519 <supports_range_stepping>: New field.
11520 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11521 * linux-x86-low.c (x86_supports_range_stepping): New.
11522 (the_low_target) <supports_range_stepping>: Set to
11523 x86_supports_range_stepping.
11524 * server.c (handle_v_cont): Handle 'r' action.
11525 (handle_v_requests): Append ";r" if the target supports range
11526 stepping.
11527 * target.h (struct thread_resume) <step_range_start,
11528 step_range_end>: New fields.
11529 (struct target_ops) <supports_range_stepping>:
11530 New field.
11531 (target_supports_range_stepping): New macro.
11532
11533 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11534
11535 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11536 confusion in comment.
11537
11538 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11539
11540 * lynx-low.c (struct process_info_private): New type.
11541 (lynx_add_process): New function.
11542 (lynx_create_inferior, lynx_attach): Replace calls to
11543 add_process by calls to lynx_add_process.
11544 (lynx_resume): If PTID is null, then try using
11545 current_process()->private->last_wait_event_ptid.
11546 Add comments.
11547 (lynx_clear_inferiors): Delete. The contents of that function
11548 has been inlined in lynx_mourn;
11549 (lynx_wait_1): Save the ptid in the process's private data.
11550 (lynx_mourn): Free the process' private data. Replace call
11551 to lynx_clear_inferiors by call to clear_inferiors.
11552
11553 2013-05-17 Yao Qi <yao@codesourcery.com>
11554
11555 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11556 the right place.
11557
11558 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11559
11560 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11561 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11562 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11563 PT_TEXT_END_ADDR guards. Update comments.
11564 (linux_target_op) <read_offsets>: Conditionally define to
11565 linux_read_offsets if the target is UCLIBC and if it defines
11566 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11567
11568 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11569 Andrew Jenner <andrew@codesourcery.com>
11570
11571 * Makefile.in (SFILES): Add linux-nios2-low.c.
11572 (clean): Add action to delete nios2-linux.c.
11573 (nios2-linux.c): New rule.
11574 * configure.srv: Add nios2*-*-linux*.
11575 * linux-nios2-low.c: New.
11576
11577 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11578
11579 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11580
11581 2013-04-25 Hui Zhu <hui@codesourcery.com>
11582
11583 PR gdb/15186
11584 * ax.c (ax_printf): Add fflush.
11585
11586 2013-04-22 Tom Tromey <tromey@redhat.com>
11587
11588 * Makefile.in (SFILES): Add filestuff.c.
11589 (OBS): Add filestuff.o.
11590 (filestuff.o): New target.
11591 * config.in, configure: Rebuild.
11592 * configure.ac: Check for fdwalk, pipe2.
11593
11594 2013-04-17 Pedro Alves <palves@redhat.com>
11595
11596 * configure.ac (USE_THREAD_DB): Delete variable.
11597 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11598 Don't AC_SUBST USE_THREAD_DB.
11599 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11600 * config.in, configure: Regenerate.
11601
11602 2013-04-16 Pedro Alves <palves@redhat.com>
11603
11604 * linux-low.h (struct lwp_info) <thread_known>: Move under
11605 the USE_THREAD_DB #ifdef.
11606
11607 2013-04-16 Pedro Alves <palves@redhat.com>
11608
11609 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11610 (linux-low.o): Delete rule.
11611 * linux-low.h: Always include "gdb_thread_db.h" instead of
11612 conditionally including thread_db.h.
11613 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11614 HAVE_THREAD_DB_H.
11615
11616 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11617
11618 * Makefile.in (install-only): Fix make install regression.
11619
11620 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11621
11622 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11623 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11624 installation.
11625 * gdbserver.1: Remove.
11626
11627 2013-03-22 Pedro Alves <palves@redhat.com>
11628
11629 * linux-low.c (handle_extended_wait): Don't call
11630 linux_enable_event_reporting.
11631
11632 2013-03-15 Tony Theodore <tonyt@logyst.com>
11633
11634 PR build/9098:
11635 * Makefile.in (SHELL): Use @SHELL@.
11636
11637 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11638
11639 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11640 compiler warning.
11641
11642 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11643
11644 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11645 Remove extraneous NULL element.
11646
11647 2013-03-13 Yao Qi <yao@codesourcery.com>
11648
11649 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11650 'V' block in trace frame.
11651
11652 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11653
11654 * target.h (struct target_ops): Add btrace ops.
11655 (target_supports_btrace): New macro.
11656 (target_enable_btrace): New macro.
11657 (target_disable_btrace): New macro.
11658 (target_read_btrace): New macro.
11659 * gdbthread.h (struct thread_info): Add btrace field.
11660 * server.c: Include btrace-common.h.
11661 (handle_btrace_general_set): New function.
11662 (handle_btrace_enable): New function.
11663 (handle_btrace_disable): New function.
11664 (handle_general_set): Call handle_btrace_general_set.
11665 (handle_qxfer_btrace): New function.
11666 (struct qxfer qxfer_packets[]): Add btrace entry.
11667 * inferiors.c (remove_thread): Disable btrace.
11668 * linux-low: Include linux-btrace.h.
11669 (linux_low_enable_btrace): New function.
11670 (linux_low_read_btrace): New function.
11671 (linux_target_ops): Add btrace ops.
11672 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11673 Add srv_linux_btrace=yes.
11674 (x86_64-*-linux*): Add linux-btrace.o.
11675 Add srv_linux_btrace=yes.
11676 * configure.ac: Define HAVE_LINUX_BTRACE.
11677 * config.in: Regenerated.
11678 * configure: Regenerated.
11679
11680 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11681
11682 * server.c (handle_qxfer): Preserve error message if -3 is
11683 returned.
11684 (qxfer): Document the -3 return value.
11685
11686 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11687
11688 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11689 (linux_btrace_h): New variable.
11690 (linux-btrace.o): New rule.
11691
11692 2013-03-08 Stan Shebs <stan@codesourcery.com>
11693 Hafiz Abid Qadeer <abidh@codesourcery.com>
11694
11695 * tracepoint.c (trace_buffer_size): New global.
11696 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11697 (init_trace_buffer): Change to one-argument function. Allocate
11698 trace buffer memory.
11699 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11700 handle QTBuffer:size packet.
11701 (cmd_bigqtbuffer_size): New function.
11702 (initialize_tracepoint): Call init_trace_buffer with
11703 DEFAULT_TRACE_BUFFER_SIZE.
11704 * server.c (handle_query): Add QTBuffer:size in the
11705 supported packets.
11706
11707 2013-03-07 Yao Qi <yao@codesourcery.com>
11708
11709 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11710 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11711 of -1.
11712 (cmd_qtsp): Adjust condition. Do post increment.
11713 Set cur_action and cur_step_action back to 0.
11714
11715 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11716
11717 PR server/15236
11718 * linux-low.c (linux_write_memory): Return early success if LEN is
11719 zero.
11720
11721 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11722
11723 * configure.srv: Add x86_64-*-cygwin* as target.
11724
11725 2013-02-28 Tom Tromey <tromey@redhat.com>
11726
11727 * configure.ac: Invoke AC_SYS_LARGEFILE.
11728 * configure, config.in: Rebuild.
11729
11730 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11731
11732 * win32-low.c: Throughout, fix format strings and casts of
11733 printf-like functions to avoid type related warnings on all
11734 platforms.
11735 (get_child_debug_event): Print dwDebugEventCode as hex since
11736 that's how it's usually documented.
11737
11738 2013-02-28 Yao Qi <yao@codesourcery.com>
11739
11740 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11741 pulongest.
11742
11743 2013-02-27 Jiong Wang <jiwang@tilera.com>
11744
11745 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11746 (reg-tilegx32.c): New rule.
11747 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11748 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11749 different register info initializer according to elf class.
11750 (init_registers_tilgx32): New function. The tilegx32 register info
11751 initializer.
11752 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11753 (tile_store_gregset): Likewise.
11754
11755 2013-02-27 Yao Qi <yao@codesourcery.com>
11756
11757 * server.c (process_point_options): Print debug message when
11758 debug_threads is true.
11759
11760 2013-02-26 Yao Qi <yao@codesourcery.com>
11761
11762 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11763
11764 2013-02-19 Pedro Alves <palves@redhat.com>
11765 Kai Tietz <ktietz@redhat.com>
11766
11767 PR gdb/15161
11768
11769 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11770 instead of strtoul to extract address from packet.
11771 (process_serial_event) <'z'>: Likewise.
11772
11773 2013-02-18 Yao Qi <yao@codesourcery.com>
11774
11775 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11776
11777 2013-02-14 Pedro Alves <palves@redhat.com>
11778
11779 Plug memory leak.
11780
11781 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11782 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11783
11784 2013-02-14 Pedro Alves <palves@redhat.com>
11785
11786 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11787
11788 2013-02-14 Pedro Alves <palves@redhat.com>
11789
11790 * tracepoint.c (save_string): Delete.
11791 (add_tracepoint_action): Use savestring instead of save_string.
11792
11793 2013-02-12 Pedro Alves <palves@redhat.com>
11794
11795 * linux-xtensa-low.c: Ditto.
11796 * xtensa-xtregs.c: Ditto.
11797
11798 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11799
11800 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11801 thread_db.
11802
11803 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11804
11805 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11806 aarch64_num_wp_regs and aarch64_num_bp_regs to
11807 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11808
11809 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11810
11811 * linux-aarch64-low.c (ps_get_thread_area): Replace
11812 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11813
11814 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11815 Marcus Shawcroft <marcus.shawcroft@arm.com>
11816 Nigel Stephens <nigel.stephens@arm.com>
11817 Yufeng Zhang <yufeng.zhang@arm.com>
11818
11819 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11820 (aarch64.c, aarch64-without-fpu.c): New targets.
11821 * configure.srv (aarch64*-*-linux*): New.
11822 * linux-aarch64-low.c: New file.
11823
11824 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11825
11826 * linux-low.c (handle_extended_wait, linux_create_inferior)
11827 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11828 (dequeue_one_deferred_signal, linux_resume_one_thread)
11829 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11830 (linux_tracefork_grandchild, linux_test_for_tracefork)
11831 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11832 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11833 where the argument is 0.
11834
11835 2013-01-25 Yao Qi <yao@codesourcery.com>
11836
11837 * event-loop.c: Include "queue.h".
11838 (gdb_event_p): New typedef.
11839 (struct gdb_event) <next_event>: Remove.
11840 (event_queue): Change to QUEUE(gdb_event_p).
11841 (async_queue_event): Remove.
11842 (gdb_event_xfree): New.
11843 (initialize_event_loop): New.
11844 (process_event): Use API from QUEUE.
11845 (wait_for_event): Likewise.
11846 * server.c (main): Call initialize_event_loop.
11847 * server.h (initialize_event_loop): Declare.
11848
11849 2013-01-18 Yao Qi <yao@codesourcery.com>
11850
11851 * ax.h (struct eval_agent_expr_context): New.
11852 (gdb_eval_agent_expr): Update declaration.
11853 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11854 TFRAME. Add new argument CTX.
11855 * server.h (struct eval_agent_expr_context): Declare.
11856 (agent_mem_read, agent_tsv_read): Update declaration.
11857 (agent_mem_read_string): Likewise.
11858 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11859 (add_traceframe_block): Add new argument TPOINT.
11860 Increase TPOINT->traceframe_usage.
11861 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11862 eval_tracepoint_agent_expr.
11863 (condition_true_at_tracepoint): Likewise.
11864 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11865 (agent_mem_read_string, agent_tsv_read): Likewise.
11866
11867 2013-01-16 Yao Qi <yao@codesourcery.com>
11868
11869 * linux-low.c (linux_resume_one_lwp): Don't check
11870 'lwp->bp_reinsert != 0'.
11871
11872 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11873 Pedro Alves <palves@redhat.com>
11874
11875 * lynx-low.c (ptrace_request_to_str): Define a temporary
11876 macro and use it to simplify this function's implementation.
11877
11878 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11879
11880 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11881 sets errno.
11882
11883 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11884
11885 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11886
11887 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11888
11889 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11890
11891 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11892
11893 * lynx-low.c (lynx_resume): Use the resume_info parameter
11894 to determine the ptid for the lynx_ptrace call, unless
11895 it is equal to minus_one_ptid, in which case we use the
11896 ptid of the current_inferior.
11897 (lynx_wait_1): After having received a thread create/exit
11898 event, resume the inferior's execution using the signaling
11899 thread's ptid, rather than the old ptid.
11900
11901 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11902
11903 * lynx-low.c (lynx_resume): Delete variable ret.
11904
11905 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11906
11907 * gdbreplay.c (gdbreplay_version): Update copyright year.
11908 * server.c (gdbserver_version): Likewise.
11909
11910 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11911
11912 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11913 new thread.
11914
11915 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11916
11917 * lynx-low.c (ptrace_request_to_str): Add handling for
11918 PTRACE_GETTRACESIG.
11919
11920 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11921
11922 * lynx-low.c (lynx_attach): Delete variable new_process.
11923
11924 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11925
11926 * lynx-low.c (lynx_create_inferior): Delete variable
11927 new_process.
11928
11929 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11930
11931 * lynx-low.c (ptrace_request_to_str): Do not handle
11932 PTRACE_GETTHREADLIST if this macro does not exist.
11933
11934 2012-12-15 Yao Qi <yao@codesourcery.com>
11935
11936 * Makefile.in (OBS): Add notif.o.
11937 * notif.c, notif.h: New.
11938 * server.c: Include "notif.h".
11939 (struct vstop_notif) <next>: Remove.
11940 <base>: New field.
11941 (queue_stop_reply): Update.
11942 (push_event, send_next_stop_reply): Remove.
11943 (discard_queued_stop_replies): Update.
11944 (notif_stop): New variable.
11945 (handle_v_stopped): Remove.
11946 (handle_v_requests): Don't call handle_v_stopped. Call
11947 handle_ack_notif instead.
11948 (queue_stop_reply_callback): Call notif_event_enque instead
11949 of queue_stop_reply.
11950 (handle_status): Don't call send_next_stop_reply, call
11951 notif_write_event instead.
11952 (kill_inferior_callback): Likewise.
11953 (detach_or_kill_inferior_callback): Likewise.
11954 (main): Call initialize_notif.
11955 (process_serial_event): Call QUEUE_is_empty.
11956 (handle_target_event): Call notif_push instead of push event.
11957 * server.h (push_event): Remove declaration.
11958
11959 2012-12-10 Tom Tromey <tromey@redhat.com>
11960
11961 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11962 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11963 macros.
11964 (.c.o): Rewrite.
11965 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11966 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11967 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11968 (amd64-linux-ipa.o, ax.o): Rewrite.
11969 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11970 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11971 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11972 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11973 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11974 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11975 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11976 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11977 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11978 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11979 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11980 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11981 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11982 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11983 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11984 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11985 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11986 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11987 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11988 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11989 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11990 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11991 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11992 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11993 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11994 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11995 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11996 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11997 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11998 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11999 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12000 (reg-tilegx.o): Remove.
12001 (all_object_files): New macro.
12002 Include .deps files.
12003 * aclocal.m4, configure: Rebuild.
12004 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12005 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12006 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12007
12008 2012-12-05 Tom Tromey <tromey@redhat.com>
12009
12010 PR gdb/14917:
12011 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12012
12013 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12014
12015 * configure.ac: Check for linux/perf_event.h.
12016 * config.in: Regenerated.
12017 * configure: Regenerated.
12018
12019 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12020
12021 * hostio.c (handle_readlink): Decrease buffer size
12022 parameter passed to readlink by one byte.
12023
12024 2012-11-26 Yao Qi <yao@codesourcery.com>
12025
12026 * configure.ac (build_warnings): Append '-Wempty-body'.
12027 * configure: Regenerated.
12028 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12029 body.
12030
12031 2012-11-15 Pierre Muller <muller@sourceware.org>
12032
12033 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12034 * config.in: Regenerate.
12035 * configure: Regenerate.
12036 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12037 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12038 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12039 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12040 header.
12041 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12042 instead of <sys/wait.h> header.
12043 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12044
12045 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12046
12047 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12048 (various make rules): Remove -DGDBSERVER
12049
12050 2012-11-09 Yao Qi <yao@codesourcery.com>
12051
12052 * spu-low.c (current_ptid): Move it to ..
12053 * gdbthread.h: ... here. New.
12054 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12055 * server.c (myresume, process_serial_event): Likewise.
12056 * thread-db.c (thread_db_find_new_threads): Likewise.
12057 * tracepoint.c (run_inferior_command): Likewise.
12058
12059 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12060
12061 * server.c (handle_search_memory_1): Include access length in
12062 warning message.
12063
12064 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12065
12066 * linux-crisv32-low.c: Fix compile errors.
12067
12068 2012-09-04 Yao Qi <yao@codesourcery.com>
12069
12070 * tracepoint.c (cmd_qtsv): Adjust debug message.
12071 Don't check CUR_TPOINT.
12072
12073 2012-08-28 Yao Qi <yao@codesourcery.com>
12074
12075 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12076 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12077 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12078 Remove declarations of xmalloc, xreallloc, xstrdup and
12079 freeargv.
12080 * Makefile.in (libiberty_h): New.
12081 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12082 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12083
12084 2012-08-23 Yao Qi <yao@codesourcery.com>
12085
12086 * server.h: Remove declaration of 'xsnprintf'.
12087
12088 2012-08-22 Keith Seitz <keiths@redhat.com>
12089
12090 * server.h: Include build-gnulib-gbserver/config.h.
12091 * gdbreplay.c: Likewise.
12092
12093 2012-08-08 Doug Evans <dje@google.com>
12094
12095 * Makefile.in (SFILES): Add gdb_vecs.c.
12096 (OBS): Add gdb_vecs.o.
12097 (gdb_vecs_h, host_defs_h): New variables.
12098 (thread-db.o): Add $(gdb_vecs_h) dependency.
12099 (gdb_vecs.o): New rule.
12100 * thread-db.c: #include "gdb_vecs.h".
12101 (thread_db_load_search): Use a vector to iterate over path elements.
12102 Handle text appearing after "$pdir".
12103
12104 * configure.ac: Add check for strstr.
12105 * config.in: Regenerate.
12106 * configure: Regenerate.
12107
12108 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12109
12110 * hostio.c (handle_pread): If pread fails, fall back to attempting
12111 lseek/read.
12112 (handle_pwrite): Likewise for pwrite.
12113
12114 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12115
12116 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12117 between unsupported TYPE and unimplementable ADDR/LEN combination.
12118 (arm_insert_point): Act on new return value.
12119
12120 2012-07-31 Pedro Alves <palves@redhat.com>
12121
12122 * server.c (process_point_options): Only skip tokens if we find
12123 one that is unrecognized. Don't treat 'X' specially while
12124 skipping unrecognized tokens.
12125
12126 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12127
12128 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12129 to 4-byte-align HW breakpoint addresses for Thumb.
12130
12131 2012-07-27 Yao Qi <yao@codesourcery.com>
12132
12133 PR remote/14161.
12134
12135 * server.h: Declare gdb_agent_about_to_close.
12136 * target.c (kill_inferior): Include "agent.h".
12137 New. Send command 'kill'.
12138 * target.h (kill_inferior): Removed macro.
12139 * tracepoint.c (gdb_agent_about_to_close): New.
12140 (gdb_agent_helper_thread): Handle command 'close'.
12141 Wait endlessly until the inferior stops.
12142 Install gdb_agent_remove_socket to atexit hook.
12143 (agent_socket_name): New static variable.
12144 (gdb_agent_socket_init): Replace local variable 'name' with
12145 'agent_socket_name'.
12146 (gdb_agent_remove_socket): New.
12147
12148 2012-07-27 Yao Qi <yao@codesourcery.com>
12149
12150 * server.c (process_point_options): Stop at 'X' when parsing.
12151
12152 2012-07-19 Michael Eager <eager@eagercon.com>
12153
12154 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12155 to hw_execute.
12156 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12157 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12158 hardware breakpoint.
12159
12160 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12161
12162 * gdbserver/linux-low.c (initialize_low): Call
12163 linux_ptrace_init_warnings.
12164
12165 2012-07-02 Doug Evans <dje@google.com>
12166
12167 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12168 pointer to int.
12169
12170 2012-07-02 Stan Shebs <stan@codesourcery.com>
12171
12172 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12173 (ax.o): Add it to build rule.
12174 (ax-ipa.o): Ditto.
12175 (OBS): Add format.o.
12176 (IPA_OBS): Add format.o.
12177 * server.c (handle_query): Claim support for breakpoint commands.
12178 (process_point_options): Add command case.
12179 (process_serial_event): Leave running if there are printfs in
12180 effect.
12181 * mem-break.h (any_persistent_commands): Declare.
12182 (add_breakpoint_commands): Declare.
12183 (gdb_no_commands_at_breakpoint): Declare.
12184 (run_breakpoint_commands): Declare.
12185 * mem-break.c (struct point_command_list): New struct.
12186 (struct breakpoint): New field command_list.
12187 (any_persistent_commands): New function.
12188 (add_commands_to_breakpoint): New function.
12189 (add_breakpoint_commands): New function.
12190 (gdb_no_commands_at_breakpoint): New function.
12191 (run_breakpoint_commands): New function.
12192 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12193 locally.
12194 * ax.c: Include format.h.
12195 (ax_printf): New function.
12196 (gdb_eval_agent_expr): Add printf opcode.
12197
12198 2012-06-13 Yao Qi <yao@codesourcery.com>
12199
12200 * server.c (start_inferior): Remove duplicated writes to fields
12201 'last_resume_kind' and 'last_status' of 'current_inferior'.
12202
12203 2012-06-12 Yao Qi <yao@codesourcery.com>
12204 Pedro Alves <palves@redhat.com>
12205
12206 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12207 comment.
12208 * server.c (handle_v_cont): Extend comment.
12209
12210 2012-06-11 Yao Qi <yao@codesourcery.com>
12211
12212 * linux-low.c (linux_attach): Add 'static'.
12213
12214 2012-06-06 Yao Qi <yao@codesourcery.com>
12215
12216 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12217
12218 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12219
12220 Fix gcc -flto compilation warning.
12221 * server.c (main): Make variable multi_mode and attach volatile.
12222
12223 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12224
12225 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12226 if the platform doesn't know about it.
12227
12228 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12229
12230 * Makefile.in (SFILES): Add linux-tile-low.c.
12231 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12232 * configure.srv: Handle tilegx-*-linux*.
12233 * linux-tile-low.c: New file.
12234
12235 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12236
12237 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12238
12239 2012-05-24 Pedro Alves <palves@redhat.com>
12240
12241 PR gdb/7205
12242
12243 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12244
12245 2012-05-24 Pedro Alves <palves@redhat.com>
12246
12247 PR gdb/7205
12248
12249 Replace target_signal with gdb_signal throughout.
12250
12251 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12252
12253 * linux-low.c (linux_store_registers): Avoid the copying sequence
12254 when no data has been retrieved by ptrace.
12255
12256 2012-05-22 Will Deacon <will.deacon@arm.com>
12257
12258 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12259 Include asm/ptrace.h.
12260 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12261 already defined.
12262
12263 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12264
12265 * linux-low.c (linux_store_registers): Don't re-retrieve data
12266 with ptrace that has already been obtained from /proc. Always
12267 copy any data retrieved with ptrace to the buffer supplied.
12268
12269 2012-05-11 Yao Qi <yao@codesourcery.com>
12270 Pedro Alves <palves@redhat.com>
12271
12272 * linux-low.c (enum stopping_threads_kind): New.
12273 (stopping_threads): Change type to `enum stopping_threads_kind'.
12274 (handle_extended_wait): If stopping and suspending threads, leave
12275 the new_lwp suspended too.
12276 (linux_wait_for_event): Adjust.
12277 (stop_all_lwps): Set `stopping_threads' to
12278 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12279 whether we're suspending threads or just stopping them. Assert no
12280 recursion happens.
12281
12282 2012-04-29 Yao Qi <yao@codesourcery.com>
12283
12284 * server.h: Move some code to ...
12285 * gdbthread.h: ... here. New.
12286 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12287 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12288 (nto-low.o, win32-low.o): Likewise.
12289 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12290 * regcache.c, remote-utils.c, server.c: Likewise.
12291 * target.c, tracepoint.c, win32-low.c: Likewise.
12292
12293 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12294
12295 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12296 (PTRACE_ARG4_TYPE): Likewise.
12297 (PTRACE_XFER_TYPE): Likewise.
12298 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12299 ptrace to PTRACE_ARG3_TYPE.
12300 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12301 (PTRACE_ARG4_TYPE): Likewise.
12302 (PTRACE_XFER_TYPE): Likewise.
12303 (linux_detach_one_lwp): Cast fourth argument of
12304 ptrace to long then PTRACE_ARG4_TYPE.
12305 (regsets_fetch_inferior_registers): Cast third argument of
12306 ptrace to long then PTRACE_ARG3_TYPE.
12307 (regsets_store_inferior_registers): Likewise.
12308
12309 2012-04-20 Pedro Alves <palves@redhat.com>
12310
12311 * configure: Regenerate.
12312
12313 2012-04-19 Pedro Alves <palves@redhat.com>
12314
12315 * Makefile.in (GNULIB_BUILDDIR): New.
12316 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12317 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12318 (all, install-only, uninstall, clean-info, all-lib, clean): No
12319 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12320 (maintainer-clean realclean distclean): Use subdir_do.
12321 (subdir_do): New.
12322 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12323 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12324 * acinclude.m4: Include acx_configure_dir.m4.
12325 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12326 calls. Call AC_PROG_RANLIB. Configure gnulib using
12327 ACX_CONFIGURE_DIR.
12328 (GNULIB): New.
12329 (GNULIB_STDINT_H): Adjust.
12330 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12331 * gdbreplay.c: Include build-gnulib/config.h.
12332 * server.h: Likewise.
12333 * aclocal.m4: Regenerate.
12334 * config.in: Regenerate.
12335 * configure: Regenerate.
12336
12337 2012-04-19 Pedro Alves <palves@redhat.com>
12338
12339 * Makefile.in (LIBGNU, INCGNU): Adjust.
12340 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12341 (all, install-only, uninstall, clean-info, all-lib, clean)
12342 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12343 * configure.ac: Adjust AC_OUTPUT output.
12344 * aclocal.m4: Regenerate.
12345 * configure: Regenerate.
12346
12347 2012-04-19 Pedro Alves <palves@redhat.com>
12348
12349 * Makefile.in (generated_files): New.
12350 (server_h): Remove the explicit dependency on config.h, and depend
12351 on $generated_files.
12352
12353 2012-04-19 Pedro Alves <palves@redhat.com>
12354
12355 * Makefile.in (INCGNU): Add -Ignulib.
12356
12357 2012-04-19 Pedro Alves <palves@redhat.com>
12358
12359 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12360 (INCGNU): ... this, and spell out -I here.
12361 (GNULIB_LIB): Rename to ...
12362 (LIBGNU): ... this.
12363 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12364
12365 2012-04-19 Pedro Alves <palves@redhat.com>
12366
12367 * config.in: Regenerate.
12368
12369 2012-04-19 Pedro Alves <palves@redhat.com>
12370
12371 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12372 * server.h (memmem): Remove declaration.
12373 * config.in: Regenerate.
12374 * configure: Regenerate.
12375
12376 2012-04-19 Yao Qi <yao@codesourcery.com>
12377
12378 * Makefile.in (SFILES): Add common/vec.c.
12379 (OBS): Add vec.o.
12380 (vec.o): New rule.
12381
12382 2012-04-19 Yao Qi <yao@codesourcery.com>
12383
12384 * remote-utils.c (prepare_resume_reply): Replace with macro
12385 target_core_of_thread.
12386 * server.c (handle_qxfer_threads_proper): Likewise.
12387 * target.h (traget_core_of_thread): New macro.
12388
12389 2012-04-18 Pedro Alves <palves@redhat.com>
12390
12391 * aclocal.m4: Regenerate.
12392 * configure: Regenerate.
12393
12394 2012-04-16 Yao Qi <yao@codesourcery.com>
12395
12396 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12397 duplicated on address.
12398
12399 2012-04-16 Yao Qi <yao@codesourcery.com>
12400
12401 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12402 (struct tracepoint_action_ops) <send>: New field.
12403 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12404 (agent_expr_send, x_tracepoint_action_send): New.
12405 (l_tracepoint_action_send): New.
12406 (cmd_qtdp): Download and install tracepoint
12407 according to `use_agent'.
12408 (run_inferior_command): Add one more parameter `len'.
12409 Update callers.
12410 (tracepoint_send_agent): New.
12411 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12412
12413 2012-04-16 Yao Qi <yao@codesourcery.com>
12414
12415 * tracepoint.c (download_tracepoints): Moved to ...
12416 (cmd_qtstart): ... here.
12417
12418 2012-04-14 Yao Qi <yao@codesourcery.com>
12419
12420 * tracepoint.c: Include inttypes.h.
12421 (struct collect_memory_action): Use sized types.
12422 (struct tracepoint): Likewise.
12423 (cmd_qtdp, stop_tracing): Update print specifiers.
12424 (cmd_qtp, response_tracepoint): Likewise.
12425 (collect_data_at_tracepoint): Likewise.
12426 (collect_data_at_step): Likewise.
12427
12428 2012-04-14 Yao Qi <yao@codesourcery.com>
12429
12430 Import gnulib module inttypes.
12431 * aclocal.m4, config.in, configure: Regenerated.
12432
12433 2012-04-14 Yao Qi <yao@codesourcery.com>
12434
12435 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12436 Makefile and config.status at last.
12437
12438 2012-04-13 Yao Qi <yao@codesourcery.com>
12439
12440 * tracepoint.c: Include stdint.h unconditionally.
12441
12442 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12443
12444 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12445 on BFD_HAVE_SYS_PROCFS_TYPE.
12446 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12447 * configure: Regenerate.
12448 * config.in: Likewise.
12449
12450 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12451
12452 * Makefile.in (clean): Also remove x32.c x32-linux.c
12453 x32-avx.c x32-avx-linux.c.
12454 (x32.o): New target.
12455 (x32.c): Likewise.
12456 (x32-linux.o): Likewise.
12457 (x32-linux.c): Likewise.
12458 (x32-avx.o): Likewise.
12459 (x32-avx.c): Likewise.
12460 (x32-avx-linux.o): Likewise.
12461 (x32-avx-linux.c): Likewise.
12462
12463 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12464 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12465 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12466 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12467 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12468 i386/x32-avx-linux.xml.
12469
12470 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12471 (init_registers_x32_avx_linux): Likwise.
12472 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12473 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12474
12475 2012-04-13 Pedro Alves <palves@redhat.com>
12476
12477 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12478 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12479 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12480 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12481 the sub-make.
12482
12483 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12484
12485 * linux-x86-low.c (compat_x32_clock_t): New.
12486 (compat_x32_siginfo_t): Likewise.
12487 (compat_x32_siginfo_from_siginfo): Likewise.
12488 (siginfo_from_compat_x32_siginfo): Likewise.
12489 (linux_is_elf64): Likewise.
12490 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12491 and siginfo_from_compat_x32_siginfo for x32.
12492 (x86_arch_setup): Set linux_is_elf64.
12493
12494 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12495
12496 PR gdb/13969
12497 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12498 e_machine field.
12499 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12500 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12501 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12502 compatible with process.
12503
12504 2012-04-12 Yao Qi <yao@codesourcery.com>
12505
12506 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12507 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12508 (install-only, install-info, clean): Handle sub dir gnulib.
12509 (all-lib, am--refresh): New targets.
12510 (memmem.o): Remove target.
12511 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12512 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12513 (AC_REPLACE_FUNCS): Remove memmem.
12514 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12515 (AC_OUTPUT): Generate Makefile in gnulib/.
12516 * aclocal.m4, config.in, configure: Regenerated.
12517
12518 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12519
12520 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12521
12522 2012-04-05 Pedro Alves <palves@redhat.com>
12523
12524 -Werror=strict-aliasing
12525
12526 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12527 pointer.
12528
12529 2012-04-04 Pedro Alves <palves@redhat.com>
12530
12531 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12532 (sparc_store_gregset_from_stack, sparc_store_gregset)
12533 (sparc_breakpoint_at): Fix formatting.
12534
12535 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12536
12537 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12538 are available.
12539 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12540 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12541 * config.in: Regenerate.
12542 * configure: Likewise.
12543
12544 2012-03-29 Pedro Alves <palves@redhat.com>
12545
12546 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12547 Correct ptrace arguments.
12548
12549 2012-03-28 Pedro Alves <palves@redhat.com>
12550
12551 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12552 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12553 (IA64_FR1_REGNUM): New defines.
12554 (ia64_fetch_register): New.
12555 (the_low_target): Install it.
12556 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12557 field.
12558 * linux-low.c (linux_fetch_registers): Try the
12559 the_low_target.fetch_register hook first.
12560
12561 * linux-arm-low.c (the_low_target): Adjust.
12562 * linux-bfin-low.c (the_low_target): Adjust.
12563 * linux-cris-low.c (the_low_target): Adjust.
12564 * linux-crisv32-low.c (the_low_target): Adjust.
12565 * linux-m32r-low.c (the_low_target): Adjust.
12566 * linux-m68k-low.c (the_low_target): Adjust.
12567 * linux-mips-low.c (the_low_target): Adjust.
12568 * linux-ppc-low.c (the_low_target): Adjust.
12569 * linux-s390-low.c (the_low_target): Adjust.
12570 * linux-sh-low.c (the_low_target): Adjust.
12571 * linux-sparc-low.c (the_low_target): Adjust.
12572 * linux-tic6x-low.c (the_low_target): Adjust.
12573 * linux-x86-low.c (the_low_target): Adjust.
12574 * linux-xtensa-low.c (the_low_target): Adjust.
12575
12576 2012-03-26 Pedro Alves <palves@redhat.com>
12577
12578 * server.c (handle_qxfer_libraries): Don't bail early if
12579 the_target->qxfer_libraries_svr4 is not NULL.
12580
12581 2012-03-26 Pedro Alves <palves@redhat.com>
12582
12583 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12584
12585 2012-03-23 Pedro Alves <palves@redhat.com>
12586
12587 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12588 "library-list-svr4" element's start tag when the the DSO list is
12589 empty.
12590
12591 2012-03-23 Pedro Alves <palves@redhat.com>
12592
12593 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12594 a variable whose type size is the same as the inferior's pointer
12595 size.
12596
12597 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12598
12599 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12600 struct siginfo.
12601 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12602 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12603 * linux-low.h: Include <signal.h>.
12604 (struct siginfo): Remove forward declaration.
12605 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12606 struct siginfo.
12607
12608 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12609
12610 * .gitignore: Ignore more files.
12611
12612 2012-03-19 Pedro Alves <palves@redhat.com>
12613 Jan Kratochvil <jan.kratochvil@redhat.com>
12614
12615 * server.c (cont_thread, general_thread): Add describing comments.
12616 (start_inferior): Clear `cont_thread'.
12617 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12618 of a process.
12619
12620 2012-03-15 Yao Qi <yao@codesourcery.com>
12621
12622 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12623 handling to ...
12624 (cmd_qtdp): ... here.
12625
12626 2012-03-15 Yao Qi <yao@codesourcery.com>
12627
12628 * tracepoint.c (struct tracepoint_action_ops): New.
12629 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12630 (m_tracepoint_action_download): New.
12631 (r_tracepoint_action_download): New.
12632 (x_tracepoint_action_download): New.
12633 (l_tracepoint_action_download): New.
12634 (add_tracepoint_action): Install `action->ops' according type.
12635 (download_tracepoint_1): Move code `download' function pointer
12636 of various tracepoint_action_ops.
12637
12638 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12639
12640 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12641 linux_ptrace_attach_warnings.
12642
12643 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12644
12645 * Makefile.in (linux-ptrace.o): New.
12646 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12647 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12648 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12649 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12650 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12651 of these targets.
12652 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12653
12654 2012-03-08 Yao Qi <yao@codesourcery.com>
12655 Pedro Alves <palves@redhat.com>
12656
12657 Fix PR server/13392.
12658 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12659 offset of JMP insn.
12660 * tracepoint.c (remove_tracepoint): New.
12661 (cmd_qtdp): Call remove_tracepoint when failed to install.
12662
12663 2012-03-07 Pedro Alves <palves@redhat.com>
12664
12665 * linux-low.c (get_detach_signal): New.
12666 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12667 Pass on pending signals to PTRACE_DETACH. Check the result of the
12668 ptrace call.
12669 * server.c (program_signals, program_signals_p): New.
12670 (handle_general_set): Handle QProgramSignals.
12671 * server.h (program_signals, program_signals_p): Declare.
12672
12673 2012-03-05 Pedro Alves <palves@redhat.com>
12674 Jan Kratochvil <jan.kratochvil@redhat.com>
12675
12676 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12677 New comment why.
12678
12679 2012-03-03 Yao Qi <yao@codesourcery.com>
12680
12681 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12682 agent_look_up_symbols.
12683
12684 2012-03-03 Yao Qi <yao@codesourcery.com>
12685
12686 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12687 (linux-x86-low.o): Likewise.
12688 * server.h: Remove in_process_agent_loaded.
12689 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12690 common/agent.c.
12691 Update callers.
12692
12693 2012-03-03 Yao Qi <yao@codesourcery.com>
12694
12695 * tracepoint.c (gdb_agent_capability): New global.
12696 (in_process_agent_loaded_ust): Renamed to
12697 `in_process_agent_supports_ust'.
12698 Update callers.
12699 (in_process_agent_supports_ust): Call agent_capability_check.
12700 (clear_installed_tracepoints): Assert that agent supports
12701 agent.
12702
12703 2012-03-03 Yao Qi <yao@codesourcery.com>
12704
12705 * linux-low.c (linux_supports_agent): New.
12706 (linux_target_ops): Initialize field `supports_agent' with
12707 linux_supports_agent.
12708 * target.h (struct target_ops) <supports_agent>: New.
12709 (target_supports_agent): New macro.
12710 * server.c (handle_general_set): Handle packet 'QAgent'.
12711 (handle_query): Send `QAgent+'.
12712 * Makefile.in (server.o): Depends on agent.h.
12713
12714 2012-03-03 Yao Qi <yao@codesourcery.com>
12715
12716 * Makefile.in (OBS): Add agent.o.
12717 Add new rule for agent.o.
12718 Track dependence of tracepoint.c on agent.h.
12719 * tracepoint.c (run_inferior_command_1):
12720 (run_inferior_command): Call agent_run_command.
12721 (gdb_ust_connect_sync_socket): Deleted. Move it to
12722 common/agent.c.
12723 (resume_thread, stop_thread): Likewise.
12724 (gdb_ust_socket_init): Renamed to ...
12725 (gdb_agent_socket_init): ... New.
12726 (gdb_ust_thread): Renamed to ...
12727 (gdb_agent_helper_thread): ... New.
12728 (gdb_ust_init): Move some code to ...
12729 (gdb_agent_init): ... here. New.
12730 [HAVE_UST]: Call gdb_ust_init.
12731 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12732 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12733 * config.in, configure: Regenerated.
12734
12735 2012-03-02 Pedro Alves <palves@redhat.com>
12736
12737 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12738 * linux-low.c (struct simple_pid_list): New.
12739 (stopped_pids): New a struct simple_pid_list pointer.
12740 (add_to_pid_list, pull_pid_from_list): New.
12741 (handle_extended_wait): Don't assume the first signal new children
12742 report is SIGSTOP. Adjust call to pull_pid_from_list.
12743 (linux_wait_for_lwp): Adjust.
12744
12745 2012-03-02 Yao Qi <yao@codesourcery.com>
12746
12747 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12748 debug log.
12749
12750 2012-03-02 Yao Qi <yao@codesourcery.com>
12751
12752 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12753 `stop_pc' and `tpoint'. Update caller.
12754
12755 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12756
12757 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12758 * linux-low.c (use_linux_regsets): New macro.
12759 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12760 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12761 (linux_register_in_regsets): New function.
12762 (usr_fetch_inferior_registers): Skip registers covered by
12763 regsets.
12764 (usr_store_inferior_registers): Likewise.
12765 (usr_fetch_inferior_registers): New macro.
12766 (usr_store_inferior_registers): Likewise.
12767 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12768 (linux_store_registers): Likewise.
12769 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12770 prototype.
12771 (init_registers_mips64_dsp_linux): Likewise.
12772 (init_registers_mips_linux): New macro.
12773 (init_registers_mips_dsp_linux): Likewise.
12774 (mips_dsp_num_regs): Likewise.
12775 (DSP_BASE, DSP_CONTROL): New fallback macros.
12776 (mips_base_regs): New macro.
12777 (mips_regmap): Use it. Fix the size.
12778 (mips_dsp_regmap): New variable.
12779 (mips_dsp_regset_bitmap): Likewise.
12780 (mips_arch_setup): New function.
12781 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12782 than mips_regmap.
12783 (mips_cannot_store_register): Likewise.
12784 (the_low_target): Update .arch_setup, .num_regs and .regmap
12785 initializers. Add .regset_bitmap initializer.
12786 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12787 initializer.
12788 * linux-bfin-low.c (the_low_target): Likewise.
12789 * linux-cris-low.c (the_low_target): Likewise.
12790 * linux-crisv32-low.c (the_low_target): Likewise.
12791 * linux-ia64-low.c (the_low_target): Likewise.
12792 * linux-m32r-low.c (the_low_target): Likewise.
12793 * linux-m68k-low.c (the_low_target): Likewise.
12794 * linux-ppc-low.c (the_low_target): Likewise.
12795 * linux-s390-low.c (the_low_target): Likewise.
12796 * linux-sh-low.c (the_low_target): Likewise.
12797 * linux-sparc-low.c (the_low_target): Likewise.
12798 * linux-tic6x-low.c (the_low_target): Likewise.
12799 * linux-x86-low.c (the_low_target): Likewise.
12800 * linux-xtensa-low.c (the_low_target): Likewise.
12801 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12802 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12803 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12804 srv_xmlfiles.
12805 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12806 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12807
12808 2012-02-29 Yao Qi <yao@codesourcery.com>
12809 Pedro Alves <palves@redhat.com>
12810
12811 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12812 `step_over_finished' is true.
12813
12814 2012-02-27 Pedro Alves <palves@redhat.com>
12815
12816 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12817 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12818
12819 2012-02-27 Pedro Alves <palves@redhat.com>
12820
12821 PR server/9684
12822 * linux-low.c (pid_is_stopped): New.
12823 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12824
12825 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12826
12827 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12828 of conditions.
12829
12830 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12831
12832 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12833
12834 2012-02-24 Luis Machado <lgustavo@codesourcery>
12835
12836 * server.c (handle_query): Advertise support for target-side
12837 breakpoint condition evaluation.
12838 (process_point_options): New function.
12839 (process_serial_event): When inserting a breakpoint, check for
12840 a target-side condition that should be evaluated.
12841
12842 * mem-break.c: Include regcache.h and ax.h.
12843 (point_cond_list_t): New data structure.
12844 (breakpoint) <cond_list>: New field.
12845 (find_gdb_breakpoint_at): Make non-static.
12846 (delete_gdb_breakpoint_at): Clear any target-side
12847 conditions.
12848 (clear_gdb_breakpoint_conditions): New function.
12849 (add_condition_to_breakpoint): Likewise.
12850 (add_breakpoint_condition): Likewise.
12851 (gdb_condition_true_at_breakpoint): Likewise.
12852 (gdb_breakpoint_here): Return result directly instead
12853 of going through a local variable.
12854
12855 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12856 (clear_gdb_breakpoint_conditions): Likewise.
12857 (add_breakpoint_condition): Likewise.
12858 (gdb_condition_true_at_breakpoint): Likewise.
12859
12860 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12861 (need_step_over_p): Take target-side breakpoint condition into
12862 consideration.
12863
12864 2012-02-24 Luis Machado <lgustavo@codesourcery>
12865
12866 * server.h: Include tracepoint.h.
12867 (agent_mem_read, agent_get_trace_state_variable_value,
12868 agent_set_trace_state_variable_value,
12869 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12870 get_set_tsv_func_addr): New prototypes.
12871
12872 * ax.h: New include file.
12873 * ax.c: New source file.
12874
12875 * tracepoint.c: Include ax.h.
12876 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12877 agent_expr, eval_result_type): Move to ax.h.
12878 (parse_agent_expr): Rename to ...
12879 (gdb_parse_agent_expr): ... this, make it non-static and move
12880 to ax.h.
12881 (unparse_agent_expr) Rename to ...
12882 (gdb_unparse_agent_expr): ... this, make it non-static and move
12883 to ax.h.
12884 (eval_agent_expr): Rename to ...
12885 (eval_tracepoint_agent_expr): ... this.
12886 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12887 forward declarations.
12888 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12889 (agent_get_trace_state_variable_value): New function.
12890 (agent_set_trace_state_variable_value): New function.
12891 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12892 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12893 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12894 (condition_true_at_tracepoint): Likewise.
12895 (parse_agent_expr): Rename to ...
12896 (gdb_parse_agent_expr): ... this and move to ax.c.
12897 (unparse_agent_expr): Rename to ...
12898 (gdb_unparse_agent_expr): ... this and move to ax.c.
12899 (gdb_agent_op_name): Move to ax.c.
12900 (eval_agent_expr): Rename to ...
12901 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12902 and move to ax.c.
12903 (eval_tracepoint_agent_expr): New function.
12904 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12905 non-static.
12906 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12907 ax.c.
12908 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12909 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12910 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12911 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12912 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12913 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12914 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12915 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12916 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12917 (compile_bytecodes): Remove forward declaration.
12918 (is_goto_target): Move to ax.c.
12919 (compile_bytecodes): Move to ax.c and call
12920 agent_get_trace_state_variable_value (...) and
12921 agent_set_trace_state_variable_value (...).
12922
12923 * Makefile.in: Update ax.c and IPA dependencies.
12924
12925 2012-02-24 Pedro Alves <palves@redhat.com>
12926
12927 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12928 (cmd_bigqtbuffer_circular): ... this. Only handle
12929 'QTBuffer:circular:'.
12930 (handle_tracepoint_general_set): Adjust.
12931
12932 2012-02-16 Yao Qi <yao@codesourcery.com>
12933
12934 * inferiors.c: Move code to ...
12935 * dll.c: .... here. New.
12936 * server.h: Declare clear_dlls.
12937 * Makefile.in (SFILES): Add dll.c.
12938 (OBS): Add dll.o
12939 (dll.o): New rule.
12940
12941 2012-02-11 Yao Qi <yao@codesourcery.com>
12942
12943 * server.c: (handle_monitor_command): Add a new parameter
12944 `own_buf'.
12945 (handle_query): Update caller.
12946
12947 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12948
12949 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12950 * configure, config.in: Regenerate.
12951 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12952 is not defined.
12953
12954 2012-02-02 Pedro Alves <palves@redhat.com>
12955
12956 Try SIGKILL first, then PTRACE_KILL.
12957 * linux-low.c (linux_kill_one_lwp): New.
12958 (linux_kill_one_lwp): Rename to ...
12959 (kill_one_lwp_callback): ... this. Use the new
12960 linux_kill_one_lwp.
12961
12962 2012-02-02 Pedro Alves <palves@redhat.com>
12963
12964 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12965 inferior.
12966
12967 2012-01-27 Pedro Alves <palves@redhat.com>
12968
12969 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12970 (elf_64_file_p): Make static.
12971 (linux_pid_exe_is_elf_64_file): New.
12972 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12973 Delete declarations.
12974 (linux_pid_exe_is_elf_64_file): Declare.
12975 * linux-x86-low.c (x86_arch_setup): Use
12976 linux_pid_exe_is_elf_64_file.
12977
12978 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12979
12980 * linux-low.c (linux_wait_for_event_1): Rename to ...
12981 (linux_wait_for_event): ... here and merge it with former
12982 linux_wait_for_event - new variable wait_ptid, use it.
12983 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12984
12985 2012-01-23 Pedro Alves <palves@redhat.com>
12986
12987 * server.c (main): Avoid yet another case of infinite loop while
12988 detaching/killing after a longjmp.
12989
12990 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12991
12992 Code cleanup.
12993 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12994
12995 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12996
12997 * hostio.c (handle_readlink): New function.
12998 (handle_vFile): Call it to handle "vFile:readlink" packets.
12999
13000 2012-01-20 Pedro Alves <palves@redhat.com>
13001 Ulrich Weigand <ulrich.weigand@linaro.org>
13002
13003 * server.c (handle_v_requests): Only support vAttach and vRun to
13004 start multiple processes when in extended protocol mode.
13005
13006 2012-01-17 Pedro Alves <palves@redhat.com>
13007
13008 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13009 memalign plus mprotect to allocate the scratch buffer.
13010
13011 2012-01-13 Pedro Alves <palves@redhat.com>
13012
13013 * server.c (attach_inferior): Clear `cont_thread'.
13014
13015 2012-01-13 Pedro Alves <palves@redhat.com>
13016
13017 * server.c (main): Avoid infinite loop while detaching/killing
13018 after a longjmp.
13019
13020 2012-01-09 Doug Evans <dje@google.com>
13021
13022 * server.c (start_inferior): Set last_ptid in --wrapper case.
13023
13024 2012-01-06 Yao Qi <yao@codesourcery.com>
13025
13026 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13027 defined.
13028 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13029
13030 2012-01-04 Yao Qi <yao@codesourcery.com>
13031
13032 * tracepoint.c (cmd_qtdp): Print debug message
13033 for static tracepoint.
13034
13035 2012-01-04 Yao Qi <yao@codesourcery.com>
13036
13037 * tracepoint.c (trace_vdebug): Differentiate debug message
13038 between gdbserver and IPA.
13039
13040 2012-01-03 Yao Qi <yao@codesourcery.com>
13041
13042 * tracepoint.c (tracepoint_was_hit): Don't collect for
13043 static tracepoint.
13044
13045 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13046
13047 * terminal.h: Reformat copyright header.
13048
13049 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13050
13051 * server.c (gdbserver_version): Update copyright year.
13052 * gdbreplay.c (gdbreplay_version): Likewise.
13053
13054 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13055
13056 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13057
13058 Revert:
13059 2011-12-18 Hui Zhu <teawater@gmail.com>
13060 * linux-low.c (linux_create_inferior): Save return value to ret.
13061
13062 2011-12-18 Hui Zhu <teawater@gmail.com>
13063
13064 * linux-low.c (linux_create_inferior): Save return value to ret.
13065
13066 2011-12-16 Doug Evans <dje@google.com>
13067
13068 * linux-low.c (linux_create_inferior): If stdio connection,
13069 redirect stdin from /dev/null, stdout to stderr.
13070 * remote-utils.c (remote_is_stdio): New static global.
13071 (remote_connection_is_stdio): New function.
13072 (remote_prepare): Handle stdio connection.
13073 (remote_open): Ditto.
13074 (remote_close): Don't close stdin for stdio connections.
13075 (read_prim,write_prim): New functions. Replace all calls to
13076 read/write to these.
13077 * server.c (main): Watch for "-" argument. Move call to
13078 remote_prepare before start_inferior.
13079 * server.h (STDIO_CONNECTION_NAME): New macro.
13080 (remote_connection_is_stdio): Declare.
13081
13082 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13083 in debugging output.
13084
13085 2011-12-15 Yao Qi <yao@codesourcery.com>
13086
13087 * tracepoint.c: Include sys/syscall.h.
13088 (gdb_ust_thread): Remove preprocessor conditional.
13089
13090 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13091
13092 * linux-low.c (linux_detach_one_lwp): Call
13093 the_low_target.prepare_to_resume before detaching.
13094
13095 2011-12-14 Yao Qi <yao@codesourcery.com>
13096
13097 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13098 of write.
13099
13100 2011-12-14 Yao Qi <yao@codesourcery.com>
13101
13102 * i386-low.c (i386_low_stopped_data_address): Initialize local
13103 variable `control'.
13104
13105 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13106
13107 PR remote/13492
13108
13109 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13110 DR_CONTROL unless necessary. Extend comments.
13111 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13112 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13113
13114 2011-12-13 Yao Qi <yao@codesourcery.com>
13115
13116 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13117 macros.
13118 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13119
13120 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13121
13122 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13123 Print new debug message for such case.
13124
13125 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13126
13127 Fix overlapping memcpy.
13128 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13129 the read_inferior_memory transfer.
13130 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13131 write_inferior_memory transfer.
13132 (set_fast_tracepoint_jump): New variable buf. Use it for the
13133 read_inferior_memory and write_inferior_memory transfers.
13134 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13135 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13136 Use it for the write_inferior_memory transfer.
13137 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13138 buffers.
13139
13140 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13141
13142 * linux-low.c (fetch_register, store_register): Make code
13143 consistent, fix formatting.
13144
13145 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13146
13147 * linux-low.c (usr_store_inferior_registers): Factor out code
13148 to handle individual registers into...
13149 (store_register): ... this new function.
13150
13151 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13152
13153 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13154 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13155 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13156 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13157 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13158 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13159 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13160 (srv_xmlfiles): Add new XML files.
13161
13162 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13163 and <sys/uio.h>.
13164 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13165 (init_registers_s390_linux32v1): Add prototype.
13166 (init_registers_s390_linux32v2): Likewise.
13167 (init_registers_s390_linux64v1): Likewise.
13168 (init_registers_s390_linux64v2): Likewise.
13169 (init_registers_s390x_linux64v1): Likewise.
13170 (init_registers_s390x_linux64v2): Likewise.
13171 (s390_num_regs): Increment to 52.
13172 (s390_regmap): Add orig_r2 register.
13173 (s390_num_regs_3264): Increment to 68.
13174 (s390_regmap_3264): Add orig_r2 register.
13175 (s390_collect_ptrace_register): Handle orig_r2 register.
13176 (s390_supply_ptrace_register): Likewise.
13177 (s390_fill_last_break): New function.
13178 (s390_store_last_break): Likewise.
13179 (s390_fill_system_call): New function.
13180 (s390_store_system_call): Likewise.
13181 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13182 register sets.
13183 (s390_check_regset): New function.
13184 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13185 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13186 Update target_regsets for available register sets.
13187
13188 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13189 Jan Kratochvil <jan.kratochvil@redhat.com>
13190
13191 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13192 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13193 New.
13194 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13195 * linux-low.h (struct process_info_private): New member r_debug.
13196 * server.c (handle_qxfer_libraries): Call
13197 the_target->qxfer_libraries_svr4.
13198 (handle_qxfer_libraries_svr4): New function.
13199 (qxfer_packets): New entry "libraries-svr4".
13200 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13201 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13202 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13203 PACKET_qXfer_libraries_svr4.
13204
13205 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13206
13207 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13208 PSW address/mask between 8-byte and 16-byte formats.
13209 (s390_supply_ptrace_register): Likewise.
13210 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13211 basic addressing mode bit.
13212
13213 2011-11-24 Stan Shebs <stan@codesourcery.com>
13214
13215 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13216
13217 2011-11-17 Stan Shebs <stan@codesourcery.com>
13218
13219 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13220 (tracing_start_time): New global.
13221 (tracing_stop_time): New global.
13222 (tracing_user_name): New global.
13223 (tracing_notes): New global.
13224 (tracing_stop_note): New global.
13225 (cmd_qtstart): Set traceframe_usage, start_time.
13226 (stop_tracing): Set stop_time.
13227 (cmd_qtstatus): Report additional status.
13228 (cmd_qtp): New function.
13229 (handle_tracepoint_query): Call it.
13230 (cmd_qtnotes): New function.
13231 (handle_tracepoint_general_set): Call it.
13232 (get_timestamp): Rename from tsv_get_timestamp.
13233
13234 2011-11-14 Stan Shebs <stan@codesourcery.com>
13235 Kwok Cheung Yeung <kcy@codesourcery.com>
13236
13237 * linux-x86-low.c (small_jump_insn): New.
13238 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13239 trampoline and error message, build a trampoline and issue a small
13240 jump instruction to it.
13241 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13242 trampoline and error message.
13243 (x86_get_min_fast_tracepoint_insn_len): New.
13244 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13245 * linux-low.h (struct linux_target_ops): Add arguments to
13246 install_fast_tracepoint_jump_pad operation, add new operation.
13247 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13248 arguments.
13249 (linux_get_min_fast_tracepoint_insn_len): New function.
13250 (linux_target_op): Add new operation.
13251 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13252 (gdb_trampoline_buffer_end): Ditto.
13253 (gdb_trampoline_buffer_error): Ditto.
13254 (struct ipa_sym_addresses): Add fields for new IPA variables.
13255 (symbol_list): Add entries for new IPA variables.
13256 (struct tracepoint): Add fields to hold the address range of the
13257 trampoline used by the tracepoint.
13258 (trampoline_buffer_head): New static variable.
13259 (trampoline_buffer_tail): Ditto.
13260 (claim_trampoline_space): New function.
13261 (have_fast_tracepoint_trampoline_buffer): New function.
13262 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13263 structure.
13264 (install_fast_tracepoint): Ditto, also add error buffer argument.
13265 (cmd_qtminftpilen): New function.
13266 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13267 (fast_tracepoint_from_trampoline_address): New function.
13268 (fast_tracepoint_collecting): Handle trampoline as part of jump
13269 pad space.
13270 (set_trampoline_buffer_space): New function.
13271 (initialize_tracepoint): Initialize new IPA variables.
13272 * target.h (struct target_ops): Add arguments to
13273 install_fast_tracepoint_jump_pad operation, add new
13274 get_min_fast_tracepoint_insn_len operation.
13275 (target_get_min_fast_tracepoint_insn_len): New.
13276 (install_fast_tracepoint_jump_pad): Add arguments.
13277 * server.h (IPA_BUFSIZ): Define.
13278 * linux-i386-ipa.c: Include extra header files.
13279 (initialize_fast_tracepoint_trampoline_buffer): New function.
13280 (initialize_low_tracepoint): Call it.
13281 * server.h (set_trampoline_buffer_space): Declare.
13282 (claim_trampoline_space): Ditto.
13283 (have_fast_tracepoint_trampoline_buffer): Ditto.
13284
13285 2011-11-14 Yao Qi <yao@codesourcery.com>
13286
13287 * server.c (handle_query): Handle InstallInTrace for qSupported.
13288 * tracepoint.c (add_tracepoint): Sort list.
13289 (install_tracepoint, download_tracepoint): New.
13290 (cmd_qtdp): Call them to install and download tracepoints.
13291 (sort_tracepoints): Removed.
13292 (cmd_qtstart): Update.
13293
13294 2011-11-14 Yao Qi <yao@codesourcery.com>
13295
13296 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13297 * mem-break.h: Declare.
13298 * tracepoint.c (cmd_qtstart): Move some code to ...
13299 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13300 New.
13301 (download_tracepoints): Move some code to ...
13302 (download_tracepoint_1): ... here. New.
13303
13304 2011-11-08 Yao Qi <yao@codesourcery.com>
13305
13306 * remote-utils.c (relocate_instruction): A comment fix.
13307
13308 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13309
13310 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13311 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13312 dr_status_mirror and dr_control_mirror from debug_reg_state.
13313 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13314 (i386_initial_stuff): Remove use of deleted globals.
13315 (i386_get_thread_context, i386_set_thread_context,
13316 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13317 from debug_reg_state.
13318
13319 2011-11-05 Yao Qi <yao@codesourcery.com>
13320
13321 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13322 address as TPOINT's.
13323
13324 2011-11-02 Stan Shebs <stan@codesourcery.com>
13325
13326 * tracepoint.c (agent_mem_read_string): New function.
13327 (eval_agent_expr): Call it for tracenz.
13328 * server.c (handle_query): Report support for tracenz.
13329
13330 2011-11-02 Yao Qi <yao@codesourcery.com>
13331
13332 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13333
13334 2011-11-02 Yao Qi <yao@codesourcery.com>
13335
13336 * target.h: Fix a typo in comment.
13337
13338 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13339
13340 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13341 clobber the breakpoints' shadows with fast tracepoint jumps.
13342 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13343 * target.c (write_inferior_memory): Also pass MYADDR down to
13344 check_mem_write.
13345
13346 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13347
13348 * configure.ac: Check support for personality routine.
13349 * configure: Regenerate.
13350 * config.in: Likewise.
13351 * linux-low.c: Include <sys/personality.h>.
13352 Define ADDR_NO_RANDOMIZE if necessary.
13353 (linux_create_inferior): Disable address space randomization when
13354 forking inferior, if requested.
13355 (linux_supports_disable_randomization): New function.
13356 (linux_target_ops): Install it.
13357 * server.h (disable_randomization): Declare.
13358 * server.c (disable_randomization): New global variable.
13359 (handle_general_set): Handle QDisableRandomization.
13360 (handle_query): Likewise for qSupported.
13361 (main): Support --disable-randomization and --no-disable-randomization
13362 command line arguments.
13363 * target.h (struct target_ops): Add supports_disable_randomization.
13364 (target_supports_disable_randomization): New macro.
13365
13366 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13367
13368 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13369 ifdef check.
13370 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13371 [!PT_GETDSBT] (target_loadmap): New definition.
13372 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13373 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13374 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13375 and PT_GETDSBT to LINUX_LOADMAP.
13376 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13377 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13378
13379 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13380
13381 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13382 (arm_linux_hwbp_cap): New static variable.
13383 (arm_linux_get_hwbp_cap): Replace by ...
13384 (arm_linux_init_hwbp_cap): ... this new function.
13385 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13386 (arm_linux_get_hw_watchpoint_count): Likewise.
13387 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13388 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13389 (arm_prepare_to_resume): Use perror_with_name instead of error.
13390
13391 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13392
13393 * linux-arm-low.c: Include <signal.h>.
13394 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13395 (struct arm_linux_hwbp_cap): New data type.
13396 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13397 (struct arm_linux_hw_breakpoint): New data type.
13398 (MAX_BPTS, MAX_WPTS): Define.
13399 (struct arch_process_info, struct arch_lwp_info): New data types.
13400 (arm_linux_get_hwbp_cap): New function.
13401 (arm_linux_get_hw_breakpoint_count): Likewise.
13402 (arm_linux_get_hw_watchpoint_count): Likewise.
13403 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13404 (arm_hwbp_control_initialize): Likewise.
13405 (arm_hwbp_control_is_enabled): Likewise.
13406 (arm_hwbp_control_is_initialized): Likewise.
13407 (arm_hwbp_control_disable): Likewise.
13408 (arm_linux_hw_breakpoint_equal): Likewise.
13409 (arm_linux_hw_point_initialize): Likewise.
13410 (struct update_registers_data): New data structure.
13411 (update_registers_callback: New function.
13412 (arm_insert_point): Likewise.
13413 (arm_remove_point): Likewise.
13414 (arm_stopped_by_watchpoint): Likewise.
13415 (arm_stopped_data_address): Likewise.
13416 (arm_new_process): Likewise.
13417 (arm_new_thread): Likewise.
13418 (arm_prepare_to_resume): Likewise.
13419 (the_low_target): Register arm_insert_point, arm_remove_point,
13420 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13421 arm_new_thread, and arm_prepare_to_resume.
13422
13423 2011-09-15 Stan Shebs <stan@codesourcery.com>
13424
13425 * server.h (struct emit_ops): Add compare-goto fields.
13426 * tracepoint.c (gdb_agent_op_sizes): New table.
13427 (emit_eq_goto): New function.
13428 (emit_ne_goto): New function.
13429 (emit_lt_goto): New function.
13430 (emit_le_goto): New function.
13431 (emit_gt_goto): New function.
13432 (emit_ge_goto): New function.
13433 (is_goto_target): New function.
13434 (compile_bytecodes): Recognize special cases of compare-goto
13435 combinations and call specialized emitters for them.
13436 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13437 (amd64_emit_ne_goto): New function.
13438 (amd64_emit_lt_goto): New function.
13439 (amd64_emit_le_goto): New function.
13440 (amd64_emit_gt_goto): New function.
13441 (amd64_emit_ge_goto): New function.
13442 (amd64_emit_ops): Add the new functions.
13443 (i386_emit_eq_goto): New function.
13444 (i386_emit_ne_goto): New function.
13445 (i386_emit_lt_goto): New function.
13446 (i386_emit_le_goto): New function.
13447 (i386_emit_gt_goto): New function.
13448 (i386_emit_ge_goto): New function.
13449 (i386_emit_ops): Add the new functions.
13450
13451 2011-09-08 Stan Shebs <stan@codesourcery.com>
13452
13453 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13454 (i386_emit_epilogue): Restore %ebx.
13455
13456 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13457
13458 * server.c (step_thread): Remove definition.
13459 (process_serial_event): Don't handle Hs.
13460 * server.h (step_thread): Remove declaration.
13461 * target.c (set_desired_inferior): Remove use of step_thread.
13462
13463 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13464
13465 * linux-low.c: Include linux-procfs.h.
13466 (linux_attach_lwp_1): Update comments.
13467 (linux_attach): Scan for existing threads when attaching to a
13468 process that is the tgid.
13469 * Makefile.in: Update dependencies.
13470
13471 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13472
13473 * configure.srv: Add linux-procfs.o dependencies.
13474
13475 2011-08-14 Yao Qi <yao@codesourcery.com>
13476
13477 * target.h (struct target_ops): Fix indent.
13478 * win32-low.c (win32_target_ops): Fix comment.
13479
13480 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13481 Yao Qi <yao@codesourcery.com>
13482
13483 * Makefile.in (clean): Remove tic6x-*.c files.
13484 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13485 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13486 (tic6x-c64xp-linux.c): Likewise.
13487 * configure.srv: Add support for tic6x-*-uclinux.
13488 * linux-tic6x-low.c: New.
13489 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13490
13491 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13492 Yao Qi <yao@codesourcery.com>
13493
13494 * target.h (struct target_ops): Add read_loadmap.
13495 * linux-low.c (struct target_loadseg): New type.
13496 (struct target_loadmap): New type.
13497 (linux_read_loadmap): New function.
13498 (linux_target_ops): Add linux_read_loadmap.
13499 * server.c (handle_query): Support qXfer:fdpic:read packet.
13500 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13501 to NULL.
13502
13503 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13504
13505 * win32-low.c: Include <stdint.h>.
13506
13507 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13508
13509 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13510 to the inferior here.
13511 (i386_remove_aligned_watchpoint): Ditto.
13512 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13513 fit part of the watchpoint in the debug registers.
13514 (i386_update_inferior_debug_regs): New.
13515 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13516 registers, and only update the inferior on success.
13517 (i386_low_remove_watchpoint): Ditto.
13518
13519 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13520
13521 * linux-low.c (compare_ints, unique, list_threads, show_process,
13522 linux_core_of_thread): Delete.
13523 (linux_target_ops): Change linux_core_of_thread to
13524 linux_common_core_of_thread.
13525 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13526 * utils.c (malloc_failure): Change type of argument.
13527 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13528 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13529 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13530 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13531 (IPA_OBJS): Add common-utils-ipa.o.
13532 (ptid_h, linux_osdata_h): New macros.
13533 (server_h): Add common/common-utils.h, common/xml-utils.h,
13534 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13535 common/ptid.h.
13536 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13537 ptid.o, buffer.o): New rules.
13538 (linux-low.o): Add common/linux-osdata.h as a dependency.
13539 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13540 * configure.ac: Add AC_HEADER_DIRENT check.
13541 * config.in: Regenerate.
13542 * configure: Regenerate.
13543 * remote-utils.c (xml_escape_text): Delete.
13544 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13545 buffer_xml_printf): Move to common/buffer.c.
13546 * server.c (main): Remove call to initialize_inferiors.
13547 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13548 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13549 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13550 internal_error, gdb_assert, gdb_assert_fail): Delete.
13551 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13552 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13553 common/buffer.h.
13554 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13555 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13556 initialize_inferiors): Delete.
13557
13558 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13559
13560 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13561 symbol error.
13562
13563 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13564
13565 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13566 assertion.
13567 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13568
13569 2011-05-26 Yao Qi <yao@codesourcery.com>
13570
13571 * Makefile.in (thread-db.o): Track dependence to
13572 common/gdb_thread_db.h.
13573 * thread-db.c: include gdb_thread_db.h from right place.
13574
13575 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13576
13577 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13578 __FILE__ and __LINE__ to internal_error.
13579
13580 2011-05-13 Doug Evans <dje@google.com>
13581
13582 * thread-db.c (try_thread_db_load_from_sdir): New function.
13583 (try_thread_db_load_from_dir): New function.
13584 (thread_db_load_search): Handle $sdir, ignore $pdir.
13585 Remove trying of system directories if search of
13586 libthread-db-search-path fails, that is now done via $sdir.
13587
13588 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13589
13590 * server.c (handle_query): Add EnableDisableTracepoints to the list
13591 of supported features.
13592 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13593 tracepoints.
13594 (cmd_qtenable_disable): New.
13595 (cmd_qtstart): Install tracepoints even if disabled.
13596 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13597 receiving a QTEnable or QTDisable packet.
13598 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13599 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13600 tracepoints.
13601 (gdb_probe): Skip data collection if static tracepoint is disabled.
13602
13603 2011-05-10 Doug Evans <dje@google.com>
13604
13605 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13606
13607 2011-05-04 Doug Evans <dje@google.com>
13608
13609 * linux-low.c (linux_join): Skip process lookup.
13610 * spu-low.c (spu_join): Ditto.
13611 * server.c (join_inferiors_callback): Delete.
13612 (process_serial_event): For 'D' packet (detach) call join_inferior
13613 directly.
13614
13615 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13616
13617 * README: Don't mention xscale*-*-linux*.
13618 * configure.srv (xscale*-*-linux*): Don't handle target.
13619
13620 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13621
13622 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13623 casting pointers.
13624 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13625 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13626 (i386_emit_void_call_2): Likewise.
13627
13628 2011-04-26 Yao Qi <yao@codesourcery.com>
13629
13630 * linux-low.c: Move common macros to linux-ptrace.h.
13631 Include linux-ptrace.h.
13632 * Makefile.in (linux_ptrace_h): New.
13633 (linux-low.o): Depends on linux-ptrace.h.
13634
13635 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13636
13637 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13638 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13639 (remote_prepare): New function with most of the TCP code from ...
13640 (remote_open): ... here. Detect PORT here unconditionally. Move also
13641 setting transport_is_reliable.
13642 * server.c (run_once): New variable.
13643 (gdbserver_usage): Document it.
13644 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13645 the first run if RUN_ONCE.
13646 * server.h (run_once, remote_prepare): New declarations.
13647
13648 2011-04-19 Tom Tromey <tromey@redhat.com>
13649
13650 * win32-low.c (handle_load_dll): Remove duplicate "the".
13651
13652 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13653
13654 Remove support for old Cygwin 1.5 versions.
13655 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13656 function to avoid warning.
13657 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13658 warning.
13659
13660 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13661
13662 * gdbserver/server.h (Macro _): Define it if not available.
13663
13664 2011-03-14 Michael Snyder <msnyder@vmware.com>
13665
13666 * hostio.c (handle_close): Remove unnecessary null test.
13667
13668 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13669
13670 * Makefile.in (maintainer-clean realclean distclean): Remove
13671 "make ... subdir_do" command.
13672
13673 2011-03-10 Michael Snyder <msnyder@vmware.com>
13674
13675 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13676
13677 * server.c (handle_v_run): Free alloced buffer on early return.
13678
13679 2011-03-09 Yao Qi <yao@codesourcery.com>
13680
13681 Revert:
13682 2011-03-04 Yao Qi <yao@codesourcery.com>
13683
13684 * Makefile.in: Remove GNU make feature --directory.
13685
13686 2011-03-05 Yao Qi <yao@codesourcery.com>
13687
13688 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13689 (subdir_do): New make target. Copied from gdb/Makefile.
13690 (maintainer-clean, realclean, distclean, clean): Call corresponding
13691 make targets in common/Makefile.
13692
13693 2011-02-11 Yao Qi <yao@codesourcery.com>
13694
13695 * configure.ac: Call AC_PROG_RANLIB.
13696 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13697 * configure: Regenerate.
13698
13699 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13700
13701 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13702
13703 2011-03-06 Yao Qi <yao@codesourcery.com>
13704
13705 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13706
13707 2011-03-05 Yao Qi <yao@codesourcery.com>
13708
13709 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13710 (subdir_do): New make target. Copied from gdb/Makefile.
13711 (maintainer-clean, realclean, distclean, clean): Call corresponding
13712 make targets in common/Makefile.
13713
13714 2011-03-04 Yao Qi <yao@codesourcery.com>
13715
13716 * Makefile.in: Remove GNU make feature --directory.
13717
13718 2011-03-04 Michael Snyder <msnyder@vmware.com>
13719
13720 * server.c (queue_stop_reply): Call xmalloc not malloc.
13721
13722 2011-03-02 Michael Snyder <msnyder@vmware.com>
13723
13724 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13725
13726 2011-02-28 Michael Snyder <msnyder@vmware.com>
13727
13728 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13729 (cmd_qtframe): Ditto.
13730 (cmd_qtbuffer): Ditto.
13731 (cmd_bigqtbuffer): Ditto.
13732
13733 * utils.c (decimal2str): Initialize 'width' to nine, then
13734 don't mess with it.
13735
13736 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13737
13738 * hostio.c (require_data): Free *data, not data.
13739
13740 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13741
13742 * hostio.c (require_data): Use free, not xfree.
13743
13744 2011-02-27 Michael Snyder <msnyder@vmware.com>
13745
13746 * server.c (handle_query): Discard unused value.
13747
13748 * hostio.c (require_data): Free malloc memory before returning
13749 error.
13750
13751 2011-02-26 Michael Snyder <msnyder@vmware.com>
13752
13753 * linux-low.c (list_threads): Call closedir for dirent.
13754
13755 2011-02-27 Michael Snyder <msnyder@vmware.com>
13756
13757 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13758 a case statement falls through.
13759
13760 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13761
13762 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13763 in comparison.
13764
13765 2011-02-26 Michael Snyder <msnyder@vmware.com>
13766
13767 * utils.c (decimal2str): Eliminate dead code and dead param.
13768 (pulongest): Drop dead param from call to decimal2str.
13769 (plongest): Ditto.
13770
13771 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13772
13773 Revert the following patch (not approved yet):
13774 2011-02-21 Hui Zhu <teawater@gmail.com>
13775 * tracepoint.c (tp_printf): New function.
13776 (eval_agent_expr): Handle gdb_agent_op_printf.
13777
13778 2011-02-21 Hui Zhu <teawater@gmail.com>
13779
13780 * tracepoint.c (tp_printf): New function.
13781 (eval_agent_expr): Handle gdb_agent_op_printf.
13782
13783 2011-02-18 Tom Tromey <tromey@redhat.com>
13784
13785 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13786 (tracepoint.o): Likewise.
13787 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13788 (gdb_agent_op_names): Likewise.
13789
13790 2011-02-18 Tom Tromey <tromey@redhat.com>
13791
13792 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13793 gdb_agent_op_rot>: New constants.
13794 (gdb_agent_op_names): Add pick and roll.
13795 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13796 cases.
13797
13798 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13799
13800 * aclocal.m4: Regenerated with aclocal-1.11.1.
13801
13802 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13803
13804 * server.c (handle_qxfer_traceframe_info): New.
13805 (qxfer_packets): Register "traceframe-info".
13806 (handle_query): Report support for qXfer:traceframe-info:read+.
13807 * tracepoint.c (match_blocktype): New.
13808 (traceframe_find_block_type): Rename to ...
13809 (traceframe_walk_blocks): ... this. Add callback filter argument,
13810 and use it.
13811 (traceframe_find_block_type): New, reimplemented on top of
13812 traceframe_walk_blocks.
13813 (build_traceframe_info_xml): New.
13814 (traceframe_read_info): New.
13815 * server.h (traceframe_read_info): Declare.
13816
13817 2011-02-11 Yao Qi <yao@codesourcery.com>
13818
13819 * configure.ac: Call AC_PROG_RANLIB.
13820 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13821 * configure: Regenerate.
13822
13823 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13824
13825 * server.c (gdb_read_memory): Change return semantics to allow
13826 partial transfers.
13827 (handle_search_memory_1): Adjust.
13828 (process_serial_event) <'m' packet>: Handle partial transfers.
13829 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13830
13831 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13832
13833 * regcache.c (init_register_cache): Initialize
13834 regcache->register_status.
13835 (free_register_cache): Release regcache->register_status.
13836 (regcache_cpy): Copy register_status.
13837 (registers_to_string): Print 'x's for unavailable registers.
13838 (supply_register): Mark the register's status valid or
13839 unavailable, depending on whether a buffer was passed in or not.
13840 (supply_register_zeroed): New.
13841 (supply_regblock): Mark the registers' status valid or
13842 unavailable, depending on whether a buffer was passed in or not.
13843 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13844 (struct regcache): New `register_status' field.
13845 (supply_register_zeroed): Declare.
13846 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13847 supply_register_zeroed, rather than passing a NULL buffer to
13848 supply_register.
13849 * tracepoint.c (fetch_traceframe_registers): Update comment.
13850
13851 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13852
13853 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13854 buffer explicit.
13855
13856 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13857
13858 * server.h (decode_xfer_write): Change prototype.
13859 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13860 and don't extract the annex here.
13861 * server.c (decode_xfer_read): Remove `annex' parameter,
13862 and don't extract the annex here.
13863 (decode_xfer): New.
13864 (struct qxfer): New.
13865 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13866 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13867 (handle_qxfer_statictrace): New functions, abstracted out from
13868 handle_query, and made to use the struct qxfer interface.
13869 (handle_threads_qxfer_proper): Rename to ...
13870 (handle_qxfer_threads_proper): ... this.
13871 (handle_threads_qxfer): Rename to ...
13872 (handle_qxfer_threads): ... this. Adjust.
13873 (qxfer_packets): New array.
13874 (handle_qxfer): New function.
13875 (handle_query): Use handle_qxfer.
13876
13877 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13878
13879 * gdbreplay.c: Shorten lines of >= 80 columns.
13880 * linux-low.c: Ditto.
13881 * linux-ppc-low.c: Ditto.
13882 * linux-s390-low.c: Ditto.
13883 * linux-sparc-low.c: Ditto.
13884 * linux-x86-low.c: Ditto.
13885 * linux-xtensa-low.c: Ditto.
13886 * mem-break.c: Ditto.
13887 * nto-low.c: Ditto.
13888 * regcache.h: Ditto.
13889 * remote-utils.c: Ditto.
13890 * server.c: Ditto.
13891 * server.h: Ditto.
13892 * thread-db.c: Ditto.
13893 * tracepoint.c: Ditto.
13894 * utils.c: Ditto.
13895 * win32-low.h: Ditto.
13896
13897 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13898
13899 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13900 update.
13901
13902 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13903
13904 * server.c (gdbserver_version): Update copyright year in version
13905 output.
13906 * gdbreplay.c (gdbreplay_version): Ditto.
13907
13908 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13909
13910 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13911 * linux-bfin-low.c: New file.
13912 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13913 PT_DATA_ADDR for BFIN targets.
13914 * Makefile.in (SFILES): Add linux-bfin-low.c.
13915 (clean): Remove reg-bfin.c.
13916 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13917 * README: Mention supported Blackfin targets.
13918
13919 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13920
13921 * .gitignore: New file.
13922
13923 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13924
13925 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13926
13927 2010-10-22 Jie Zhang <jie@codesourcery.com>
13928
13929 * Makefile.in: Add FLAGS_TO_PASS variable.
13930 (install): Remove dependency of install-only and recursively
13931 invoke make for install-only.
13932
13933 2010-10-04 Doug Evans <dje@google.com>
13934
13935 * Makefile.in (uninstall): Use $(DESTDIR).
13936
13937 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13938
13939 PR gdb/11842
13940
13941 * linux-x86-low.c (compat_siginfo_from_siginfo)
13942 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13943 si_code is < 0. Check for si_code == SI_TIMER before checking for
13944 si_code < 0.
13945
13946 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13947
13948 * lynx-i386-low.c: New file.
13949 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13950
13951 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13952
13953 * lynx-low.c (ptrace_request_to_str): Remove handling for
13954 request values that have been removed in LynxOS 5.x.
13955
13956 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13957
13958 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13959 <ptrace.h>
13960
13961 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13962
13963 * configure.ac: Add --enable-inprocess-agent option.
13964 * configure: Rebuilt.
13965
13966 2010-09-06 Yao Qi <yao@codesourcery.com>
13967
13968 * linux-low.c (linux_kill): Remove unused variable.
13969 (linux_stabilize_threads): Likewise.
13970 * server.c (start_inferior): Likewise.
13971 (queue_stop_reply_callback): Likewise.
13972 * tracepoint.c (do_action_at_tracepoint): Likewise.
13973
13974 2010-09-06 Yao Qi <yao@codesourcery.com>
13975
13976 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13977 on return.
13978
13979 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13980
13981 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13982
13983 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13984
13985 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13986 "$(IPA_DEPFILES)".
13987
13988 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13989
13990 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13991 gdbserver/lynx-ppc-low.c: New files.
13992 * Makefile.in (lynx_low_h): New variable.
13993 (lynx-low.o, lynx-ppc-low.o): New rules.
13994 * configure.ac: On LynxOS, link with -lnetinet.
13995 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13996 * configure: regenerate.
13997
13998 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13999
14000 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14001 * configure.ac: Add check for vasprintf and vsnprintf.
14002 * configure, config.in: Regenerate.
14003 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14004
14005 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14006
14007 * gdbreplay.c: Move include of alloca.h up, next to include of
14008 malloc.h.
14009 * server.h: Add include of malloc.h.
14010 * mem-break.c: Remove include of malloc.h.
14011 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14012
14013 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14014
14015 * Makefile.in (memmem.o): Build with -Wno-error.
14016
14017 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14018
14019 * utils.c (xsnprintf): Make non-static.
14020 * server.h: Add xsnprintf declaration.
14021 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14022 replace calls to snprintf by calls to xsnprintf throughout.
14023
14024 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14025
14026 * configure.ac: Add configure check for alloca.
14027 * configure, config.in: Regenerate.
14028 * server.h: Include alloca.h if it exists.
14029 * gdbreplay.c: Include alloca.h if it exists.
14030
14031 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14032
14033 * linux-low.c (__SIGRTMIN): Define if not already defined.
14034 (linux_create_inferior): Check for __ANDROID__ rather than
14035 __SIGRTMIN.
14036 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14037 are already deferred.
14038 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14039 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14040 stopped and already has a pending signal to report.
14041 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14042 a pending signal to report or is moving out of a jump pad.
14043 (linux_init_signals): Check for __ANDROID__ rather than
14044 __SIGRTMIN.
14045
14046 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14047
14048 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14049 debug_threads check. Avoid a linear search when not doing debug
14050 output.
14051
14052 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14053
14054 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14055 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14056 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14057 (process_event): Change local fd's type to gdb_fildes_t.
14058 (create_file_handler): Adjust prototype.
14059 (delete_file_handler): Adjust prototype.
14060 (handle_file_event): Adjust prototype. Use pfildes.
14061 (create_file_event): Adjsut prototype.
14062 * remote-utils.c (remote_desc, listen_desc): Change type to
14063 gdb_fildes_t.
14064 * server.h: New gdb_fildes_t typedef.
14065 [USE_WIN32API]: Include winsock2.h.
14066 (delete_file_handler, add_file_handler): Adjust prototypes.
14067 (pfildes): Declare.
14068 * utils.c (pfildes): New.
14069
14070 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14071
14072 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14073 * configure: Regenerate.
14074
14075 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14076
14077 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14078 (linux_done_accessing_memory): ... this.
14079 (linux_target_ops): Adjust.
14080 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14081 * nto-low.c (nto_target_ops): Adjust comment.
14082 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14083 * spu-low.c (spu_target_ops): Adjust comment.
14084 * target.h (target_ops): Rename unprepare_to_access_memory field
14085 to done_accessing_memory.
14086 (unprepare_to_access_memory): Rename to ...
14087 (done_accessing_memory): ... this.
14088
14089 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14090
14091 * linux-low.c (linux_prepare_to_access_memory): New.
14092 (linux_unprepare_to_access_memory): New.
14093 (linux_target_ops): Install them.
14094 * server.c (read_memory): Rename to ...
14095 (gdb_read_memory): ... this. Use
14096 prepare_to_access_memory/prepare_to_access_memory.
14097 (write_memory): Rename to ...
14098 (gdb_write_memory): ... this. Use
14099 prepare_to_access_memory/prepare_to_access_memory.
14100 (handle_search_memory_1): Adjust.
14101 (process_serial_event): Adjust.
14102 * target.h (struct target_ops): New fields
14103 prepare_to_access_memory and unprepare_to_access_memory.
14104 (prepare_to_access_memory, unprepare_to_access_memory): New.
14105 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14106 prepare_to_access_memory/prepare_to_access_memory.
14107 * nto-low.c (nto_target_ops): Adjust.
14108 * spu-low.c (spu_target_ops): Adjust.
14109 * win32-low.c (win32_target_ops): Adjust.
14110
14111 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14112
14113 * Makefile.in (WARN_CFLAGS): Get it from configure.
14114 (WERROR_CFLAGS): New.
14115 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14116 * configure.ac: Introduce --enable-werror, which adds -Werror to
14117 the compiler command line. Enabled by default. Disable with
14118 --disable-werror. Add -Wdeclaration-after-statement
14119 Wpointer-arith and -Wformat-nonliteral to warning flags.
14120 * configure: Regenerate.
14121
14122 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14123
14124 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14125
14126 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14127
14128 * gdbreplay.c (remote_error): New.
14129 (gdbchar): New.
14130 (expect): Use gdbchar. Check for error reading from GDB.
14131 Clarify sync error output.
14132 (play): Check for errors writing to GDB.
14133 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14134 * remote-utils.c (getpkt): Check for errors writing to the remote
14135 descriptor.
14136
14137 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14138
14139 * linux-low.c (linux_wait_1): Move non-debugging code out of
14140 `debug_threads' control.
14141
14142 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14143
14144 * linux-low.c (linux_wait_1): Don't set last_status here.
14145 * server.c (push_event, queue_stop_reply_callback): Assert we're
14146 not pushing a TARGET_WAITKIND_IGNORE event.
14147 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14148 (myresume, handle_target_event): Set the thread's last_resume_kind
14149 and last_status from the target returned status.
14150
14151 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14152
14153 PR threads/10729
14154
14155 * linux-x86-low.c (update_debug_registers_callback): New.
14156 (i386_dr_low_set_addr): Use it.
14157 (i386_dr_low_get_addr): New.
14158 (i386_dr_low_set_control): Use update_debug_registers_callback.
14159 (i386_dr_low_get_control): New.
14160 (i386_dr_low_get_status): Adjust.
14161 * linux-low.c (linux_stop_lwp): New.
14162 * linux-low.h (linux_stop_lwp): Declare.
14163
14164 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14165 argument instead of a i386_debug_reg_state.
14166 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14167 a i386_debug_reg_state.
14168 (i386_insert_aligned_watchpoint): Adjust.
14169 (i386_remove_aligned_watchpoint): Adjust.
14170 (i386_low_stopped_data_address): Read the debug registers from the
14171 inferior instead of from the mirrors.
14172 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14173 (i386_dr_low_get_addr): Declare.
14174 (i386_dr_low_get_control): Declare.
14175 (i386_dr_low_get_status): Change prototype.
14176
14177 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14178 (i386_dr_low_get_addr): New.
14179 (i386_dr_low_get_control): New.
14180 (i386_dr_low_get_status): Adjust prototype. Return
14181 dr_status_mirror.
14182 (i386_initial_stuff): Clear dr_status_mirror and
14183 dr_control_mirror.
14184 (i386_get_thread_context): Adjust.
14185 (i386_set_thread_context): Adjust.
14186 (i386_thread_added): Adjust.
14187
14188 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14189
14190 * linux-low.h (linux_thread_area): Delete declaration.
14191
14192 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14193
14194 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14195 after its termination.
14196
14197 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14198
14199 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14200 (gdb_wants_all_stopped): Delete.
14201 (linux_wait_1): Don't call them.
14202 * server.c (handle_v_cont): Tag all threads as want-stopped.
14203 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14204 stopped as "client-wants-stopped".
14205
14206 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14207
14208 * Makefile.in (signals_h): New.
14209 (server_h): Depend on it.
14210 (server.o): Don't depend on $(signals_def).
14211 (signals.o): Depend on $(signals_def).
14212
14213 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14214
14215 * Makefile.in (signals_def): New.
14216 (server_h): Append include/gdb/signals.h and signals_def.
14217 (server.o): Append signals_def.
14218
14219 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14220
14221 * server.c (handle_target_event): Use target_signal_to_host for
14222 resume_info.sig initialization.
14223 * target.h (struct thread_resume) <sig>: New comment.
14224
14225 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14226
14227 * server.c (handle_query): strcpy() the returned string from paddress()
14228 instead of sprintf().
14229 * utils.c (paddress): Return phex_nz().
14230
14231 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14232
14233 * server.c (handle_v_cont): Call mourn_inferior if process
14234 just exited.
14235 (myresume): Likewise.
14236
14237 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14238
14239 Static tracepoints, and integration with UST.
14240
14241 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14242 * mem-break.c (uninsert_all_breakpoints)
14243 (reinsert_all_breakpoints): New.
14244 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14245 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14246 (gdb_agent_ust_loaded, helper_thread_id)
14247 (gdb_agent_helper_thread_id): New macros.
14248 (struct ipa_sym_addresses): Add addr_ust_loaded,
14249 addr_helper_thread_id, addr_cmd_buf.
14250 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14251 (in_process_agent_loaded_ust): New.
14252 (write_e_ust_not_loaded): New.
14253 (maybe_write_ipa_ust_not_loaded): New.
14254 (struct collect_static_trace_data_action): New.
14255 (enum tracepoint_type) <static_tracepoint>: New.
14256 (struct tracepoint) <handle>: Mention static tracepoints.
14257 (struct static_tracepoint_ctx): New.
14258 (CMD_BUF_SIZE): New.
14259 (add_tracepoint_action): Handle static tracepoint actions.
14260 (unprobe_marker_at): New.
14261 (clear_installed_tracepoints): Handle static tracepoints.
14262 (cmd_qtdp): Handle static tracepoints.
14263 (probe_marker_at): New.
14264 (cmd_qtstart): Handle static tracepoints.
14265 (response_tracepoint): Handle static tracepoints.
14266 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14267 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14268 (get_context_regcache): Handle static tracepoints.
14269 (do_action_at_tracepoint): Handle static tracepoint actions.
14270 (traceframe_find_block_type): Handle static trace data blocks.
14271 (traceframe_read_sdata): New.
14272 (download_tracepoints): Download static tracepoint actions.
14273 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14274 (GDB_PROBE_NAME): New.
14275 (ust_ops): New.
14276 (GET_UST_SYM): New.
14277 (USTF): New.
14278 (dlsym_ust): New.
14279 (ust_marker_to_static_tracepoint): New.
14280 (gdb_probe): New.
14281 (collect_ust_data_at_tracepoint): New.
14282 (gdb_ust_probe): New.
14283 (UNIX_PATH_MAX, SOCK_DIR): New.
14284 (gdb_ust_connect_sync_socket): New.
14285 (resume_thread, stop_thread): New.
14286 (run_inferior_command): New.
14287 (init_named_socket): New.
14288 (gdb_ust_socket_init): New.
14289 (cstr_to_hexstr): New.
14290 (next_st): New.
14291 (first_marker, next_marker): New.
14292 (response_ust_marker): New.
14293 (cmd_qtfstm, cmd_qtsstm): New.
14294 (unprobe_marker_at, probe_marker_at): New.
14295 (cmd_qtstmat, gdb_ust_thread): New.
14296 (gdb_ust_init): New.
14297 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14298 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14299 (ST_REGENTRY): New.
14300 (x86_64_st_collect_regmap): New.
14301 (X86_64_NUM_ST_COLLECT_GREGS): New.
14302 (AMD64_RIP_REGNUM): New.
14303 (supply_static_tracepoint_registers): New.
14304 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14305 (ST_REGENTRY): New.
14306 (i386_st_collect_regmap): New.
14307 (i386_NUM_ST_COLLECT_GREGS): New.
14308 (supply_static_tracepoint_registers): New.
14309 * server.c (handle_query): Handle qXfer:statictrace:read.
14310 <qSupported>: Report support for StaticTracepoints, and
14311 qXfer:statictrace:read features.
14312 * server.h (traceframe_read_sdata)
14313 (supply_static_tracepoint_registers): Declare.
14314 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14315 (unpack_varlen_hex): Include in IPA build.
14316 * Makefile.in (ustlibs, ustinc): New.
14317 (IPA_OBJS): Add remote-utils-ipa.o.
14318 ($(IPA_LIB)): Link -ldl and -lpthread.
14319 (UST_CFLAGS): New.
14320 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14321 * config.in, configure: Regenerate.
14322
14323 2010-06-20 Ian Lance Taylor <iant@google.com>
14324 Pedro Alves <pedro@codesourcery.com>
14325
14326 * linux-x86-low.c (always_true): Delete.
14327 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14328 trying to fool the compiler with always_true.
14329
14330 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14331
14332 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14333 conditions in gdbserver.
14334
14335 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14336
14337 * spu-low.c (spu_read_memory): Wrap around local store limit.
14338 (spu_write_memory): Likewise.
14339
14340 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14341
14342 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14343 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14344 LONGEST uses.
14345 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14346 uses.
14347 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14348 uses with LONGEST uses.
14349
14350 2010-06-14 Stan Shebs <stan@codesourcery.com>
14351 Pedro Alves <pedro@codesourcery.com>
14352
14353 Bytecode compiler.
14354
14355 * linux-x86-low.c: Include limits.h.
14356 (add_insns): New.
14357 (always_true): New.
14358 (EMIT_ASM): New.
14359 (EMIT_ASM32): New.
14360 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14361 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14362 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14363 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14364 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14365 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14366 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14367 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14368 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14369 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14370 (amd64_emit_void_call_2): New.
14371 (amd64_emit_ops): New.
14372 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14373 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14374 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14375 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14376 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14377 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14378 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14379 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14380 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14381 (i386_emit_stack_adjust, i386_emit_int_call_1)
14382 (i386_emit_void_call_2): New.
14383 (i386_emit_ops): New.
14384 (x86_emit_ops): New.
14385 (the_low_target): Install x86_emit_ops.
14386 * server.h (struct emit_ops): New.
14387 (get_raw_reg_func_addr): Declare.
14388 (current_insn_ptr, emit_error): Declare.
14389 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14390 (set_trace_state_variable_value): New defines.
14391 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14392 addr_get_trace_state_variable_value and
14393 addr_set_trace_state_variable_value.
14394 (symbol_list): New fields for get_raw_reg,
14395 get_trace_state_variable_value and set_trace_state_variable_value.
14396 (condfn): New typedef.
14397 (struct tracepoint): New field `compiled_cond'.
14398 (do_action_at_tracepoint): Clear compiled_cond.
14399 (get_trace_state_variable_value, set_trace_state_variable_value):
14400 Export in the IPA.
14401 (condition_true_at_tracepoint): If there's a compiled condition,
14402 run that.
14403 (current_insn_ptr, emit_error): New globals.
14404 (struct bytecode_address): New.
14405 (get_raw_reg_func_addr): New.
14406 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14407 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14408 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14409 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14410 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14411 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14412 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14413 (compile_tracepoint_condition, compile_bytecodes): New.
14414 * target.h (emit_ops): Forward declare.
14415 (struct target_ops): New field emit_ops.
14416 (target_emit_ops): New.
14417 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14418 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14419 * linux-low.c (linux_emit_ops): New.
14420 (linux_target_ops): Install it.
14421 * linux-low.h (struct linux_target_ops): New field emit_ops.
14422
14423 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14424
14425 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14426 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14427
14428 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14429 Stan Shebs <stan@codesourcery.com>
14430
14431 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14432 (all): Depend on $(extra_libraries).
14433 (install-only): Install the IPA.
14434 (IPA_OBJS, IPA_LIB): New.
14435 (clean): Remove the IPA lib.
14436 (IPAGENT_CFLAGS): New.
14437 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14438 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14439 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14440 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14441 * configure.ac: Check for atomic builtins support in the compiler.
14442 (IPA_DEPFILES, extra_libraries): Define.
14443 * configure.srv (ipa_obj): Add description.
14444 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14445 (i[34567]86-*-linux*): Set ipa_obj.
14446 (x86_64-*-linux*): Set ipa_obj.
14447 * linux-low.c (stabilizing_threads): New.
14448 (supports_fast_tracepoints): New.
14449 (linux_detach): Stabilize threads before detaching.
14450 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14451 the lwp is either not stabilizing, or is moving out of a jump pad.
14452 (linux_fast_tracepoint_collecting): New.
14453 (maybe_move_out_of_jump_pad): New.
14454 (enqueue_one_deferred_signal): New.
14455 (dequeue_one_deferred_signal): New.
14456 (linux_wait_for_event_1): If moving out of a jump pad, defer
14457 pending signals to later.
14458 (linux_stabilize_threads): New.
14459 (linux_wait_1): Check if threads need moving out of jump pads, and
14460 do it if so.
14461 (stuck_in_jump_pad_callback): New.
14462 (move_out_of_jump_pad_callback): New.
14463 (lwp_running): New.
14464 (linux_resume_one_lwp): Handle moving out of jump pads.
14465 (linux_set_resume_request): Dequeue deferred signals.
14466 (need_step_over_p): Also step over fast tracepoint jumps.
14467 (start_step_over): Also uninsert fast tracepoint jumps.
14468 (finish_step_over): Also reinsert fast tracepoint jumps.
14469 (linux_install_fast_tracepoint_jump): New.
14470 (linux_target_ops): Install linux_stabilize_threads and
14471 linux_install_fast_tracepoint_jump_pad.
14472 * linux-low.h (linux_target_ops) <get_thread_area,
14473 install_fast_tracepoint_jump_pad>: New fields.
14474 (struct lwp_info) <collecting_fast_tracepoint,
14475 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14476 (linux_get_thread_area): Declare.
14477 * linux-x86-low.c (jump_insn): New.
14478 (x86_get_thread_area): New.
14479 (append_insns): New.
14480 (push_opcode): New.
14481 (amd64_install_fast_tracepoint_jump_pad): New.
14482 (i386_install_fast_tracepoint_jump_pad): New.
14483 (x86_install_fast_tracepoint_jump_pad): New.
14484 (the_low_target): Install x86_get_thread_area and
14485 x86_install_fast_tracepoint_jump_pad.
14486 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14487 (struct fast_tracepoint_jump): New.
14488 (fast_tracepoint_jump_insn): New.
14489 (fast_tracepoint_jump_shadow): New.
14490 (find_fast_tracepoint_jump_at): New.
14491 (fast_tracepoint_jump_here): New.
14492 (delete_fast_tracepoint_jump): New.
14493 (set_fast_tracepoint_jump): New.
14494 (uninsert_fast_tracepoint_jumps_at): New.
14495 (reinsert_fast_tracepoint_jumps_at): New.
14496 (set_breakpoint_at): Use write_inferior_memory.
14497 (uninsert_raw_breakpoint): Use write_inferior_memory.
14498 (check_mem_read): Mask out fast tracepoint jumps.
14499 (check_mem_write): Mask out fast tracepoint jumps.
14500 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14501 (set_fast_tracepoint_jump): Declare.
14502 (delete_fast_tracepoint_jump)
14503 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14504 (reinsert_fast_tracepoint_jumps_at): Declare.
14505 * regcache.c: Don't compile many functions when building the
14506 in-process agent library.
14507 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14508 the register buffer in the heap.
14509 (free_register_cache): If the register buffer isn't owned by the
14510 regcache, don't free it.
14511 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14512 pre-existing register caches.
14513 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14514 type.
14515 (convert_ascii_to_int): : Constify `from' parameter type.
14516 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14517 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14518 the needed buffer in-place.
14519 (relocate_instruction): New.
14520 * server.c (handle_query) <qSymbols>: If the target supports
14521 tracepoints, give it a chance of looking up symbols. Report
14522 support for fast tracepoints.
14523 (handle_status): Stabilize threads.
14524 (process_serial_event): Adjust.
14525 * server.h (struct fast_tracepoint_jump): Forward declare.
14526 (struct process_info) <fast_tracepoint_jumps>: New field.
14527 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14528 (decode_X_packet, decode_M_packet): Adjust.
14529 (relocate_instruction): Declare.
14530 (in_process_agent_loaded): Declare.
14531 (tracepoint_look_up_symbols): Declare.
14532 (struct fast_tpoint_collect_status): Declare.
14533 (fast_tracepoint_collecting): Declare.
14534 (force_unlock_trace_buffer): Declare.
14535 (handle_tracepoint_bkpts): Declare.
14536 (initialize_low_tracepoint)
14537 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14538 * target.h (struct target_ops) <stabilize_threads,
14539 install_fast_tracepoint_jump_pad>: New fields.
14540 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14541 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14542 [HAVE_STDINT_H]: Include stdint.h.
14543 (trace_debug_1): Rename to ...
14544 (trace_vdebug): ... this.
14545 (trace_debug): Rename to ...
14546 (trace_debug_1): ... this. Add `level' parameter.
14547 (trace_debug): New.
14548 (ATTR_USED, ATTR_NOINLINE): New.
14549 (IP_AGENT_EXPORT): New.
14550 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14551 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14552 (about_to_request_buffer_space, trace_buffer_is_full)
14553 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14554 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14555 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14556 (traceframe_write_count, traceframes_created)
14557 (trace_state_variables)
14558 New renaming defines.
14559 (struct ipa_sym_addresses): New.
14560 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14561 (symbol_list): New.
14562 (ipa_sym_addrs): New.
14563 (all_tracepoint_symbols_looked_up): New.
14564 (in_process_agent_loaded): New.
14565 (write_e_ipa_not_loaded): New.
14566 (maybe_write_ipa_not_loaded): New.
14567 (tracepoint_look_up_symbols): New.
14568 (debug_threads) [IN_PROCESS_AGENT]: New.
14569 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14570 (UNKNOWN_SIDE_EFFECTS): New.
14571 (stop_tracing): New.
14572 (flush_trace_buffer): New.
14573 (stop_tracing_bkpt): New.
14574 (flush_trace_buffer_bkpt): New.
14575 (read_inferior_integer): New.
14576 (read_inferior_uinteger): New.
14577 (read_inferior_data_pointer): New.
14578 (write_inferior_data_pointer): New.
14579 (write_inferior_integer): New.
14580 (write_inferior_uinteger): New.
14581 (struct collect_static_trace_data_action): Delete.
14582 (enum tracepoint_type): New.
14583 (struct tracepoint) <type>: New field `type'.
14584 <actions_str, step_actions, step_actions_str>: Only include in
14585 GDBserver.
14586 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14587 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14588 (tracepoints): Use IP_AGENT_EXPORT.
14589 (last_tracepoint): Don't include in the IPA.
14590 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14591 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14592 (alloced_trace_state_variables): New.
14593 (trace_state_variables): Use IP_AGENT_EXPORT.
14594 (traceframe_t): Delete unused variable.
14595 (circular_trace_buffer): Don't include in the IPA.
14596 (trace_buffer_start): Delete.
14597 (struct trace_buffer_control): New.
14598 (trace_buffer_free): Delete.
14599 (struct ipa_trace_buffer_control): New.
14600 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14601 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14602 New.
14603 (trace_buffer_ctrl): New.
14604 (TRACE_BUFFER_CTRL_CURR): New.
14605 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14606 Reimplement as macros.
14607 (trace_buffer_wrap): Delete.
14608 (traceframe_write_count, traceframe_read_count)
14609 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14610 (struct tracepoint_hit_ctx) <type>: New field.
14611 (struct fast_tracepoint_ctx): New.
14612 (memory_barrier): New.
14613 (cmpxchg): New.
14614 (record_tracepoint_error): Update atomically in the IPA.
14615 (clear_inferior_trace_buffer): New.
14616 (about_to_request_buffer_space): New.
14617 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14618 updating the same buffer.
14619 (add_tracepoint): Default the tracepoint's type to trap
14620 tracepoint, and orig_size to -1.
14621 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14622 internal variables.
14623 (create_trace_state_variable): New parameter `gdb'. Handle it.
14624 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14625 (cmd_qtdp): Handle fast tracepoints.
14626 (cmd_qtdv): Adjust.
14627 (max_jump_pad_size): New.
14628 (gdb_jump_pad_head): New.
14629 (get_jump_space_head): New.
14630 (claim_jump_space): New.
14631 (sort_tracepoints): New.
14632 (MAX_JUMP_SIZE): New.
14633 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14634 IPA.
14635 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14636 support. Upload fast traceframes, and delete internal IPA
14637 breakpoints.
14638 (stop_tracing_handler): New.
14639 (flush_trace_buffer_handler): New.
14640 (cmd_qtstop): Upload fast tracepoints.
14641 (response_tracepoint): Handle fast tracepoints.
14642 (tracepoint_finished_step): Upload fast traceframes. Set the
14643 tracepoint hit context's tracepoint type.
14644 (handle_tracepoint_bkpts): New.
14645 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14646 type. Add comment about fast tracepoints.
14647 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14648 non-existing action_str field.
14649 (get_context_regcache): Handle fast tracepoints.
14650 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14651 to the regcache.
14652 (fast_tracepoint_from_jump_pad_address): New.
14653 (fast_tracepoint_from_ipa_tpoint_address): New.
14654 (collecting_t): New.
14655 (force_unlock_trace_buffer): New.
14656 (fast_tracepoint_collecting): New.
14657 (collecting): New.
14658 (gdb_collect): New.
14659 (write_inferior_data_ptr): New.
14660 (target_tp_heap): New.
14661 (target_malloc): New.
14662 (download_agent_expr): New.
14663 (UALIGN): New.
14664 (download_tracepoints): New.
14665 (download_trace_state_variables): New.
14666 (upload_fast_traceframes): New.
14667 (IPA_FIRST_TRACEFRAME): New.
14668 (IPA_NEXT_TRACEFRAME_1): New.
14669 (IPA_NEXT_TRACEFRAME): New.
14670 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14671 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14672 (gdb_jump_pad_buffer_end): New.
14673 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14674 (initialize_tracepoint): Adjust.
14675 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14676 buffer. Initialize the low module.
14677 * utils.c (PREFIX, TOOLNAME): New.
14678 (malloc_failure): Use PREFIX.
14679 (error): In the IPA, an error causes an exit.
14680 (fatal, warning): Use PREFIX.
14681 (internal_error): Use TOOLNAME.
14682 (NUMCELLS): Increase to 10.
14683 * configure, config.in: Regenerate.
14684
14685 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14686
14687 * server.c (handle_query) <qSupported>: Do two passes over the
14688 qSupported string to avoid nesting strtok.
14689
14690 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14691
14692 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14693 (CDEPS): New.
14694 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14695 -Wl,--dynamic-list.
14696 * configure: Regenerate.
14697 * proc-service.list: New.
14698
14699 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14700
14701 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14702 New comment.
14703
14704 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14705
14706 * gdbreplay.c (remote_open): Check error return from socket() call by
14707 its equality to -1 not by it being negative.
14708 * remote-utils.c (remote_open): Likewise.
14709
14710 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14711
14712 * config.h: Regenerate.
14713
14714 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14715
14716 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14717 doesn't provide PTRACE_GET_THREAD_AREA.
14718
14719 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14720
14721 * linux-m68k-low.c: Include <asm/ptrace.h>
14722 (ps_get_thread_area): Implement.
14723
14724 2010-05-03 Doug Evans <dje@google.com>
14725
14726 * event-loop.c (struct callback_event): New struct.
14727 (callback_list): New global.
14728 (append_callback_event, delete_callback_event): New functions.
14729 (process_callback): New function.
14730 (start_event_loop): Call it.
14731 * remote-utils.c (NOT_SCHEDULED): Define.
14732 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14733 moved out of readchar.
14734 (readchar): Rewrite. Call reschedule before returning.
14735 (reset_readchar): New function.
14736 (remote_close): Call it.
14737 (process_remaining, reschedule): New functions.
14738 * server.h (callback_handler_func): New typedef.
14739 (append_callback_event, delete_callback_event): Declare.
14740
14741 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14742
14743 * proc-service.c (ps_pglobal_lookup): Use
14744 thread_db_look_up_one_symbol.
14745 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14746 parameter. Use it instead of all_symbols_looked_up.
14747 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14748 field.
14749 (all_symbols_looked_up): Don't declare.
14750 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14751 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14752 field.
14753 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14754 Set all_symbols_looked_up here.
14755 (thread_db_look_up_one_symbol): New.
14756 (thread_db_get_tls_address): Adjust.
14757 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14758 thread_db object on the heap, and tentatively set it in the
14759 process structure.
14760 (thread_db_init): Don't set all_symbols_looked_up here.
14761 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14762
14763 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14764
14765 * linux-low.c (linux_kill, linux_detach): Adjust.
14766 (status_pending_p_callback): Remove redundant statement. Check
14767 for !TARGET_WAITIKIND_IGNORE, instead of
14768 TARGET_WAITKIND_STOPPED.
14769 (handle_tracepoints): Make sure LWP is locked. Adjust.
14770 (linux_wait_for_event_1): Adjust.
14771 (linux_cancel_breakpoints): New.
14772 (unsuspend_one_lwp): New.
14773 (unsuspend_all_lwps): New.
14774 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14775 (send_sigstop_callback): Change return type to int, add new
14776 `except' parameter and handle it.
14777 (suspend_and_send_sigstop_callback): New.
14778 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14779 pass them down. If SUSPEND, also increment the lwp's suspend
14780 count.
14781 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14782 (need_step_over_p): Don't consider suspended LWPs.
14783 (start_step_over): Adjust.
14784 (proceed_one_lwp): Change return type to int, add new `except'
14785 parameter and handle it.
14786 (unsuspend_and_proceed_one_lwp): New.
14787 (proceed_all_lwps): Use find_inferior instead of
14788 for_each_inferior.
14789 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14790 also decrement the suspend count of LWPs. Pass `except' down,
14791 instead of hacking its suspend count.
14792 (linux_pause_all): Add `freeze' parameter. Adjust.
14793 (linux_unpause_all): New.
14794 (linux_target_ops): Install linux_unpause_all.
14795 * server.c (handle_status): Adjust.
14796 * target.h (struct target_ops): New fields `unpause_all' and
14797 `cancel_breakpoints'. Add new parameter to `pause_all'.
14798 (pause_all): Add new `freeze' parameter.
14799 (unpause_all): New.
14800 (cancel_breakpoints): New.
14801 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14802 cancel breakpoints.
14803 (cmd_qtstart): Pause threads.
14804 (stop_tracing): Pause threads, and cancel breakpoints.
14805 * win32-low.c (win32_target_ops): Adjust.
14806
14807 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14808
14809 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14810 the inferior right away from here...
14811 (linux_wait_1): ... to here, and adjust to check the thread's
14812 last_resume_kind instead of the lwp's step or stop_expected flags.
14813
14814 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14815
14816 * README: Use consistent `GDB' and `GDBserver' spellings.
14817
14818 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14819
14820 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14821 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14822 (linux_detach_one_lwp): Assume the lwp is stopped.
14823 (any_thread_of): Delete.
14824 (linux_detach): Stop all lwps here. Don't blindly delete all
14825 breakpoints.
14826 (delete_lwp_callback): New.
14827 (linux_mourn): Delete all lwps of the process that is gone.
14828 (linux_wait_1): Don't delete the last lwp of the process here.
14829 * mem-break.h (mark_breakpoints_out): Declare.
14830 * mem-break.c (mark_breakpoints_out): New.
14831 (free_all_breakpoints): Use it.
14832 * server.c (handle_target_event): If the process is gone, mark
14833 breakpoints out.
14834 * thread-db.c (struct thread_db) <create_bp>: New field.
14835 (thread_db_enable_reporting): Fix prototype. Store a thread event
14836 breakpoint reference in the thread_db struct.
14837 (thread_db_load_search): Clear the thread_db object.
14838 (try_thread_db_load_1): Ditto.
14839 (switch_to_process): New.
14840 (disable_thread_event_reporting): Use it.
14841 (remove_thread_event_breakpoints): New.
14842 (thread_db_detach, thread_db_mourn): Use it.
14843
14844 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14845
14846 * linux-low.c (linux_enable_event_reporting): New.
14847 (linux_wait_for_event_1, handle_extended_wait): Use it.
14848
14849 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14850
14851 * linux-low.c (linux_kill_one_lwp, linux_kill)
14852 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14853 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14854 SIGSTOP even if the LWP is stopped.
14855 (send_sigstop_callback): New.
14856 (stop_all_lwps): Use send_sigstop_callback instead.
14857 (linux_resume_one_thread): Adjust.
14858 (proceed_one_lwp): Still proceed an LWP that the client has
14859 requested to stop, if we haven't reported it as stopped yet. Make
14860 sure that LWPs the client want stopped, have a pending SIGSTOP.
14861
14862 2010-04-26 Doug Evans <dje@google.com>
14863
14864 * server.c (handle_general_set): Make static.
14865
14866 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14867 Print received char after testing for error/eof instead of before.
14868 (input_interrupt): Tweak comment.
14869
14870 2010-04-23 Doug Evans <dje@google.com>
14871
14872 * server.c (start_inferior): Print inferior argv if --debug.
14873
14874 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14875
14876 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14877 * nto-x86-low.c: Include server.h
14878
14879 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14880
14881 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14882 be consistent with other sources of this directory.
14883 (init_registers_amd64): Correct name of source file of this function
14884 in the comment.
14885
14886 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14887
14888 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14889 64-bit executables.
14890
14891 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14892
14893 * win32-i386-low.c: Add 64-bit support.
14894 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14895 (init_registers_amd64): Declare.
14896 (mappings): Add 64-bit version of array.
14897 (init_windows_x86): New function.
14898 (the_low_target): Change init_arch field to init_windows_x86.
14899
14900 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14901
14902 * win32-low.c: Adapt to support also 64-bit architecture.
14903 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14904 (get_image_name): Use SIZE_T type for local variable `done'.
14905 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14906 (toolhelp_get_dll_name): Idem.
14907 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14908 Use uintptr_t typecast to avoid warning.
14909 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14910 (handle_exception): Use phex_nz to avoid warning.
14911 (win32_wait): Remove unused local variable `process'.
14912
14913 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14914
14915 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14916 `amd64-avx.o'.
14917
14918 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14919
14920 * configure.ac: Use `ws2_32' library for srv_mingw.
14921 * configure: Regenerate.
14922 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14923 * remote-utils.c: Likewise.
14924
14925 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14926
14927 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14928 if __x86_64__ is defined.
14929
14930 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14931
14932 * configure: Regenerate.
14933
14934 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14935
14936 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14937 * target.h (target_ops): New get_tib_address field.
14938 * win32-low.h (win32_thread_info): Add thread_local_base field.
14939 * win32-low.c (child_add_thread): Add tlb argument.
14940 Set thread_local_base field to TLB.
14941 (get_child_debug_event): Adapt to child_add_thread change.
14942 (win32_get_tib_address): New function.
14943 (win32_target_ops): Set get_tib_address field to
14944 win32_get_tib_address.
14945 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14946
14947 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14948
14949 * linux-low.c (linux_mourn): Also remove the process.
14950 * server.c (handle_target_event): Don't remove the process here.
14951 * nto-low.c (nto_mourn): New.
14952 (nto_target_ops): Install it.
14953 * spu-low.c (spu_mourn): New.
14954 (spu_target_ops): Install it.
14955 * win32-low.c (win32_mourn): New.
14956 (win32_target_ops): Install it.
14957
14958 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14959
14960 * server.h (buffer_xml_printf): Remove redundant `;'.
14961
14962 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14963
14964 * regcache.c (set_register_cache): Invalidate regcaches before
14965 changing the register cache layout.
14966 (regcache_invalidate_one): Allow a NULL regcache.
14967 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14968 regcaches before changing the register cache layout or the target
14969 regsets.
14970
14971 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14972
14973 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14974 variable warning on Linux/x86-64.
14975
14976 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14977
14978 GDBserver disconnected tracing support.
14979
14980 * linux-low.c (linux_remove_process): Delete.
14981 (add_lwp): Don't set last_resume_kind here.
14982 (linux_kill): Use `mourn'.
14983 (linux_detach): Use `thread_db_detach', and `mourn'.
14984 (linux_mourn): New.
14985 (linux_attach_lwp_1): Adjust comment.
14986 (linux_attach): last_resume_kind moved the thread_info; adjust.
14987 (status_pending_p_callback): Adjust.
14988 (linux_wait_for_event_1): Adjust.
14989 (count_events_callback, select_singlestep_lwp_callback)
14990 (select_event_lwp_callback, cancel_breakpoints_callback)
14991 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14992 (proceed_one_lwp): Adjust.
14993 (linux_async): Add debug output.
14994 (linux_thread_stopped): New.
14995 (linux_pause_all): New.
14996 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14997 linux_pause_all.
14998 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14999 (thread_db_free): Delete declaration.
15000 (thread_db_detach, thread_db_mourn): Declare.
15001 * thread-db.c (thread_db_init): Use thread_db_mourn.
15002 (thread_db_free): Delete, split in two.
15003 (disable_thread_event_reporting): New.
15004 (thread_db_detach): New.
15005 (thread_db_mourn): New.
15006
15007 * server.h (struct thread_info) <last_resume_kind>: New field.
15008 <attached>: Add comment.
15009 <gdb_detached>: New field.
15010 (handler_func): Change return type to int.
15011 (handle_serial_event, handle_target_event): Ditto.
15012 (gdb_connected): Declare.
15013 (tracing): Delete.
15014 (disconnected_tracing): Declare.
15015 (stop_tracing): Declare.
15016
15017 * server.c (handle_query) <qSupported>: Report support for
15018 disconnected tracing.
15019 (queue_stop_reply_callback): Account for running threads.
15020 (gdb_wants_thread_stopped): New.
15021 (gdb_wants_all_threads_stopped): New.
15022 (gdb_reattached_process): New.
15023 (handle_status): Clear the `gdb_detached' flag of all processes.
15024 In all-stop, stop all threads.
15025 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15026 (process_serial_event): If the remote connection breaks, or if an
15027 exit was forced with "monitor exit", force an event loop exit.
15028 Handle disconnected tracing on detach.
15029 (handle_serial_event): Adjust.
15030 (handle_target_event): If GDB isn't connected, forward events back
15031 to the inferior, unless the last process exited, in which case,
15032 exit gdbserver. Adjust interface.
15033
15034 * remote-utils.c (remote_open): Don't block in accept. Instead
15035 register an event loop source on the listen socket file
15036 descriptor. Refactor bits into ...
15037 (listen_desc): ... this new global.
15038 (gdb_connected): ... this new function.
15039 (enable_async_notification): ... this new function.
15040 (handle_accept_event): ... this new function.
15041 (remote_close): Clear remote_desc.
15042
15043 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15044
15045 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15046 New fields.
15047 (mourn_inferior): Define.
15048 (target_process_qsupported): Avoid the dangling else problem.
15049 (thread_stopped): Define.
15050 (pause_all): Define.
15051 (target_waitstatus_to_string): Declare.
15052 * target.c (target_waitstatus_to_string): New.
15053
15054 * tracepoint.c (tracing): Make extern.
15055 (disconnected_tracing): New.
15056 (stop_tracing): Make extern. Handle tracing stops due to GDB
15057 disconnecting.
15058 (cmd_qtdisconnected): New.
15059 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15060 (handle_tracepoint_general_set): Handle QTDisconnected.
15061
15062 * event-loop.c (event_handler_func): Change return type to int.
15063 (process_event): Bail out if the event handler wants the event
15064 loop to stop.
15065 (handle_file_event): Ditto.
15066 (start_event_loop): Bail out if the event handler wants the event
15067 loop to stop.
15068
15069 * nto-low.c (nto_target_ops): Adjust.
15070 * spu-low.c (spu_wait): Don't remove the process here.
15071 (spu_target_ops): Adjust.
15072 * win32-low.c (win32_wait): Don't remove the process here.
15073 (win32_target_ops): Adjust.
15074
15075 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15076
15077 * regcache.c (realloc_register_cache): Invalidate inferior's
15078 regcache before recreating it.
15079
15080 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15081
15082 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15083
15084 2010-04-09 Stan Shebs <stan@codesourcery.com>
15085 Pedro Alves <pedro@codesourcery.com>
15086
15087 * server.h (LONGEST): New.
15088 (struct thread_info) <while_stepping>: New field.
15089 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15090 Declare.
15091 (initialize_tracepoint, handle_tracepoint_general_set)
15092 (handle_tracepoint_query, tracepoint_finished_step)
15093 (tracepoint_was_hit, release_while_stepping_state_list):
15094 (current_traceframe): Declare.
15095 * server.c (handle_general_set): Handle tracepoint packets.
15096 (read_memory): New.
15097 (write_memory): New.
15098 (handle_search_memory_1): Use read_memory.
15099 (handle_query): Report support for conditional tracepoints, trace
15100 state variables, and tracepoint sources. Handle tracepoint
15101 queries.
15102 (main): Initialize the tracepoints module.
15103 (process_serial_event): Handle traceframe reads/writes.
15104
15105 * linux-low.c (handle_tracepoints): New.
15106 (linux_wait_1): Call it.
15107 (linux_resume_one_lwp): Handle while-stepping.
15108 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15109 (linux_target_ops): Install them.
15110 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15111 New field.
15112 * linux-x86-low.c (x86_supports_tracepoints): New.
15113 (the_low_target). Install it.
15114
15115 * mem-break.h (delete_breakpoint): Declare.
15116 * mem-break.c (delete_breakpoint): Make external.
15117
15118 * target.h (struct target_ops): Add `supports_tracepoints',
15119 `read_pc', and `write_pc' fields.
15120 (target_supports_tracepoints): Define.
15121 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15122 (phex_nz): New.
15123
15124 * regcache.h (struct regcache) <registers_owned>: New field.
15125 (init_register_cache, regcache_cpy): Declare.
15126 (regcache_read_pc, regcache_write_pc): Declare.
15127 (register_cache_size): Declare.
15128 (supply_regblock): Declare.
15129 * regcache.c (init_register_cache): New.
15130 (new_register_cache): Use it.
15131 (regcache_cpy): New.
15132 (register_cache_size): New.
15133 (supply_regblock): New.
15134 (regcache_read_pc, regcache_write_pc): New.
15135
15136 * tracepoint.c: New.
15137
15138 * Makefile.in (OBS): Add tracepoint.o.
15139 (tracepoint.o): New rule.
15140
15141 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15142
15143 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15144 (i386-mmx.o): New.
15145 (i386-mmx.c): Likewise.
15146 (i386-mmx-linux.o): Likewise.
15147 (i386-mmx-linux.c): Likewise.
15148
15149 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15150 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15151 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15152 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15153
15154 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15155 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15156 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15157
15158 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15159
15160 * Makefile.in (clean): Updated.
15161 (i386-avx.o): New.
15162 (i386-avx.c): Likewise.
15163 (i386-avx-linux.o): Likewise.
15164 (i386-avx-linux.c): Likewise.
15165 (amd64-avx.o): Likewise.
15166 (amd64-avx.c): Likewise.
15167 (amd64-avx-linux.o): Likewise.
15168 (amd64-avx-linux.c): Likewise.
15169
15170 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15171 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15172 (srv_amd64_regobj): Add amd64-avx.o.
15173 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15174 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15175 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15176 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15177 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15178 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15179 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15180
15181 * i387-fp.c: Include "i386-xstate.h".
15182 (i387_xsave): New.
15183 (i387_cache_to_xsave): Likewise.
15184 (i387_xsave_to_cache): Likewise.
15185 (x86_xcr0): Likewise.
15186
15187 * i387-fp.h (i387_cache_to_xsave): Likewise.
15188 (i387_xsave_to_cache): Likewise.
15189 (x86_xcr0): Likewise.
15190
15191 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15192 * linux-crisv32-low.c (target_regsets): Likewise.
15193 * linux-m68k-low.c (target_regsets): Likewise.
15194 * linux-mips-low.c (target_regsets): Likewise.
15195 * linux-ppc-low.c (target_regsets): Likewise.
15196 * linux-s390-low.c (target_regsets): Likewise.
15197 * linux-sh-low.c (target_regsets): Likewise.
15198 * linux-sparc-low.c (target_regsets): Likewise.
15199 * linux-xtensa-low.c (target_regsets): Likewise.
15200
15201 * linux-low.c: Include <sys/uio.h>.
15202 (regsets_fetch_inferior_registers): Support nt_type.
15203 (regsets_store_inferior_registers): Likewise.
15204 (linux_process_qsupported): New.
15205 (linux_target_ops): Add linux_process_qsupported.
15206
15207 * linux-low.h (regset_info): Add nt_type.
15208 (linux_target_ops): Add process_qsupported.
15209
15210 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15211 and <sys/uio.h>.
15212 (init_registers_i386_avx_linux): New.
15213 (init_registers_amd64_avx_linux): Likewise.
15214 (xmltarget_i386_linux_no_xml): Likewise.
15215 (xmltarget_amd64_linux_no_xml): Likewise.
15216 (PTRACE_GETREGSET): Likewise.
15217 (PTRACE_SETREGSET): Likewise.
15218 (x86_fill_xstateregset): Likewise.
15219 (x86_store_xstateregset): Likewise.
15220 (use_xml): Likewise.
15221 (x86_linux_update_xmltarget): Likewise.
15222 (x86_linux_process_qsupported): Likewise.
15223 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15224 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15225 init_registers_i386_linux here. Call
15226 x86_linux_update_xmltarget.
15227 (the_low_target): Add x86_linux_process_qsupported.
15228
15229 * server.c (handle_query): Call target_process_qsupported.
15230
15231 * target.h (target_ops): Add process_qsupported.
15232 (target_process_qsupported): New.
15233
15234 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15235
15236 * inferiors.c (add_thread): Set last_status kind to
15237 TARGET_WAITKIND_IGNORE.
15238 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15239 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15240 (linux_wait_1): Move `thread' local definition to block that uses
15241 it. Don't NULL initialize `event_child'.
15242 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15243 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15244 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15245
15246 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15247
15248 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15249 an extended waitstatus, or by a watchpoint.
15250 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15251 thread was stepping or has been stopped by a watchpoint.
15252
15253 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15254
15255 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15256 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15257 of another, then delete the previous, and validate all
15258 breakpoints.
15259 (validate_inserted_breakpoint): New.
15260 (delete_disabled_breakpoints): New.
15261 (validate_breakpoints): New.
15262 (check_mem_read): Validate breakpoints before trusting their
15263 shadow. Delete disabled breakpoints.
15264 (check_mem_write): Validate breakpoints before trusting they
15265 should be inserted. Delete disabled breakpoints.
15266 * mem-break.h (validate_breakpoints):
15267 * server.c (handle_query): Validate breakpoints when we see a
15268 qSymbol query.
15269
15270 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15271
15272 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15273 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15274 if we could tell there's a GDB breakpoint at stop_pc.
15275 (need_step_over_p): Don't do a step over if we find a GDB
15276 breakpoint at the resume PC.
15277
15278 * mem-break.c (struct raw_breakpoint): New.
15279 (enum bkpt_type): New type `gdb_breakpoint'.
15280 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15281 fields. New field `raw'.
15282 (find_raw_breakpoint_at): New.
15283 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15284 breakpoint instead.
15285 (set_breakpoint_at): Adjust.
15286 (delete_raw_breakpoint): New.
15287 (release_breakpoint): New.
15288 (delete_breakpoint): Rename to...
15289 (delete_breakpoint_1): ... this. Add proc parameter. Use
15290 release_breakpoint. Return ENOENT.
15291 (delete_breakpoint): Reimplement.
15292 (find_breakpoint_at): Delete.
15293 (find_gdb_breakpoint_at): New.
15294 (delete_breakpoint_at): Delete.
15295 (set_gdb_breakpoint_at): New.
15296 (delete_gdb_breakpoint_at): New.
15297 (gdb_breakpoint_here): New.
15298 (set_reinsert_breakpoint): Use release_breakpoint.
15299 (uninsert_breakpoint): Rename to ...
15300 (uninsert_raw_breakpoint): ... this.
15301 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15302 (reinsert_raw_breakpoint): Change parameter type to
15303 raw_breakpoint.
15304 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15305 instead.
15306 (check_breakpoints): Adjust. Use release_breakpoint.
15307 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15308 (breakpoint_inserted_here): Ditto.
15309 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15310 Don't trust the breakpoint's shadow if it is not inserted.
15311 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15312 (delete_all_breakpoints): Adjust.
15313 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15314 use delete_breakpoint_1.
15315
15316 * mem-break.h (breakpoints_supported): Delete declaration.
15317 (set_gdb_breakpoint_at): Declare.
15318 (gdb_breakpoint_here): Declare.
15319 (delete_breakpoint_at): Delete.
15320 (delete_gdb_breakpoint_at): Declare.
15321
15322 * server.h (struct raw_breakpoint): Forward declare.
15323 (struct process_info): New field `raw_breakpoints'.
15324
15325 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15326 breakpoints.
15327
15328 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15329
15330 * linux-low.c (status_pending_p_callback): Fix comment.
15331 (linux_wait_for_event_1): Move most of the internal breakpoint
15332 handling from here...
15333 (linux_wait_1): ... to here.
15334 (count_events_callback): New.
15335 (select_singlestep_lwp_callback): New.
15336 (select_event_lwp_callback): New.
15337 (cancel_breakpoints_callback): New.
15338 (select_event_lwp): New.
15339 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15340 priority to all LWPs that have had events that should be reported
15341 to the client. Cancel breakpoints when about to reporting the
15342 event to the client, not while stopping lwps. No longer cancel
15343 finished single-steps here.
15344 (cancel_finished_single_step): Delete.
15345 (cancel_finished_single_steps): Delete.
15346
15347 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15348
15349 * mem-break.c (enum bkpt_type): New.
15350 (struct breakpoint): New field `type'.
15351 (set_breakpoint_at): Change return type to struct breakpoint
15352 pointer. Set type to `other_breakpoint' by default.
15353 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15354 in the breakpoint list.
15355 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15356 (reinsert_breakpoint): Rename to ...
15357 (reinsert_raw_breakpoint): ... this.
15358 (reinsert_breakpoints_at): Adjust.
15359 * mem-break.h (struct breakpoint): Declare.
15360 (set_breakpoint_at): Change return type to struct breakpoint
15361 pointer.
15362
15363 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15364
15365 * server.c (handle_query): Assign, not compare.
15366
15367 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15368
15369 Teach linux gdbserver to step-over-breakpoints.
15370
15371 * linux-low.c (can_hardware_single_step): New.
15372 (supports_breakpoints): New.
15373 (handle_extended_wait): If stopping threads, read the stop pc of
15374 the new cloned LWP.
15375 (get_pc): New.
15376 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15377 low target doesn't support retrieving the PC.
15378 (add_lwp): Set last_resume_kind to resume_continue.
15379 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15380 (linux_attach): Don't clear stop_expected. Set the lwp's
15381 last_resume_kind to resume_stop.
15382 (linux_detach_one_lwp): Don't check for removed breakpoints.
15383 (check_removed_breakpoint): Delete.
15384 (status_pending_p): Rename to ...
15385 (status_pending_p_callback): ... this. Don't check for removed
15386 breakpoints. Don't consider threads that are stopped from GDB's
15387 perspective.
15388 (linux_wait_for_lwp): Always read the stop_pc here.
15389 (cancel_breakpoint): New.
15390 (step_over_bkpt): New global.
15391 (linux_wait_for_event_1): Implement stepping over breakpoints.
15392 (gdb_wants_lwp_stopped): New.
15393 (gdb_wants_all_stopped): New.
15394 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15395 single-step traps here. Store the thread's last reported target
15396 wait status.
15397 (send_sigstop): Don't clear stop_expected. Always set it,
15398 instead.
15399 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15400 (cancel_finished_single_step): New.
15401 (cancel_finished_single_steps): New.
15402 (wait_for_sigstop): Don't cancel finished single-step traps here.
15403 (linux_resume_one_lwp): Don't check for removed breakpoints.
15404 Don't set `step' on non-hardware step archs.
15405 (linux_set_resume_request): Ignore resume_stop requests if already
15406 stopping or stopped. Set the lwp's last_resume_kind.
15407 (resume_status_pending_p): Don't check for removed breakpoints.
15408 (need_step_over_p): New.
15409 (start_step_over): New.
15410 (finish_step_over): New.
15411 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15412 requests. Clear the thread's last reported target waitstatus.
15413 Don't use the `suspended' flag. Don't consider pending breakpoints.
15414 (linux_resume): Start a step-over if necessary.
15415 (proceed_one_lwp): New.
15416 (proceed_all_lwps): New.
15417 (unstop_all_lwps): New.
15418 * linux-low.h (struct lwp_info): Rewrite comment for the
15419 `suspended' flag. Add the `stop_pc' field. Delete the
15420 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15421 Add `'last_resume_kind' and `need_step_over' fields.
15422 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15423 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15424 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15425 (set_raw_breakpoint_at): New.
15426 (set_breakpoint_at): Rewrite to use it.
15427 (reinsert_breakpoint_handler): Delete.
15428 (set_reinsert_breakpoint): New.
15429 (reinsert_breakpoint_by_bp): Delete.
15430 (delete_reinsert_breakpoints): New.
15431 (uninsert_breakpoint): Rewrite.
15432 (uninsert_breakpoints_at): New.
15433 (reinsert_breakpoint): Rewrite.
15434 (reinsert_breakpoints_at): New.
15435 (check_breakpoints): Rewrite.
15436 (breakpoint_here): New.
15437 (breakpoint_inserted_here): New.
15438 (check_mem_read): Adjust.
15439 * mem-break.h (breakpoints_supported, breakpoint_here)
15440 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15441 (reinsert_breakpoint_by_bp): Delete declaration.
15442 (delete_reinsert_breakpoints): Declare.
15443 (reinsert_breakpoint): Delete declaration.
15444 (reinsert_breakpoints_at): Declare.
15445 (uninsert_breakpoint): Delete declaration.
15446 (uninsert_breakpoints_at): Declare.
15447 (check_breakpoints): Adjust prototype.
15448 * server.h: Adjust include order.
15449 (struct thread_info): Declare here. Add a `last_status' field.
15450
15451 2010-03-23 Michael Snyder <msnyder@vmware.com>
15452
15453 * server.c (crc32): New function.
15454 (handle_query): Add handling for 'qCRC:' request.
15455
15456 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15457
15458 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15459 lwp had been stopped by a watchpoint.
15460
15461 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15462
15463 * server.h (internal_error): Declare.
15464 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15465 * utils.c (internal_error): New function.
15466
15467 2010-03-15 Andreas Schwab <schwab@redhat.com>
15468
15469 * configure.srv: Fix typo setting srv_regobj.
15470
15471 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15472
15473 * linux-low.c (fetch_register): Avoid passing a non string literal
15474 format to `error'.
15475 (usr_store_inferior_registers): Ditto.
15476
15477 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15478
15479 * linux-low.c (linux_write_memory): Bail out early if peeking
15480 memory failed.
15481
15482 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15483
15484 * linux-low.h (struct lwp_info): New fields
15485 `stopped_by_watchpoint' and `stopped_data_address'.
15486 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15487 here, and cache them in the lwp object.
15488 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15489 directly.
15490 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15491 field.
15492 (linux_stopped_by_watchpoint): Rewrite.
15493 (linux_stopped_data_address): Rewrite.
15494
15495 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15496
15497 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15498 switching the current inferior, not before.
15499
15500 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15501
15502 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15503 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15504 i386-linux.c and amd64-linux.c.
15505 (reg-i386.o): Removed.
15506 (reg-i386.c): Likewise.
15507 (reg-i386-linux.o): Likewise.
15508 (reg-i386-linux.c): Likewise.
15509 (reg-x86-64.o): Likewise.
15510 (reg-x86-64.c): Likewise.
15511 (reg-x86-64-linux.o): Likewise.
15512 (reg-x86-64-linux.c): Likewise.
15513 (i386.o): New.
15514 (i386.c): Likewise.
15515 (i386-linux.o): Likewise.
15516 (i386-linux.c): Likewise.
15517 (amd64.o): Likewise.
15518 (amd64.c): Likewise.
15519 (amd64-linux.o): Likewise.
15520 (amd64-linux.c): Likewise.
15521
15522 * configure.srv (srv_i386_regobj): New.
15523 (srv_i386_linux_regobj): Likewise.
15524 (srv_amd64_regobj): Likewise.
15525 (srv_amd64_linux_regobj): Likewise.
15526 (srv_i386_32bit_xmlfiles): Likewise.
15527 (srv_i386_64bit_xmlfiles): Likewise.
15528 (srv_i386_xmlfiles): Likewise.
15529 (srv_amd64_xmlfiles): Likewise.
15530 (srv_i386_linux_xmlfiles): Likewise.
15531 (srv_amd64_linux_xmlfiles): Likewise.
15532 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15533 srv_xmlfiles to $srv_i386_xmlfiles.
15534 (i[34567]86-*-mingw32ce*): Likewise.
15535 (i[34567]86-*-mingw*): Likewise.
15536 (i[34567]86-*-nto*): Likewise.
15537 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15538 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15539 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15540 (x86_64-*-linux*): Likewise.
15541
15542 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15543 (init_registers_amd64_linux): New.
15544 (x86_arch_setup): Replace init_registers_x86_64_linux with
15545 init_registers_amd64_linux.
15546
15547 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15548
15549 * configure.ac: Check for libdl. If it is not available link against
15550 static libthread_db.
15551 * configure: Regenerate.
15552
15553 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15554
15555 PR9605
15556
15557 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15558 handing a read watchpoint.
15559 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15560
15561 2010-02-12 Doug Evans <dje@google.com>
15562
15563 * linux-low.c (linux_supports_tracefork_flag): Document.
15564 (linux_look_up_symbols): Add comment.
15565
15566 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15567
15568 * regcache.c (supply_register): Clear regcache if buf is NULL.
15569
15570 2010-02-02 Nicolas Roche <roche@sourceware.org>
15571 Joel Brobecker <brobecker@adacore.com>
15572
15573 * inferiors.c (find_inferior): Add function documentation.
15574 (unloaded_dll): Handle the case where the unloaded dll has not
15575 been previously registered in the dll list.
15576
15577 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15578
15579 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15580 (thumb2_breakpoint): New.
15581 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15582
15583 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15584
15585 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15586 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15587 breakpoints.
15588
15589 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15590
15591 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15592
15593 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15594
15595 * linux-s390-low.c (s390_collect_ptrace_register)
15596 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15597
15598 2010-01-21 Doug Evans <dje@google.com>
15599
15600 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15601 (PTRACE_ARG4_TYPE): New macro.
15602 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15603 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15604 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15605 (usr_store_inferior_registers): Ditto.
15606 (linux_read_memory, linux_write_memory): Ditto.
15607 (linux_test_for_tracefork): Ditto.
15608
15609 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15610 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15611
15612 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15613
15614 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15615 target.
15616
15617 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15618
15619 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15620 prototype to take a regcache. Adjust.
15621
15622 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15623
15624 * regcache.h (struct thread_info): Forward declare.
15625 (struct regcache): New.
15626 (new_register_cache): Adjust prototype.
15627 (get_thread_regcache): Declare.
15628 (free_register_cache): Adjust prototype.
15629 (registers_to_string, registers_from_string): Ditto.
15630 (supply_register, supply_register_by_name, collect_register)
15631 (collect_register_as_string, collect_register_by_name): Ditto.
15632 * regcache.c (struct inferior_regcache_data): Delete.
15633 (get_regcache): Rename to ...
15634 (get_thread_regcache): ... this. Adjust. Switch inferior before
15635 fetching registers.
15636 (regcache_invalidate_one): Adjust.
15637 (regcache_invalidate): Fix prototype.
15638 (new_register_cache): Return the new register cache.
15639 (free_register_cache): Change prototype.
15640 (realloc_register_cache): Adjust.
15641 (registers_to_string): Change prototype to take a regcache. Adjust.
15642 (registers_from_string): Ditto.
15643 (register_data): Ditto.
15644 (supply_register): Ditto.
15645 (supply_register_by_name): Ditto.
15646 (collect_register): Ditto.
15647 (collect_register_as_string): Ditto.
15648 (collect_register_by_name): Ditto.
15649 * server.c (process_serial_event): Adjust.
15650 * linux-low.h (regset_fill_func, regset_store_func): Change
15651 prototype.
15652 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15653 Change prototype.
15654 * linux-low.c (get_stop_pc): Adjust.
15655 (check_removed_breakpoint): Adjust.
15656 (linux_wait_for_event): Adjust.
15657 (linux_resume_one_lwp): Adjust.
15658 (fetch_register): Add regcache parameter. Adjust.
15659 (usr_store_inferior_registers): Ditto.
15660 (regsets_fetch_inferior_registers): Ditto.
15661 (regsets_store_inferior_registers): Ditto.
15662 (linux_fetch_registers, linux_store_registers): Ditto.
15663 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15664 regcache. Adjust.
15665 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15666 Ditto.
15667 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15668 prototype to take a regcache.
15669 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15670 * remote-utils.c (convert_ascii_to_int, outreg)
15671 (prepare_resume_reply): Change prototype to take a regcache.
15672 Adjust.
15673 * target.h (struct target_ops) <fetch_registers, store_registers>:
15674 Change prototype to take a regcache.
15675 (fetch_inferior_registers, store_inferior_registers): Change
15676 prototype to take a regcache. Adjust.
15677 * proc-service.c (ps_lgetregs): Adjust.
15678 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15679 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15680 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15681 take a regcache. Adjust.
15682 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15683 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15684 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15685 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15686 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15687 (cris_cannot_fetch_register):
15688 (cris_breakpoint_at): Change prototype to take a regcache.
15689 Adjust.
15690 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15691 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15692 to take a regcache. Adjust.
15693 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15694 Adjust.
15695 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15696 take a regcache. Adjust.
15697 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15698 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15699 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15700 * linux-mips-low.c (mips_get_pc):
15701 (mips_set_pc): Change prototype to take a regcache. Adjust.
15702 (mips_reinsert_addr): Adjust.
15703 (mips_collect_register): Change prototype to take a regcache.
15704 Adjust.
15705 (mips_supply_register):
15706 (mips_collect_register_32bit, mips_supply_register_32bit)
15707 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15708 (mips_store_fpregset): Ditto.
15709 * linux-ppc-low.c (ppc_supply_ptrace_register)
15710 (ppc_supply_ptrace_register): Ditto.
15711 (parse_spufs_run): Adjust.
15712 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15713 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15714 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15715 take a regcache. Adjust.
15716 * linux-s390-low.c (s390_collect_ptrace_register)
15717 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15718 (s390_set_pc): Change prototype to take a regcache. Adjust.
15719 (s390_arch_setup): Adjust.
15720 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15721 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15722 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15723 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15724 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15725 regcache. Adjust.
15726 (sparc_breakpoint_at): Adjust.
15727 * linux-xtensa-low.c (xtensa_fill_gregset):
15728 (xtensa_store_gregset):
15729 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15730 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15731 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15732 prototype to take a regcache. Adjust.
15733 * win32-arm-low.c (arm_fetch_inferior_register)
15734 (arm_store_inferior_register): Change prototype to take a
15735 regcache. Adjust.
15736 * win32-i386-low.c (i386_fetch_inferior_register)
15737 (i386_store_inferior_register): Change prototype to take a
15738 regcache. Adjust.
15739 * win32-low.c (child_fetch_inferior_registers)
15740 (child_store_inferior_registers): Change prototype to take a
15741 regcache. Adjust.
15742 (win32_wait): Adjust.
15743 (win32_fetch_inferior_registers): Change prototype to take a
15744 regcache. Adjust.
15745 (win32_store_inferior_registers): Adjust.
15746 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15747 store_inferior_register>: Change prototype to take a regcache.
15748
15749 2010-01-20 Doug Evans <dje@google.com>
15750
15751 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15752 #ifdef.
15753 (linux_wait_for_event1, linux_init_signals): Ditto.
15754 (W_STOPCODE): Provide definition if missing.
15755
15756 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15757
15758 * linux-low.c (linux_core_of_thread): New.
15759 (compare_ints, show_process, list_threads): New.
15760 (linux_qxfer_osdata): Report threads and cores.
15761 (linux_target_op): Register linux_core_of_thread.
15762 * remote-utils.c (prepare_resume_reply): Report the core.
15763 (buffer_xml_printf): Support %d specifier.
15764 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15765 New.
15766 (handle_query): Handle qXfer:threads. Announce availability
15767 thereof.
15768 * target.h (struct target_ops): New field core_of_thread.
15769
15770 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15771
15772 * Makefile.in (clean): Remove new generated files.
15773 (reg-s390.o, reg-s390.c): Remove rules.
15774 (reg-s390x.o, reg-s390x.c): Likewise.
15775 (s390-linux32.o, s390-linux32.c): Add rules.
15776 (s390-linux64.o, s390-linux64.c): Likewise.
15777 (s390x-linux64.o, s390x-linux64.c): Likewise.
15778 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15779 * linux-s390-low.c: Include <elf.h>.
15780 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15781 (init_registers_s390): Remove prototype.
15782 (init_registers_s390x): Likewise.
15783 (init_registers_s390_linux32): Add prototype.
15784 (init_registers_s390_linux64): Likewise.
15785 (init_registers_s390x_linux64): Likewise.
15786 (s390_num_regs_3264): New define.
15787 (s390_regmap_3264): New global variable.
15788 (s390_cannot_fetch_register): Remove obsolete check.
15789 (s390_cannot_store_register): Likewise.
15790 (s390_collect_ptrace_register): Handle upper/lower register halves.
15791 (s390_supply_ptrace_register): Likewise.
15792 (s390_fill_gregset): Update to register number changes.
15793 (s390_get_hwcap): New routine.
15794 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15795 Install appropriate regmap and register set.
15796
15797 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15798
15799 * server.c (gdbserver_version): Update copyright year to 2010.
15800 * gdbreplay.c (gdbreplay_version): Likewise.
15801
15802 2009-12-28 Doug Evans <dje@google.com>
15803
15804 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15805 elf/external.h. Include <elf.h> instead but only if necessary.
15806
15807 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15808
15809 * linux-low.c (linux_remove_process): Remove `detaching'
15810 parameter. Don't release/detach from thread_db here.
15811 (linux_kill): Release/detach from thread_db here, ...
15812 (linux_detach): ... and here, before actually detaching.
15813 (linux_wait_1): ... and here, when a process exits.
15814 * thread-db.c (any_thread_of): New.
15815 (thread_db_free): Switch the current inferior to a thread of the
15816 passed in process.
15817
15818 2009-12-21 Doug Evans <dje@google.com>
15819
15820 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15821
15822 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15823 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15824 warning ifndef __NR_tkill. Move setting of errno there too.
15825 Delete unnecessary resetting of errno after syscall.
15826 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15827
15828 * configure.ac: Check for dladdr.
15829 * config.in: Regenerate.
15830 * configure: Regenerate.
15831 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15832 (try_thread_db_load): Update.
15833
15834 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15835
15836 2009-12-18 Doug Evans <dje@google.com>
15837
15838 * event-loop.c: Include unistd.h if it exists.
15839
15840 * linux-low.c (my_waitpid): Move definition away from being in
15841 between linux_tracefork_child/linux_test_for_tracefork.
15842
15843 * gdb_proc_service.h (psaddr_t): Fix type.
15844 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15845 signature to match glibc.
15846
15847 2009-12-16 Doug Evans <dje@google.com>
15848
15849 * linux-low.c (linux_read_memory): Fix argument to read.
15850
15851 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15852
15853 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15854 events, don't leave current_inferior pointing at null.
15855
15856 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15857
15858 * win32-low.c (LOG): Delete.
15859 (OUTMSG): Output to stderr.
15860 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15861 on compile time LOG macro.
15862 (win32_wait): Fix debug output.
15863
15864 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15865
15866 * win32-low.c (win32_add_one_solib): If the dll name is
15867 "ntdll.dll", prepend the system directory to the dll path.
15868
15869 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15872
15873 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15874 Vladimir Prus <vladimir@codesourcery.com>
15875
15876 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15877 * configure.ac: Check for __mcoldfire__ and set
15878 gdb_cv_m68k_is_coldfire.
15879 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15880 reg-cf.o and reg-m68k.o.
15881 * configure: Regenerated.
15882
15883 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15884
15885 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15886 Pass it to thread_db_free.
15887 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15888 proper `detaching' argument to linux_remove_process.
15889 * linux-low.h (thread_db_free): Add `detaching' parameter.
15890 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15891 to thread_db_free.
15892 (thread_db_free): Add `detaching' parameter. Only
15893 call td_ta_clear_event if detaching from process.
15894
15895 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15896
15897 * thread-db.c (thread_db_free): Fix typo.
15898
15899 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15900
15901 PR gdb/10838
15902 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15903
15904 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15905
15906 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15907 with an i686 compiler.
15908 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15909 needed.
15910 * configure: Rebuilt.
15911
15912 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15913
15914 PR gdb/10783
15915
15916 * server.c (handle_search_memory_1): Correct read_addr initialization
15917 in loop for searching subsequent chunks.
15918
15919 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15920
15921 * configure.ac: New --with-libthread-db option.
15922 * thread-db.c: Allow direct dependence on libthread_db.
15923 (thread_db_free): Adjust.
15924 * config.in: Regenerate.
15925 * configure: Likewise.
15926
15927 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15928
15929 PR gdb/10757
15930 * thread-db.c (attach_thread): New function.
15931 (maybe_attach_thread): Return success/failure.
15932 (find_new_threads_callback): Adjust.
15933 (thread_db_find_new_threads): Loop until no new threads.
15934
15935 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15936
15937 * proc-service.c (ps_lgetregs): Formatting.
15938
15939 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15940
15941 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15942 * configure.ac: Adjust.
15943 * linux-low.h (struct process_info_private): Move members to struct
15944 thread_db.
15945 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15946 * linux-low.c (linux_remove_process): Adjust.
15947 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15948 * server.c (handle_query): Move code ...
15949 (handle_monitor_command): ... here. New function.
15950 * target.h (struct target_ops): New member.
15951 * thread-db.c (struct thread_db): New.
15952 (libthread_db_search_path): New variable.
15953 (thread_db_create_event, thread_db_enable_reporting)
15954 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15955 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15956 (try_thread_db_load_1, dladdr_to_soname): New functions.
15957 (try_thread_db_load, thread_db_load_search): New functions.
15958 (thread_db_init): Search for libthread_db.
15959 (thread_db_free): New function.
15960 (thread_db_handle_monitor_command): Likewise.
15961 * config.in: Regenerate.
15962 * configure: Regenerate.
15963
15964 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15965
15966 * spu-low.c (spu_kill): Wait for inferior to terminate.
15967 Call clear_inferiors.
15968 (spu_detach): Call clear_inferiors.
15969
15970 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15971
15972 * aclocal.m4: Regenerate.
15973 * config.in: Likewise.
15974 * configure: Likewise.
15975
15976 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15977
15978 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15979 (parse_spufs_run): New function.
15980 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15981 (ppc_breakpoint_at): Handle SPU breakpoints.
15982
15983 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15984
15985 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15986 (SPUFS_MAGIC): Define.
15987 (spu_enumerate_spu_ids): New function.
15988 (linux_qxfer_spu): New function.
15989 (linux_target_ops): Install linux_qxfer_spu.
15990
15991 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15992
15993 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15994 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15995 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15996 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15997 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15998 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15999 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16000 (init_registers_powerpc_cell32l): Add prototype.
16001 (init_registers_powerpc_cell64l): Likewise.
16002 (ppc_arch_setup): Detect Cell/B.E. architecture.
16003
16004 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16005
16006 * Makefile.in (datarootdir): New variable.
16007
16008 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16009
16010 * linux-low.c (linux_write_memory): Update debugging output.
16011 * Makefile.in (clean): Add new descriptions.
16012 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16013 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16014 * configure.srv: Add new files for arm*-*-linux*.
16015 * linux-arm-low.c: Add new declarations.
16016 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16017 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16018 (HWCAP_VFPv3D16): New.
16019 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16020 instead of __IWMMXT__.
16021 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16022 (arm_arch_setup): New.
16023 (target_regsets): Remove #ifdef. Add VFP regset.
16024 (the_low_target): Use arm_arch_setup.
16025
16026 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16029 the main thread again.
16030
16031 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16032
16033 Adding Neutrino gdbserver.
16034 * configure: Regenerated.
16035 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16036 * configure.srv (i[34567]86-*-nto*): New target.
16037 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16038 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16039 (nto_comctrl) [__QNX__]: New function.
16040 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16041
16042 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16043
16044 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16045 srv_tgtobj.
16046
16047 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16048 Pedro Alves <pedro@codesourcery.com>
16049
16050 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16051 don't support CONTEXT_EXTENDED_REGISTERS.
16052 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16053 (the_low_target): Install them.
16054 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16055 failing with ERROR_PIPE_NOT_CONNECTED.
16056
16057 2009-06-30 Doug Evans <dje@google.com>
16058 Pierre Muller <muller@ics.u-strasbg.fr>
16059
16060 Add h/w watchpoint support to x86-linux, win32-i386.
16061 * Makefile.in (SFILES): Add i386-low.c
16062 (i386_low_h): Define.
16063 (i386-low.o): Add dependencies.
16064 (linux-x86-low.o): Add i386-low.h dependency.
16065 (win32-i386-low.o): Ditto.
16066 * i386-low.c: New file.
16067 * i386-low.h: New file.
16068 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16069 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16070 * linux-low.c (linux_add_process): Initialize arch_private.
16071 (linux_remove_process): Free arch_private.
16072 (add_lwp): Initialize arch_private.
16073 (delete_lwp): Free arch_private.
16074 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16075 provided.
16076 * linux-low.h (process_info_private): New member arch_private.
16077 (lwp_info): New member arch_private.
16078 (linux_target_ops): New members new_process, new_thread,
16079 prepare_to_resume.
16080 (ptid_of): New macro.
16081 * linux-x86-low.c: Include stddef.h, i386-low.h.
16082 (arch_process_info): New struct.
16083 (arch_lwp_info): New struct.
16084 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16085 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16086 (i386_dr_low_get_status): New function.
16087 (x86_insert_point, x86_remove_point): New functions.
16088 (x86_stopped_by_watchpoint): New function.
16089 (x86_stopped_data_address): New function.
16090 (x86_linux_new_process, x86_linux_new_thread): New functions.
16091 (x86_linux_prepare_to_resume): New function.
16092 (the_low_target): Add entries for insert_point, remove_point,
16093 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16094 prepare_to_resume.
16095 * server.c (debug_hw_points): New global.
16096 (monitor_show_help): Document set debug-hw-points.
16097 (handle_query): Process "set debug-hw-points".
16098 * server.h (debug_hw_points): Declare.
16099 (paddress): Declare.
16100 * utils.c (NUMCELLS, CELLSIZE): New macros.
16101 (get_sell, xsnprintf, paddress): New functions.
16102 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16103 remove_point, stopped_by_watchpoint, stopped_data_address.
16104 * win32-i386-low.c: Include i386-low.h.
16105 (debug_reg_state): Replaces dr.
16106 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16107 (i386_dr_low_get_status): New function.
16108 (i386_insert_point, i386_remove_point): New functions.
16109 (i386_stopped_by_watchpoint): New function.
16110 (i386_stopped_data_address): New function.
16111 (i386_initial_stuff): Update.
16112 (get_thread_context,set_thread_context,i386_thread_added): Update.
16113 (the_low_target): Add entries for insert_point,
16114 remove_point, stopped_by_watchpoint, stopped_data_address.
16115 * win32-low.c (win32_insert_watchpoint): New function.
16116 (win32_remove_watchpoint): New function.
16117 (win32_stopped_by_watchpoint): New function.
16118 (win32_stopped_data_address): New function.
16119 (win32_target_ops): Add entries for insert_watchpoint,
16120 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16121 * win32-low.h (win32_target_ops): New members insert_point,
16122 remove_point, stopped_by_watchpoint, stopped_data_address.
16123
16124 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16125
16126 * server.c (process_serial_event): Re-return unsupported, not
16127 error, if the type isn't recognized. Re-allow supporting only
16128 insert or remove packets. Also call require_running for
16129 breakpoints. Add missing break statement to default case. Tidy.
16130 * target.h (struct target_ops): Rename insert_watchpoint to
16131 insert_point, and remove_watchpoint to remove_point.
16132
16133 * linux-low.h (struct linux_target_ops): Likewise.
16134 * linux-low.c (linux_insert_watchpoint): Rename to ...
16135 (linux_insert_point): ... this. Adjust.
16136 (linux_remove_watchpoint): Rename to ...
16137 (linux_remove_point): ... this. Adjust.
16138 (linux_target_ops): Adjust.
16139 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16140 (cris_insert_point): ... this.
16141 (cris_remove_watchpoint): Rename to ...
16142 (cris_remove_point): ... this.
16143 (the_low_target): Adjust.
16144
16145 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16146
16147 * server.c (handle_v_kill): Pass signal_pid to
16148 kill_inferior if multi_process is zero.
16149
16150 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16151
16152 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16153 * target.h (target_ops): Comment for *_watchpoint to make it clear
16154 the functions can get types '0' and '1'.
16155
16156 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16157
16158 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16159 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16160 * regcache.c (get_regcache): Likewise.
16161 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16162 * win32-low.c (child_fetch_inferior_registers): Remove check for
16163 regno 0.
16164
16165 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16166 Pedro Alves <pedro@codesourcery.com>
16167
16168 * target.h (struct target_ops) <supports_multi_process>: New
16169 callback.
16170 (target_supports_multi_process): New.
16171 * server.c (handle_query): Even if GDB reports support, only
16172 enable multi-process if the target also supports it. Report
16173 multi-process support only if the target backend supports it.
16174 * linux-low.c (linux_supports_multi_process): New function.
16175 (linux_target_ops): Install it as target_supports_multi_process
16176 callback.
16177
16178 2009-05-24 Doug Evans <dje@google.com>
16179
16180 Global renaming of find_thread_pid to find_thread_ptid.
16181 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16182 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16183 All callers updated.
16184
16185 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16186 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16187 directly.
16188
16189 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16190 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16191 (linux_resume_one_lwp): Ditto.
16192
16193 2009-05-23 Doug Evans <dje@google.com>
16194
16195 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16196 from struct inferior_list_entry * to struct lwp_info *.
16197 All callers updated.
16198
16199 2009-05-13 Doug Evans <dje@google.com>
16200
16201 * linux-x86-low.c: Don't include assert.h.
16202 (x86_siginfo_fixup): Use fatal, not assert.
16203 (x86_arch_setup): Fix comment.
16204
16205 2009-05-12 Doug Evans <dje@google.com>
16206
16207 Biarch support for i386/amd64 gdbserver.
16208 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16209 Add linux-x86-low.c.
16210 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16211 (linux-x86-low.o): Add.
16212 * linux-x86-64-low.c: Delete.
16213 * linux-i386-low.c: Delete.
16214 * linux-x86-low.c: New file.
16215 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16216 linux-x86-low.o.
16217 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16218 linux-x86-low.o.
16219 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16220 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16221 (linux_child_pid_to_exec_file): New function.
16222 (elf_64_header_p, elf_64_file_p): New functions.
16223 (siginfo_fixup): New function.
16224 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16225 give target a chance to convert layout.
16226 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16227 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16228
16229 2009-05-07 Doug Evans <dje@google.com>
16230
16231 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16232 (regsets_store_inferior_registers): Ditto.
16233
16234 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16235
16236 PR server/10048
16237
16238 * linux-low.c (must_set_ptrace_flags): Delete.
16239 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16240 of the global.
16241 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16242 `lwp->must_set_ptrace_flags' instead.
16243 (linux_wait_for_event_1): Set ptrace options here.
16244 (linux_wait_1): ... not here.
16245
16246 2009-04-30 Doug Evans <dje@google.com>
16247
16248 * inferiors.c (started_inferior_callback): New function.
16249 (attached_inferior_callback): New function.
16250 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16251 * server.c (print_started_pid, print_attached_pid): New functions.
16252 (detach_or_kill_for_exit): New function.
16253 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16254 * server.h (have_started_inferiors_p): Declare.
16255 (have_attached_inferiors_p): Declare.
16256
16257 * inferiors.c (remove_process): Fix memory leak, free process.
16258 * linux-low.c (linux_remove_process): New function.
16259 (linux_kill): Call it instead of remove_process.
16260 (linux_detach, linux_wait_1): Ditto.
16261
16262 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16263
16264 * configure.srv: Add x86 Windows CE target.
16265
16266 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16267
16268 * inferiors.c (get_thread_process): Make global.
16269 * server.h (get_thread_process): Add prototype.
16270 * thread-db.c (find_one_thread): Use get_thread_process
16271 instead of current_process.
16272 (thread_db_get_tls_address): Do not crash if called when
16273 thread layer is not yet initialized.
16274
16275 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16276
16277 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16278 * spu-low.c (current_tid): Rename to ...
16279 (current_ptid): ... this.
16280 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16281 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16282 ptid_get_lwp (current_ptid) instead of current_tid.
16283 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16284 instead of current_tid. Use find_process_pid to verify pid
16285 argument is valid. Pass proper argument to remove_process.
16286 (spu_thread_alive): Compare current_ptid instead of current_tid.
16287 (spu_resume): Likewise.
16288
16289 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16290
16291 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16292 variable.
16293
16294 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16295
16296 Implement the multiprocess extensions, and add linux multiprocess
16297 support.
16298
16299 * server.h (ULONGEST): Declare.
16300 (struct ptid, ptid_t): New.
16301 (minus_one_ptid, null_ptid): Declare.
16302 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16303 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16304 (struct inferior_list_entry): Change `id' type from unsigned from
16305 to ptid_t.
16306 (struct sym_cache, struct breakpoint, struct
16307 process_info_private): Forward declare.
16308 (struct process_info): Declare.
16309 (current_process): Declare.
16310 (all_processes): Declare.
16311 (initialize_inferiors): Declare.
16312 (add_thread): Adjust to use ptid_t.
16313 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16314 (add_process, remove_process, find_thread_pid): Declare.
16315 (find_inferior_id): Adjust to use ptid_t.
16316 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16317 (multi_process): Declare.
16318 (push_event): Adjust to use ptid_t.
16319 (read_ptid, write_ptid): Declare.
16320 (prepare_resume_reply): Adjust to use ptid_t.
16321 (clear_symbol_cache): Declare.
16322 * inferiors.c (all_processes): New.
16323 (null_ptid, minus_one_ptid): New.
16324 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16325 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16326 (add_thread): Change unsigned long to ptid. Remove gdb_id
16327 parameter. Adjust.
16328 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16329 (gdb_id_to_thread): Rename to ...
16330 (find_thread_pid): ... this. Change unsigned long to ptid.
16331 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16332 (loaded_dll, pull_pid_from_list): Adjust.
16333 (add_process, remove_process, find_process_pid)
16334 (get_thread_process, current_process, initialize_inferiors): New.
16335 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16336 (struct target_waitstatus) <related_pid>: Ditto.
16337 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16338 return type to int.
16339 (struct target_ops) <join>: Add `pid' argument.
16340 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16341 (struct target_ops) <wait>: Add `ptid' field. Change return type
16342 to ptid.
16343 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16344 (mywait): Add `ptid' argument. Change return type to ptid_t.
16345 (target_pid_to_str): Declare.
16346 * target.c (set_desired_inferior): Adjust to use ptids.
16347 (mywait): Add new `ptid' argument. Adjust.
16348 (target_pid_to_str): New.
16349 * mem-break.h (free_all_breakpoints): Declare.
16350 * mem-break.c (breakpoints): Delelete.
16351 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16352 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16353 to use per-process breakpoint list.
16354 (free_all_breakpoints): New.
16355 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16356 (symbol_cache, all_symbols_looked_up): Delete.
16357 (hexchars): New.
16358 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16359 read_ptid): New.
16360 (prepare_resume_reply): Change ptid argument's type from unsigned
16361 long to ptid_t. Adjust. Implement W;process and X;process.
16362 (free_sym_cache, clear_symbol_cache): New.
16363 (look_up_one_symbol): Adjust to per-process symbol cache. *
16364 * server.c (cont_thread, general_thread, step_thread): Change type
16365 to ptid_t.
16366 (attached): Delete.
16367 (multi_process): New.
16368 (last_ptid): Change type to ptid_t.
16369 (struct vstop_notif) <ptid>: Change type to ptid_t.
16370 (queue_stop_reply, push_event): Change `ptid' argument's type to
16371 ptid_t.
16372 (discard_queued_stop_replies): Add `pid' argument.
16373 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16374 changes. Don't reference the `attached' global.
16375 (attach_inferior): Adjust to mywait interface changes.
16376 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16377 features. Handle and report "multiprocess+". Handle
16378 "qAttached:PID".
16379 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16380 changes.
16381 (handle_v_kill): New.
16382 (handle_v_stopped): Adjust to use target_pid_to_str.
16383 (handle_v_requests): Allow multiple attaches and runs when
16384 multiprocess extensions are in effect. Handle "vKill".
16385 (myresume): Adjust to use ptids.
16386 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16387 (handle_status): Adjust to discard_queued_stop_replies interface
16388 change.
16389 (first_thread_of, kill_inferior_callback)
16390 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16391 (main): Call initialize_inferiors. Adjust to use ptids, killing
16392 and detaching from all inferiors. Handle multiprocess packet
16393 variants.
16394 * linux-low.h: Include gdb_proc_service.h.
16395 (struct process_info_private): New.
16396 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16397 <lwpid_of>: Use ptid_get_lwp.
16398 (get_lwp_thread): Adjust.
16399 (struct lwp_info): Add `dead' member.
16400 (find_lwp_pid): Declare.
16401 * linux-low.c (thread_db_active): Delete.
16402 (new_inferior): Adjust comment.
16403 (inferior_pid): Delete.
16404 (linux_add_process): New.
16405 (handle_extended_wait): Adjust.
16406 (add_lwp): Change unsigned long to ptid.
16407 (linux_create_inferior): Add process to processes table. Adjust
16408 to use ptids. Don't set new_inferior here.
16409 (linux_attach_lwp): Rename to ...
16410 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16411 it. Adjust to use ptids.
16412 (linux_attach_lwp): New.
16413 (linux_attach): Add process to processes table. Don't set
16414 new_inferior here.
16415 (struct counter): New.
16416 (second_thread_of_pid_p, last_thread_of_process_p): New.
16417 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16418 multiple processes.
16419 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16420 processes. Remove process from process table.
16421 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16422 to multiple processes.
16423 (any_thread_of): New.
16424 (linux_detach): Add `pid' argument, and handle it. Remove process
16425 from processes table.
16426 (linux_join): Add `pid' argument. Handle it.
16427 (linux_thread_alive): Change unsighed long argument to ptid_t.
16428 Consider dead lwps as not being alive.
16429 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16430 threads we're not interested in.
16431 (same_lwp, find_lwp_pid): New.
16432 (linux_wait_for_lwp): Change `pid' argument's type from int to
16433 ptid_t. Adjust.
16434 (linux_wait_for_event): Rename to ...
16435 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16436 from int to ptid_t. Adjust.
16437 (linux_wait_for_event): New.
16438 (linux_wait_1): Add `ptid' argument. Change return type to
16439 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16440 that exit from the process table.
16441 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16442 Adjust.
16443 (mark_lwp_dead): New.
16444 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16445 stopping all threads, mark its main lwp as dead.
16446 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16447 ptids.
16448 (fetch_register, usr_store_inferior_registers)
16449 (regsets_fetch_inferior_registers)
16450 (regsets_store_inferior_registers, linux_read_memory)
16451 (linux_write_memory): Inline `inferior_pid'.
16452 (linux_look_up_symbols): Adjust to use per-process
16453 `thread_db_active'.
16454 (linux_request_interrupt): Adjust to use ptids.
16455 (linux_read_auxv): Inline `inferior_pid'.
16456 (initialize_low): Don't reference thread_db_active.
16457 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16458 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16459 (ps_getpid): Return the pid of the current inferior.
16460 * thread-db.c (proc_handle, thread_agent): Delete.
16461 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16462 per-process data.
16463 (find_one_thread): Change argument type to ptid_t. Adjust to
16464 per-process data.
16465 (maybe_attach_thread): Adjust to per-process data and ptids.
16466 (thread_db_find_new_threads): Ditto.
16467 (thread_db_init): Ditto.
16468 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16469 processes table. Adjust to use ptids.
16470 (spu_kill, spu_detach): Adjust interface. Remove process from
16471 processes table.
16472 (spu_join, spu_thread_alive): Adjust interface.
16473 (spu_wait): Adjust interface. Remove process from processes
16474 table. Adjust to use ptids.
16475 * win32-low.c (current_inferior_tid): Delete.
16476 (current_inferior_ptid): New.
16477 (debug_event_ptid): New.
16478 (thread_rec): Take a ptid. Adjust.
16479 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16480 (child_delete_thread): Ditto.
16481 (do_initial_child_stuff): Add `attached' argument. Add process to
16482 processes table.
16483 (child_fetch_inferior_registers, child_store_inferior_registers):
16484 Adjust.
16485 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16486 (win32_attach): Pass 1 to do_initial_child_stuff.
16487 (win32_kill): Adjust interface. Remove process from processes
16488 table.
16489 (win32_detach): Ditto.
16490 (win32_join): Adjust interface.
16491 (win32_thread_alive): Take a ptid.
16492 (win32_resume): Adjust to use ptids.
16493 (get_child_debug_event): Ditto.
16494 (win32_wait): Adjust interface. Remove exiting process from
16495 processes table.
16496
16497 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16498
16499 Non-stop mode support.
16500
16501 * server.h (non_stop): Declare.
16502 (gdb_client_data, handler_func): Declare.
16503 (delete_file_handler, add_file_handler, start_event_loop):
16504 Declare.
16505 (handle_serial_event, handle_target_event, push_event)
16506 (putpkt_notif): Declare.
16507 * target.h (enum resume_kind): New.
16508 (struct thread_resume): Replace `step' field by `kind' field.
16509 (TARGET_WNOHANG): Define.
16510 (struct target_ops) <wait>: Add `options' argument.
16511 <supports_non_stop, async, start_non_stop>: New fields.
16512 (target_supports_non_stop, target_async): New.
16513 (start_non_stop): Declare.
16514 (mywait): Add `options' argument.
16515 * target.c (mywait): Add `options' argument. Print child exit
16516 notifications here.
16517 (start_non_stop): New.
16518 * server.c (non_stop, own_buf, mem_buf): New globals.
16519 (struct vstop_notif): New.
16520 (notif_queue): New global.
16521 (queue_stop_reply, push_event, discard_queued_stop_replies)
16522 (send_next_stop_reply): New.
16523 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16524 interface changes.
16525 (attach_inferior): In non-stop mode, don't wait for the target
16526 here.
16527 (handle_general_set): Handle QNonStop.
16528 (handle_query): When handling qC, return the current general
16529 thread, instead of the first thread of the list.
16530 (handle_query): If the backend supports non-stop mode, include
16531 QNonStop+ in the qSupported query response.
16532 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16533 and non-stop mode.
16534 (handle_v_attach, handle_v_run): Handle non-stop mode.
16535 (handle_v_stopped): New.
16536 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16537 (myresume): Adjust to use resume_kind. Handle non-stop.
16538 (queue_stop_reply_callback): New.
16539 (handle_status): Handle non-stop mode.
16540 (main): Clear non_stop flag on reconnection. Use the event-loop.
16541 Refactor serial protocol handling from here ...
16542 (process_serial_event): ... to this new function. When GDB
16543 selects any thread, select one here. In non-stop mode, wait until
16544 GDB acks all pending events before exiting.
16545 (handle_serial_event, handle_target_event): New.
16546 * remote-utils.c (remote_open): Install remote_desc in the event
16547 loop.
16548 (remote_close): Remove remote_desc from the event loop.
16549 (putpkt_binary): Rename to...
16550 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16551 (putpkt_binary): New as wrapper around putpkt_binary_1.
16552 (putpkt_notif): New.
16553 (prepare_resume_reply): In non-stop mode, don't change the
16554 general_thread.
16555 * event-loop.c: New.
16556 * Makefile.in (OBJ): Add event-loop.o.
16557 (event-loop.o): New rule.
16558
16559 * linux-low.h (pid_of): Moved here.
16560 (lwpid_of): New.
16561 (get_lwp_thread): Use lwpid_of.
16562 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16563 * linux-low.c (pid_of): Delete.
16564 (inferior_pid): Use lwpid_of.
16565 (linux_event_pipe): New.
16566 (target_is_async_p): New.
16567 (delete_lwp): New.
16568 (handle_extended_wait): Use lwpid_of.
16569 (add_lwp): Don't set lwpid field.
16570 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16571 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16572 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16573 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16574 first. Adjust to linux_wait_for_event interface changes. Use
16575 lwpid_of.
16576 (linux_detach): Don't delete the main lwp here.
16577 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16578 (status_pending_p): Don't consider explicitly suspended lwps.
16579 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16580 pointer. Add OPTIONS argument. Change return type to int. Use
16581 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16582 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16583 pointer. Add status pointer argument. Return a pid instead of a
16584 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16585 changes. In non-stop mode, don't switch to a random thread.
16586 (linux_wait): Rename to...
16587 (linux_wait_1): ... this. Add target_options argument, and handle
16588 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16589 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16590 clean exit and signal exit code. Don't stop all threads in
16591 non-stop mode. In all-stop mode, only stop all threads when
16592 reporting a stop to GDB. Handle explicit thread stop requests.
16593 (async_file_flush, async_file_mark): New.
16594 (linux_wait): New.
16595 (send_sigstop): Use lwpid_of.
16596 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16597 interface changes. In non-stop mode, don't switch to a random
16598 thread.
16599 (linux_resume_one_lwp): Use lwpid_of.
16600 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16601 (linux_resume_one_thread): ... this. Handle resume_stop. In
16602 non-stop mode, don't look for pending flag in all threads.
16603 (resume_status_pending_p): Don't consider explicitly suspended
16604 threads.
16605 (my_waitpid): Reimplement. Emulate __WALL.
16606 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16607 Use lwpid_of.
16608 (sigchld_handler, linux_supports_non_stop, linux_async)
16609 (linux_start_non_stop): New.
16610 (linux_target_ops): Register linux_supports_non_stop, linux_async
16611 and linux_start_non_stop.
16612 (initialize_low): Install SIGCHLD handler.
16613 * thread-db.c (thread_db_create_event, find_one_thread)
16614 (thread_db_get_tls_address): Use lwpid_of.
16615 * win32-low.c (win32_detach): Adjust to use resume_kind.
16616 (win32_wait): Add `options' argument.
16617 * spu-low.c (spu_resume): Adjust to use resume_kind.
16618 (spu_wait): Add `options' argument.
16619
16620 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16621
16622 Decouple target code from remote protocol.
16623
16624 * target.h (enum target_waitkind): New.
16625 (struct target_waitstatus): New.
16626 (struct target_ops) <wait>: Return an unsigned long. Take a
16627 target_waitstatus pointer instead of a char pointer.
16628 (mywait): Likewise.
16629 * target.c (mywait): Change prototype to return an unsigned long.
16630 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16631 * server.h (thread_from_wait, old_thread_from_wait): Delete
16632 declarations.
16633 (prepare_resume_reply): Change prototype to take a
16634 target_waitstatus.
16635 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16636 (last_status, last_ptid): New.
16637 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16638 pid instead of a signal.
16639 (attach_inferior): Remove "status" and "signal" parameters.
16640 Adjust.
16641 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16642 not as an address.
16643 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16644 (handle_v_requests, myresume): Remove "status" and "signal"
16645 parameters. Adjust.
16646 (handle_status): New.
16647 (main): Delete local `status'. Adjust.
16648 * remote-utils.c: Include target.h.
16649 (prepare_resume_reply): Change prototype to take a
16650 target_waitstatus. Adjust.
16651
16652 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16653 interface.
16654 * spu-low.c (spu_wait): Adjust.
16655 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16656 Delete.
16657 (win32_wait): Adjust.
16658
16659 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16660
16661 * target.h (struct thread_resume): Delete leave_stopped member.
16662 (struct target_ops): Add a `n' argument to the `resume' callback.
16663 * server.c (start_inferior): Adjust.
16664 (handle_v_cont, myresume): Adjust.
16665 * linux-low.c (check_removed_breakpoint): Adjust to resume
16666 interface change, and to removed leave_stopped field.
16667 (resume_ptr): Delete.
16668 (struct thread_resume_array): New.
16669 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16670 resume interface change.
16671 (linux_continue_one_thread, linux_queue_one_thread)
16672 (resume_status_pending_p): Check if the resume field is NULL
16673 instead of checking the leave_stopped member.
16674 (linux_resume): Adjust to the target resume interface change.
16675 * spu-low.c (spu_resume): Adjust to the target resume interface
16676 change.
16677 * win32-low.c (win32_detach, win32_resume): Ditto.
16678
16679 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16680
16681 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16682 flag.
16683 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16684 pending.
16685 (linux_continue_one_thread): Only preserve the stepping flag if
16686 there's a pending breakpoint.
16687
16688 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16689
16690 * server.c (main): After the inferior having exited, call
16691 remote_close before exiting gdbserver.
16692
16693 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16694
16695 Fix size of FPSCR in Power 7 processors.
16696 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16697 (PPC_FEATURE_HAS_DFP): New #define.
16698 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16699 size of the FPSCR.
16700
16701 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16702
16703 * server.c (handle_query) Whitespace and formatting.
16704
16705 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16706
16707 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16708 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16709 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16710 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16711 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16712 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16713 Makefile.in, configure.ac: Fix whitespace throughout.
16714 * configure: Regenerate.
16715
16716 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16717
16718 * inferiors.c (find_inferior): Make it safe for the callback
16719 function to delete the currently iterated inferior.
16720
16721 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16722
16723 * Makefile.in (linuw_low_h): Move higher.
16724 (thread-db.o): Depend on $(linux_low_h).
16725
16726 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16727
16728 Rename "process" to "lwp" throughout.
16729
16730 * linux-low.c (all_processes): Rename to...
16731 (all_lwps): ... this.
16732 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16733 (add_process): Rename to ...
16734 (add_lwp): ... this. Adjust.
16735 (linux_create_inferior): Adjust.
16736 (linux_attach_lwp): Adjust.
16737 (linux_attach): Adjust.
16738 (linux_kill_one_process): Rename to ...
16739 (linux_kill_one_lwp): ... this. Adjust.
16740 (linux_kill): Adjust.
16741 (linux_detach_one_process): Rename to ...
16742 (linux_detach_one_lwp): ... this. Adjust.
16743 (linux_detach): Adjust.
16744 (check_removed_breakpoint): Adjust.
16745 (status_pending_p): Adjust.
16746 (linux_wait_for_process): Rename to ...
16747 (linux_wait_for_lwp): ... this. Adjust.
16748 (linux_wait_for_event): Adjust.
16749 (send_sigstop): Adjust.
16750 (wait_for_sigstop): Adjust.
16751 (stop_all_processes): Rename to ...
16752 (stop_all_lwps): ... this.
16753 (linux_resume_one_process): Rename to ...
16754 (linux_resume_one_lwp): ... this. Adjust.
16755 (linux_set_resume_request, linux_continue_one_thread)
16756 (linux_queue_one_thread, resume_status_pending_p)
16757 (usr_store_inferior_registers, regsets_store_inferior_registers)
16758 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16759 Adjust.
16760 * linux-low.h (get_process): Rename to ...
16761 (get_lwp): ... this. Adjust.
16762 (get_thread_process): Rename to ...
16763 (get_thread_lwp): ... this. Adjust.
16764 (get_process_thread): Rename to ...
16765 (get_lwp_thread): ... this. Adjust.
16766 (struct process_info): Rename to ...
16767 (struct lwp_info): ... this.
16768 (all_processes): Rename to ...
16769 (all_lwps): ... this.
16770 * proc-service.c (ps_lgetregs): Adjust.
16771 * thread-db.c (thread_db_create_event, find_one_thread)
16772 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16773
16774 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16775
16776 * server.c (handle_query): Handle "qAttached".
16777
16778 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16779
16780 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16781 GPLv3, update license URL.
16782
16783 2009-03-01 Doug Evans <dje@google.com>
16784
16785 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16786 (server_h): Add gdb_signals.h.
16787 (signals.o): Update.
16788 * server.h (target_signal_from_host,target_signal_to_host_p)
16789 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16790
16791 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16792
16793 * remote-utils.c (getpkt): Also generate remote-debug
16794 information if noack_mode is set.
16795
16796 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16797
16798 * server.c (handle_query): Report qXfer:siginfo:read and
16799 qXfer:siginfo:write as supported and handle them.
16800 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16801 * linux-low.c (linux_xfer_siginfo): New.
16802 (linux_target_ops): Set it.
16803
16804 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16805
16806 * server.c (gdbserver_usage): Mention --remote-debug.
16807 (main): Accept '--remote-debug' switch.
16808
16809 2009-01-18 Doug Evans <dje@google.com>
16810
16811 * regcache.c (new_register_cache): No need to check result of xcalloc.
16812 * server.c (handle_search_memory): Back out calls to xmalloc,
16813 result is checked and error is returned to user upon failure.
16814 (handle_query): Ditto. Add more checks for result of malloc.
16815 (handle_v_cont): Check result of malloc, report error back to
16816 user upon failure.
16817 (handle_v_run): Ditto. Call freeargv.
16818 * server.h (freeargv): Declare.
16819 * utils.c (freeargv): New fn.
16820
16821 2009-01-15 Doug Evans <dje@google.com>
16822
16823 * gdbreplay.c (perror_with_name): Make arg const char *.
16824 * server.h (target_signal_to_name): Make return type const char *.
16825 * thread-db.c (thread_db_err_str): Make return type const char *.
16826 * utils.c (perror_with_name): Make arg const char *.
16827
16828 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16829
16830 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16831 when handling a EXIT_PROCESS_DEBUG_EVENT.
16832
16833 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16834
16835 * gdbreplay.c (gdbreplay_version): Update copyright year.
16836 * server.c (gdbserver_version): Likewise.
16837
16838 2009-01-05 Doug Evans <dje@google.com>
16839
16840 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16841 (handle_extended_wait): Improve comment.
16842
16843 2008-12-13 Doug Evans <dje@google.com>
16844
16845 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16846 * server.h (ATTR_MALLOC): New macro.
16847 (xmalloc,xcalloc,xstrdup): Declare.
16848 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16849 * inferiors.c: Ditto.
16850 * linux-low.c: Ditto.
16851 * mem-break.c: Ditto.
16852 * regcache.c: Ditto.
16853 * remote-utils.c: Ditto.
16854 * server.c: Ditto.
16855 * target.c: Ditto.
16856 * win32-low.c: Ditto.
16857
16858 2008-12-12 Doug Evans <dje@google.com>
16859
16860 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16861 in debugging printf.
16862
16863 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16864
16865 2008-12-09 Doug Evans <dje@google.com>
16866
16867 * linux-low.h (struct process_info): Delete member tid, unused.
16868 * thread-db.c (find_one_thread): Update.
16869 (maybe_attach_thread): Update.
16870
16871 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16872
16873 * target.h (struct target_ops): Add qxfer_osdata member.
16874 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16875 and dirent.h.
16876 (linux_qxfer_osdata): New functions.
16877 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16878 callback.
16879 * server.c (handle_query): Handle "qXfer:osdata:read:".
16880 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16881 (buffer_xml_printf): New functions.
16882 * server.h (struct buffer): New.
16883 (buffer_grow_str, buffer_grow_str0): New macros.
16884 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16885 (buffer_xml_printf): Declare.
16886
16887 2008-11-24 Doug Evans <dje@google.com>
16888
16889 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16890
16891 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * server.c (handle_v_run): Always use the supplied argument list.
16894
16895 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16896
16897 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16898 (xtensa_regmap_table): Add entry for scompare1.
16899
16900 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16901
16902 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16903 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16904 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16905 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16906 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16907 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16908 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16909 XML target descriptions.
16910 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16911 when inferior is running on an ISA 2.05 or later processor. Add
16912 special case to return offset for full 64-bit slot of FPSCR when
16913 in 32-bits.
16914
16915 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16916
16917 * Makefile.in (SFILES, clean): Added sparc64 files.
16918 (reg-sparc64.o, reg-sparc64.c): New.
16919 * configure.srv (sparc*-*-linux*): New configuration.
16920 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16921 syscall arguments for SPARC.
16922 (regsets_store_inferior_registers): Likewise.
16923 * linux-sparc-low.c: New file.
16924
16925 2008-10-21 Doug Evans <dje@google.com>
16926
16927 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16928 (READLINE_DIR,READLINE_DEP): Delete.
16929 (INTERNAL_CFLAGS): Update.
16930 (LINTFLAGS): Update.
16931
16932 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16933
16934 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16935 whole argv from the last run, not just argv[0].
16936
16937 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16938
16939 * regcache.c (new_register_cache): Return NULL if the register
16940 cache size isn't known yet.
16941 (free_register_cache): Avoid dereferencing a NULL regcache.
16942
16943 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16944
16945 * configure.srv: Merge MIPS and MIPS64.
16946
16947 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16948
16949 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16950
16951 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16952
16953 * Makefile.in: Add required vsx dependencies.
16954
16955 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16956 Declare init_registers_powerpc_vsx32l.
16957 Declare init_registers_powerpc_vsx64l.
16958 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16959 (ppc_arch_setup): Check for VSX in hwcap.
16960 (ppc_fill_vsxregset): New function.
16961 (ppc_store_vsxregset): New function.
16962 Add new VSX entry in regset_info target_regsets.
16963
16964 * configure.srv: Add new VSX dependencies.
16965
16966 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16967
16968 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16969 (remote_open): Set or clear transport_is_reliable.
16970 (putpkt_binary): Don't expect acks in noack mode.
16971 (getpkt): Don't send ack/nac in noack mode.
16972 * server.c (handle_general_set): Handle QStartNoAckMode.
16973 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16974 qSupported.
16975 (main): Reset noack_mode on every connection.
16976 * server.h (noack_mode): Declare.
16977
16978 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16979
16980 * Makefile.in (GDBREPLAY_OBS): New variable.
16981 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16982
16983 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16984 Daniel Jacobowitz <dan@codesourcery.com>
16985
16986 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16987 (usr_store_inferior_registers): Likewise.
16988 (regsets_store_inferior_registers): Likewise.
16989
16990 2008-07-31 Rolf Jansen <rj@surtec.com>
16991 Pedro Alves <pedro@codesourcery.com>
16992
16993 * configure.ac: Check for memmem declaration.
16994 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16995 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16996 (disable_packet_qfThreadInfo): Unconditionally compile.
16997 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16998 * configure, config.in: Regenerate.
16999
17000 2008-07-28 Doug Kwan <dougkwan@google.com>
17001
17002 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17003 (linux_write_memory): Remove declaration of errno.
17004
17005 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17006
17007 * linux-low.c (handle_extended_wait): Do not use "status"
17008 variable uninitialized.
17009
17010 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17011
17012 * server.c (handle_v_attach): Inhibit reporting dll changes.
17013
17014 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17015
17016 * remote-utils.c (prepare_resume_reply): If requested, don't
17017 output "thread:TID" in the T stop reply.
17018
17019 * server.c (disable_packet_vCont, disable_packet_Tthread)
17020 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17021 (handle_query): If requested, disable support for qC, qfThreadInfo
17022 and qsThreadInfo.
17023 (handle_v_requests): If requested, disable support for vCont.
17024 (gdbserver_show_disableable): New.
17025 (main): Handle --disable-packet and --disable-packet=LIST.
17026
17027 * server.h (disable_packet_vCont, disable_packet_Tthread)
17028 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17029
17030 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17031
17032 * server.c (gdbserver_usage): Mention --version.
17033
17034 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17035
17036 * Makefile.in (gdbreplay.o): New rule.
17037
17038 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17039
17040 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17041 message, not gdbserver.
17042
17043 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17044 Nathan Sidwell <nathan@codesourcery.com>
17045 Joseph Myers <joseph@codesourcery.com>
17046
17047 * acinclude.m4: Include ../../config/acx.m4.
17048 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17049 * configure, config.in: Regenerate.
17050 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17051 * server.c (gdbserver_version): Print PKGVERSION.
17052 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17053 (main): Adjust gdbserver_usage calls.
17054 * gdbreplay.c (version, host_name): Add declarations.
17055 (gdbreplay_version, gdbreplay_usage): New.
17056 (main): Accept --version and --help options.
17057
17058 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17059
17060 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17061 (arm_breakpoint_at): Handle Thumb.
17062 (the_low_target): Add comment.
17063
17064 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17065
17066 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17067
17068 2008-05-09 Doug Evans <dje@google.com>
17069
17070 * server.h (decode_search_memory_packet): Declare.
17071 * remote-utils.c (decode_search_memory_packet): New fn.
17072 * server.c (handle_search_memory_1): New fn.
17073 (handle_search_memory): New fn.
17074 (handle_query): Process qSearch:memory packets.
17075
17076 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17077
17078 * regcache.c (registers_length): Remove.
17079 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17080 full register packet.
17081 * regcache.h (registers_length): Remove prototype.
17082 * server.h (PBUFSIZ): Define to 16384.
17083
17084 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17085
17086 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17087 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17088 powerpc-64l.o, and powerpc-altivec64l.o.
17089 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17090 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17091 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17092 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17093 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17094 to srv_xmlfiles.
17095
17096 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17097 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17098 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17099 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17100 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17101 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17102 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17103 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17104 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17105 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17106 (clean): Update.
17107
17108 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17109 (init_registers_powerpc_32l): ... this new prototype.
17110 (init_registers_powerpc_32): Remove, replace by ...
17111 (init_registers_powerpc_altivec32l): ... this new prototype.
17112 (init_registers_powerpc_e500): Remove, replace by ...
17113 (init_registers_powerpc_e500l): ... this new prototype.
17114 (init_registers_ppc64): Remove, replace by ...
17115 (init_registers_powerpc_64l): ... this new prototype.
17116 (init_registers_powerpc_64): Remove, replace by ...
17117 (init_registers_powerpc_altivec64l): ... this new prototype.
17118 (ppc_num_regs): Set to 73.
17119 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17120 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17121 (ppc_cannot_store_register): Handle orig_r3 and trap.
17122 (ppc_arch_setup): Update init_registers_... calls.
17123 (ppc_fill_gregset): Handle orig_r3 and trap.
17124
17125 * inferiors.c (clear_inferiors): Reset current_inferior.
17126
17127 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17128
17129 * acinclude.m4: Add override.m4.
17130 * configure: Regenerate.
17131
17132 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17133
17134 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17135 initial call to init_register_ppc64.
17136
17137 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17138
17139 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17140 single powerpc*-*-linux* case.
17141 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17142
17143 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17144
17145 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17146 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17147 from reg_xmlfiles.
17148 * linux-ppc-low.c: Include <elf.h>.
17149 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17150 (ppc_hwcap): New global variable.
17151 (ppc_regmap): Remove __SPE__ #ifdef sections.
17152 (ppc_regmap_e500): New global variable.
17153 (ppc_cannot_store_register): Update __SPE__ special case.
17154 (ppc_get_hwcap): New function.
17155 (ppc_arch_setup): Use it to determine whether inferior supports
17156 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17157 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17158 Do not access registers if target does not support AltiVec.
17159 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17160 Do not access registers if target does not support SPE.
17161 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17162
17163 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17164
17165 * linux-low.c (disabled_regsets, num_regsets): New.
17166 (use_regsets_p): Delete.
17167 (linux_wait_for_process): Clear disabled_regsets.
17168 (regsets_fetch_inferior_registers): Check and set it.
17169 (regsets_store_inferior_registers): Likewise.
17170 (linux_fetch_registers, linux_store_registers): Do not use
17171 use_regsets_p.
17172 (initialize_low): Allocate disabled_regsets.
17173
17174 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17175
17176 * Makefile.in (LIBOBJS): New.
17177 (OBS): Use LIBOBJS.
17178 (memmem.o): New rule.
17179 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17180 * configure: Regenerated.
17181
17182 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17183
17184 * server.c (handle_query): Never return "unsupported" for
17185 qXfer:features:read queries.
17186
17187 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17188
17189 * server.c (get_features_xml): Fix inverted condition.
17190 (handle_query): Always support qXfer:feature:read.
17191
17192 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17193
17194 * server.c (wrapper_argv): New.
17195 (start_inferior): Handle wrapper_argv. If set, expect an extra
17196 trap.
17197 (gdbserver_usage): Document --wrapper.
17198 (main): Parse --wrapper.
17199
17200 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17201
17202 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17203 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17204 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17205 (ppc_set_pc): Likewise.
17206 (ppc_arch_setup): New function.
17207 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17208 of collect_register.
17209 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17210
17211 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17212
17213 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17214 instead of linux-ppc64-low.o.
17215 * linux-ppc64-low.c: Remove file.
17216 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17217 (linux-ppc64-low.o): Remove rule.
17218
17219 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17220 (init_registers_powerpc_64): Likewise.
17221 (ppc_regmap): Conditionally define depending on __powerpc64__.
17222 (ppc_cannot_store_register): Do not special-case "fpscr" when
17223 compiled on __powerpc64__.
17224 (ppc_collect_ptrace_register): New function.
17225 (ppc_supply_ptrace_register): New function.
17226 (ppc_breakpoint): Change type to "unsigned int".
17227 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17228 (the_low_target): Conditionally provide initializers for the
17229 arch_setup member depending on __powerpc64__. Install
17230 collect_ptrace_register and supply_ptrace_register members.
17231
17232 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17233
17234 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17235 * server.c (gdbserver_xmltarget): Define.
17236 (get_features_xml): Use it to replace "target.xml" and arch_string.
17237
17238 * configure.srv: Remove srv_xmltarget. Add XML files that were
17239 mentioned there to srv_xmlfiles instead. Remove conditional tests
17240 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17241 srv_xmlfiles and srv_regobj to include all possible choices.
17242 * configure.ac (srv_xmltarget): Remove.
17243 (srv_xmlfiles): Do not add "target.xml".
17244 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17245 checks for supplementary target information.
17246 * configure: Regenerate.
17247 * Makefile.in (XML_TARGET): Remove.
17248 (target.xml): Remove rule.
17249 (clean): Do not clean up target.xml.
17250 (.PRECIOUS): Do not mention target.xml.
17251
17252 * target.h (struct target_ops): Remove arch_string member.
17253 * linux-low.c (linux_arch_string): Remove.
17254 (linux_target_ops): Remove arch_string initializer.
17255 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17256 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17257 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17258 * spu-low.c (spu_arch_string): Remove.
17259 (spu_target_ops): Remove arch_string initializer.
17260 * win32-low.c (win32_arch_string): Remove.
17261 (win32_target_ops): Remove arch_string initializer.
17262 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17263 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17264 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17265
17266 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17267
17268 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17269 by collect_ptrace_register and supply_ptrace_register hooks.
17270 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17271 instead of checking for the_low_target.left_pad_xfer.
17272 (usr_store_inferior_registers): Use collect_ptrace_register callback
17273 instead of checking for the_low_target.left_pad_xfer.
17274
17275 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17276 (s390_supply_ptrace_register): Likewise.
17277 (s390_fill_gregset): Call s390_collect_ptrace_register.
17278 (the_low_target): Update.
17279
17280 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17281 (ppc_supply_ptrace_register): Likewise.
17282 (the_low_target): Update.
17283
17284 * linux-i386-low.c (the_low_target): Update.
17285 * linux-x86-64-low.c (the_low_target): Update.
17286
17287 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17288
17289 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17290 reg-s390.o and reg-s390x.o.
17291
17292 * linux-low.c (new_inferior): New global variable.
17293 (linux_create_inferior, linux_attach): Set it.
17294 (linux_wait_for_process): Call the_low_target.arch_setup after the
17295 target has stopped for the first time.
17296 (initialize_low): Do not call the_low_target.arch_setup.
17297
17298 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17299 (s390_set_pc): Likewise.
17300 (s390_arch_setup): New function.
17301 (the_low_target): Use s390_arch_setup as arch_setup routine.
17302
17303 * regcache.c (realloc_register_cache): New function.
17304 (set_register_cache): Call it for each existing regcache.
17305
17306 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17307
17308 * server.h (init_registers): Remove prototype.
17309
17310 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17311 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17312 instead of init_registers ().
17313 * linux-arm-low.c (init_registers_arm): Add prototype.
17314 (init_registers_arm_with_iwmmxt): Likewise.
17315 (the_low_target): Add initializer for arch_setup field.
17316 * linux-cris-low.c (init_registers_cris): Add prototype.
17317 (the_low_target): Add initializer for arch_setup field.
17318 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17319 (the_low_target): Add initializer for arch_setup field.
17320 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17321 (the_low_target): Add initializer for arch_setup field.
17322 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17323 (the_low_target): Add initializer for arch_setup field.
17324 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17325 (the_low_target): Add initializer for arch_setup field.
17326 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17327 (the_low_target): Add initializer for arch_setup field.
17328 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17329 (init_registers_mips64_linux): Likewise.
17330 (the_low_target): Add initializer for arch_setup field.
17331 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17332 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17333 (the_low_target): Add initializer for arch_setup field.
17334 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17335 (init_registers_powerpc_64): Likewise.
17336 (the_low_target): Add initializer for arch_setup field.
17337 * linux-s390-low.c (init_registers_s390): Add prototype.
17338 (init_registers_s390x): Likewise.
17339 (the_low_target): Add initializer for arch_setup field.
17340 * linux-sh-low.c (init_registers_sh): Add prototype.
17341 (the_low_target): Add initializer for arch_setup field.
17342 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17343 (the_low_target): Add initializer for arch_setup field.
17344 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17345 (the_low_target): Add initializer for arch_setup field.
17346
17347 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17348 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17349 instead of init_registers ().
17350 * win32-arm-low.c (init_registers_arm): Add prototype.
17351 (the_low_target): Add initializer for arch_setup field.
17352 * win32-i386-low.c (init_registers_i386): Add prototype.
17353 (the_low_target): Add initializer for arch_setup field.
17354
17355 * spu-low.c (init_registers_spu): Add prototype.
17356 (initialize_low): Call initialie_registers_spu () instead of
17357 initialize_registers ().
17358
17359 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17360
17361 * server.c (handle_v_requests): When handling the vRun and vAttach
17362 packets, if already debugging a process, don't kill it. Return an
17363 error instead.
17364
17365 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17366
17367 * server.c (handle_query): Correct length check.
17368
17369 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17370
17371 * win32-low.c (do_initial_child_stuff): Add process handle
17372 parameter. Set current_process_handle and current_process_id from the
17373 parameters. Clear globals.
17374 (win32_create_inferior): Don't set current_process_handle and
17375 current_process_id here. Instead pass them on the call to
17376 do_initial_child_stuff.
17377 (win32_attach): Likewise.
17378 (win32_clear_inferiors): New.
17379 (win32_kill): Don't close the current process handle or the
17380 current thread handle here. Instead call win32_clear_inferiors.
17381 (win32_detach): Don't open a new handle to the process. Call
17382 win32_clear_inferiors.
17383 (win32_join): Don't rely on current_process_handle; open a new
17384 handle using the process id.
17385 (win32_wait): Call win32_clear_inferiors when the inferior process
17386 has exited.
17387
17388 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17389
17390 * server.c (monitor_show_help): Add "exit".
17391
17392 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17393
17394 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17395 (clean): Add reg-xtensa.c.
17396 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17397 * configure.srv (xtensa*-*-linux*) New target.
17398 * linux-xtensa-low.c: New.
17399 * xtensa-xtregs.c: New.
17400
17401 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17402
17403 * hostio.c: Don't include errno.h.
17404 (errno_to_fileio_errno): Move to hostio-errno.
17405 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17406 error number outputting to the target->hostio_last_error callback.
17407 (hostio_packet_error): Use FILEIO_EINVAL directly.
17408 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17409 calls to hostio_error.
17410 * hostio-errno.c: New.
17411 * server.h (hostio_last_error_from_errno): Declare.
17412 * target.h (target_ops): Add hostio_last_error member.
17413 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17414 as hostio_last_error handler.
17415 * spu-low.c (spu_target_ops): Likewise.
17416 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17417 (wince_hostio_last_error): New functions.
17418 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17419 as hostio_last_error handler.
17420 (win32_target_ops) [!_WIN32_WCE]: Register
17421 hostio_last_error_from_errno as hostio_last_error handler.
17422 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17423 (hostio-errno.o): New rule.
17424 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17425 * configure.srv (srv_hostio_err_objs): New variable. Default to
17426 hostio-errno.o.
17427 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17428 * configure: Regenerate.
17429
17430 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17431
17432 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17433 (linux_kill, linux_detach): Clean up the process list.
17434 * remote-utils.c (remote_open): Improve port number parsing.
17435 (putpkt_binary, input_interrupt): Only send interrupts if the target
17436 is running.
17437 * server.c (extended_protocol): Make static.
17438 (attached): Define earlier.
17439 (exit_requested, response_needed, program_argv): New variables.
17440 (target_running): New.
17441 (start_inferior): Clear attached here.
17442 (attach_inferior): Set attached here.
17443 (require_running): Define.
17444 (handle_query): Use require_running and target_running. Implement
17445 "monitor exit".
17446 (handle_v_attach, handle_v_run): New.
17447 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17448 (gdbserver_usage): Update.
17449 (main): Redo argument parsing. Handle --debug and --multi. Handle
17450 --attach along with other options or after the port. Save
17451 program_argv. Support no initial program. Resynchronize
17452 communication with GDB after an error. Handle "monitor exit".
17453 Use require_running and target_running. Always allow the extended
17454 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17455 restart in extended mode.
17456 * README: Refer to the GDB manual. Update --attach usage.
17457
17458 2007-12-20 Andreas Schwab <schwab@suse.de>
17459
17460 * linux-low.c (STACK_SIZE): Define.
17461 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17462 (linux_test_for_tracefork): Likewise.
17463
17464 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17465
17466 * linux-low.c (linux_wait_for_event): Update messages. Do not
17467 reinsert auto-delete breakpoints.
17468 * mem-break.c (struct breakpoint): Change return type of handler to
17469 int.
17470 (set_breakpoint_at): Update handler type.
17471 (reinsert_breakpoint_handler): Return 1 instead of calling
17472 delete_breakpoint.
17473 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17474 setting a new one.
17475 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17476 * mem-break.h (set_breakpoint_at): Update handler type.
17477 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17478 * win32-low.c (auto_delete_breakpoint): New.
17479 (get_child_debug_event): Use it.
17480
17481 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17482
17483 * configure.ac: Check for pread and pwrite.
17484 * hostio.c (handle_pread): Fall back to lseek and read.
17485 (handle_pwrite): Fall back to lseek and write.
17486 * config.in, configure: Regenerated.
17487
17488 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17489
17490 * server.c (myresume): Add own_buf argument.
17491 (main): Update calls.
17492
17493 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17494
17495 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17496 * remote-utils.c (remote_open): Do not call disable_async_io.
17497 (block_async_io): Delete.
17498 (unblock_async_io): Make static.
17499 (initialize_async_io): New.
17500 * server.c (handle_v_cont): Handle async I/O here.
17501 (myresume): Likewise. Move other common resume tasks here...
17502 (main): ... from here. Call initialize_async_io. Disable async
17503 I/O before the main loop.
17504 * server.h (initialize_async_io): Declare.
17505 (block_async_io, unblock_async_io): Delete prototypes.
17506 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17507
17508 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17509
17510 * remote-utils.c (readchar): Allow binary data in received messages.
17511
17512 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17513
17514 * win32-low.c (attaching): New global.
17515 (win32_create_inferior): Clear the `attaching' global.
17516 (win32_attach): Set the `attaching' global.
17517 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17518 attaching. Only set a breakpoint at the entry point if not
17519 attaching.
17520
17521 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17522
17523 * server.c (main): Don't report dll events on the initial
17524 connection on attaches.
17525
17526 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17527
17528 * server.c (main): Relax numerical bases supported for the pid of
17529 the --attach command line argument.
17530
17531 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17532
17533 * win32-low.c (win32_attach): Call OpenProcess before
17534 DebugActiveProcess, not after. Add last error output to error
17535 call.
17536
17537 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17538
17539 * win32-low.c (win32_get_thread_context)
17540 (win32_set_thread_context): New functions.
17541 (thread_rec): Use win32_get_thread_context.
17542 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17543 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17544 field.
17545
17546 2007-12-03 Leo Zayas
17547 Pedro Alves <pedro_alves@portugalmail.pt>
17548
17549 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17550 global variables.
17551 (child_add_thread): Minor cleanup.
17552 (child_continue): Resume artificially suspended threads before
17553 calling ContinueDebugEvent.
17554 (suspend_one_thread): New.
17555 (fake_breakpoint_event): New.
17556 (get_child_debug_event): Change return type to int. Check here if
17557 gdb sent an interrupt request. If a soft interrupt was requested,
17558 fake a breakpoint event. Return 0 if there is no event to handle,
17559 and 1 otherwise.
17560 (win32_wait): Don't check here if gdb sent an interrupt request.
17561 Ensure there is a valid event to handle.
17562 (win32_request_interrupt): Add soft interruption method as last
17563 resort.
17564
17565 2007-12-03 Leo Zayas
17566 Pedro Alves <pedro_alves@portugalmail.pt>
17567
17568 * win32-low.h (win32_thread_info): Add descriptions to the
17569 structure members. Replace `suspend_count' counter by a
17570 `suspended' flag.
17571 * win32-low.c (thread_rec): Update condition of when to get the
17572 context from the inferior. Rely on ContextFlags being set if it
17573 has already been retrieved. Only suspend the inferior thread if
17574 we haven't already. Warn if that fails.
17575 (continue_one_thread): s/suspend_count/suspended/. Only call
17576 ResumeThread once. Warn if that fails.
17577
17578 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17579
17580 * win32-low.c (win32_wait): Don't read from the inferior when it
17581 has already exited.
17582
17583 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17584
17585 * Makefile.in (win32_low_h): New variable.
17586 (win32-low.o): Add dependency on $(win32_low_h).
17587 (win32-arm-low.o, win32-i386-low.o): New rules.
17588
17589 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17590
17591 * hostio.c: Correct copyright year.
17592
17593 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17594
17595 * Makefile.in (OBS): Add hostio.o.
17596 (hostio.o): New rule.
17597 * server.h (handle_vFile): Declare.
17598 * hostio.c: New file.
17599 * server.c (handle_v_requests): Take packet_len and new_packet_len
17600 for binary packets. Call handle_vFile.
17601 (main): Update call to handle_v_requests.
17602
17603 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17604
17605 * linux-low.c: Include <sched.h>.
17606
17607 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17608
17609 * linux-low.c (linux_tracefork_grandchild): New.
17610 (linux_tracefork_child): Use clone.
17611 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17612
17613 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17614
17615 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17616
17617 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17618
17619 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17620
17621 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17622
17623 * inferiors.c (change_inferior_id): Delete.
17624 (add_pid_to_list, pull_pid_from_list): New.
17625 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17626 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17627 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17628 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17629 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17630 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17631 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17632 (using_threads): Always set to 1.
17633 (handle_extended_wait): New.
17634 (add_process): Do not set TID.
17635 (linux_create_inferior): Set must_set_ptrace_flags.
17636 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17637 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17638 (linux_thread_alive): Rename TID argument to LWPID.
17639 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17640 (linux_wait_for_event): Do not use TID or check using_threads. Update
17641 call to dead_thread_notify. Call handle_extended_wait.
17642 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17643 (send_sigstop): Delete sigstop_sent.
17644 (wait_for_sigstop): Avoid TID.
17645 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17646 (linux_test_for_tracefork): New.
17647 (linux_lookup_signals): Use thread_db_active and
17648 linux_supports_tracefork_flag.
17649 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17650 * linux-low.h (get_process_thread): Avoid TID.
17651 (struct process_ifo): Move thread_known and tid to the end. Remove
17652 sigstop_sent.
17653 (linux_attach_lwp, thread_db_init): Update prototypes.
17654 * server.h (change_inferior_id): Delete prototype.
17655 (add_pid_to_list, pull_pid_from_list): New prototypes.
17656 * thread-db.c (thread_db_use_events): New.
17657 (find_first_thread): Rename to...
17658 (find_one_thread): ...this. Update callers and messages. Do not
17659 call fatal. Check thread_db_use_events. Do not call
17660 change_inferior_id or new_thread_notify.
17661 (maybe_attach_thread): Update. Do not call new_thread_notify.
17662 (thread_db_init): Set thread_db_use_events. Check use_events.
17663 * utils.c (fatal, warning): Correct message prefix.
17664
17665 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17666
17667 * Makefile.in (clean): Remove new files.
17668 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17669 (powerpc-64.o, powerpc-64.c): New rules.
17670 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17671 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17672 with SPE.
17673 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17674 SPE targets.
17675 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17676 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17677 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17678 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17679 (target_regsets): Add AltiVec and SPE register sets.
17680 * configure.ac: Check for AltiVec and SPE.
17681 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17682 (ppc_fill_vrregset, ppc_store_vrregset): New.
17683 (target_regsets): Add AltiVec register set.
17684 * configure: Regenerated.
17685
17686 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17687
17688 * linux-low.c (O_LARGEFILE): Define.
17689 (linux_read_memory): Use /proc/PID/mem.
17690 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17691 * configure, config.in: Regenerated.
17692
17693 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17694
17695 * linux-low.c (linux_wait_for_event): Do not pass signals while
17696 single-stepping.
17697
17698 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17699
17700 * win32-low.c (create_process): New.
17701 (win32_create_inferior): Use create_process instead of
17702 CreateProcess. If create_process failed retry appending an ".exe"
17703 suffix. Store the GetLastError result immediatelly after
17704 create_process calls and use it on the call to error.
17705
17706 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17707
17708 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17709
17710 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17711
17712 * configure.ac: Switch license to GPLv3.
17713
17714 2007-08-01 Michael Snyder <msnyder@access-company.com>
17715
17716 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17717
17718 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17719
17720 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17721 typedef.
17722 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17723 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17724 CloseToolhelp32Snapshot.
17725 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17726 CloseToolhelp32Snapshot.
17727
17728 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17729
17730 * server.c (main): Check for inferior exit before main loop.
17731
17732 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17733
17734 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17735 instead of on tmp_desc.
17736
17737 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17738 Daniel Jacobowitz <dan@codesourcery.com>
17739
17740 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17741 (add_thread): Minor cleanups.
17742 (clear_inferiors): Move lower in the file. Clear the DLL
17743 list.
17744 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17745 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17746 (xml_escape_text): New.
17747 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17748 for qSupported.
17749 (handle_v_cont): Report errors.
17750 (gdbserver_version): Update.
17751 (main): Correct size of own_buf. Do not report initial DLL events.
17752 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17753 (unloaded_dll, xml_escape_text): New.
17754 * win32-low.c (enum target_waitkind): Update comments.
17755 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17756 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17757 (win32_EnumProcessModules, win32_GetModuleInformation)
17758 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17759 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17760 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17761 (win32_Module32First, win32_Module32Next, load_toolhelp)
17762 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17763 (get_child_debug_event): Handle DLL events.
17764 (win32_wait): Likewise.
17765
17766 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17767
17768 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17769 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17770
17771 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17772
17773 * win32-low.c (handle_output_debug_string): Ignore event if not
17774 waiting.
17775
17776 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17777
17778 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17779
17780 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17781
17782 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17783
17784 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17785
17786 * inferiors.c (change_inferior_id): Add comment.
17787 * linux-low.c (check_removed_breakpoint): Add an early
17788 prototype. Improve debug output.
17789 (linux_attach): Doc update.
17790 (linux_detach_one_process, linux_detach): Clean up before releasing
17791 each process.
17792 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17793 * linux-low.h (struct process_info): Doc improvement.
17794 * mem-break.c (delete_all_breakpoints): New.
17795 * mem-break.h (delete_all_breakpoints): New prototype.
17796 * thread-db.c (find_first_thread): New.
17797 (thread_db_create_event): Call it instead of
17798 thread_db_find_new_threads. Clean up unused variables.
17799 (maybe_attach_thread): Remove first thread handling.
17800 (thread_db_find_new_threads): Use find_first_thread.
17801 (thread_db_get_tls_address): Likewise.
17802
17803 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17804
17805 * thread-db.c (thread_db_find_new_threads): Add prototype.
17806 (thread_db_create_event): Check for the main thread before adding
17807 a new thread.
17808 (maybe_attach_thread): Only enable event reporting if TID == 0.
17809 (thread_db_get_tls_address): Check for new threads.
17810
17811 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17812
17813 * linux-low.c (linux_create_inferior): Try execv before execvp.
17814 * spu-low.c (spu_create_inferior): Likewise.
17815
17816 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17817
17818 * linux-low.c (linux_create_inferior): Change execv to execvp.
17819 * spu-low.c (spu_create_inferior): Likewies.
17820
17821 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17822
17823 * Makefile.in (clean): Clean new files instead of deleted ones.
17824 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17825 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17826 rules.
17827 * configure.srv: Specify XML files and new regformats for MIPS and
17828 MIPS64 GNU/Linux.
17829 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17830 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17831 an entry for the restart register.
17832 (mips_cannot_fetch_register, mips_cannot_store_register)
17833 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17834 register names to match the XML descriptions.
17835 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17836 restart register instead of $0.
17837
17838 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17839 Markus Deuling <deuling@de.ibm.com>
17840
17841 * remote-utils.c (decode_xfer_write): New function.
17842 * server.h (decode_xfer_write): Add prototype.
17843 * server.c (handle_query): Add PACKET_LEN argument. Support
17844 qXfer:spu:read and qXfer:spu:write packets.
17845 (main): Pass packet_len to handle_query.
17846 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17847 * target.h (target_ops): Add qxfer_spu.
17848
17849 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17850
17851 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17852 accessing non-seekable spufs files.
17853
17854 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17855
17856 * server.c (handle_query): Add reply for qC packet.
17857
17858 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17859 Leo Zayas <lerele@champenstudios@com>
17860
17861 * server.h (check_remote_input_interrupt_request): New function.
17862 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17863 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17864 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17865 (check_remote_input_interrupt_request): New function.
17866 * server.h (check_remote_input_interrupt_request): Declare.
17867 * win32-low.c (winapi_DebugBreakProcess,
17868 winapi_GenerateConsoleCtrlEvent): New typedefs.
17869 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17870 to 250 ms.
17871 (win32_wait): Check for remote interrupt request
17872 with check_remote_input_interrupt_request.
17873 (win32_request_interrupt): New function.
17874 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17875
17876 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17877
17878 * win32-low.c (debug_registers_changed,
17879 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17880 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17881 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17882 (thread_rec): Get context using the low target.
17883 (child_add_thread): Call thread_added on the low target,
17884 which does the same thing.
17885 (regptr): Delete.
17886 (do_initial_child_stuff): Remove debug registers references.
17887 Set context using the low target. Resume threads after
17888 setting the contexts.
17889 (child_continue): Remove dead variable. Remove debug
17890 registers references.
17891 (child_fetch_inferior_registers): Go through the low target.
17892 (do_child_store_inferior_registers): Remove.
17893 (child_store_inferior_registers): Go through the low target.
17894 (win32_resume): Remove debug registers references.
17895 Set context using the low target.
17896 (handle_exception): Change return type to void. Don't record
17897 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17898 first chance exception.
17899 (get_child_debug_event): Change return type to void. Remove
17900 goto loop. Always return after waiting for debug event.
17901 (win32_wait): Convert to switch statement. Handle spurious
17902 events.
17903
17904 * win32-i386-low.c (debug_registers_changed,
17905 debug_registers_used): New.
17906 (initial_stuff): Rename to ...
17907 (i386_initial_stuff): ... this. Clear debug registers
17908 state variables.
17909 (store_debug_registers): Delete.
17910 (i386_get_thread_context): New.
17911 (load_debug_registers): Delete.
17912 (i386_set_thread_context): New.
17913 (i386_thread_added): New.
17914 (single_step): Rename to ...
17915 (i386_single_step): ... this.
17916 (do_fetch_inferior_registers): Rename to ...
17917 (i386_fetch_inferior_register): ... this.
17918 (i386_store_inferior_register): New.
17919 (the_low_target): Adapt to new interface.
17920
17921 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17922 (arm_get_thread_context): New.
17923 (arm_set_thread_context): New.
17924 (regptr): New.
17925 (do_fetch_inferior_registers): Rename to ...
17926 (arm_fetch_inferior_register): ... this.
17927 (arm_store_inferior_register): New.
17928 (arm_wince_breakpoint): Reimplement as unsigned long.
17929 (arm_wince_breakpoint_len): Define.
17930 (the_low_target): Adapt to new interface.
17931
17932 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17933 load_debug_registers. Add get_thread_context, set_thread_context,
17934 thread_added and store_inferior_register. Rename
17935 fetch_inferior_registers to fetch_inferior_register.
17936 (regptr): Remove declaration.
17937
17938 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17939
17940 * linux-low.c (linux_detach): Change return type to int. Return 0.
17941 * spu-low.c (spu_detach): Likewise.
17942
17943 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17944
17945 * target.h (target_ops): Change return type of detach to int.
17946 Add join.
17947 (join_inferior): New.
17948 * server.c (main): Don't skip detach support on mingw32.
17949 If the inferior doesn't support detaching return error.
17950 Call join_inferior instead of using waitpid.
17951 * linux-low.c (linux_join): New.
17952 (linux_target_op): Add linux_join.
17953 * spu-low.c (spu_join): New.
17954 (spu_target_ops): Add spu_join.
17955 * win32-low.c (win32_detach): Adapt to new interface.
17956 Reopen current_process_handle before detaching. Issue a child
17957 resume before detaching.
17958 (win32_join): New.
17959 (win32_target_op): Add win32_join.
17960
17961 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17962
17963 * win32-low.c (win32-attach): Fix return value.
17964 * target.h (target_ops): Describe ATTACH return values.
17965
17966 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17967
17968 * win32-low.c (GETPROCADDRESS): Define.
17969 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17970 (winapi_DebugSetProcessKillOnExit): Likewise.
17971 (win32_create_inferior): Force usage of ansi CreateProcessA.
17972 (win32_attach): Use GETPROCADDRESS.
17973 (win32_detach): Likewise.
17974
17975 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17976
17977 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17978
17979 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17980
17981 * win32-low.c: Commit leftover changes from 2007-03-29.
17982
17983 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17984
17985 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17986 fields short instead of int. Add explicit padding.
17987 (i387_cache_to_fsave): Remove unnecessary casts.
17988 (i387_fsave_to_cache): Doc fix.
17989 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17990
17991 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17992
17993 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17994 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17995
17996 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17997
17998 * configure.srv (arm*-*-mingw32ce*): Move near the other
17999 arm targets.
18000
18001 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18002
18003 * configure.ac: Add errno checking.
18004 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18005 sys/file.h and malloc.h.
18006 (AC_CHECK_DECLS): Add perror.
18007 (srv_mingwce): Handle.
18008 * configure.srv (i[34567]86-*-cygwin*): Add
18009 win32-i386-low.o to srv_tgtobj.
18010 (i[34567]86-*-mingw*): Likewise.
18011 (arm*-*-mingw32ce*): Add case.
18012 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18013 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18014 [__MINGW32CE__] (strerror): New function.
18015 [__MINGW32CE__] (errno): Define to GetLastError.
18016 [__MINGW32CE__] (COUNTOF): New macro.
18017 (remote_open): Remove extra close call.
18018 * mem-break.c (delete_breakpoint_at): New function.
18019 * mem-break.h (delete_breakpoint_at): Declare.
18020 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18021 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18022 [USE_WIN32API] (read, write): Add char* casts.
18023 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18024 * server.h: Include wincecompat.h on Windows CE.
18025 [HAVE_ERRNO_H]: Check.
18026 (perror): Declare if not declared.
18027 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18028 (perror_with_name): Remove errno declaration.
18029 * wincecompat.h: New.
18030 * wincecompat.c: New.
18031 * win32-low.h: New.
18032 * win32-arm-low.c: New.
18033 * win32-i386-low.c: New.
18034 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18035 (OUTMSG2): Make it safe.
18036 (_T): New macro.
18037 (COUNTOF): New macro.
18038 (NUM_REGS): Get it from the low target.
18039 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18040 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18041 (thread_rec): Let low target handle debug registers.
18042 (child_add_thread): Likewise.
18043 (child_init_thread_list): Likewise.
18044 (continue_one_thread): Likewise.
18045 (regptr): New.
18046 (do_child_fetch_inferior_registers): Move to ...
18047 * win32-i386-low.c: ... here, and rename to ...
18048 (do_fetch_inferior_registers): ... this.
18049 * win32-low.c (child_fetch_inferior_registers):
18050 Go through the low target.
18051 (do_child_store_inferior_registers): Use regptr.
18052 (strwinerror): New function.
18053 (win32_create_inferior): Handle Windows CE.
18054 Use strwinerror instead of strerror on Windows error
18055 codes. Add program to the error output.
18056 Don't close the main thread handle on Windows CE.
18057 (win32_attach): Use coredll.dll on Windows CE.
18058 (win32_kill): Close current process and current
18059 thread handles.
18060 (win32_detach): Use coredll.dll on Windows CE.
18061 (win32_resume): Let low target handle debug registers, and
18062 step request.
18063 (handle_exception): Add/Remove initial breakpoint. Avoid
18064 non-existant WSTOPSIG on Windows CE.
18065 (win32_read_inferior_memory): Cast to remove warning.
18066 (win32_arch_string): Go through the low target.
18067 (initialize_low): Call set_breakpoint_data with the low
18068 target's breakpoint.
18069 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18070 FOP_REGNUM, mappings): Move to ...
18071 * win32-i386-low.c: ... here.
18072 * win32-low.c (win32_thread_info): Move to ...
18073 * win32-low.h: ... here.
18074 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18075 win32-arm-low.c and wincecompat.c.
18076 (all:): Add $EXEEXT.
18077 (install-only:): Likewise.
18078 (gdbserver:): Likewise.
18079 (gdbreplay:): Likewise.
18080 * config.in: Regenerate.
18081 * configure: Regenerate.
18082
18083 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18084
18085 * win32-low.c: Rename typedef thread_info to
18086 win32_thread_info throughout.
18087
18088 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18089
18090 * win32-i386-low.c: Rename to ...
18091 * win32-low.c: ... this.
18092 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18093 * Makefile.in: Likewise.
18094
18095 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18096
18097 * remote-utils.c (monitor_output): Constify msg parameter.
18098 * server.h (monitor_output): Likewise.
18099 * win32-i386-low.c (handle_output_debug_string): New.
18100 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18101 handle_output_debug_string.
18102 (get_child_debug_event): Likewise.
18103
18104 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18105
18106 * server.c (main): Correct strtoul check.
18107
18108 2007-03-27 Jon Ringle <jon@ringle.org>
18109
18110 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18111
18112 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18113
18114 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18115
18116 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18117
18118 * terminal.h: Check HAVE_SGTTY_H.
18119
18120 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18121
18122 * remote-utils.c (remote_open): Print out the assigned port number.
18123
18124 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18125
18126 * remote-utils.c (monitor_output): New function.
18127 * server.c (debug_threads): Define here.
18128 (monitor_show_help): New function.
18129 (handle_query): Handle qRcmd.
18130 (main): Do not handle 'd' packet.
18131 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18132 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18133 of debug_threads.
18134
18135 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18136
18137 * Makefile.in (EXEEXT): New.
18138 (clean): Use $(EXEEXT).
18139
18140 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18141
18142 * target.h (target_ops): Rename send_signal to request_interrupt,
18143 and remove enum target_signal parameter.
18144 * linux-low.c (linux_request_interrupt): Rename from
18145 linux_send_signal, and always send SIGINT.
18146 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18147 and always send SIGINT.
18148 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18149 of send_signal.
18150 (input_interrupt): Likewise.
18151
18152 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18153
18154 * server.c (get_features_xml): Check if target implemented
18155 arch_string.
18156 * win32-i386-low.c (win32_arch_string): New.
18157 (win32_target_ops): Add win32_arch_string as arch_string member.
18158
18159 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18160
18161 * spu-low.c (spu_arch_string): New.
18162 (spu_target_ops): Add spu_arch_string.
18163
18164 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18165
18166 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18167 * configure.ac: Do not check for terminal.h.
18168 * configure, config.in: Regenerated.
18169
18170 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18171
18172 * Makefile.in (OBS): Add $(XML_BUILTIN).
18173 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18174 (clean): Update.
18175 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18176 (arm-with-iwmmxt.c): New.
18177 * config.in, configure: Regenerate.
18178 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18179 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18180 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18181 (arm*-*-linux*): Add iWMMXt and regset support.
18182 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18183 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18184 (arm_store_wmmxregset, target_regsets): New.
18185 * server.c (get_features_xml): Take annex argument. Check builtin
18186 XML documents.
18187 (handle_query): Handle multiple annexes.
18188
18189 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18190
18191 * remote-utils.c [USE_WIN32API] (read, write): Define.
18192 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18193 write.
18194
18195 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18196
18197 * linux-i386-low.c (the_low_target): Set arch_string.
18198 * linux-x86-64-low.c (the_low_target): Likewise.
18199 * linux-low.c (linux_arch_string): New.
18200 (linux_target_ops): Add it.
18201 * linux-low.h (struct linux_target_ops): Add arch_string.
18202 * server.c (write_qxfer_response): Use const void * for DATA.
18203 (get_features_xml): New.
18204 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18205 * target.h (struct target_ops): Add arch_string method.
18206
18207 2007-01-03 Denis Pilat <denis.pilat@st.com>
18208 Daniel Jacobowitz <dan@codesourcery.com>
18209
18210 * linux-low.c (linux_kill): Handle being called with no threads.
18211 * win32-i386-low.c (win32_kill): Likewise.
18212 (get_child_debug_event): Clear current_process_handle.
18213
18214 2006-12-30 Denis PILAT <denis.pilat@st.com>
18215 Daniel Jacobowitz <dan@codesourcery.com>
18216
18217 * remote-utils.c (remote_open): Check the type of specified
18218 serial port devices before opening them.
18219 * server.c (main): Kill the inferior if an error occurs during
18220 the first remote_open.
18221
18222 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18223
18224 * README: Update supported targets.
18225
18226 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18227
18228 * Makefile.in (clean): Remove reg-mips64.c.
18229 (reg-mips64.c, reg-mips64.o): New rules.
18230 * configure.srv: Handle mips64. Include regset support for mips.
18231 * linux-mips-low.c (union mips_register): New.
18232 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18233 (mips_breakpoint, mips_breakpoint_at): Use int.
18234 (mips_collect_register, mips_supply_register)
18235 (mips_collect_register_32bit, mips_supply_register_32bit)
18236 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18237 (mips_store_fpregset, target_regsets): New.
18238 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18239
18240 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18241
18242 * configure.srv: Add target "spu*-*-*".
18243 * Makefile.in (clean): Remove reg-spu.c.
18244 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18245 * spu-low.c: New file.
18246
18247 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18248
18249 * configure.ac: Correct td_thr_tls_get_addr test.
18250 * configure: Regenerated.
18251
18252 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18253
18254 * linux-low.c (linux_wait_for_event): Reformat. Use the
18255 pass_signals array.
18256 * remote-utils.c (decode_address_to_semicolon): New.
18257 * server.c (pass_signals, handle_general_set): New.
18258 (handle_query): Mention QPassSignals for qSupported.
18259 (main): Call handle_general_set.
18260 * server.h (pass_signals, decode_address_to_semicolon): New.
18261
18262 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18263
18264 * server.c (handle_query): Correct error handling for read_auxv.
18265
18266 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18267
18268 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18269 and srv_linux_thread_db to yes.
18270 * linux-s390-low.c (s390_fill_gregset): New function.
18271 (target_regsets): Define data structure.
18272
18273 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18274
18275 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18276 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18277 * config.in, configure: Regenerated.
18278 * inferiors.c (gdb_id_to_thread): New function.
18279 (gdb_id_to_thread_id): Use it.
18280 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18281 * linux-low.h (struct process_info): Add th member.
18282 (thread_db_get_tls_address): New prototype.
18283 * remote-utils.c (decode_address): Make non-static.
18284 * server.c (handle_query): Handle qGetTLSAddr.
18285 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18286 * target.h (struct target_ops): Add get_tls_address.
18287 * thread-db.c (maybe_attach_thread): Save the thread handle.
18288 (thread_db_get_tls_address): New.
18289
18290 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18291
18292 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18293 (linux_resume_one_process): Take a siginfo_t *. Update all
18294 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18295 (struct pending_signals): Add a siginfo_t.
18296 (linux_wait_for_process): Always set last_status.
18297 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18298 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18299 * linux-low.h (struct process_info): Add last_status.
18300
18301 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18302
18303 * remote-utils.c (try_rle): New function.
18304 (putpkt_binary): Use it.
18305
18306 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18307
18308 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18309 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18310 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18311 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18312 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18313 point registers.
18314
18315 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18316
18317 * server.c (terminal_fd): New variable.
18318 (old_foreground_pgrp): Likewise.
18319 (restore_old_foreground_pgrp): New function.
18320 (start_inferior): Record the terminal file descriptor in terminal_fd
18321 and its original foreground group in old_foreground_pgrp. Register
18322 restore_old_foreground_pgrp with atexit().
18323
18324 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18325
18326 * server.c (handle_query): Correct qPart to qXfer.
18327
18328 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18329
18330 * configure.ac: Check for more headers which are missing on
18331 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18332 * configure.srv: Add Cygwin and mingw32.
18333 * remote-utils.c: Don't include headers unconditionally which
18334 are missing on mingw32. Include <winsock.h> for mingw32.
18335 (remote_open): Adjust for mingw32 support. Flush
18336 standard error after writing to it.
18337 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18338 (unblock_async_io, enable_async_io, disable_async_io)
18339 (readchar, getpkt): Update for Winsock support.
18340 (prepare_resume_reply): Expect a protocol signal number.
18341 * server.c: Disable <sys/wait.h> on mingw32.
18342 (start_inferior): Adjust for mingw32 support. Flush
18343 standard error after writing to it.
18344 (attach_inferior): Likewise. Use protocol signal
18345 numbers.
18346 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18347 and names.
18348 * win32-i386-low.c: New file.
18349 * Makefile.in (XM_CLIBS): Set.
18350 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18351 (win32-i386-low.o): New dependency rule.
18352 * linux-low.c (linux_wait): Use target signal numbers.
18353 * target.h (struct target_ops): Doc fix.
18354 * server.h (target_signal_to_name): New prototype.
18355 * gdbreplay.c: Don't include headers unconditionally which
18356 are missing on mingw32. Include <winsock.h> for mingw32.
18357 (remote_close, remote_open): Adjust for Winsock support.
18358 * configure, config.in: Regenerated.
18359
18360 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18361
18362 * server.c (decode_xfer_read, write_qxfer_response): New.
18363 (handle_query): Take a packet length argument. Handle
18364 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18365 the qSupported response.
18366 (main): Update call to handle_query.
18367
18368 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18369
18370 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18371 (putpkt_binary): Renamed from putpkt and adjusted for binary
18372 data.
18373 (putpkt): New wrapper for putpkt_binary.
18374 (readchar): Don't mask off the high bit.
18375 (decode_X_packet): New function.
18376 * server.c (main): Call putpkt_binary if a handler sets the packet
18377 length. Save the length of the incoming packet. Handle 'X'.
18378 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18379
18380 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18381
18382 * server.c (handle_query): Handle qSupported.
18383
18384 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18385
18386 * remote-utils.c (all_symbols_looked_up): New variable.
18387 (look_up_one_symbol): Check it.
18388 * server.h (look_up_one_symbol): New declaration.
18389 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18390
18391 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18392
18393 * Makefile.in (linux-arm-low.o): Update dependencies.
18394 * linux-arm-low.c: Include "gdb_proc_service.h".
18395 (PTRACE_GET_THREAD_AREA): Define.
18396 (ps_get_thread_area): New function.
18397
18398 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18399
18400 * configure.srv (m68k*-*-uclinux*): New target.
18401 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18402 (linux_resume_one_process): Remove extraneous cast.
18403 (linux_read_offsets): New.
18404 (linux_target_op): Add linux_read_offsets on mmuless systems.
18405 * server.c (handle_query): Add qOffsets logic.
18406 * target.h (struct target_ops): Add read_offsets.
18407
18408 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18409
18410 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18411 (PTRACE_GET_THREAD_AREA): Define.
18412 (ps_get_thread_area): New function.
18413 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18414 (linux-x86-64-low.o): Update.
18415
18416 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18417
18418 * configure.ac: Remove checks for prfpregset_t.
18419 * gdb_proc_service.h: New file.
18420 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18421 new "gdb_proc_service.h".
18422 * proc-service.c: Likewise.
18423 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18424 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18425 * Makefile.in (gdb_proc_service_h): Updated.
18426 * configure, config.in: Regenerated.
18427
18428 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18429
18430 * remote-utils.c (prepare_resume_reply): Move declaration
18431 of gdb_id_from_wait to the top of the block.
18432
18433 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18434
18435 * linux-low.c (regsets_store_inferior_registers): Read the regset
18436 from the target before filling it.
18437
18438 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18439
18440 * server.c (attach_inferior): Return SIGTRAP for a successful
18441 attach.
18442
18443 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18444
18445 * Makefile.in (OBS): Add version.o.
18446 (STAGESTUFF): Delete.
18447 (version.o): Add dependencies.
18448 (version.c): Replace rule.
18449 (clean): Remove version.c.
18450 * server.c (gdbserver_version): New.
18451 (gdbserver_usage): Use printf.
18452 (main): Handle --version and --help.
18453 * server.h (version, host_name): Add declarations.
18454
18455 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18456
18457 * linux-arm-low.c:
18458 * linux-arm-low.c:
18459 * inferiors.c:
18460 * i387-fp.h:
18461 * i387-fp.c:
18462 * gdbreplay.c:
18463 * regcache.c:
18464 * proc-service.c:
18465 * mem-break.h:
18466 * mem-break.c:
18467 * linux-x86-64-low.c:
18468 * linux-sh-low.c:
18469 * linux-s390-low.c:
18470 * linux-ppc64-low.c:
18471 * linux-ppc-low.c:
18472 * linux-mips-low.c:
18473 * linux-m68k-low.c:
18474 * linux-m32r-low.c:
18475 * linux-low.h:
18476 * linux-low.c:
18477 * linux-ia64-low.c:
18478 * linux-i386-low.c:
18479 * linux-crisv32-low.c:
18480 * thread-db.c:
18481 * terminal.h:
18482 * target.h:
18483 * target.c:
18484 * server.h:
18485 * server.c:
18486 * remote-utils.c:
18487 * regcache.h:
18488 * utils.c:
18489 * Makefile.in:
18490 * configure.ac:
18491 * gdbserver.1: Add (C) after Copyright. Update the FSF
18492 address.
18493
18494 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18495
18496 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18497 (arm_breakpoint_at): Recognize both breakpoints.
18498 (the_low_target): Use the correct breakpoint instruction.
18499
18500 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18501
18502 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18503 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18504 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18505 (the_low_target): Update.
18506
18507 2005-10-25 Andreas Schwab <schwab@suse.de>
18508
18509 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18510
18511 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18512 (ia64_num_regs): Reduce to 462.
18513
18514 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18515
18516 * acinclude.m4: Correct quoting.
18517 * aclocal.m4: Regenerated.
18518
18519 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18520 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18521 (thread_db_init): Call thread_db_err_str.
18522 * configure.ac: Check for TD_VERSION.
18523 * config.in, configure: Regenerated.
18524
18525 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18526
18527 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18528
18529 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18530
18531 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18532 is not available. Define HAVE_PTRACE_GETREGS if it is.
18533 * config.in, configure: Regenerated.
18534 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18535 * linux-i386-low.c, linux-m68k-low.c: Update to use
18536 HAVE_PTRACE_GETREGS.
18537 * linux-low.c (regsets_fetch_inferior_registers)
18538 (regsets_store_inferior_registers): Only return 0 if we processed
18539 GENERAL_REGS.
18540 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18541 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18542
18543 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18544
18545 * inferiors.c (struct thread_info): Add gdb_id.
18546 (add_thread): Add gdb_id argument.
18547 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18548 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18549 calls to add_thread.
18550 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18551 * server.c (handle_query): Use thread_to_gdb_id.
18552 (handle_v_cont, main): Use gdb_id_to_thread_id.
18553 * server.h (add_thread): Update prototype.
18554 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18555 prototypes.
18556
18557 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18558
18559 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18560 left-padded registers.
18561 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18562 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18563
18564 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18565
18566 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18567 * configure: Regenerate.
18568 * config.in: Regenerate.
18569 * server.h (NEED_DECLARATION_STRERROR):
18570 Replace with !HAVE_DECL_STRERROR.
18571
18572 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18573
18574 * linux-low.c (linux_wait, linux_send_signal): Don't test
18575 an unsigned long variable for > 0 if it could be MAX_ULONG.
18576 * server.c (myresume): Likewise.
18577 * target.c (set_desired_inferior): Likewise.
18578
18579 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18580
18581 * configure.ac: Simplify and improve check for socklen_t.
18582 * configure, config.in: Regenerate.
18583
18584 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18585
18586 * acconfig.h: Remove.
18587 * configure.ac: Add a test for socklen_t. Use three-argument
18588 AC_DEFINE throughout.
18589 * config.in: Regenerated using autoheader 2.59.
18590 * configure: Regenerated.
18591
18592 * gdbreplay.c (socklen_t): Provide a default.
18593 (remote_open): Use socklen_t.
18594 * remote-utils.c (socklen_t): Provide a default.
18595 (remote_open): Use socklen_t.
18596 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18597 unsigned char.
18598
18599 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18600 char for buffers.
18601 * linux-low.c (linux_read_memory, linux_write_memory)
18602 (linux_read_auxv): Likewise.
18603 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18604 (check_mem_write): Likewise.
18605 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18606 Likewise.
18607 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18608 (registers_from_string, register_data): Likewise.
18609 * server.c (handle_query, main): Likewise.
18610 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18611 (decode_M_packet): Likewise.
18612 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18613 * target.h (struct target_ops): Update read_memory, write_memory,
18614 and read_auxv.
18615 (read_inferior_memory, write_inferior_memory): Update.
18616 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18617 to unsigned char *.
18618 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18619 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18620 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18621 linux-s390-low.c, linux-sh-low.c: Update for changes in
18622 read_inferior_memory and the_low_target->breakpoint.
18623
18624 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18625
18626 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18627 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18628 * configure.srv: Add powerpc64-*-linux*.
18629 * linux-ppc64-low.c: New file.
18630
18631 2005-05-23 Orjan Friberg <orjanf@axis.com>
18632
18633 * linux-cris-low.c: New file with support for CRIS.
18634 * linux-crisv32-low.c: Ditto for CRISv32.
18635 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18636 (clean): Add reg-cris.c and reg-crisv32.c.
18637 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18638 reg-crisv32.o, and reg-crisv32.c to make rules.
18639 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18640 recognized targets.
18641
18642 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18643
18644 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18645 of sizeof (PTRACE_XFER_TYPE).
18646 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18647
18648 2005-05-12 Orjan Friberg <orjanf@axis.com>
18649
18650 * target.h (struct target_ops): Add insert_watchpoint,
18651 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18652 pointers for hardware watchpoint support.
18653 * linux-low.h (struct linux_target_ops): Ditto.
18654 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18655 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18656 to linux_target_ops.
18657 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18658 reply packet.
18659 * server.c (main): Recognize 'Z' and 'z' packets.
18660
18661 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18662
18663 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18664 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18665 (the_low_target): Add new members.
18666
18667 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18668
18669 * proc-service.c (ps_lgetregs): Search all_processes instead of
18670 all_threads.
18671
18672 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18673
18674 * server.c (start_inferior): Change return type to int.
18675 (attach_inferior): Change sigptr to int *.
18676 (handle_v_cont, handle_v_requests): Change signal to int *.
18677 (main): Change signal to int.
18678
18679 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18680
18681 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18682 * configure.srv: Add m32r*-*-linux*.
18683 * linux-m32r-low.c: New file.
18684
18685 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18686
18687 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18688
18689 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18690
18691 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18692 Take unsigned long arguments for PIDs.
18693 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18694 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18695 (wait_for_sigstop, linux_resume_one_process)
18696 (regsets_fetch_inferior_registers, linux_send_signal)
18697 (linux_read_auxv): Likewise. Update the types of variables holding
18698 PIDs. Update format string specifiers.
18699 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18700 * remote-utils.c (prepare_resume_reply): Likewise.
18701 * server.c (cont_thread, general_thread, step_thread)
18702 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18703 unsigned long.
18704 (handle_query): Update format specifiers.
18705 (handle_v_cont, main): Use strtoul for thread IDs.
18706 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18707 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18708 (general_thread, step_thread, thread_from_wait)
18709 (old_thread_from_wait): Update.
18710 * target.h (struct thread_resume): Use unsigned long for THREAD.
18711 (struct target_ops): Use unsigned long for arguments to attach and
18712 thread_alive.
18713
18714 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18715
18716 * acinclude.m4: Include bfd/bfd.m4 directly.
18717 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18718 <agriffis@toolchain.org>.
18719 * aclocal.m4, configure: Regenerated.
18720
18721 2005-01-07 Andrew Cagney <cagney@gnu.org>
18722
18723 * configure.ac: Rename configure.in, require autoconf 2.59.
18724 * configure: Re-generate.
18725
18726 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18727
18728 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18729 LIBS when finished.
18730 * aclocal.m4: Regenerated.
18731 * configure: Regenerated.
18732
18733 2004-11-21 Andreas Schwab <schwab@suse.de>
18734
18735 * linux-m68k-low.c (m68k_num_gregs): Define.
18736 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18737 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18738 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18739 (m68k_breakpoint_at): New. Add to the_low_target.
18740
18741 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18742 srv_linux_thread_db to yes.
18743
18744 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18745
18746 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18747 (ARCH_SET_FS): Likewise.
18748 (ARCH_GET_FS): Likewise.
18749 (ARCH_GET_GS): Likewise.
18750
18751 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18752
18753 * linux-i386-low.c (ps_get_thread_area): New.
18754 * linux-x86-64-low.c (ps_get_thread_area): New.
18755 * linux-low.c: Include <sys/syscall.h>.
18756 (linux_kill_one_process): Don't kill the first thread here.
18757 (linux_kill): Kill the first thread here.
18758 (kill_lwp): New function.
18759 (send_sigstop, linux_send_signal): Use it.
18760 * proc-service.c: Clean up #ifdefs.
18761 (fpregset_info): Delete.
18762 (ps_lgetregs): Update and enable implementation.
18763 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18764 implementations.
18765 * remote-utils.c (struct sym_cache, symbol_cache): New.
18766 (input_interrupt): Print a clearer message.
18767 (async_io_enabled): New variable.
18768 (enable_async_io, disable_async_io): Use it. Update comments.
18769 (look_up_one_symbol): Use the symbol cache.
18770 * thread-db.c (thread_db_look_up_symbols): New function.
18771 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18772
18773 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18774
18775 * configure.in: Test for -rdynamic.
18776 * configure: Regenerated.
18777 * Makefile (INTERNAL_LDFLAGS): New.
18778 (gdbserver, gdbreplay): Use it.
18779
18780 2004-09-02 Andrew Cagney <cagney@gnu.org>
18781
18782 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18783
18784 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18785
18786 * linux-low.c (linux_wait): Clear all_processes list also.
18787
18788 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18789
18790 * linux-low.c: Include <errno.h>. Remove extern declaration of
18791 errno.
18792
18793 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18794
18795 * gdbreplay.c, server.h, utils.c: Update copyright years.
18796
18797 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18798
18799 * server.c (main): Print child status or termination signal from
18800 variable 'signal', not 'sig'.
18801
18802 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18803
18804 * linux-low.c (linux_read_memory): Change return type to
18805 int. Check for and return error from ptrace().
18806 * target.c (read_inferior_memory): Change return type to int. Pass
18807 back return status from the_target->read_memory().
18808 * target.h (struct target_ops): Adapt *read_memory() prototype.
18809 Update comment.
18810 (read_inferior_memory): Adapt prototype.
18811 * server.c (main): Return an error packet if
18812 read_inferior_memory() returns an error.
18813
18814 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18815
18816 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18817 Unify with other clean targets.
18818
18819 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18820
18821 * server.c (handle_v_cont): Call set_desired_inferior.
18822
18823 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18824
18825 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18826
18827 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18828
18829 * linux-low.c (linux_wait): Unblock async I/O.
18830 (linux_resume): Block and enable async I/O.
18831 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18832 * server.h (block_async_io, unblock_async_io): Add prototypes.
18833
18834 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18835
18836 * remote-utils.c (remote_open): Print a status notice after
18837 opening a TCP port.
18838 * server.c (attach_inferior): Print a status notice after
18839 attaching.
18840
18841 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18842
18843 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18844
18845 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18846
18847 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18848 error packet.
18849 * server.c, target.h: Update copyright years.
18850
18851 2004-02-25 Roland McGrath <roland@redhat.com>
18852
18853 * target.h (struct target_ops): New member `read_auxv'.
18854 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18855 * linux-low.c (linux_read_auxv): New function.
18856 (linux_target_ops): Initialize `read_auxv' member to that.
18857
18858 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18859
18860 Committed by Jim Blandy <jimb@redhat.com>.
18861
18862 * linux-s390-low.c (s390_num_regs): Update.
18863 (s390_regmap): Remove control registers. Use __s390x__ predefine
18864 instead of GPR_SIZE to distiguish s390 and s390x targets.
18865
18866 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18867
18868 * linux-low.c: Update copyright year.
18869 (check_removed_breakpoint): Clear pending_is_breakpoint.
18870 (linux_set_resume_request, linux_queue_one_thread)
18871 (resume_status_pending_p): New functions.
18872 (linux_continue_one_thread): Use process->resume.
18873 (linux_resume): Only resume threads if there are no pending events.
18874 * linux-low.h (struct process_info): Add resume request
18875 pointer.
18876
18877 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18878
18879 * regcache.c (new_register_cache): Clear the allocated register
18880 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18881
18882 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18883
18884 * linux-low.c (linux_resume): Take a struct thread_resume *
18885 argument.
18886 (linux_wait): Update call.
18887 (resume_ptr): New static variable.
18888 (linux_continue_one_thread): Renamed from
18889 linux_continue_one_process. Use resume_ptr.
18890 (linux_resume): Use linux_continue_one_thread.
18891 * server.c (handle_v_cont, handle_v_requests): New functions.
18892 (myresume): New function.
18893 (main): Handle 'v' case.
18894 * target.h (struct thread_resume): New type.
18895 (struct target_ops): Change argument of "resume" to struct
18896 thread_resume *.
18897 (myresume): Delete macro.
18898
18899 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18900
18901 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18902 (uninstall): Support DESTDIR.
18903
18904 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18905
18906 * configure.srv: Add xscale*linux copy of arm*linux entry.
18907
18908 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18909
18910 * linux-arm-low.c (arm_reinsert_addr): New function.
18911 (the_low_target): Add arm_reinsert_addr.
18912
18913 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18914
18915 * mem-break.c: Remove whitespace at end of file.
18916
18917 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18918
18919 * configure.in: Check whether we need to prototype strerror.
18920 * server.h: Optionally prototype strerror.
18921 * gdbreplay.c (perror_with_name): Use strerror.
18922 * linux-low.c (linux_attach_lwp): Use strerror.
18923 * utils.c (perror_with_name): Use strerror.
18924 * config.in, configure: Regenerated.
18925
18926 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18927
18928 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18929 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18930
18931 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18932
18933 * Makefile.in (SFILES): Update.
18934 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18935 low-sun3.c: Remove files.
18936
18937 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18938
18939 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18940 (linux_detach_one_process, linux_detach): New functions.
18941 (linux_target_ops): Add linux_detach.
18942 * server.c (main): Handle 'D' packet.
18943 * target.h (struct target_ops): Add "detach" member.
18944 (detach_inferior): Define.
18945
18946 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18947
18948 From Kelley Cook <kelleycook@wideopenwest.com>:
18949 * configure.srv: Accept i[34567]86 variants.
18950
18951 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18952
18953 * linux-low.c (linux_wait_for_event): Correct comment typos.
18954 (linux_resume_one_process): Call check_removed_breakpoint.
18955 (linux_send_signal): New function.
18956 (linux_target_ops): Add linux_send_signal.
18957 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18958 of kill.
18959 * target.h (struct target_ops): Add send_signal.
18960
18961 2003-05-29 Jim Blandy <jimb@redhat.com>
18962
18963 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18964 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18965 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18966 away part of the register's value.
18967
18968 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18969
18970 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18971 (linux_wait_for_event, linux_init_signals): Likewise.
18972
18973 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18974
18975 * configure.in: Check for stdlib.h.
18976 * configure: Regenerated.
18977 * config.in: Regenerated.
18978
18979 2003-01-04 Andreas Schwab <schwab@suse.de>
18980
18981 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18982
18983 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18984
18985 * Makefile.in: Remove obsolete code.
18986
18987 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18988
18989 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18990 defined(PT_FPR0_HI).
18991
18992 2002-11-17 Stuart Hughes <seh@zee2.com>
18993
18994 * linux-arm-low.c (arm_num_regs): Increase.
18995 (arm_regmap): Include status register.
18996
18997 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18998
18999 * linux-low.c (register_addr): Remove incorrect -1 check.
19000
19001 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19002
19003 * linux-low.c (linux_create_inferior): Call setpgid. Return
19004 the new PID.
19005 (unstopped_p, linux_signal_pid): Remove.
19006 (linux_target_ops): Remove linux_signal_pid.
19007 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19008 global instead of target method.
19009 * target.h (struct target_ops): Remove signal_pid. Update comment
19010 for create_inferior.
19011 * server.c (signal_pid): New variable.
19012 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19013 gdbserver. Set the child to be the foreground process group.
19014 (attach_inferior): Set signal_pid.
19015
19016 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19017
19018 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19019
19020 2002-08-20 Jim Blandy <jimb@redhat.com>
19021
19022 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19023 default for this.
19024
19025 2002-08-01 Andrew Cagney <cagney@redhat.com>
19026
19027 * Makefile.in: Make chill references obsolete.
19028
19029 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19030
19031 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19032 * configure: Regenerate.
19033 * config.in: Regenerate.
19034
19035 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19036
19037 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19038 (perror_with_name, remote_close, remote_open, expect, play): Static.
19039
19040 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19041
19042 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19043 byte offsets instead of an array of indexes.
19044 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19045
19046 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19047
19048 * regcache.c: Add comment.
19049
19050 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19051
19052 * thread-db.c: New file.
19053 * proc-service.c: New file.
19054 * acinclude.m4: New file.
19055 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19056 proc-service.o, and thread-db.o.
19057 (linux-low.o): Add USE_THREAD_DB.
19058 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19059 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19060 * aclocal.m4: Regenerated.
19061 * config.in: Regenerated.
19062 * configure: Regenerated.
19063 * configure.in: Check for proc_service.h, sys/procfs.h,
19064 thread_db.h, and linux/elf.h headrs.
19065 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19066 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19067 Check for -lthread_db and thread support.
19068 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19069 PowerPC, and SuperH.
19070 * i387-fp.c: Constify arguments.
19071 * i387-fp.h: Likewise.
19072 * inferiors.c: (struct thread_info): Renamed from
19073 `struct inferior_info'. Remove PID member. Use generic inferior
19074 list header. All uses updated.
19075 (inferiors, signal_pid): Removed.
19076 (all_threads): New variable.
19077 (get_thread): Define.
19078 (add_inferior_to_list): New function.
19079 (for_each_inferior): New function.
19080 (change_inferior_id): New function.
19081 (add_inferior): Removed.
19082 (remove_inferior): New function.
19083 (add_thread): New function.
19084 (free_one_thread): New function.
19085 (remove_thread): New function.
19086 (clear_inferiors): Use for_each_inferior and free_one_thread.
19087 (find_inferior): New function.
19088 (find_inferior_id): New function.
19089 (inferior_target_data): Update argument type.
19090 (set_inferior_target_data): Likewise.
19091 (inferior_regcache_data): Likewise.
19092 (set_inferior_regcache_data): Likewise.
19093 * linux-low.c (linux_bp_reinsert): Remove.
19094 (all_processes, stopping_threads, using_thrads)
19095 (struct pending_signals, debug_threads, pid_of): New.
19096 (inferior_pid): Replace with macro.
19097 (struct inferior_linux_data): Remove.
19098 (get_stop_pc, add_process): New functions.
19099 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19100 Use add_process and add_thread.
19101 (linux_attach_lwp): New function, based on old linux_attach. Use
19102 add_process and add_thread. Set stop_expected for new threads.
19103 (linux_attach): New function.
19104 (linux_kill_one_process): New function.
19105 (linux_kill): Kill all LWPs.
19106 (linux_thread_alive): Use find_inferior_id.
19107 (check_removed_breakpoints, status_pending_p): New functions.
19108 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19109 Update. Use WNOHANG. Wait for cloned processes also. Update process
19110 struct for the found process.
19111 (linux_wait_for_event): New function.
19112 (linux_wait): Use it. Support LWPs.
19113 (send_sigstop, wait_for_sigstop, stop_all_processes)
19114 (linux_resume_one_process, linux_continue_one_process): New functions.
19115 (linux_resume): Support LWPs.
19116 (REGISTER_RAW_SIZE): Remove.
19117 (fetch_register): Use register_size instead. Call supply_register.
19118 (usr_store_inferior_registers): Likewise. Call collect_register.
19119 Fix recursive case.
19120 (regsets_fetch_inferior_registers): Improve error message.
19121 (regsets_store_inferior_registers): Add debugging.
19122 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19123 (unstopped_p, linux_signal_pid): New functions.
19124 (linux_target_ops): Add linux_signal_pid.
19125 (linux_init_signals): New function.
19126 (initialize_low): Call it. Initialize using_threads.
19127 * regcache.c (inferior_regcache_data): Add valid
19128 flag.
19129 (get_regcache): Fetch registers lazily. Add fetch argument
19130 and update all callers.
19131 (regcache_invalidate_one, regcache_invalidate): New
19132 functions.
19133 (new_register_cache): Renamed from create_register_cache.
19134 Return the new regcache.
19135 (free_register_cache): Change argument to a void *.
19136 (registers_to_string, registers_from_string): Call get_regcache
19137 with fetch flag set.
19138 (register_data): Make static. Pass fetch flag to get_regcache.
19139 (supply_register): Call get_regcache with fetch flag clear.
19140 (collect_register): Call get_regcache with fetch flag set.
19141 (collect_register_as_string): New function.
19142 * regcache.h: Update.
19143 * remote-utils.c (putpkt): Flush after debug output and use
19144 stderr.
19145 Handle input interrupts while waiting for an ACK.
19146 (input_interrupt): Use signal_pid method.
19147 (getpkt): Flush after debug output and use stderr.
19148 (outreg): Use collect_register_as_string.
19149 (new_thread_notify, dead_thread_notify): New functions.
19150 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19151 and general_thread.
19152 (look_up_one_symbol): Flush after debug output.
19153 * server.c (step_thread, server_waiting): New variables.
19154 (start_inferior): Don't use signal_pid. Update call to mywait.
19155 (attach_inferior): Update call to mywait.
19156 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19157 (main): Don't fetch/store registers explicitly. Use
19158 set_desired_inferior. Support proposed ``Hs'' packet. Update
19159 calls to mywait.
19160 * server.h: Update.
19161 (struct inferior_list, struct_inferior_list_entry): New.
19162 * target.c (set_desired_inferior): New.
19163 (write_inferior_memory): Constify.
19164 (mywait): New function.
19165 * target.h: Update.
19166 (struct target_ops): New signal_pid method.
19167 (mywait): Removed macro, added prototype.
19168
19169 * linux-low.h (regset_func): Removed.
19170 (regset_fill_func, regset_store_func): New.
19171 (enum regset_type): New.
19172 (struct regset_info): Add type field. Use new operation types.
19173 (struct linux_target_ops): stop_pc renamed to get_pc.
19174 Add decr_pc_after_break and breakpoint_at.
19175 (get_process, get_thread_proess, get_process_thread)
19176 (strut process_info, all_processes, linux_attach_lwp)
19177 (thread_db_init): New.
19178
19179 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19180 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19181 (the_low_target): Add new members.
19182 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19183 (i386_store_fpxregset): Constify.
19184 (target_regsets): Add new kind identifier.
19185 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19186 (i386_set_pc): Add debugging.
19187 (i386_breakpoint_at): New function.
19188 (the_low_target): Add new members.
19189 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19190 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19191 (mips_breakpoint_at): New.
19192 (the_low_target): Add new members.
19193 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19194 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19195 (the_low_target): Add new members.
19196 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19197 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19198 (the_low_target): Add new members.
19199 * linux-x86-64-low.c (target_regsets): Add new kind
19200 identifier.
19201
19202 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19203
19204 From Martin Pool <mbp@samba.org>:
19205 * server.c (gdbserver_usage): New function.
19206 (main): Call it.
19207
19208 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19209
19210 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19211 stop_at -> stop_pc.
19212
19213 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19214
19215 * Makefile.in: Remove obsolete code.
19216
19217 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19218
19219 * linux-low.c (regsets_fetch_inferior_registers),
19220 (regsets_store_inferior_registers): Removed cast to int from
19221 ptrace() calls.
19222 * regcache.h: Added declaration of struct inferior_info.
19223
19224 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19225
19226 * inferiors.c (struct inferior_info): Add regcache_data.
19227 (add_inferior): Call create_register_cache.
19228 (clear_inferiors): Call free_register_cache.
19229 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19230 * regcache.c (struct inferior_regcache_data): New.
19231 (registers): Remove.
19232 (get_regcache): New function.
19233 (create_register_cache, free_register_cache): New functions.
19234 (set_register_cache): Don't initialize the register cache here.
19235 (registers_to_string, registers_from_string, register_data): Call
19236 get_regcache.
19237 * regcache.h: Add prototypes.
19238 * server.h: Likewise.
19239
19240 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19241
19242 * mem-break.c: New file.
19243 * mem-break.h: New file.
19244 * Makefile.in: Add mem-break.o rule; update server.h
19245 dependencies.
19246 * inferiors.c (struct inferior_info): Add target_data
19247 member.
19248 (clear_inferiors): Free target_data member if set.
19249 (inferior_target_data, set_inferior_target_data): New functions.
19250 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19251 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19252 * linux-low.c (linux_bp_reinsert): New variable.
19253 (struct inferior_linux_data): New.
19254 (linux_create_inferior): Use set_inferior_target_data.
19255 (linux_attach): Likewise. Call add_inferior.
19256 (linux_wait_for_one_inferior): New function.
19257 (linux_wait): Call it.
19258 (linux_write_memory): Add const.
19259 (initialize_low): Call set_breakpoint_data.
19260 * linux-low.h (struct linux_target_ops): Add breakpoint
19261 handling members.
19262 * server.c (attach_inferior): Remove extra add_inferior
19263 call.
19264 * server.h: Include mem-break.h. Update inferior.c
19265 prototypes.
19266 * target.c (read_inferior_memory)
19267 (write_inferior_memory): New functions.
19268 * target.h (read_inferior_memory)
19269 (write_inferior_memory): Change macros to prototypes.
19270 (struct target_ops): Update comments. Add const to write_memory
19271 definition.
19272
19273 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19274
19275 * linux-low.c (usr_store_inferior_registers): Support
19276 registers which are allowed to fail to store.
19277 * linux-low.h (linux_target_ops): Likewise.
19278 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19279 (ppc_cannot_store_register): FPSCR may not be storable.
19280
19281 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19282
19283 * server.h: Include <string.h> if HAVE_STRING_H.
19284 * ChangeLog: Correct paths in last ChangeLog entry.
19285
19286 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19287
19288 * linux-low.h: Remove obsolete prototypes.
19289 (struct linux_target_ops): New.
19290 (extern the_low_target): New.
19291 * linux-low.c (num_regs, regmap): Remove declarations.
19292 (register_addr): Use the_low_target explicitly.
19293 (fetch_register): Likewise.
19294 (usr_fetch_inferior_registers): Likewise.
19295 (usr_store_inferior_registers): Likewise.
19296 * linux-arm-low.c (num_regs): Remove.
19297 (arm_num_regs): Define.
19298 (arm_regmap): Renamed from regmap, made static.
19299 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19300 made static.
19301 (arm_cannot_store_register): Renamed from cannot_store_register,
19302 made static.
19303 (the_low_target): New.
19304 * linux-i386-low.c (num_regs): Remove.
19305 (i386_num_regs): Define.
19306 (i386_regmap): Renamed from regmap, made static.
19307 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19308 made static.
19309 (i386_cannot_store_register): Renamed from cannot_store_register,
19310 made static.
19311 (the_low_target): New.
19312 * linux-ia64-low.c (num_regs): Remove.
19313 (ia64_num_regs): Define.
19314 (ia64_regmap): Renamed from regmap, made static.
19315 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19316 made static.
19317 (ia64_cannot_store_register): Renamed from cannot_store_register,
19318 made static.
19319 (the_low_target): New.
19320 * linux-m68k-low.c (num_regs): Remove.
19321 (m68k_num_regs): Define.
19322 (m68k_regmap): Renamed from regmap, made static.
19323 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19324 made static.
19325 (m68k_cannot_store_register): Renamed from cannot_store_register,
19326 made static.
19327 (the_low_target): New.
19328 * linux-mips-low.c (num_regs): Remove.
19329 (mips_num_regs): Define.
19330 (mips_regmap): Renamed from regmap, made static.
19331 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19332 made static.
19333 (mips_cannot_store_register): Renamed from cannot_store_register,
19334 made static.
19335 (the_low_target): New.
19336 * linux-ppc-low.c (num_regs): Remove.
19337 (ppc_num_regs): Define.
19338 (ppc_regmap): Renamed from regmap, made static.
19339 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19340 made static.
19341 (ppc_cannot_store_register): Renamed from cannot_store_register,
19342 made static.
19343 (the_low_target): New.
19344 * linux-s390-low.c (num_regs): Remove.
19345 (s390_num_regs): Define.
19346 (s390_regmap): Renamed from regmap, made static.
19347 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19348 made static.
19349 (s390_cannot_store_register): Renamed from cannot_store_register,
19350 made static.
19351 (the_low_target): New.
19352 * linux-sh-low.c (num_regs): Remove.
19353 (sh_num_regs): Define.
19354 (sh_regmap): Renamed from regmap, made static.
19355 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19356 made static.
19357 (sh_cannot_store_register): Renamed from cannot_store_register,
19358 made static.
19359 (the_low_target): New.
19360 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19361 (the_low_target): New.
19362
19363 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19364
19365 * Makefile.in: Add stamp-h target.
19366 * configure.in: Create stamp-h.
19367 * configure: Regenerated.
19368
19369 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19370
19371 * inferiors.c: New file.
19372 * target.c: New file.
19373 * target.h: New file.
19374 * Makefile.in: Add target.o and inferiors.o. Update
19375 dependencies.
19376 * linux-low.c (inferior_pid): New static variable,
19377 moved from server.c.
19378 (linux_create_inferior): Renamed from create_inferior.
19379 Call add_inferior. Return 0 on success instead of a PID.
19380 (linux_attach): Renamed from myattach.
19381 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19382 (linux_thread_alive): Renamed from mythread_alive.
19383 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19384 child dies.
19385 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19386 (regsets_store_inferior_registers): Correct error message.
19387 Add missing ``return 0''.
19388 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19389 (linux_store_registers): Renamed from store_inferior_registers.
19390 (linux_read_memory): Renamed from read_inferior_memory.
19391 (linux_write_memory): Renamed from write_inferior_memory.
19392 (linux_target_ops): New structure.
19393 (initialize_low): Call set_target_ops ().
19394 * remote-utils.c (unhexify): New function.
19395 (hexify): New function.
19396 (input_interrupt): Send signals to ``signal_pid''.
19397 * server.c (inferior_pid): Remove.
19398 (start_inferior): Update create_inferior call.
19399 (attach_inferior): Call add_inferior.
19400 (handle_query): New function.
19401 (main): Call handle_query for `q' packets.
19402 * server.h: Include "target.h". Remove obsolete prototypes.
19403 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19404
19405 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19406
19407 * Makefile.in: Add WARN_CFLAGS. Update configury
19408 dependencies.
19409 * configure.in: Check for <string.h>
19410 * configure: Regenerate.
19411 * config.in: Regenerate.
19412 * gdbreplay.c: Include needed system headers.
19413 (remote_open): Remove strchr prototype.
19414 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19415 * regcache.c (supply_register): Change buf argument to const void *.
19416 (supply_register_by_name): Likewise.
19417 (collect_register): Change buf argument to void *.
19418 (collect_register_by_name): Likewise.
19419 * regcache.h: Add missing prototypes.
19420 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19421 * server.c (handle_query): New function.
19422 (attached): New static variable, moved out of main.
19423 (main): Quiet longjmp clobber warnings.
19424 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19425 * utils.c (error): Remove NORETURN.
19426 (fatal): Likewise.
This page took 0.773352 seconds and 5 git commands to generate.