gdbserver: turn target op 'get_tib_address' into a method
[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 get_tib_address op into a method of
4 process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op. Also add
8 'supports_get_tib_address'.
9 * target.cc (process_target::get_tib_address): Define.
10 (process_target::supports_get_tib_address): Define.
11
12 Update the derived classes and callers below.
13
14 * server.cc (handle_query): Update.
15 * linux-low.cc (win32_target_ops): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 * nto-low.cc (nto_target_ops): Update.
18 * win32-low.cc (win32_target_ops): Update.
19 (win32_process_target::supports_get_tib_address): Define.
20 (win32_get_tib_address): Turn into ...
21 (win32_process_target::get_tib_address): ... this.
22 * win32-low.h (class win32_process_target): Update.
23
24 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
25
26 Turn process_stratum_target's thread_stopped op into a method of
27 process_target.
28
29 * target.h (struct process_stratum_target): Remove the target op.
30 (class process_target): Add the target op. Also add
31 'supports_thread_stopped'.
32 (target_thread_stopped): Update the macro.
33 * target.cc (process_target::thread_stopped): Define.
34 (process_target::supports_thread_stopped): Define.
35 (prepare_to_access_memory): Update.
36
37 Update the derived classes and callers below.
38
39 * server.cc (queue_stop_reply_callback): Update.
40 * linux-low.cc (linux_target_ops): Update.
41 (linux_process_target::supports_thread_stopped): Define.
42 (linux_thread_stopped): Turn into ...
43 (linux_process_target::thread_stopped): ... this.
44 * linux-low.h (class linux_process_target): Update.
45 * lynx-low.cc (lynx_target_ops): Update.
46 * nto-low.cc (nto_target_ops): Update.
47 * win32-low.cc (win32_target_ops): Update.
48
49 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
50
51 Turn process_stratum_target's read_pc and write_pc ops into
52 methods of process_target.
53
54 * target.h (struct process_stratum_target): Remove the target ops.
55 (class process_target): Add the target ops.
56 * target.cc (process_target::read_pc): Define.
57 (process_target::write_pc): Define.
58
59 Update the derived classes and callers below.
60
61 * regcache.cc (regcache_read_pc): Update.
62 (regcache_write_pc): Update.
63 * linux-low.cc (linux_target_ops): Update.
64 (linux_read_pc): Turn into ...
65 (linux_process_target::read_pc): ... this.
66 (linux_write_pc): Turn into ...
67 (linux_process_target::write_pc): ... this.
68 * linux-low.h (class linux_process_target): Update.
69 * lynx-low.cc (lynx_target_ops): Update.
70 * nto-low.cc (nto_target_ops): Update.
71 * win32-low.cc (win32_target_ops): Update.
72
73 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
74
75 Turn process_stratum_target's supports_tracepoints op into a
76 method of process_target.
77
78 * target.h (struct process_stratum_target): Remove the target op.
79 (class process_target): Add the target op.
80 (target_supports_tracepoints): Update the macro.
81 * target.cc (process_target::supports_tracepoints): Define.
82
83 Update the derived classes and callers below.
84
85 * linux-low.cc (linux_target_ops): Update.
86 (linux_supports_tracepoints): Turn into ...
87 (linux_process_target::supports_tracepoints): ... this.
88 * linux-low.h (class linux_process_target): Update.
89 * lynx-low.cc (lynx_target_ops): Update.
90 * nto-low.cc (nto_target_ops): Update.
91 * win32-low.cc (win32_target_ops): Update.
92
93 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
94
95 Turn process_stratum_target's process_qsupported op into a method
96 of process_target.
97
98 * target.h (struct process_stratum_target): Remove the target op.
99 (class process_target): Add the target op.
100 (target_process_qsupported): Update the macro.
101 * target.cc (process_target::process_qsupported): Define.
102
103 Update the derived classes and callers below.
104
105 * linux-low.cc (linux_target_ops): Update.
106 (linux_process_qsupported): Turn into ...
107 (linux_process_target::process_qsupported): ... this.
108 * linux-low.h (class linux_process_target): Update.
109 * lynx-low.cc (lynx_target_ops): Update.
110 * nto-low.cc (nto_target_ops): Update.
111 * win32-low.cc (win32_target_ops): Update.
112
113 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
114
115 Turn process_stratum_target's read_loadmap op into a method of
116 process_target.
117
118 * target.h (struct process_stratum_target): Remove the target op.
119 (class process_target): Add the target op. Also add
120 'supports_read_loadmap'.
121 * target.cc (process_target::read_loadmap): Define.
122 (process_target::supports_read_loadmap): Define.
123
124 Update the derived classes and callers below.
125
126 * server.cc (handle_qxfer_fdpic): Update.
127 (handle_query): Update.
128 * linux-low.cc (linux_target_ops): Update.
129 (linux_process_target::supports_read_loadmap): Define.
130 (linux_read_loadmap): Turn into ...
131 (linux_process_target::read_loadmap): ... this.
132 * linux-low.h (class linux_process_target): Update.
133 * lynx-low.cc (lynx_target_ops): Update.
134 * nto-low.cc (nto_target_ops): Update.
135 * win32-low.cc (win32_target_ops): Update.
136
137 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
138
139 Turn process_stratum_target's core_of_thread op into a method of
140 process_target.
141
142 * target.h (struct process_stratum_target): Remove the target op.
143 (class process_target): Add the target op.
144 (target_core_of_thread): Update the macro.
145 * target.cc (process_target::core_of_thread): Define.
146
147 Update the derived classes and callers below.
148
149 * linux-low.cc (linux_target_ops): Update.
150 (linux_process_target::core_of_thread): Define.
151 * linux-low.h (class linux_process_target): Update.
152 * lynx-low.cc (lynx_target_ops): Update.
153 * nto-low.cc (nto_target_ops): Update.
154 * win32-low.cc (win32_target_ops): Update.
155
156 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
157
158 Turn process_stratum_target's handle_monitor_command op into a
159 method of process_target.
160
161 * target.h (struct process_stratum_target): Remove the target op.
162 (class process_target): Add the target op.
163 (target_handle_monitor_command): Update the macro.
164 * target.cc (process_target::handle_monitor_command): Define.
165
166 Update the derived classes and callers below.
167
168 * server.cc (handle_query): Update.
169 * linux-low.cc (linux_target_ops): Update.
170 (linux_process_target::handle_monitor_command): Define.
171 * linux-low.h (class linux_process_target): Update.
172 * lynx-low.cc (lynx_target_ops): Update.
173 * nto-low.cc (nto_target_ops): Update.
174 * win32-low.cc (win32_target_ops): Update.
175
176 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
177
178 Turn process_stratum_target's handle_new_gdb_connection op into a
179 method of process_target.
180
181 * target.h (struct process_stratum_target): Remove the target op.
182 (class process_target): Add the target op.
183 (target_handle_new_gdb_connection): Update the macro.
184 * target.cc (process_target::handle_new_gdb_connection): Define.
185
186 Update the derived classes and callers below.
187
188 * linux-low.cc (linux_target_ops): Update.
189 (linux_handle_new_gdb_connection): Turn into ...
190 (linux_process_target::handle_new_gdb_connection): ... this.
191 * linux-low.h (class linux_process_target): Update.
192 * lynx-low.cc (lynx_target_ops): Update.
193 * nto-low.cc (nto_target_ops): Update.
194 * win32-low.cc (win32_target_ops): Update.
195
196 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
197
198 Turn process_stratum_target's supports_fork_events,
199 supports_vfork_events, and supports_exec_events ops into methods
200 of process_target.
201
202 * target.h (struct process_stratum_target): Remove the target ops.
203 (class process_target): Add the target ops.
204 (target_supports_fork_events): Update the macro.
205 (target_supports_vfork_events): Update the macro.
206 (target_supports_exec_events): Update the macro.
207 * target.cc (process_target::supports_fork_events): Define.
208 (process_target::supports_vfork_events): Define.
209 (process_target::supports_exec_events): Define.
210
211 Update the derived classes and callers below.
212
213 * linux-low.cc (linux_target_ops): Update.
214 (linux_supports_fork_events): Turn into ...
215 (linux_process_target::supports_fork_events): ... this.
216 (linux_supports_vfork_events): Turn into ...
217 (linux_process_target::supports_vfork_events): ... this.
218 (linux_supports_exec_events): Turn into ...
219 (linux_process_target::supports_exec_events): ... this.
220 * linux-low.h (class linux_process_target): Update.
221 * lynx-low.cc (lynx_target_ops): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 * win32-low.cc (win32_target_ops): Update.
224
225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
226
227 Turn process_stratum_target's supports_multi_process op into a
228 method of process_target.
229
230 * target.h (struct process_stratum_target): Remove the target op.
231 (class process_target): Add the target op.
232 * target.cc (process_target::supports_multi_process): Define.
233 (target_supports_multi_process): Update.
234
235 Update the derived classes and callers below.
236
237 * linux-low.cc (linux_target_ops): Update.
238 (linux_supports_multi_process): Turn into ...
239 (linux_process_target::supports_multi_process): ... this.
240 * linux-low.h (class linux_process_target): Update.
241 * lynx-low.cc (lynx_target_ops): Update.
242 * nto-low.cc (nto_target_ops): Update.
243 * win32-low.cc (win32_target_ops): Update.
244
245 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
246
247 Turn process_stratum_target's supports_non_stop, async, and
248 start_non_stop ops into methods of process_target.
249
250 * target.h (struct process_stratum_target): Remove the target ops.
251 (class process_target): Add the target ops.
252 (target_supports_non_stop): Update the macro.
253 (target_async): Update the macro.
254 (start_non_stop): Remove declaration.
255 * target.cc (process_target::supports_non_stop): Define.
256 (process_target::async): Define.
257 (process_target::start_non_stop): Define.
258 (start_non_stop): Remove.
259
260 Update the derived classes and callers below.
261
262 * server.cc (handle_qxfer_siginfo): Update.
263 (handle_query): Update.
264 * linux-low.cc (linux_target_ops): Update.
265 (linux_supports_non_stop): Turn into ...
266 (linux_process_target::supports_non_stop): ... this.
267 (linux_async): Turn into ...
268 (linux_process_target::async): ... this.
269 (linux_start_non_stop): Turn into ...
270 (linux_process_target::start_non_stop): ... this.
271 * linux-low.h (class linux_process_target): Update.
272 * lynx-low.cc (lynx_target_ops): Update.
273 * nto-low.cc (nto_target_ops): Update.
274 (nto_supports_non_stop): Remove; rely on the default behavior
275 instead.
276 * win32-low.cc (win32_target_ops): Update.
277
278 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
279
280 Turn process_stratum_target's qxfer_siginfo op into a method of
281 process_target.
282
283 * target.h (struct process_stratum_target): Remove the target op.
284 (class process_target): Add the target op. Also add
285 'supports_qxfer_siginfo'.
286 * target.cc (process_target::qxfer_siginfo): Define.
287 (process_target::supports_qxfer_siginfo): Define.
288
289 Update the derived classes and callers below.
290
291 * server.cc (handle_qxfer_siginfo): Update.
292 (handle_query): Update.
293 * linux-low.cc (linux_target_ops): Update.
294 (linux_process_target::supports_qxfer_siginfo): Define.
295 (linux_xfer_siginfo): Turn into ...
296 (linux_process_target::qxfer_siginfo): ... this.
297 * linux-low.h (class linux_process_target): Update.
298 * lynx-low.cc (lynx_target_ops): Update.
299 * nto-low.cc (nto_target_ops): Update.
300 * win32-low.cc (win32_target_ops): Update.
301
302 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
303
304 Turn process_stratum_target's qxfer_osdata op into a method of
305 process_target.
306
307 * target.h (struct process_stratum_target): Remove the target op.
308 (class process_target): Add the target op. Also add
309 'supports_qxfer_osdata'.
310 * target.cc (process_target::qxfer_osdata): Define.
311 (process_target::supports_qxfer_osdata): Define.
312
313 Update the derived classes and callers below.
314
315 * server.cc (handle_qxfer_osdata): Update.
316 (handle_query): Update.
317 * linux-low.cc (linux_target_ops): Update.
318 (linux_process_target::supports_qxfer_osdata): Define.
319 (linux_qxfer_osdata): Turn into ...
320 (linux_process_target::qxfer_osdata): ... this.
321 * linux-low.h (class linux_process_target): Update.
322 * lynx-low.cc (lynx_target_ops): Update.
323 * nto-low.cc (nto_target_ops): Update.
324 * win32-low.cc (win32_target_ops): Update.
325
326 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
327
328 Turn process_stratum_target's hostio_last_error op into a
329 method of process_target.
330
331 * target.h (struct process_stratum_target): Remove the target op.
332 (class process_target): Add the target op.
333 * target.cc: Add "hostio.h" to includes.
334 (process_target::hostio_last_error): Define.
335
336 Update the derived classes and callers below.
337
338 * hostio.cc (hostio_error): Update.
339 * linux-low.cc: Remove "hostio.h" from includes.
340 (linux_target_ops): Update.
341 * lynx-low.cc (lynx_target_ops): Update.
342 * nto-low.cc (nto_target_ops): Update.
343 * win32-low.h (class win32_process_target): Update.
344 * win32-low.cc (win32_target_ops): Update.
345 (wince_hostio_last_error): Turn into ...
346 (win32_process_target::hostio_last_error): ... this.
347
348 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
349
350 Turn process_stratum_target's get_tls_address op into a method of
351 process_target.
352
353 * target.h (struct process_stratum_target): Remove the target op.
354 (class process_target): Add the target op. Also add
355 'supports_get_tls_address'.
356 * target.cc (process_target::get_tls_address): Define.
357 (process_target::supports_get_tls_address): Define.
358
359 Update the derived classes and callers below.
360
361 * server.cc (handle_query): Update.
362 * linux-low.cc (linux_target_ops): Update.
363 (linux_process_target::supports_get_tls_address): Define.
364 (linux_process_target::get_tls_address): Define.
365 * linux-low.h (class linux_process_target): Update.
366 * lynx-low.cc (lynx_target_ops): Update.
367 * nto-low.cc (nto_target_ops): Update.
368 * win32-low.cc (win32_target_ops): Update.
369
370 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
371
372 Turn process_stratum_target's read_offsets op into a method of
373 process_target.
374
375 * target.h (struct process_stratum_target): Remove the target op.
376 (class process_target): Add the target op. Also add
377 'supports_read_offsets'.
378 * target.cc (process_target::read_offsets): Define.
379 (process_target::supports_read_offsets): Define.
380
381 Update the derived classes and callers below.
382
383 * server.cc (handle_query): Update.
384 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
385 (linux_target_ops): Update.
386 (linux_process_target::supports_read_offsets): Define.
387 (linux_read_offsets): Turn into ...
388 (linux_process_target::read_offsets): ... this.
389 * linux-low.h (class linux_process_target): Update.
390 * lynx-low.cc (lynx_target_ops): Update.
391 * nto-low.cc (nto_target_ops): Update.
392 * win32-low.cc (win32_target_ops): Update.
393
394 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
395
396 Turn process_stratum_target's stopped_by_watchpoint and
397 stopped_data_address ops into methods of process_target.
398
399 * target.h (struct process_stratum_target): Remove the target ops.
400 (class process_target): Add the target ops.
401 * target.cc (process_target::stopped_by_watchpoint): Define.
402 (process_target::stopped_data_address): Define.
403
404 Update the derived classes and callers below.
405
406 * remote-utils.cc (prepare_resume_reply): Update.
407 * linux-low.cc (linux_target_ops): Update.
408 (linux_stopped_by_watchpoint): Turn into ...
409 (linux_process_target::stopped_by_watchpoint): ... this.
410 (linux_stopped_data_address): Turn into ...
411 (linux_process_target::stopped_data_address): ... this.
412 * linux-low.h (class linux_process_target): Update.
413 * lynx-low.cc (lynx_target_ops): Update.
414 * nto-low.cc (nto_target_ops): Update.
415 (nto_stopped_by_watchpoint): Turn into ...
416 (nto_process_target::stopped_by_watchpoint): ... this.
417 (nto_stopped_data_address): Turn into ...
418 (nto_process_target::stopped_data_address): ... this.
419 * nto-low.h (class nto_process_target): Update.
420 * win32-low.cc (win32_target_ops): Update.
421 (win32_stopped_by_watchpoint): Turn into ...
422 (win32_process_target::stopped_by_watchpoint): ... this.
423 (win32_stopped_data_address): Turn into ...
424 (win32_process_target::stopped_data_address): ... this.
425 * win32-low.h (class win32_process_target): Update.
426
427 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
428
429 Turn process_stratum_target's supports_hardware_single_step op into
430 a method of process_target.
431
432 * target.h (struct process_stratum_target): Remove the target op.
433 (class process_target): Add the target op.
434 (target_supports_hardware_single_step): Update the macro.
435 (target_can_do_hardware_single_step): Remove declaration.
436 * target.cc (process_target::supports_hardware_single_step): Define.
437 (target_can_do_hardware_single_step): Remove.
438
439 Update the derived classes and callers below.
440
441 * linux-low.h (class linux_process_target): Update.
442 * linux-low.cc (linux_target_ops): Update.
443 (linux_supports_hardware_single_step): Turn into ...
444 (linux_process_target::supports_hardware_single_step): ... this.
445 * lynx-low.h (class lynx_process_target): Update.
446 * lynx-low.cc (lynx_target_ops): Update.
447 (lynx_process_target::supports_hardware_single_step): Define.
448 * nto-low.h (class nto_process_target): Update.
449 * nto-low.cc (nto_target_ops): Update.
450 (nto_process_target::supports_hardware_single_step): Define.
451 * win32-low.h (class win32_process_target): Update.
452 * win32-low.cc (win32_target_ops): Update.
453 (win32_process_target::supports_hardware_single_step): Define.
454
455 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
456
457 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
458 ops into methods of process_target.
459
460 * target.h (struct process_stratum_target): Remove the target ops.
461 (class process_target): Add the target ops.
462 (target_stopped_by_hw_breakpoint): Update the macro.
463 (target_supports_stopped_by_hw_breakpoint): Update the macro.
464 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
465 (process_target::supports_stopped_by_hw_breakpoint): Define.
466
467 Update the derived classes and callers below.
468
469 * linux-low.cc (linux_target_ops): Update.
470 (linux_stopped_by_hw_breakpoint): Turn into ...
471 (linux_process_target::stopped_by_hw_breakpoint): ... this.
472 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
473 (linux_process_target::supports_stopped_by_hw_breakpoint): ... 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_}stopped_by_sw_breakpoint
482 ops into methods of process_target.
483
484 * target.h (struct process_stratum_target): Remove the target ops.
485 (class process_target): Add the target ops.
486 (target_stopped_by_sw_breakpoint): Update the macro.
487 (target_supports_stopped_by_sw_breakpoint): Update the macro.
488 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
489 (process_target::supports_stopped_by_sw_breakpoint): Define.
490
491 Update the derived classes and callers below.
492
493 * linux-low.cc (linux_target_ops): Update.
494 (linux_stopped_by_sw_breakpoint): Turn into ...
495 (linux_process_target::stopped_by_sw_breakpoint): ... this.
496 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
497 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
498 * linux-low.h (class linux_process_target): Update.
499 * lynx-low.cc (lynx_target_ops): Update.
500 * nto-low.cc (nto_target_ops): Update.
501 * win32-low.cc (win32_target_ops): Update.
502
503 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
504
505 Turn process_stratum_target's insert_point and remove_point ops
506 into methods of process_target.
507
508 * target.h (struct process_stratum_target): Remove the target ops.
509 (class process_target): Add the target ops.
510 * target.cc (process_target::insert_point): Define.
511 (process_target::remove_point): Define.
512
513 Update the derived classes and callers below.
514
515 * mem-break.cc (set_raw_breakpoint_at): Update.
516 (delete_raw_breakpoint): Update.
517 (uninsert_raw_breakpoint): Update.
518 (reinsert_raw_breakpoint): Update.
519 * linux-low.cc (linux_target_ops): Update.
520 (linux_insert_point): Turn into ...
521 (linux_process_target::insert_point): ... this.
522 (linux_remove_point): Turn into ...
523 (linux_process_target::remove_point): ... this.
524 * linux-low.h (class linux_process_target): Update.
525 * lynx-low.cc (lynx_target_ops): Update.
526 * nto-low.cc (nto_target_ops): Update.
527 (nto_insert_point): Turn into ...
528 (nto_process_target::insert_point): ... this.
529 (nto_remove_point): Turn into ...
530 (nto_process_target::remove_point): ... this.
531 * nto-low.h (class nto_process_target): Update.
532 * win32-low.cc (win32_target_ops): Update.
533 (win32_insert_point): Turn into ...
534 (win32_process_target::insert_point): ... this.
535 (win32_remove_point): Turn into ...
536 (win32_process_target::remove_point): ... this.
537 * win32-low.h (class win32_process_target): Update.
538
539 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
540
541 Turn process_stratum_target's supports_z_point_type op into a
542 method of process_target.
543
544 * target.h (struct process_stratum_target): Remove the target op.
545 (class process_target): Add the target op.
546 * target.cc (process_target::supports_z_point_type): Define.
547
548 Update the derived classes and callers below.
549
550 * mem-break.cc (z_type_supported): Update.
551 * linux-low.cc (linux_target_ops): Update.
552 (linux_supports_z_point_type): Turn into ...
553 (linux_process_target::supports_z_point_type): ... 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_z_point_type): Turn into ...
558 (nto_process_target::supports_z_point_type): ... this.
559 * nto-low.h (class nto_process_target): Update.
560 * win32-low.cc (win32_target_ops): Update.
561 (win32_supports_z_point_type): Turn into ...
562 (win32_process_target::supports_z_point_type): ... this.
563 * win32-low.h (class win32_process_target): Update.
564
565 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
566
567 Turn process_stratum_target's read_auxv op into a method of
568 process_target.
569
570 * target.h (class process_stratum_target): Remove the target op.
571 (struct process_target): Add the target op. Also add
572 'supports_read_auxv'.
573 * target.cc (process_target::read_auxv): Define.
574 (process_target::supports_read_auxv): Define.
575
576 Update the derived classes and callers below.
577
578 * server.cc (handle_qxfer_auxv): Update.
579 (handle_query): Update.
580 * linux-low.cc (linux_target_ops): Update.
581 (linux_process_target::supports_read_auxv): Define.
582 (linux_read_auxv): Turn into ...
583 (linux_process_target::read_auxv): ... this.
584 * linux-low.h (class linux_process_target): Update.
585 * lynx-low.cc (lynx_target_ops): Update.
586 * nto-low.cc (nto_target_ops): Update.
587 (nto_process_target::supports_read_auxv): Define.
588 (nto_read_auxv): Turn into ...
589 (nto_process_target::read_auxv): ... this.
590 * nto-low.h (class nto_process_target): Update.
591 * win32-low.cc (win32_target_ops): Update.
592
593 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
594
595 Turn process_stratum_target's request_interrupt op into a method of
596 process_target.
597
598 * target.h (struct process_stratum_target): Remove the target op.
599 (class process_target): Add the target op.
600
601 Update the derived classes and callers below.
602
603 * remote-utils.cc (putpkt_binary_1): Update.
604 (input_interrupt): Update.
605 (getpkt): Update.
606 * server.cc (handle_v_requests): Update.
607 * linux-low.cc (linux_target_ops): Update.
608 (linux_request_interrupt): Turn into ...
609 (linux_process_target::request_interrupt): ... this.
610 * linux-low.h (class linux_process_target): Update.
611 * lynx-low.cc (lynx_target_ops): Update.
612 (lynx_request_interrupt): Turn into ...
613 (lynx_process_target::request_interrupt): ... this.
614 * lynx-low.h (class lynx_process_target): Update.
615 * nto-low.cc (nto_target_ops): Update.
616 (nto_request_interrupt): Turn into ...
617 (nto_process_target::request_interrupt): ... this.
618 * nto-low.h (class nto_process_target): Update.
619 * win32-low.cc (win32_target_ops): Update.
620 (win32_request_interrupt): Turn into ...
621 (win32_process_target::request_interrupt): ... this.
622 * win32-low.h (class win32_process_target): Update.
623
624 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
625
626 Turn process_stratum_target's look_up_symbols op into a method of
627 process_target.
628
629 * target.h (struct process_stratum_target): Remove the target op.
630 (class process_target): Add the target op.
631 * target.cc (process_target::look_up_symbols): Define.
632
633 Update the derived classes and callers below.
634
635 * server.cc (handle_query): Update.
636 * linux-low.cc (linux_target_ops): Update.
637 (linux_look_up_symbols): Turn into ...
638 (linux_process_target::look_up_symbols): ... this.
639 * linux-low.h (class linux_process_target): Update.
640 * lynx-low.cc (lynx_target_ops): Update.
641 * nto-low.cc (nto_target_ops): Update.
642 * win32-low.cc (win32_target_ops): Update.
643
644 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
645
646 Turn process_stratum_target's read_memory and write_memory
647 ops into methods of process_target.
648
649 * target.h (struct process_stratum_target): Remove the target ops.
650 (class process_target): Add the target ops.
651
652 Update the derived classes and callers below.
653
654 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
655 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
656 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
657 (arm_get_syscall_trapinfo): Update.
658 * linux-cris-low.cc (cris_breakpoint_at): Update.
659 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
660 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
661 * linux-mips-low.cc (mips_breakpoint_at): Update.
662 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
663 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
664 * linux-sh-low.cc (sh_breakpoint_at): Update.
665 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
666 (sparc_store_gregset_from_stack): Update.
667 (sparc_breakpoint_at): Update.
668 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
669 * linux-tile-low.cc (tile_breakpoint_at): Update.
670 * linux-x86-low.cc (x86_breakpoint_at): Update.
671 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
672 * mem-brea.cc (insert_memory_breakpoint): Update.
673 (validate_inserted_breakpoint): Update.
674 * target.cc (read_inferior_memory): Update.
675 (target_write_memory): Update.
676 * linux-low.cc (linux_target_ops): Update.
677 (linux_read_memory): Make a wrapper around the read_memory target
678 op call.
679 (linux_process_target::read_memory): Rename from linux_read_memory.
680 (linux_write_memory): Turn into ...
681 (linux_process_target::write_memory): ... this.
682 * linux-low.h (class linux_process_target): Update.
683 * lynx-low.cc (lynx_target_ops): Update.
684 (lynx_read_memory): Turn into ...
685 (lynx_process_target::read_memory): ... this.
686 (lynx_write_memory): Turn into ...
687 (lynx_process_target::write_memory): ... this.
688 * lynx-low.h (class lynx_process_target): Update.
689 * nto-low.cc (nto_target_ops): Update.
690 (nto_read_memory): Turn into ...
691 (nto_process_target::read_memory): ... this.
692 (nto_write_memory): Turn into ...
693 (nto_process_target::write_memory): ... this.
694 * nto-low.h (class nto_process_target): Update.
695 * win32-low.cc (win32_target_ops): Update.
696 (win32_read_inferior_memory): Turn into ...
697 (win32_process_target::read_memory): ... this.
698 (win32_write_inferior_memory): Turn into ...
699 (win32_process_target::write_memory): ... this.
700 * win32-low.h (class win32_process_target): Update.
701
702 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
703
704 Turn process_stratum_target's prepare_to_access_memory and
705 done_accessing_memory ops into methods of process_target.
706
707 * target.h (struct process_stratum_target): Remove the target ops.
708 (class process_target): Add the target ops.
709 * target.cc (process_target::prepare_to_access_memory): Define.
710 (process_target::done_accessing_memory): Define.
711 (prepare_to_access_memory): Update.
712 (done_accessing_memory): Update.
713
714 Update the derived classes and callers below.
715
716 * linux-low.cc (linux_target_ops): Update.
717 (linux_prepare_to_access_memory): Turn into ...
718 (linux_process_target::prepare_to_access_memory): ... this.
719 (linux_done_accessing_memory): Turn into ...
720 (linux_process_target::done_accessing_memory): ... this.
721 * linux-low.h (class linux_process_target): Update.
722 * lynx-low.cc (lynx_target_ops): Update.
723 * nto-low.cc (nto_target_ops): Update.
724 * win32-low.cc (win32_target_ops): Update.
725
726 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
727
728 Turn process_stratum_target's fetch_registers and store_registers
729 ops into methods of process_target.
730
731 * target.h (struct process_stratum_target): Remove the target ops.
732 (class process_target): Add the target ops.
733 (fetch_inferior_registers): Update the macro.
734 (store_inferior_registers): Update the macro.
735
736 Update the derived classes and callers below.
737
738 * linux-low.cc (linux_target_ops): Update.
739 (linux_fetch_registers): Turn into ...
740 (linux_process_target::fetch_registers): ... this.
741 (linux_store_registers): Turn into ...
742 (linux_process_target::store_registers): ... this.
743 * linux-low.h (class linux_process_target): Update.
744 * lynx-low.cc (lynx_target_ops): Update.
745 (lynx_fetch_registers): Turn into ...
746 (lynx_process_target::fetch_registers): ... this.
747 (lynx_store_registers): Turn into ...
748 (lynx_process_target::store_registers): ... this.
749 * lynx-low.h (class lynx_process_target): Update.
750 * nto-low.cc (nto_target_ops): Update.
751 (nto_fetch_registers): Turn into ...
752 (nto_process_target::fetch_registers): ... this.
753 (nto_store_registers): Turn into ...
754 (nto_process_target::store_registers): ... this.
755 * nto-low.h (class nto_process_target): Update.
756 * win32-low.cc (win32_target_ops): Update.
757 (win32_fetch_inferior_registers): Turn into ...
758 (win32_process_target::fetch_registers): ... this.
759 (win32_store_inferior_registers): Turn into ...
760 (win32_process_target::store_registers): ... this.
761 * win32-low.h (class win32_process_target): Update.
762
763 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
764
765 Turn process_stratum_target's wait op into a method of
766 process_target.
767
768 * target.h (struct process_stratum_target): Remove the target op.
769 (class process_target): Add the target op.
770
771 Update the derived classes and callers below.
772
773 * target.cc (target_wait): Update.
774 * linux-low.cc (linux_target_ops): Update.
775 (linux_wait): Turn into ...
776 (linux_process_target::wait): ... this.
777 * linux-low.h (class linux_process_target): Update.
778 * lynx-low.cc (lynx_target_ops): Update.
779 (lynx_wait): Turn into ...
780 (lynx_process_target::wait): ... this.
781 * lynx-low.h (class lynx_process_target): Update.
782 * nto-low.cc (nto_target_ops): Update.
783 (nto_wait): Turn into ...
784 (nto_process_target::wait): ... this.
785 * nto-low.h (class nto_process_target): Update.
786 * win32-low.cc (win32_target_ops): Update.
787 (win32_wait): Turn into ...
788 (win32_process_target::wait): ... this.
789 (do_initial_child_stuff): Update.
790 * win32-low.h (class win32_process_target): Update.
791
792 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
793
794 Turn process_stratum_target's resume op into a method of
795 process_target.
796
797 * target.h (struct process_stratum_target): Remove the target op.
798 (class process_target): Add the target op.
799
800 Update the derived classes and callers below.
801
802 * server.cc (resume): Update.
803 * target.cc (target_stop_and_wait): Update.
804 (target_continue_no_signal): Update.
805 (target_continue): Update.
806 * linux-low.cc (linux_target_ops): Update.
807 (linux_resume): Turn into ...
808 (linux_process_target::resume): ... this.
809 * linux-low.h (class linux_process_target): Update.
810 * lynx-low.cc (lynx_target_ops): Update.
811 (lynx_resume): Turn into ...
812 (lynx_process_target::resume): ... this.
813 * lynx-low.h (class lynx_process_target): Update.
814 * nto-low.cc (nto_target_ops): Update.
815 (nto_resume): Turn into ...
816 (nto_process_target::resume): ... this.
817 * nto-low.h (class nto_process_target): Update.
818 * win32-low.cc (win32_target_ops): Update.
819 (win32_resume): Turn into ...
820 (win32_process_target::resume): ... this.
821 (win32_process_target::detach): Update.
822 (do_initial_child_stuff): Update.
823 * win32-low.h (class win32_process_target): Update.
824
825 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
826
827 Turn process_stratum_target's thread_alive op into a method of
828 process_target.
829
830 * target.h (struct process_stratum_target): Remove the target op.
831 (class process_target): Add the target op.
832 (mythread_alive): Update the macro.
833
834 Update the derived classes and callers below.
835
836 * linux-low.cc (linux_target_ops): Update.
837 (linux_thread_alive): Turn into ...
838 (linux_process_target::thread_alive): ... this.
839 (wait_for_sigstop): Update.
840 * linux-low.h (class linux_process_target): Update.
841 * lynx-low.cc (lynx_target_ops): Update.
842 (lynx_thread_alive): Turn into ...
843 (lynx_process_target::thread_alive): ... this.
844 * lynx-low.h (class lynx_process_target): Update.
845 * nto-low.cc (nto_target_ops): Update.
846 (nto_thread_alive): Turn into ...
847 (nto_process_target::thread_alive): ... this.
848 * nto-low.h (class nto_process_target): Update.
849 * win32-low.cc (win32_target_ops): Update.
850 (win32_thread_alive): Turn into ...
851 (win32_process_target::thread_alive): ... this.
852 * win32-low.h (class win32_process_target): Update.
853
854 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
855
856 Turn process_stratum_target's join op into a method of
857 process_target.
858
859 * target.h (struct process_stratum_target): Remove the target op.
860 (class process_target): Add the target op.
861 (join_inferior): Update the macro.
862
863 Update the derived classes and callers below.
864
865 * linux-low.cc (linux_target_ops): Update.
866 (linux_join): Turn into ...
867 (linux_process_target::join): ... this.
868 * linux-low.h (class linux_process_target): Update.
869 * lynx-low.cc (lynx_target_ops): Update.
870 (lynx_join): Turn into ...
871 (lynx_process_target::join): ... this.
872 * lynx-low.h (class lynx_process_target): Update.
873 * nto-low.cc (nto_target_ops): Update.
874 (nto_process_target::join): Define.
875 * nto-low.h (class nto_process_target): Update.
876 * win32-low.cc (win32_target_ops): Update.
877 (win32_join): Turn into ...
878 (win32_process_target::join): ... this.
879 * win32-low.h (class win32_process_target): Update.
880
881 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
882
883 Turn process_stratum_target's mourn op into a method of
884 process_target.
885
886 * target.h (struct process_stratum_target): Remove the target op.
887 (class process_target): Add the target op.
888
889 Update the derived classes and callers below.
890
891 * target.cc (target_mourn_inferior): Update.
892 * linux-low.cc (linux_target_ops): Update.
893 (linux_mourn): Turn into ...
894 (linux_process_target::mourn): ... this.
895 (handle_extended_wait): Update.
896 (linux_process_target::kill): Update.
897 (linux_process_target::detach): Update.
898 * linux-low.h (class linux_process_target): Update.
899 * lynx-low.cc (lynx_target_ops): Update.
900 (lynx_mourn): Turn into ...
901 (lynx_process_target::mourn): ... this.
902 * lynx-low.h (class lynx_process_target): Update.
903 * nto-low.cc (nto_target_ops): Update.
904 (nto_mourn): Turn into ...
905 (nto_process_target::mourn): ... this.
906 * nto-low.h (class nto_process_target): Update.
907 * win32-low.cc (win32_target_ops): Update.
908 (win32_mourn): Turn into ...
909 (win32_process_target::mourn): ... this.
910 * win32-low.h (class win32_process_target): Update.
911
912 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
913
914 Turn process_stratum_target's detach op into a method of
915 process_target.
916
917 * target.h (struct process_stratum_target): Remove the target op.
918 (class process_target): Add the target op.
919 (detach_inferior): Update the macro.
920
921 Update the derived classes and callers below.
922
923 * linux-low.cc (linux_target_ops): Update.
924 (linux_detach): Turn into ...
925 (linux_process_target::detach): ... this.
926 * linux-low.h (class linux_process_target): Update.
927 * lynx-low.cc (lynx_target_ops): Update.
928 (lynx_detach): Turn into ...
929 (lynx_process_target::detach): ... this.
930 * lynx-low.h (class lynx_process_target): Update.
931 * nto-low.cc (nto_target_ops): Update.
932 (nto_detach): Turn into ...
933 (nto_process_target::detach): ... this.
934 * nto-low.h (class nto_process_target): Update.
935 * win32-low.cc (win32_target_ops): Update.
936 (win32_detach): Turn into ...
937 (win32_process_target::detach): ... this.
938 * win32-low.h (class win32_process_target): Update.
939
940 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
941
942 Turn process_stratum_target's kill op into a method of
943 process_target.
944
945 * target.h (struct process_stratum_target): Remove the target op.
946 (class process_target): Add the target op.
947
948 Update the derived classes and callers below.
949
950 * target.cc (kill_inferior): Update.
951 * linux-low.cc (linux_target_ops): Update.
952 (linux_kill): Turn into ...
953 (linux_process_target::kill): ... this.
954 * linux-low.h (class linux_process_target): Update.
955 * lynx-low.cc (lynx_target_ops): Update.
956 (lynx_kill): Turn into ...
957 (lynx_process_target::kill): ... this.
958 * lynx-low.h (class lynx_process_target): Update.
959 * nto-low.cc (nto_target_ops): Update.
960 (nto_kill): Turn into ...
961 (nto_process_target::kill): ... this.
962 * nto-low.h (class nto_process_target): Update.
963 * win32-low.cc (win32_target_ops): Update.
964 (win32_kill): Turn into ...
965 (win32_process_target::kill): ... this.
966 * win32-low.h (class win32_process_target): Update.
967
968 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
969
970 Turn process_stratum_target's attach op into a method of
971 process_target.
972
973 * target.h (struct process_stratum_target): Remove the target op.
974 (class process_target): Add the target op.
975 (myattach): Update the macro.
976
977 Update the derived classes and callers below.
978
979 * linux-low.cc (linux_target_ops): Update.
980 (linux_attach): Turn into ...
981 (linux_process_target::attach): ... this.
982 * linux-low.h (class linux_process_target): Update.
983 * lynx-low.cc (lynx_target_ops): Update.
984 (lynx_attach): Turn into ...
985 (lynx_process_target::attach): ... this.
986 * lynx-low.h (class lynx_process_target): Update.
987 * nto-low.cc (nto_target_ops): Update.
988 (nto_attach): Turn into ...
989 (nto_process_target::attach): ... this.
990 * nto-low.h (class nto_process_target): Update.
991 * win32-low.cc (win32_target_ops): Update.
992 (win32_attach): Turn into ...
993 (win32_process_target::attach): ... this.
994 * win32-low.h (class win32_process_target): Update.
995
996 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
997
998 Turn process_stratum_target's post_create_inferior op into a method
999 of process_target.
1000
1001 * target.h (struct process_stratum_target): Remove the target op.
1002 (class process_target): Add the target op.
1003 (target_post_create_inferior): Update the macro.
1004 * target.cc (process_target::post_create_inferior): Define.
1005
1006 Update the derived classes and callers below.
1007
1008 * linux-low.cc (linux_target_ops): Update.
1009 (linux_post_create_inferior): Turn into ...
1010 (linux_process_target::post_create_inferior): ... this.
1011 * linux-low.h (class linux_process_target): Update.
1012 * lynx-low.cc (lynx_target_ops): Update.
1013 * nto-low.cc (nto_target_ops): Update.
1014 * win32-low.cc (win32_target_ops): Update.
1015
1016 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1017
1018 Turn process_stratum_target's create_inferior op into a method of
1019 process_target.
1020
1021 * target.h (struct process_stratum_target): Remove the target op.
1022 (class process_target): Add the target op.
1023 (create_inferior): Rename the macro to ...
1024 (target_create_inferior): ... this.
1025
1026 Update the derived classes and callers below.
1027
1028 * server.cc (handle_v_run): Update.
1029 (captured_main): Update.
1030 (process_serial_event): Update.
1031 * linux-low.cc (linux_target_ops): Update.
1032 (linux_create_inferior): Turn into ...
1033 (linux_process_target::create_inferior): ... this.
1034 * linux-low.h (class linux_process_target): Update.
1035 * lynx-low.cc (lynx_target_ops): Update.
1036 (lynx_create_inferior): Turn into ...
1037 (lynx_process_target::create_inferior): ... this.
1038 * lynx-low.h (class lynx_process_target): Update.
1039 * nto-low.cc (nto_target_ops): Update.
1040 (nto_create_inferior): Turn into ...
1041 (nto_process_target::create_inferior): ... this.
1042 * nto-low.h (class nto_process_target): Update.
1043 * win32-low.cc (win32_target_ops): Update.
1044 (win32_create_inferior): Turn into ...
1045 (win32_process_target::create_inferior): ... this.
1046 * win32-low.h (class win32_process_target): Update.
1047
1048 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1049
1050 * target.h (class process_target): New class definition.
1051 (struct process_stratum_target) <pt>: New field with type
1052 'process_target*'.
1053 * linux-low.h (class linux_process_target): Define as a derived
1054 class of 'process_target'.
1055 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1056 as the 'pt' field.
1057 * lynx-low.h (class lynx_process_target): Define as a derived
1058 class of 'process_target'.
1059 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1060 as the 'pt' field.
1061 * nto-low.h (class nto_process_target): Define as a derived
1062 class of 'process_target'.
1063 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1064 as the 'pt' field.
1065 * win32-low.h (class win32_process_target): Define as a derived
1066 class of 'process_target'.
1067 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1068 as the 'pt' field.
1069
1070 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1071
1072 * configure: Regenerate.
1073
1074 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1075 Andrew Burgess <andrew.burgess@embecosm.com>
1076
1077 * linux-riscv-low.cc: New file.
1078 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1079 and nat/riscv-linux-tdesc.c.
1080 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1081 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1082 Define.
1083
1084 2020-02-14 Tom Tromey <tom@tromey.com>
1085
1086 * acinclude.m4: Don't include acx_configure_dir.m4.
1087 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1088 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1089 (all, install-only, uninstall, clean-info, clean)
1090 (maintainer-clean): Don't recurse.
1091 (subdir_do, all-lib): Remove.
1092 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1093 (GNULIB_H): Remove.
1094 (generated_files): Update.
1095 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1096 * configure: Rebuild.
1097 * configure.ac: Don't configure gnulib or libiberty.
1098 (GNULIB): Update.
1099
1100 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1101
1102 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1103 preparing the command line for CreateProcess.
1104 (win32_create_inferior): Reflect the program name in debugging
1105 output that shows the process and its command line.
1106
1107 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1108
1109 * Makefile.in: Rename source files from .c to .cc.
1110 * %.c: Rename to %.cc.
1111 * configure.ac: Rename server.c to server.cc.
1112 * configure: Re-generate.
1113
1114 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1115
1116 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1117
1118 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1119
1120 * win32-low.c (win32_create_inferior): Set signal_pid.
1121
1122 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1123 Pedro Alves <palves@redhat.com>
1124
1125 Skip building gdbserver in a cross-configuration.
1126 * configure.srv: Set $gdbserver_host depending on whether $target
1127 is $host. Use $gdbserver_host instead of $host.
1128
1129 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1130
1131 * configure: Re-generate.
1132
1133 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1134
1135 * configure: Re-generate.
1136
1137 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1138
1139 * acinclude.m4: Update warning.m4 path.
1140
1141 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1142
1143 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1144 (handle_exception): Set siginfo_er.
1145 (win32_xfer_siginfo): New function.
1146
1147 2020-02-07 Tom Tromey <tom@tromey.com>
1148 Pedro Alves <palves@redhat.com>
1149
1150 * README: Update build documentation.
1151 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1152 host, not target.
1153 * configure.ac: Update paths.
1154 * configure: Rebuild.
1155 * acinclude.m4: Update paths.
1156 * Makefile.in: Update include paths.
1157 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1158 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1159 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1160 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1161 (%-generated.c): Update paths.
1162 * Move entire directory from ../gdb/gdbserver.
1163
1164 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1165
1166 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1167
1168 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1169
1170 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1171 assignment instead of srv_linux_obj.
1172
1173 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1174
1175 * server.c (handle_qxfer_libraries): Write segment-address with
1176 paddress.
1177
1178 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1179
1180 * Makefile.in (install-strip): New target.
1181 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1182 * aclocal.m4: Regenerate.
1183 * configure: Regenerate.
1184 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1185
1186 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1187
1188 * Makefile.in (SFILES): Adjust paths to point to real files.
1189 (OBS): Move waitstatus.o to target/waitstatus.o.
1190 (TAGS): Transform paths appropriately.
1191 (%.o): Rename to...
1192 (nat/%.o): ... this pattern rule.
1193 (%.o): Rename to...
1194 (target/%.o): ... this pattern rule.
1195 * configure.srv: Adjust paths throughout to include nat/ prefix
1196 with the revant files.
1197 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1198 * configure: Regenerate.
1199
1200 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1201
1202 * Makefile.in (TAGS): Remove config files from the recipe.
1203
1204 2020-01-14 Tom Tromey <tom@tromey.com>
1205
1206 * configure: Rebuild.
1207 * configure.ac: Remove any checks that were added to common.m4.
1208 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1209 lib-link.m4.
1210
1211 2020-01-14 Tom Tromey <tom@tromey.com>
1212
1213 * server.h: Include config.h.
1214 * gdbreplay.c: Include config.h.
1215 * configure: Rebuild.
1216 * configure.ac: Don't source common.host.
1217 * acinclude.m4: Update path.
1218 * Makefile.in (INCSUPPORT): New variable.
1219 (INCLUDE_CFLAGS): Add INCSUPPORT.
1220 (SFILES): Update paths.
1221 (version-generated.c): Update path to create-version.sh.
1222 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1223
1224 2020-01-14 Tom Tromey <tom@tromey.com>
1225
1226 * configure.ac (LIBS): Use WIN32APILIBS.
1227 (USE_WIN32API): Don't define.
1228 * configure: Rebuild.
1229
1230 2020-01-14 Tom Tromey <tom@tromey.com>
1231
1232 * configure: Rebuild.
1233
1234 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1235
1236 * Makefile.in (%-generated.c): Remove rule for files from
1237 regformats/i386.
1238
1239 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1240
1241 * configure: Re-generate.
1242
1243 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1244
1245 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1246 Define to static.
1247 * tracepoint.c (stop_tracing, flush_trace_buffer,
1248 about_to_request_buffer_space, get_trace_state_variable_value,
1249 set_trace_state_variable_value, gdb_collect): Add declaration.
1250
1251 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1252
1253 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1254 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1255 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1256 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1257 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1258 static.
1259
1260 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1261
1262 * inferiors.c: Include gdbsupport/common-inferior.h.
1263
1264 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1265
1266 * hostio-errno.c: Include hostio.h.
1267
1268 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1269
1270 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1271 prerequisite.
1272
1273 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1274
1275 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1276 * linux-arm-tdesc.h: Include arch/arm.h.
1277
1278 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1279
1280 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1281
1282 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1283
1284 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1285 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1286
1287 2020-01-10 Pedro Alves <palves@redhat.com>
1288
1289 * fork-child.c (post_fork_inferior): Pass target down to
1290 startup_inferior.
1291 * inferiors.c (switch_to_thread): Add process_stratum_target
1292 parameter.
1293 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1294 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1295 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1296 * remote-utils.c (prepare_resume_reply): Pass the target to
1297 switch_to_thread.
1298 * target.c (the_target): Now a process_stratum_target.
1299 (done_accessing_memory): Pass the target to switch_to_thread.
1300 (set_target_ops): Ajust to use process_stratum_target.
1301 * target.h (struct target_ops): Rename to ...
1302 (struct process_stratum_target): ... this.
1303 (the_target, set_target_ops): Adjust.
1304 (prepare_to_access_memory): Adjust comment.
1305 * win32-low.c (child_xfer_memory): Adjust to use
1306 process_stratum_target.
1307 (win32_target_ops): Now a process_stratum_target.
1308
1309 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1310 Pedro Alves <palves@redhat.com>
1311
1312 * win32-low.c (get_child_debug_event): Extract the fatal exception
1313 from the exit status and convert to the equivalent Posix signal
1314 number.
1315 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1316 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1317
1318 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1319
1320 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1321
1322 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1323
1324 * server.c (gdbserver_version): Change copyright year to 2020.
1325 * gdbreplay.c (gdbreplay_version): Likewise.
1326
1327 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1328
1329 * configure: Regenerate.
1330 * configure.ac: Quote variable arguments of test.
1331
1332 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1333
1334 * Makefile.in: Fix build with GNU Make 3.81
1335
1336 2019-12-16 Tom Tromey <tromey@adacore.com>
1337
1338 * server.c (get_exec_file): Constify result.
1339
1340 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1341
1342 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1343 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1344 * config.in: Regenerate.
1345 * configure: Regenerate.
1346 * configure.ac: Don't check for strerror.
1347 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1348 Call safe_strerror instead of strerror.
1349 * server.h (strerror): Remove this now-unnecessary declaration.
1350 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1351 strerror.
1352 (gdb_agent_helper_thread): Likewise.
1353 * utils.c (perror_with_name): Likewise.
1354
1355 2019-11-26 Tom Tromey <tom@tromey.com>
1356
1357 * configure, config.in: Rebuild.
1358
1359 2019-11-26 Tom Tromey <tom@tromey.com>
1360
1361 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1362 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1363 gdb_sigmask.
1364 * configure, config.in: Rebuild.
1365
1366 2019-11-26 Tom Tromey <tom@tromey.com>
1367
1368 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1369 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1370 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1371 * acinclude.m4: Include ax_pthread.m4.
1372 * config.in, configure: Rebuild.
1373
1374 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1375
1376 * debug.c (debug_set_output): Call safe_strerror instead of
1377 strerror.
1378 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1379 (linux_kill_one_lwp): Likewise.
1380 (linux_detach_one_lwp): Likewise.
1381 (linux_wait_for_event_filtered): Likewise.
1382 (store_register): Likewise.
1383 * lynx-low.c (lynx_attach): Likewise.
1384 * mem-break.c (insert_memory_breakpoint): Likewise.
1385 (remove_memory_breakpoint): Likewise.
1386 (delete_fast_tracepoint_jump): Likewise.
1387 (set_fast_tracepoint_jump): Likewise.
1388 (uninsert_fast_tracepoint_jumps_at): Likewise.
1389 (reinsert_fast_tracepoint_jumps_at): Likewise.
1390 * nto-low.c (nto_xfer_memory): Likewise.
1391 (nto_resume): Likewise.
1392
1393 2019-11-20 Luis Machado <luis.machado@linaro.org>
1394
1395 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1396 instead of register count.
1397 * tdesc.c (tdesc_contains_feature): New function.
1398 * tdesc.h (tdesc_contains_feature): New prototype.
1399
1400 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1401
1402 * Makefile.in: Add safe-strerror.c.
1403 * configure: Regenerate.
1404 * configure.ac: Don't source common.host.
1405
1406 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1407
1408 * config.in: Regenerate.
1409 * configure: Regenerate.
1410
1411 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1412
1413 * ax.c (ax_printf): Handle size_t_arg.
1414
1415 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1416
1417 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1418 * mi/mi-main.c (output_cores): Likewise.
1419 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1420 (linux_xfer_osdata_modules): Likewise.
1421 * remote.c (register_remote_support_xml): Likewise.
1422 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1423 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1424
1425 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1426
1427 * configure: Regenerate.
1428 * configure.ac: Remove check for strerror_r.
1429
1430 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1431
1432 * config.in: Regenerate.
1433 * configure: Regenerate.
1434 * configure.ac: Also check for strerror_r.
1435
1436 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1437
1438 * ax.h (debug_agent): Remove duplicate declaration.
1439
1440 2019-10-26 Tom de Vries <tdevries@suse.de>
1441
1442 * linux-aarch64-low.c: Fix typos in comments.
1443 * linux-arm-low.c: Same.
1444 * linux-low.c: Same.
1445 * linux-ppc-low.c: Same.
1446 * proc-service.c: Same.
1447 * regcache.h: Same.
1448 * server.c: Same.
1449 * tracepoint.c: Same.
1450 * win32-low.c: Same.
1451
1452 2019-10-25 Tom Tromey <tromey@adacore.com>
1453
1454 * utils.c (xstrdup): Remove.
1455
1456 2019-10-23 Tom Tromey <tom@tromey.com>
1457
1458 * configure, config.in: Rebuild.
1459
1460 2019-10-23 Tom Tromey <tom@tromey.com>
1461
1462 * configure: Rebuild.
1463 * acinclude.m4: Use m4_include, not sinclude.
1464
1465 2019-10-17 Tom Tromey <tromey@adacore.com>
1466
1467 * configure: Rebuild.
1468 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1469 in AC_CONFIG_FILES invocation.
1470 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1471 invocation.
1472
1473 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1474
1475 * server.c: Include xml-builtin.h.
1476 (get_xml_features): Don't declare xml_builtins here.
1477
1478 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1479
1480 * Makefile.in: Remove references to vec-ipa.o.
1481
1482 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1483
1484 * Makefile.in: Remove references to vec.c.
1485
1486 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1487
1488 * server.c (server_waiting): Change to bool.
1489 (extended_protocol): Likewise.
1490 (response_needed): Likewise.
1491 (exit_requested): Likewise.
1492 (run_once): Likewise.
1493 (report_no_resumed): Likewise.
1494 (non_stop): Likewise.
1495 (disable_packet_vCont): Likewise.
1496 (disable_packet_Tthread): Likewise.
1497 (disable_packet_qC): Likewise.
1498 (disable_packet_qfThreadInfo): Likewise.
1499 (handle_general_set): Update.
1500 (handle_detach): Update.
1501 (handle_monitor_command): Update.
1502 (handle_query): Update.
1503 (captured_main): Update.
1504 (process_serial_event): Update.
1505 * server.h (server_waiting): Change to bool.
1506 (disable_packet_vCont): Likewise.
1507 (disable_packet_Tthread): Likewise.
1508 (disable_packet_qC): Likewise.
1509 (disable_packet_qfThreadInfo): Likewise.
1510 (run_once): Likewise.
1511 (non_stop): Likewise.
1512 * target.c (target_stop_and_wait): Update.
1513
1514 2019-10-02 Tom Tromey <tromey@adacore.com>
1515
1516 * Makefile.in (SFILES): Add common-inferior.c.
1517 (OBS): Add common-inferior.o.
1518 * server.c (startup_with_shell): Don't define.
1519
1520 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1521
1522 * linux-low.c (linux_low_read_btrace): Update for change to
1523 std::vector.
1524
1525 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1526
1527 * debug.c (debug_threads): Remove comment in favor of the header.
1528 * debug.h (using_threads): Add declaration.
1529 (debug_threads): Add comment.
1530 * linux-aarch64-low.c: Include debug.h and remove declaration of
1531 debug_threads.
1532 * nto-low.c: Likewise.
1533 * remote-utils.c: Likewise.
1534 * thread-db.c: Likewise.
1535
1536 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1537
1538 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1539 and powerpc-cell64l-ipa.o.
1540 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1541 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1542 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1543 (spu*-*-*): Remove.
1544
1545 * spu-low.c: Remove file.
1546
1547 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1548 (parse_spufs_run): Remove.
1549 (ppc_get_pc): Remove Cell/B.E. support.
1550 (ppc_set_pc): Likewise.
1551 (ppc_breakpoint_at): Likewise.
1552 (ppc_arch_setup): Likewise.
1553 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1554 tdesc_powerpc_cell32l.
1555 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1556 or init_registers_powerpc_cell32l.
1557 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1558 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1559 or init_registers_powerpc_cell32l.
1560 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1561 (init_registers_powerpc_cell32l): Remove prototype.
1562 (init_registers_powerpc_cell64l): Likewise.
1563
1564 * target.h (struct target_ops): Remove qxfer_spu member.
1565 * server.c (handle_qxfer_spu): Remove.
1566 (qxfer_packets): Remove entry for "spu".
1567 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1568 * linux-low.c (SPUFS_MAGIC): Remove.
1569 (spu_enumerate_spu_ids): Remove.
1570 (linux_qxfer_spu): Remove.
1571 (linux_target_ops): Remove qxfer_spu member.
1572 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1573 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1574 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1575
1576 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1577
1578 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1579 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1580 * config.in: Regenerate.
1581 * configure: Regenerate.
1582
1583 2019-08-15 Tom Tromey <tromey@adacore.com>
1584
1585 * target.c (target_write_memory): Use gdb::byte_vector.
1586
1587 2019-08-15 Tom Tromey <tromey@adacore.com>
1588
1589 * tracepoint.c (write_inferior_data_pointer)
1590 (write_inferior_integer, write_inferior_int8)
1591 (write_inferior_uinteger, m_tracepoint_action_download)
1592 (r_tracepoint_action_download, x_tracepoint_action_download)
1593 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1594 (download_agent_expr, download_tracepoint_1)
1595 (download_trace_state_variables, upload_fast_traceframes): Update.
1596 * server.c (gdb_write_memory): Update.
1597 * remote-utils.c (relocate_instruction): Update.
1598 * proc-service.c (ps_pdwrite): Update.
1599 * mem-break.c (remove_memory_breakpoint)
1600 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1601 (uninsert_fast_tracepoint_jumps_at)
1602 (reinsert_fast_tracepoint_jumps_at): Update.
1603 * linux-x86-low.c (append_insns)
1604 (i386_install_fast_tracepoint_jump_pad)
1605 (amd64_write_goto_address, i386_write_goto_address): Update.
1606 * linux-s390-low.c (append_insns, s390_write_goto_address):
1607 Update.
1608 * linux-ppc-low.c (ppc_relocate_instruction)
1609 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1610 (ppc_write_goto_address): Update.
1611 * linux-aarch64-low.c (append_insns): Update.
1612 * target.h (struct target_ops): Update.
1613 (write_inferior_memory): Don't declare.
1614 * target.c (target_write_memory): Rename from
1615 write_inferior_memory. Remove old target_write_memory.
1616
1617 2019-08-15 Tom Tromey <tromey@adacore.com>
1618
1619 * target.c (write_inferior_memory): Use std::vector.
1620
1621 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1622
1623 PR build/24886
1624 * configure.ac: Drop enable-libmcheck support.
1625 * configure, config.in: Rebuild.
1626 * acinclude.m4: Don't include it.
1627
1628 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1629
1630 * configure.srv: Remove Arm xml files.
1631
1632 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1633
1634 * configure.srv: Add new files. Remove xml generated files.
1635 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1636 registers.
1637 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1638 * linux-aarch32-tdesc.c: New file.
1639 * linux-aarch32-tdesc.h: New file.
1640 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1641 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1642 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1643 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1644 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1645 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1646 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1647 (arm_read_description): Call arm_linux_read_description.
1648 (initialize_low_arch): Don't init registers.
1649 * linux-arm-tdesc.c: New file.
1650 * linux-arm-tdesc.h: New file.
1651
1652 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1653
1654 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1655 Move counter inside for.
1656 (arm_read_description): Check ptrace earlier.
1657 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1658
1659 2019-07-09 Tom Tromey <tom@tromey.com>
1660
1661 * configure: Rebuild.
1662 * configure.ac: Change common to gdbsupport.
1663 * acinclude.m4: Change common to gdbsupport.
1664 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1665 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1666 common to gdbsupport.
1667 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1668 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1669 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1670 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1671 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1672 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1673 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1674 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1675 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1676 common to gdbsupport.
1677
1678 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1679
1680 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1681 defines.
1682 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1683
1684 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1685
1686 * configure.srv: Remove legacy xml.
1687 * linux-aarch64-low.c (initialize_low_arch): Remove
1688 initialize_low_tdesc call.
1689 * linux-aarch64-tdesc-selftest.c: Remove file.
1690 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1691 * linux-x86-low.c (initialize_low_arch): Remove
1692 initialize_low_tdesc call.
1693 * linux-x86-tdesc-selftest.c: Remove file.
1694 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1695
1696 2019-06-20 Tom de Vries <tdevries@suse.de>
1697
1698 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1699 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1700
1701 2019-06-19 Tom de Vries <tdevries@suse.de>
1702
1703 * debug.h (debug_write): Change return type to ssize_t.
1704 * debug.c (debug_write): Same.
1705
1706 2019-06-14 Tom Tromey <tom@tromey.com>
1707
1708 * configure.ac: Use new path to gnulib.
1709 * configure: Rebuild.
1710 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1711 to gnulib.
1712
1713 2019-06-11 Tom Tromey <tom@tromey.com>
1714
1715 * Makefile.in (SFILES): Add alloc.c.
1716 (OBS): Add alloc.o.
1717 (IPA_OBJS): Add alloc-ipa.o.
1718 (alloc-ipa.o): New target.
1719 (%.o: ../%.c): New pattern rule.
1720
1721 2019-06-10 Tom Tromey <tromey@adacore.com>
1722
1723 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1724 end warning with a newline.
1725 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1726 newline.
1727 * thread-db.c (attach_thread): Don't end warning with a newline.
1728 (thread_db_notice_clone): Likewise.
1729 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1730 newline.
1731 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1732 end warning with a newline.
1733
1734 2019-06-04 Pedro Alves <palves@redhat.com>
1735
1736 * server.c (captured_main): Use make_unique_xstrdup.
1737
1738 2019-06-02 Tom Tromey <tom@tromey.com>
1739
1740 * gdbreplay.c (fromhex): Remove.
1741 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1742
1743 2019-05-29 Tom Tromey <tromey@adacore.com>
1744
1745 * configure: Rebuild.
1746
1747 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1748
1749 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1750 sign extension code on 32-bit builds.
1751
1752 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1753
1754 * remote-utils.c:
1755 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1756
1757 2019-04-19 Tom Tromey <tom@tromey.com>
1758
1759 * server.c (struct vstop_notif): Derive from notif_event.
1760 <base>: Remove.
1761 (queue_stop_reply): Update.
1762 (remove_all_on_match_ptid): Change type. Rewrite.
1763 (discard_queued_stop_replies): Rewrite.
1764 (in_queued_stop_replies_ptid): Change type.
1765 (in_queued_stop_replies): Rewrite.
1766 (notif_stop): Update.
1767 (queue_stop_reply_callback): Update.
1768 (captured_main): Don't call initialize_notif.
1769 (push_stop_notification): Update.
1770 * notif.c (notif_write_event, handle_notif_ack)
1771 (notif_event_enque, notif_push): Update.
1772 (notif_event_xfree, initialize_notif): Remove.
1773 * notif.h (struct notif_event): Include <list>, not
1774 "common/queue.h".
1775 (struct notif_server) <queue>: Now a std::list.
1776 (notif_event_p): Remove typedef.
1777 (initialize_notif): Don't declare.
1778 (struct notif_event): Add virtual destructor.
1779
1780 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1781
1782 * ax.c (ax_vdebug): Call debug_printf.
1783 * debug.c (debug_write): New function.
1784 * debug.h (debug_write): New declaration.
1785 * linux-low.c (sigchld_handler): Call debug_write.
1786
1787 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1788
1789 * debug.c (debug_set_output): New function.
1790 (debug_vprintf): Send output to debug_file.
1791 (debug_flush): Likewise.
1792 * debug.h (debug_set_output): New declaration.
1793 * server.c (handle_monitor_command): Add debug-file option.
1794 (captured_main): Likewise.
1795
1796 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1797
1798 * debug.c (remote_debug): Add definition.
1799 * debug.h (remote_debug): Add declaration.
1800 * hostio.c (remote_debug): Remove declaration.
1801 * remote-utils.c (struct ui_file): Likewise.
1802 (remote_debug): Likewise.
1803 * remote-utils.h (remote_debug): Likewise,
1804 * server.c (remote_debug): Remove definition.
1805
1806 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1807
1808 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1809 when using a 64-bit gdbserver.
1810
1811 2019-04-09 Tom Tromey <tromey@adacore.com>
1812
1813 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1814
1815 2019-04-08 Tom Tromey <tom@tromey.com>
1816
1817 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1818 throw.
1819 (linux_resume_one_lwp): Likewise.
1820
1821 2019-04-08 Tom Tromey <tom@tromey.com>
1822
1823 * gdbreplay.c: Update.
1824 * linux-low.c: Update.
1825 * server.c: Update.
1826
1827 2019-04-08 Tom Tromey <tom@tromey.com>
1828
1829 * server.c: Use C++ exception handling.
1830 * linux-low.c: Use C++ exception handling.
1831 * gdbreplay.c: Use C++ exception handling.
1832
1833 2019-04-08 Tom Tromey <tom@tromey.com>
1834
1835 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1836 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1837 (captured_main, main): Update.
1838 * gdbreplay.c (main): Update.
1839
1840 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1841
1842 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1843 value in argument pointer, return 1 if the entry is found and 0
1844 otherwise. Move comment.
1845 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1846 * linux-low.h (linux_get_auxv): Declare.
1847 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1848
1849 2019-04-05 Tom Tromey <tromey@adacore.com>
1850
1851 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1852 variables.
1853
1854 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1855
1856 * linux-low.c (AT_HWCAP2): Add define if not already included.
1857
1858 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1859
1860 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1861 (aarch64_arch_setup): Call linux_get_hwcap.
1862 * linux-arm-low.c (arm_get_hwcap): Remove function.
1863 (arm_read_description): Call linux_get_hwcap.
1864 * linux-low.c (linux_get_auxv): New function.
1865 (linux_get_hwcap): Likewise.
1866 (linux_get_hwcap2): Likewise.
1867 * linux-low.h (linux_get_hwcap): New declaration.
1868 (linux_get_hwcap2): Likewise.
1869 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1870 (ppc_arch_setup): Call linux_get_hwcap.
1871 * linux-s390-low.c (s390_get_hwcap): Remove function.
1872 (s390_arch_setup): Call linux_get_hwcap.
1873
1874 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1875 Jiong Wang <jiong.wang@arm.com>
1876
1877 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1878 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1879 to fail.
1880 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1881
1882 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1883 Jiong Wang <jiong.wang@arm.com>
1884
1885 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1886 (aarch64_get_hwcap): New function.
1887 (aarch64_arch_setup): Read APIA hwcap.
1888
1889 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1890 Jiong Wang <jiong.wang@arm.com>
1891
1892 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1893 (initialize_low_tracepoint): Likewise.
1894 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1895 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1896 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1897 (aarch64_linux_read_description): Likewise.
1898 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1899
1900 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1901
1902 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1903 i386_create_target_description for 'segments' parameter.
1904 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1905 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1906 * win32-i386-low.c (i386_arch_setup): Likewise.
1907
1908 2019-03-12 Tom Tromey <tromey@adacore.com>
1909
1910 * linux-low.c (iterate_over_lwps): Update.
1911
1912 2019-03-06 Tom Tromey <tom@tromey.com>
1913
1914 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1915 (captured_main): Use SCOPE_EXIT.
1916
1917 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1918
1919 * configure.srv: Use '$enable_unittest' instead of '$development'
1920 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1921 case.
1922
1923 2019-02-27 Tom Tromey <tromey@adacore.com>
1924
1925 * gdbreplay.c (logchar): Handle \r\n.
1926
1927 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1928
1929 * linux-low.c (linux_attach): Add process before lwp.
1930 * server.c (attach_inferior): Check if already attached.
1931
1932 2019-02-07 Tom Tromey <tom@tromey.com>
1933
1934 * x86-tdesc.h: Rename include guard.
1935 * x86-low.h: Add include guard.
1936 * wincecompat.h: Rename include guard.
1937 * win32-low.h: Add include guard.
1938 * utils.h: Rename include guard.
1939 * tracepoint.h: Rename include guard.
1940 * tdesc.h: Rename include guard.
1941 * target.h: Rename include guard.
1942 * server.h: Rename include guard.
1943 * remote-utils.h: Rename include guard.
1944 * regcache.h: Rename include guard.
1945 * nto-low.h: Rename include guard.
1946 * notif.h: Add include guard.
1947 * mem-break.h: Rename include guard.
1948 * lynx-low.h: Add include guard.
1949 * linux-x86-tdesc.h: Add include guard.
1950 * linux-s390-tdesc.h: Add include guard.
1951 * linux-ppc-tdesc-init.h: Add include guard.
1952 * linux-low.h: Add include guard.
1953 * linux-aarch64-tdesc.h: Add include guard.
1954 * linux-aarch32-low.h: Add include guard.
1955 * inferiors.h: Rename include guard.
1956 * i387-fp.h: Rename include guard.
1957 * hostio.h: Rename include guard.
1958 * gdbthread.h: Rename include guard.
1959 * gdb_proc_service.h: Rename include guard.
1960 * event-loop.h: Rename include guard.
1961 * dll.h: Rename include guard.
1962 * debug.h: Rename include guard.
1963 * ax.h: Rename include guard.
1964
1965 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1966
1967 PR gdb/23985
1968 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1969 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1970
1971 2019-01-25 Tom Tromey <tom@tromey.com>
1972
1973 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1974
1975 2019-01-25 Tom Tromey <tom@tromey.com>
1976
1977 * win32-low.c: Fix common/ includes.
1978 * win32-i386-low.c: Fix common/ includes.
1979 * tracepoint.c: Fix common/ includes.
1980 * thread-db.c: Fix common/ includes.
1981 * target.h: Fix common/ includes.
1982 * symbol.c: Fix common/ includes.
1983 * spu-low.c: Fix common/ includes.
1984 * server.h: Fix common/ includes.
1985 * server.c: Fix common/ includes.
1986 * remote-utils.c: Fix common/ includes.
1987 * regcache.h: Fix common/ includes.
1988 * regcache.c: Fix common/ includes.
1989 * nto-x86-low.c: Fix common/ includes.
1990 * notif.h: Fix common/ includes.
1991 * mem-break.h: Fix common/ includes.
1992 * lynx-low.c: Fix common/ includes.
1993 * lynx-i386-low.c: Fix common/ includes.
1994 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1995 * linux-x86-low.c: Fix common/ includes.
1996 * linux-low.c: Fix common/ includes.
1997 * inferiors.h: Fix common/ includes.
1998 * i387-fp.c: Fix common/ includes.
1999 * hostio.c: Fix common/ includes.
2000 * hostio-errno.c: Fix common/ includes.
2001 * gdbthread.h: Fix common/ includes.
2002 * gdbreplay.c: Fix common/ includes.
2003 * fork-child.c: Fix common/ includes.
2004 * event-loop.c: Fix common/ includes.
2005 * ax.c:
2006 (enum gdb_agent_op): Fix common/ includes.
2007
2008 2019-01-21 Tom Tromey <tom@tromey.com>
2009
2010 * tracepoint.c: Fix includes.
2011 * remote-utils.c: Fix includes.
2012 * linux-x86-low.c: Fix includes.
2013
2014 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2015
2016 * gdbreplay.c (gdbreplay_version): Update copyright year in
2017 version message.
2018 * server.c (gdbserver_version): Likewise.
2019
2020 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2021
2022 * linux-low.c (add_lwp): Switch ordering.
2023
2024 2018-11-29 Tom Tromey <tom@tromey.com>
2025
2026 * win32-low.c (win32_join): Take pid, not process.
2027 * target.h (struct target_ops) <join>: Change argument type.
2028 (join_inferior): Change argument name.
2029 * spu-low.c (spu_join): Take pid, not process.
2030 * server.c (handle_detach): Preserve pid before destroying
2031 process.
2032 * lynx-low.c (lynx_join): Take pid, not process.
2033 * linux-low.c (linux_join): Take pid, not process.
2034
2035 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2036
2037 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2038 (aarch64_cannot_fetch_register): Likewise.
2039 (struct linux_target_ops): Update references.
2040
2041 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2042
2043 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2044
2045 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2046
2047 * configure.srv (ipa_ppc_linux_regobj): Add
2048 powerpc-isa207-htm-vsx32l-ipa.o and
2049 powerpc-isa207-htm-vsx64l-ipa.o.
2050 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2051 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2052 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2053 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2054 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2055 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2056 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2057 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2058 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2059 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2060 (init_registers_powerpc_isa207_htm_vsx32l)
2061 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2062 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2063 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2064 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2065 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2066 (ppc_store_tm_ctarregset): New functions.
2067 (ppc_regsets): Add entries for HTM regsets.
2068 (ppc_arch_setup): Set htm in features struct when needed. Set
2069 sizes for the HTM regsets.
2070 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2071 (initialize_low_arch): Call
2072 init_registers_powerpc_isa207_htm_vsx32l and
2073 init_registers_powerpc_isa207_htm_vsx64l.
2074 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2075 PPC_TDESC_ISA207_HTM_VSX.
2076 (initialize_low_tracepoint): Call
2077 init_registers_powerpc_isa207_htm_vsx32l and
2078 init_registers_powerpc_isa207_htm_vsx64l.
2079
2080 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2081
2082 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2083 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2084 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2085 (ppc_store_pmuregset): New functions.
2086 (ppc_regsets): Add entries for ebb and pmu regsets.
2087 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2088 pmu regsets are available. Set sizes for these regsets.
2089
2090 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2091
2092 * configure.srv (ipa_ppc_linux_regobj): Add
2093 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2094 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2095 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2096 rs6000/powerpc-isa207-vsx32l.xml, and
2097 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2098 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2099 <PPC_TDESC_ISA207_VSX>: New enum value.
2100 (init_registers_powerpc_isa207_vsx32l): Declare.
2101 (init_registers_powerpc_isa207_vsx64l): Declare.
2102 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2103 (ppc_store_tarregset): New function.
2104 (ppc_regsets): Add entry for the TAR regset.
2105 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2106 size for the TAR regsets.
2107 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2108 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2109 and init_registers_powerpc_isa207_vsx64l.
2110 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2111 (initialize_low_tracepoint): Call
2112 init_registers_powerpc_isa207_vsx32l and
2113 init_registers_powerpc_isa207_vsx64l.
2114
2115 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2116 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2117
2118 * configure.srv (ipa_ppc_linux_regobj): Add
2119 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2120 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2121 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2122 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2123 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2124 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2125 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2126 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2127 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2128 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2129 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2130 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2131 (ppc_hwcap): Add comment.
2132 (ppc_hwcap2): New global.
2133 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2134 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2135 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2136 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2137 when needed. Set sizes for the the DSCR and PPR regsets.
2138 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2139 (initialize_low_arch): Call
2140 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2141 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2142 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2143 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2144 (initialize_low_tracepoint): Call
2145 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2146 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2147
2148 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2149
2150 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2151
2152 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2153 Simon Marchi <simark@simark.ca>
2154
2155 * acinclude.m4: Include "../selftest.m4".
2156 * configure: Regenerate.
2157 * configure.ac: Use "GDB_AC_SELFTEST".
2158 * configure.srv: Use "$enable_unittests" instead of
2159 "$development" when checking whether unit tests have been
2160 enabled.
2161 * server.c (captured_main): Update message informing that
2162 selftests have been disabled.
2163
2164 2018-10-04 Tom Tromey <tom@tromey.com>
2165
2166 * configure: Rebuild.
2167
2168 2018-10-04 Tom Tromey <tom@tromey.com>
2169
2170 * server.c (handle_status): Rename inner "thread".
2171 (process_serial_event): Declare "res" in 'm' case.
2172 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2173 (iterate_over_lwps): Rename inner "thread".
2174 (linux_qxfer_libraries_svr4): Rename inner "len".
2175 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2176
2177 2018-10-01 Gary Benson <gbenson@redhat.com>
2178
2179 * gdb_proc_service.h: Moved common code to
2180 common/gdb_proc_service.h.
2181
2182 2018-10-01 Gary Benson <gbenson@redhat.com>
2183
2184 * gdb_proc_service.h: Synchronize comments and whitespace with
2185 GDB's version of this file.
2186
2187 2018-09-25 Tom Tromey <tom@tromey.com>
2188
2189 * configure: Rebuild.
2190 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2191
2192 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2193
2194 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2195 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2196 ($(IPA_LIB)): Sort IPA_OBJS.
2197
2198 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2199
2200 * Makefile.in: Remove references to $(ADD_DEPS).
2201
2202 2018-09-16 Tom Tromey <tom@tromey.com>
2203
2204 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2205 variables.
2206 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2207 variables.
2208
2209 2018-09-05 Tom Tromey <tom@tromey.com>
2210
2211 * configure: Rebuild.
2212
2213 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2214
2215 PR build/23399
2216 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2217
2218 2018-08-27 Tom Tromey <tom@tromey.com>
2219
2220 PR build/23087:
2221 * configure: Rebuild.
2222
2223 2018-08-27 Tom Tromey <tom@tromey.com>
2224
2225 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2226 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2227 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2228 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2229 (s390x_emit_stack_adjust): Add casts to unsigned char.
2230
2231 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 PR gdb/23374
2234 PR gdb/23375
2235 * server.h (struct client_state) <disable_randomization>:
2236 Initialize to 1.
2237
2238 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2239
2240 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2241 variable.
2242 (mips_supply_ptrace_register): Likewise.
2243
2244 2018-07-22 Tom Tromey <tom@tromey.com>
2245
2246 * configure: Rebuild.
2247
2248 2018-07-22 Tom Tromey <tom@tromey.com>
2249
2250 * win32-low.c (win32_create_inferior): Remove unused variables.
2251 * gdbreplay.c (remote_open): Remove unused variable.
2252 * remote-utils.c (remote_prepare): Remove unused variable.
2253 * x86-tdesc.h (X86_TDESC_H): Define.
2254 (amd64_expedite_regs): Define conditionally.
2255 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2256 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2257 * remote-utils.c (readchar): Remove unused variable.
2258
2259 2018-07-13 Pedro Alves <palves@redhat.com>
2260
2261 * linux-low.c (linux_kill): Change parameter to process_info
2262 pointer instead of pid. Adjust.
2263 * lynx-low.c (lynx_kill): Likewise.
2264 * nto-low.c (nto_kill): Likewise.
2265 * spu-low.c (spu_kill): Likewise.
2266 * win32-low.c (win32_kill): Likewise.
2267 * server.c (handle_v_kill, kill_inferior_callback)
2268 (detach_or_kill_for_exit): Adjust.
2269 * target.c (kill_inferior): Change parameter to process_info
2270 pointer instead of pid. Adjust.
2271 * target.h (struct target_ops) <kill>: Change parameter to
2272 process_info pointer instead of pid. Adjust all implementations
2273 and callers.
2274 (kill_inferior): Likewise.
2275
2276 2018-07-13 Pedro Alves <palves@redhat.com>
2277
2278 * linux-low.c (linux_detach, linux_join): Change parameter to
2279 process_info pointer instead of pid. Adjust.
2280 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2281 * nto-low.c (nto_detach): Likewise.
2282 * spu-low.c (spu_detach, spu_join): Likewise.
2283 * win32-low.c (win32_detach, win32_join): Likewise.
2284 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2285 * target.h (struct target_ops) <detach, join>: Change parameter to
2286 process_info pointer instead of pid. Adjust all implementations
2287 and callers.
2288 (detach_inferior, join_inferior): Rename 'pid' parameter to
2289 'proc'.
2290
2291 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2292 Jan Kratochvil <jan.kratochvil@redhat.com>
2293 Paul Fertser <fercerpav@gmail.com>
2294 Tsutomu Seki <sekiriki@gmail.com>
2295
2296 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2297 (OBS): Add 'common/netstuff.o'.
2298 (GDBREPLAY_OBS): Likewise.
2299 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2300 (remote_open): Implement support for IPv6
2301 connections.
2302 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2303 and 'wspiapi.h'.
2304 (handle_accept_event): Accept connections from IPv6 sources.
2305 (remote_prepare): Handle IPv6-style hostnames; implement
2306 support for IPv6 connections.
2307 (remote_open): Implement support for printing connections from
2308 IPv6 sources.
2309
2310 2018-07-11 Pedro Alves <palves@redhat.com>
2311
2312 PR gdb/23377
2313 * mem-break.c (any_persistent_commands): Add process_info
2314 parameter and use it instead of relying on the current process.
2315 Change return type to bool.
2316 * mem-break.h (any_persistent_commands): Add process_info
2317 parameter and change return type to bool.
2318 * server.c (handle_detach): Remove require_running_or_return call.
2319 Look up the process_info for the process we're about to detach.
2320 If not found, return back error to GDB. Adjust
2321 any_persistent_commands call to pass down a process pointer.
2322
2323 2018-07-11 Pedro Alves <palves@redhat.com>
2324
2325 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2326 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2327 instead of collect_register_by_name.
2328 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2329 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2330
2331 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2332 Pedro Alves <palves@redhat.com>
2333
2334 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2335
2336 2018-07-03 Tom Tromey <tom@tromey.com>
2337
2338 * linux-low.c: Update.
2339 * lynx-low.c: Update.
2340 * mem-break.c: Update.
2341 * nto-low.c: Update.
2342 * remote-utils.c: Update.
2343 * server.c: Update.
2344 * spu-low.c: Update.
2345 * target.c: Update.
2346 * win32-low.c: Update.
2347
2348 2018-07-03 Tom Tromey <tom@tromey.com>
2349
2350 * server.c: Update.
2351
2352 2018-07-03 Tom Tromey <tom@tromey.com>
2353
2354 * linux-low.c: Update.
2355
2356 2018-07-03 Tom Tromey <tom@tromey.com>
2357
2358 * target.c: Update.
2359
2360 2018-07-03 Tom Tromey <tom@tromey.com>
2361
2362 * linux-low.c: Update.
2363 * linux-mips-low.c: Update.
2364 * lynx-low.c: Update.
2365 * nto-low.c: Update.
2366 * remote-utils.c: Update.
2367 * server.c: Update.
2368 * spu-low.c: Update.
2369 * target.c: Update.
2370 * thread-db.c: Update.
2371
2372 2018-07-03 Tom Tromey <tom@tromey.com>
2373
2374 * linux-low.c: Update.
2375 * linux-mips-low.c: Update.
2376 * lynx-low.c: Update.
2377 * mem-break.c: Update.
2378 * nto-low.c: Update.
2379 * remote-utils.c: Update.
2380 * server.c: Update.
2381 * spu-low.c: Update.
2382 * target.c: Update.
2383 * tracepoint.c: Update.
2384
2385 2018-07-03 Tom Tromey <tom@tromey.com>
2386
2387 * linux-low.c: Update.
2388 * linux-ppc-low.c: Update.
2389 * linux-x86-low.c: Update.
2390 * proc-service.c: Update.
2391 * server.c: Update.
2392 * spu-low.c: Update.
2393 * thread-db.c: Update.
2394 * win32-low.c: Update.
2395
2396 2018-07-03 Tom Tromey <tom@tromey.com>
2397
2398 * linux-low.c: Update.
2399 * lynx-low.c: Update.
2400 * nto-low.c: Update.
2401 * remote-utils.c: Update.
2402 * spu-low.c: Update.
2403 * thread-db.c: Update.
2404 * win32-low.c: Update.
2405
2406 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2407
2408 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2409 parameter in call to 'amd64_create_target_description'.
2410
2411 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2412
2413 * x86-tdesc.h: Remove executable permission flag.
2414
2415 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2416
2417 * configure.ac: Remove AC_PREREQ, add missing quoting.
2418 * configure: Re-generate.
2419 * config.in: Re-generate.
2420 * aclocal.m4: Re-generate.
2421
2422 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2423
2424 * tracepoint.h (current_traceframe): Remove declaration.
2425
2426 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2427
2428 * linux-aarch64-low.c (is_sve_tdesc): New function.
2429 (aarch64_sve_regs_copy_to_regcache): Likewise.
2430 (aarch64_sve_regs_copy_from_regcache): Likewise.
2431 (aarch64_regs_info): Add SVE checks.
2432 (initialize_low_arch): Initialize SVE.
2433
2434 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2435
2436 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2437
2438 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2439
2440 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2441 (initialize_low_tracepoint): Likewise
2442 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2443 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2444 param.
2445 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2446 checks.
2447 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2448
2449 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2450
2451 * server.h (PBUFSIZ): Increase size
2452
2453 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2454
2455 * regcache.c (regcache::raw_compare): New function.
2456 * regcache.h (regcache::raw_compare): New declaration.
2457
2458 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2459
2460 * regcache.c (new_register_cache): Use new.
2461 (free_register_cache): Use delete.
2462 (register_data): Use const.
2463 (supply_register): Move body inside regcache.
2464 (regcache::raw_supply): New override function.
2465 (collect_register): Move body inside regcache.
2466 (regcache::raw_collect): New override function.
2467 (regcache::get_register_status): New override function.
2468 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2469
2470 2018-06-09 Tom Tromey <tom@tromey.com>
2471
2472 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2473 declare queue.
2474 (event_queue): Use std::queue.
2475 (gdb_event_xfree): Remove.
2476 (initialize_event_loop, process_event, wait_for_event): Update.
2477
2478 2018-06-08 Stan Cox <scox@redhat.com>
2479
2480 * win32-low.c (win32_create_inferior): last_ptid and last_status
2481 moved to client_state.
2482
2483 2018-06-08 Pedro Alves <palves@redhat.com>
2484
2485 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2486 common/common-exceptions.o, common/common-utils.o,
2487 common/errors.o, common/print-utils.o and utils.o.
2488 * gdbreplay.c: Include "common-defs.h" instead of the two
2489 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2490 string.h or alloca.h.
2491 (perror_with_name): Delete.
2492 (remote_open): Use xstrdup instead of strdup.
2493 (main): Rename to ...
2494 (captured_main): ... this.
2495 (main): New.
2496
2497 2018-06-08 Tom Tromey <tom@tromey.com>
2498
2499 * linux-low.c (linux_low_read_btrace): Update.
2500
2501 2018-06-04 Stan Cox <scox@redhat.com>
2502
2503 * server.h (struct client_state): New.
2504 * server.c (cont_thread, general_thread, multi_process)
2505 (report_fork_events, report_vfork_events, report_exec_events)
2506 (report_thread_events, swbreak_feature, hwbreak_feature)
2507 (vCont_supported, disable_randomization, pass_signals)
2508 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2509 Moved to client_state.
2510 * remote-utils.c (remote_debug, noack_mode)
2511 (transport_is_reliable): Moved to client_state.
2512 * tracepoint.c (current_traceframe): Moved to client_state.
2513
2514 Update all callers.
2515 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2516 linux-low.c, remote-utils.h, target.c: Use client_state.
2517
2518 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2519
2520 * configure.srv: Add new c/h file.
2521
2522 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2523
2524 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2525 null VQ.
2526
2527 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2528
2529 * gdb.arch/mips-fpregset-core.exp: New test.
2530 * gdb.arch/mips-fpregset-core.c: New test source.
2531
2532 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2533
2534 PR server/23198
2535 * hostio.c (require_int): Do not report overflow for integers
2536 between 0xfffffff and 0x7fffffff.
2537
2538 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2539
2540 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2541 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2542 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2543 functions.
2544 (the_low_target): Wire them.
2545
2546 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2547
2548 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2549 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2550 mode. Call collect_register_by_name with vscr using
2551 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2552 (ppc_store_vrregset): Add and set vscr_offset variable as in
2553 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2554 vscr_offset.
2555
2556 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2557
2558 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2559 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2560 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2561
2562 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2563
2564 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2565 (ppc_store_vsxregset): Likewise.
2566 (ppc_fill_vrregset): Likewise.
2567 (ppc_store_vrregset): Likewise.
2568 (ppc_fill_evrregset): Likewise.
2569 (ppc_store_evrregset): Likewise.
2570 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2571 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2572 needed.
2573
2574 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2575
2576 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2577 wordsize of the inferior. Call ppc_linux_target_wordsize.
2578
2579 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2580
2581 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2582 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2583 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2584 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2585 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2586 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2587 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2588 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2589 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2590 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2591 (tdesc_powerpc_e500l): Remove.
2592 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2593 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2594 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2595 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2596 linux-ppc-tdesc.h.
2597 (ppc_arch_setup): Remove target description matching code. Fill a
2598 ppc_linux_features struct and call ppc_linux_match_description
2599 with it.
2600
2601 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2602
2603 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2604 width of the requested register exceeds the width of the
2605 `ptrace' data type.
2606 (mips_cannot_store_register): Likewise.
2607
2608 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2609
2610 * linux-mips-low.c (mips_fetch_register): New function. Update
2611 preceding comment.
2612 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2613 (the_low_target): Wire `mips_fetch_register'.
2614
2615 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2616
2617 * lynx-i386-low.c (LYNXOS_178): New macro.
2618 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2619 the layout on LynxOS-178.
2620 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2621 handle floating point registers that are not supported by
2622 LynxOS-178.
2623
2624 2018-05-10 Tom Tromey <tom@tromey.com>
2625
2626 * configure: Rebuild.
2627
2628 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2629
2630 PR server/23158:
2631 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2632 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2633 Use it to set the expedite_regs field in the given tdesc.
2634 * x86-tdesc.h: New file.
2635 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2636 Adjust following the addition of the new expedite_regs parameter
2637 to init_target_desc.
2638 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2639 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2640 (i386_linux_read_description, amd64_linux_read_description):
2641 Adjust following the addition of the new expedite_regs parameter
2642 to init_target_desc.
2643 * lynx-i386-low.c: #include "x86-tdesc.h".
2644 (lynx_i386_arch_setup): Adjust following the addition of the new
2645 expedite_regs parameter to init_target_desc.
2646 * nto-x86-low.c: #include "x86-tdesc.h".
2647 (nto_x86_arch_setup): Adjust following the addition of the new
2648 expedite_regs parameter to init_target_desc.
2649 * win32-i386-low.c: #include "x86-tdesc.h".
2650 (i386_arch_setup): Adjust following the addition of the new
2651 expedite_regs parameter to init_target_desc.
2652
2653 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2654
2655 PR server/23158:
2656 * win32-low.c (win32_create_inferior): Add call to my_wait
2657 setting last_status global.
2658
2659 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2660
2661 PR server/23158:
2662 * win32-low.c (create_process): Only call gdb_tilde_expand if
2663 inferior_cwd is not NULL.
2664
2665 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2666
2667 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2668 registers to the cache if their values have changed.
2669 (i387_xsave_to_cache): Provide default values for x87 control
2670 registers when these features are available, but disabled.
2671 * regcache.c (supply_register_by_name_zeroed): New function.
2672 * regcache.h (supply_register_by_name_zeroed): Declare new
2673 function.
2674
2675 2018-05-07 Tom Tromey <tom@tromey.com>
2676
2677 * configure: Rebuild.
2678
2679 2018-05-04 Tom Tromey <tom@tromey.com>
2680
2681 * configure: Rebuild.
2682
2683 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2684 Pedro Alves <palves@redhat.com>
2685
2686 * linux-aarch64-low.c (aarch64_stopped_data_address):
2687 Likewise.
2688
2689 2018-04-27 Tom Tromey <tom@tromey.com>
2690
2691 * configure: Rebuild.
2692
2693 2018-04-23 Tom Tromey <tom@tromey.com>
2694
2695 * configure: Rebuild.
2696
2697 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2698
2699 * Makefile.in (depcomp): Add "..".
2700 (all_deps_files): New and use it.
2701
2702 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2703
2704 * configure.srv (aarch64*-*-linux*): Don't include xml.
2705 (i[34567]86-*-cygwin*): Likewise.
2706 (i[34567]86-*-linux*): Likewise.
2707 (i[34567]86-*-lynxos*): Likewise.
2708 (i[34567]86-*-mingw32ce*): Likewise.
2709 (i[34567]86-*-mingw*): Likewise.
2710 (i[34567]86-*-nto*): Likewise.
2711 (tic6x-*-uclinux): Likewise.
2712 (x86_64-*-linux*): Likewise.
2713 (x86_64-*-mingw*): Likewise.
2714 (x86_64-*-cygwin*): Likewise.
2715
2716 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2717
2718 * tdesc.c: Remove xml parameter.
2719
2720 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2721
2722 * server.c (get_features_xml): Remove cast.
2723 * tdesc.c (void target_desc::accept): Fill in function.
2724 (tdesc_get_features_xml): Remove old xml creation.
2725 (print_xml_feature::visit_pre): Add xml vistor.
2726 * tdesc.h (struct target_desc): Make xmltarget mutable.
2727 (tdesc_get_features_xml): Remove declaration.
2728
2729 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2730
2731 * tdesc.c (tdesc_architecture_name): Add new function.
2732 (tdesc_osabi_name): Likewise.
2733 (tdesc_get_features_xml): Use new functions.
2734
2735 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2736
2737 * tdesc.c (tdesc_create_flags): Remove.
2738 (tdesc_add_flag): Likewise.
2739 (tdesc_named_type): Likewise.
2740 (tdesc_create_union): Likewise.
2741 (tdesc_create_struct): Likewise.
2742 (tdesc_create_vector): Likewise.
2743 (tdesc_add_bitfield): Likewise.
2744 (tdesc_add_field): Likewise.
2745 (tdesc_set_struct_size): Likewise.
2746
2747 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2748
2749 * tdesc.c (~target_desc): Remove implictly deleted items.
2750 (init_target_desc): Iterate all features.
2751 (tdesc_get_features_xml): Use vector.
2752 (tdesc_create_feature): Create feature.
2753 * tdesc.h (tdesc_feature) Remove
2754 (target_desc): Add features.
2755
2756 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2757
2758 * Makefile.in: Add common/tdesc.c
2759 * tdesc.c (init_target_desc): init all reg_defs from register
2760 vector.
2761 (tdesc_create_reg): Create tdesc_reg.
2762 * tdesc.h (tdesc_feature): Add register vector.
2763
2764 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2765
2766 * tdesc.h (struct target_desc) <features>: Change type to
2767 std::vector<std::string>.
2768 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2769 changes.
2770 (tdesc_get_features_xml): Likewise.
2771 (tdesc_create_feature): Likewise.
2772
2773 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2774
2775 * regcache.c (find_register_by_number): Return a ref.
2776 (find_regno): Use references.
2777 (register_size): Likewise.
2778 (register_data): Likewise.
2779 * tdesc.c (target_desc::~target_desc): Remove free calls.
2780 (target_desc::operator==): Use std::vector compare.
2781 (init_target_desc): Use reference.
2782 (tdesc_create_reg): Use reg constructors.
2783 * tdesc.h (struct target_desc): Replace pointer with object.
2784
2785 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2786
2787 * regcache.c (find_register_by_number): Make static.
2788 (find_regno): Use find_register_by_number
2789 * regcache.h (struct reg): Remove declaration.
2790
2791 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2792
2793 * tdesc.c (target_desc::~target_desc): Move to here.
2794 (target_desc::operator==): Likewise.
2795 * tdesc.h (target_desc::~target_desc): Move from here.
2796 (target_desc::operator==): Likewise.
2797
2798 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2799
2800 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2801
2802 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2803
2804 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2805 S390_TDESC_GS.
2806 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2807 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2808 and init_registers_s390_gs_linux64.
2809
2810 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2811
2812 * linux-s390-low.c (s390_fill_gs): Remove function.
2813 (s390_fill_gsbc): Remove function.
2814 (s390_regsets): Set fill functions for the guarded storage regsets
2815 to NULL.
2816
2817 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2818
2819 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2820 the word size. Add comment.
2821 (s390_get_wordsize): New function.
2822 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2823 pswm with it. Instead, use s390_get_wordsize to determine the
2824 word size first and derive the correct tdesc from that directly.
2825
2826 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2827
2828 * Makefile.in: Include silent-rules.mk.
2829 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2830 (COMPILE): Add ECHO_CXX.
2831 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2832 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2833 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2834 (version-generated.c): Add ECHO_GEN.
2835 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2836 (IPAGENT_COMPILE): Add ECHO_CXX.
2837 (%-generated.c): Add ECHO_REGDAT.
2838
2839 2018-03-14 Tom Tromey <tom@tromey.com>
2840
2841 PR cli/14977:
2842 * ax.c (ax_printf): Special case for NULL.
2843
2844 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2845
2846 * linux-low.c (linux_qxfer_libraries_svr4): Use
2847 xml_escape_text_append.
2848
2849 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2850
2851 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2852
2853 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2854
2855 * server.c (handle_general_set): Remove unnecessary xstrdup.
2856
2857 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2858
2859 * server.c (parse_debug_format_options): Adjust to
2860 delim_string_to_char_ptr_vec changes.
2861 * thread-db.c (thread_db_load_search): Adjust to
2862 dirnames_to_char_ptr_vec changes.
2863
2864 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2865
2866 * target.h (target_enable_btrace, target_disable_btrace)
2867 (target_read_btrace, target_read_btrace_conf): Turn macro into
2868 inline function. Throw error if target method is not defined.
2869 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2870 check for btrace target method. Be prepared to handle exceptions
2871 from btrace target methods.
2872
2873 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2874
2875 * server.c (captured_main): Change order of error message printed
2876 when the current working directory cannot be found.
2877
2878 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2879
2880 * server.c: Include "filenames.h" and "pathstuff.h".
2881 (program_name): Delete variable.
2882 (program_path): New anonymous class.
2883 (get_exec_wrapper): Use "program_path" instead of
2884 "program_name".
2885 (handle_v_run): Likewise.
2886 (captured_main): Likewise.
2887 (process_serial_event): Likewise.
2888
2889 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2890
2891 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2892 (OBJS): Add "pathstuff.o".
2893 * server.c (current_directory): New global variable.
2894 (captured_main): Initialize "current_directory".
2895
2896 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2897
2898 * tdesc.c: Use common/tdesc.h.
2899 * tdesc.h: Likewise.
2900
2901 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2902 Simon Marchi <simon.marchi@ericsson.com>
2903
2904 * Makefile.in: Switch order of make rules.
2905
2906 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2907
2908 * Makefile.in: Add common directory in build.
2909 * configure.ac: Add common reference.
2910 * configure: Regenerate.
2911
2912 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2913
2914 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2915 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2916 * spu-low.c (spu_target_ops): Likewise.
2917 * win32-low.c (win32_target_ops): Likewise.
2918 * server.c (supported_btrace_packets): Report packets unconditionally.
2919 * target.h (target_ops) <supports_btrace>: Remove.
2920 (target_supports_btrace): Remove.
2921
2922 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2923
2924 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2925 (handle_btrace_disable): Change return type to void. Use exceptions
2926 to report errors.
2927 (handle_btrace_general_set): Catch exception and copy message to
2928 return message.
2929
2930 2018-02-08 Tom Tromey <tom@tromey.com>
2931
2932 * linux-low.c (install_software_single_step_breakpoints): Use
2933 make_scoped_restore.
2934 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2935 (do_restore_current_thread_cleanup): Remove.
2936 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2937 declare.
2938
2939 2018-02-08 Tom Tromey <tom@tromey.com>
2940
2941 * mem-break.c (set_raw_breakpoint_at): Use
2942 gdb::unique_xmalloc_ptr.
2943
2944 2018-01-30 Pedro Alves <palves@redhat.com>
2945
2946 PR gdb/13211
2947 * target.c (target_terminal::terminal_state): Rename to ...
2948 (target_terminal::m_terminal_state): ... this.
2949
2950 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2951
2952 * linux-low.c (handle_extended_wait): Surround call to
2953 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2954
2955 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2956
2957 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2958 linux_ptrace_attach_fail_reason_string now returning an
2959 std::string.
2960 (linux_attach): Likewise.
2961 * thread-db.c (attach_thread): Likewise.
2962
2963 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2964
2965 PR gdb/21559
2966 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2967 checking for fs_base/gs_base fields in struct user_regs_struct.
2968 * configure: Regenerate.
2969
2970 2018-01-16 Yao Qi <yao.qi@linaro.org>
2971
2972 PR gdb/18749
2973 * linux-low.c (fetch_register): Call supply_register instead of
2974 error.
2975
2976 2018-01-08 Yao Qi <yao.qi@linaro.org>
2977 Simon Marchi <simon.marchi@ericsson.com>
2978
2979 * Makefile.in (OBS): Remove selftest.o.
2980 * configure.ac: Set srv_selftest_objs if $development is true.
2981 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2982 * configure: Re-generated.
2983 * server.c (captured_main): Wrap variable selftest_filter with
2984 GDB_SELF_TEST.
2985
2986 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2987
2988 * server.c (parse_debug_format_options): Return std::string.
2989 (handle_monitor_command, captured_main): Adjust.
2990
2991 2018-01-05 Pedro Alves <palves@redhat.com>
2992
2993 PR gdb/18653
2994 * server.c (captured_main): Pass quiet=false to
2995 save_original_signals_state.
2996
2997 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2998
2999 * gdbreplay.c (gdbreplay_version): Update copyright year in
3000 version message.
3001 * server.c (gdbserver_version): Likewise.
3002
3003 2017-12-08 Tom Tromey <tom@tromey.com>
3004
3005 * ax.c (ax_printf): Update.
3006
3007 2017-12-07 Yao Qi <yao.qi@linaro.org>
3008
3009 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3010 aarch64_linux_read_description.
3011 * linux-amd64-ipa.c (idx2mask): New array.
3012 (get_ipa_tdesc): Move idx2mask out.
3013 (initialize_low_tracepoint): Initialize target descriptions.
3014 * linux-i386-ipa.c (idx2mask): New array.
3015 (get_ipa_tdesc): Move idx2mask out.
3016 (initialize_low_tracepoint): Initialize target descriptions.
3017
3018 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3019
3020 * tdesc.c (struct tdesc_type): Change return type.
3021 (tdesc_add_flag): Change parameter type.
3022 (tdesc_add_bitfield): Likewise.
3023 (tdesc_add_field): Likewise.
3024 (tdesc_set_struct_size): Likewise.
3025
3026 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3027
3028 * regcache.c (registers_to_string): Remove unused variable.
3029
3030 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3031
3032 * inferiors.c (for_each_inferior_with_data): Remove.
3033 * inferiors.h (for_each_inferior_with_data): Remove.
3034 * server.c (handle_qxfer_threads_worker): Change parameter type.
3035 (handle_qxfer_threads_proper): Use for_each_thread.
3036
3037 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3038
3039 * inferiors.c (for_each_inferior): Remove.
3040 (clear_inferiors): Use for_each_thread.
3041 * inferiors.h (for_each_inferior): Remove.
3042 * linux-low.c (linux_wait_for_event_filtered): Use
3043 for_each_thread.
3044 (linux_stabilize_threads): Likewise.
3045 * regcache.c (regcache_release): Likewise.
3046 * server.c (gdb_wants_all_threads_stopped): Likewise.
3047 (clear_pending_status_callback): Remove.
3048 (handle_status): Use for_each_thread.
3049 (captured_main): Likewise.
3050 * win32-low.c (child_init_thread_list): Likewise.
3051 (win32_clear_inferiors): Likewise.
3052 (fake_breakpoint_event): Likewise.
3053
3054 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3055
3056 * inferiors.h (find_inferior): Remove.
3057 * inferiors.c (find_inferior): Remove.
3058
3059 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3060
3061 * linux-low.c (resume_status_pending_p): Update comment.
3062 (need_step_over_p): Update comment.
3063
3064 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3065
3066 * linux-low.c (proceed_one_lwp): Return void, change parameter
3067 type.
3068 (unsuspend_and_proceed_one_lwp): Likewise.
3069 (proceed_all_lwps): Use for_each_thread.
3070 (unstop_all_lwps): Likewise.
3071
3072 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3073
3074 * linux-low.c (linux_resume_one_thread): Return void, take
3075 parameter directly.
3076 (linux_resume): Use for_each_thread.
3077
3078 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3079
3080 * linux-low.c (send_sigstop_callback): Return void, change
3081 parameter type. Rename to...
3082 (send_sigstop): ... this.
3083 (suspend_and_send_sigstop_callback): Return void, change parameter
3084 type. Rename to...
3085 (suspend_and_send_sigstop): ... this.
3086 (stop_all_lwps): Use for_each_thread.
3087
3088 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3089
3090 * linux-low.c (lwp_running): Return bool, remove unused
3091 argument.
3092 (linux_stabilize_threads): Use find_thread.
3093
3094 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3095
3096 * linux-low.c (select_singlestep_lwp_callback): Remove.
3097 (count_events_callback): Remove.
3098 (select_event_lwp_callback): Remove.
3099 (select_event_lwp): Use find_thread/for_each_thread.
3100
3101 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3102
3103 * linux-low.c (not_stopped_callback): Return bool, take filter
3104 argument directly.
3105 (linux_wait_for_event_filtered): Use find_thread.
3106 (linux_wait_1): Likewise.
3107
3108 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3109
3110 * linux-low.c (same_lwp): Remove.
3111 (find_lwp_pid): Use find_thread.
3112
3113 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3114
3115 * linux-low.c (delete_lwp_callback): Remove.
3116 (linux_mourn): Use for_each_thread.
3117
3118 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3119
3120 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3121 args parameter, don't check for pid.
3122 (linux_detach): Use for_each_thread.
3123
3124 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3125
3126 * linux-low.c (struct counter): Remove.
3127 (second_thread_of_pid_p): Remove.
3128 (last_thread_of_process_p): Use find_thread.
3129
3130 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3131
3132 * inferiors.c (find_inferior_in_random): Remove.
3133 * inferiors.h (find_inferior_in_random): Remove.
3134 * linux-low.c (status_pending_p_callback): Return bool, accept
3135 parameter ptid directly.
3136 (linux_wait_for_event_filtered): Use find_thread_in_random.
3137 (linux_wait_1): Likewise.
3138
3139 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3140
3141 * inferiors.c (find_inferior_id): Remove.
3142 (find_thread_ptid): Move implemention from find_inferior_id to
3143 here.
3144 * inferiors.h (find_inferior_id): Remove.
3145 * server.c (handle_status): Use find_thread_ptid.
3146 (process_serial_event): Likewise.
3147 * thread-db.c (find_one_thread): Likewise.
3148 (thread_db_thread_handle): Likewise.
3149 * win32-low.c (thread_rec): Likewise.
3150 (child_delete_thread): Likewise.
3151 (win32_thread_alive): Likewise.
3152 (get_child_debug_event): Likewise.
3153
3154 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3155
3156 * linux-mips-low.c (update_watch_registers_callback): Return
3157 void, remove pid_p parameter, don't check for pid.
3158 (mips_insert_point, mips_remove_point): Use for_each_thread.
3159
3160 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3161
3162 * lynx.low (lynx_delete_thread_callback): Remove.
3163 (lynx_mourn): Use for_each_thread.
3164
3165 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3166
3167 * regcache.c (regcache_invalidate_one): Remove.
3168 (regcache_invalidate_pid): use for_each_thread.
3169
3170 2017-11-26 Tom Tromey <tom@tromey.com>
3171
3172 * linux-low.c (linux_create_inferior): Update.
3173
3174 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3175
3176 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3177
3178 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3179
3180 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3181 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3182 * linux-aarch64-tdesc-selftest.c: New file.
3183 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3184
3185 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3186
3187 * configure.srv: Add new file.
3188 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3189 * linux-aarch64-tdesc-selftest.c: New file.
3190 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3191
3192 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3193
3194 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3195 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3196 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3197
3198 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3199
3200 * configure.srv: Add new files.
3201 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3202 aarch64_linux_read_description.
3203 * linux-aarch64-low.c (aarch64_linux_read_description):
3204 Merge with aarch64_arch_setup.
3205 (aarch64_arch_setup): Call aarch64_linux_read_description.
3206 * linux-aarch64-tdesc.c: New file.
3207 * linux-aarch64-tdesc.h: New file.
3208
3209 2017-11-24 Yao Qi <yao.qi@linaro.org>
3210
3211 * configure.srv: Set $srv_regobj for tic6x-linux.
3212 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3213 (tic6x_read_description): Move some code to tic6x_arch_setup.
3214 (tic6x_tdesc_test): New function.
3215 (initialize_low_arch): Call selftests::register_test.
3216
3217 2017-11-22 Yao Qi <yao.qi@linaro.org>
3218
3219 * remote-utils.c (prepare_resume_reply): Use memcpy.
3220
3221 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3222
3223 * linux-low.c (kill_one_lwp_callback): Return void, take
3224 argument directly, don't filter on pid.
3225 (linux_kill): Use for_each_thread.
3226
3227 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3228
3229 * linux-low.c (need_step_over_p): Return bool, remove dummy
3230 argument.
3231 (linux_resume, proceed_all_lwps): Use find_thread.
3232
3233 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3234
3235 * linux-low.c (resume_status_pending_p): Return bool, remove
3236 flag_p argument.
3237 (linux_resume): Use find_thread.
3238
3239 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3240
3241 * linux-low.c (struct thread_resume_array): Remove.
3242 (linux_set_resume_request): Return void, take arguments
3243 directly.
3244 (linux_resume): Use for_each_thread.
3245
3246 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3247
3248 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3249 return bool, remove data argument.
3250 (linux_stabilize_threads): Use find_thread.
3251
3252 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3253
3254 * linux-low.c (unsuspend_one_lwp): Remove.
3255 (unsuspend_all_lwps): Use for_each_thread, inline code from
3256 unsuspend_one_lwp.
3257
3258 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3259
3260 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3261 * linux-low.c (struct iterate_over_lwps_args): Remove.
3262 (iterate_over_lwps_filter): Remove.
3263 (iterate_over_lwps): Use find_thread.
3264
3265 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3266
3267 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3268 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3269 code from reset_lwp_ptrace_options_callback.
3270
3271 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3272
3273 * linux-arm-low.c (struct update_registers_data): Remove.
3274 (update_registers_callback): Return void, take arguments
3275 directly, don't check thread's pid.
3276 (arm_insert_point, arm_remove_point): Use for_each_thread.
3277
3278 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3279
3280 * win32-low.c (continue_one_thread): Return void, take argument
3281 directly.
3282 (child_continue): Use for_each_thread.
3283
3284 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3285
3286 * win32-i386-low.c (update_debug_registers_callback): Rename
3287 to ...
3288 (update_debug_registers): ... this, return void, remove pid_p arg.
3289 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3290
3291 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3292
3293 * inferiors.h (struct process_info): Add constructor, initialize
3294 fields..
3295 <syscalls_to_catch>: Change type to std::vector<int>.
3296 * inferiors.c (add_process): Allocate process_info with new.
3297 (remove_process): Free process_info with delete.
3298 * linux-low.c (handle_extended_wait): Adjust.
3299 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3300 * server.c (handle_general_set): Adjust.
3301
3302 2017-11-16 Pedro Alves <palves@redhat.com>
3303
3304 * remote-utils.c (remote_close): Block SIGIO signals instead of
3305 uninstalling the SIGIO handler.
3306
3307 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3308
3309 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3310
3311 2017-11-16 Yao Qi <yao.qi@linaro.org>
3312
3313 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3314 (tic6x_store_gregset): Likewise.
3315 (tic6x_usrregs_info): Move it up.
3316
3317 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3318
3319 * Makefile.in: Update arch rules.
3320 * configure.srv: Explicitly mark arch/ files.
3321
3322 2017-11-13 Andreas Schwab <schwab@suse.de>
3323
3324 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3325 function.
3326 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3327
3328 2017-11-06 Pedro Alves <palves@redhat.com>
3329
3330 * config.in, configure: Regenerate.
3331
3332 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3333
3334 * target.c (struct thread_search): Remove.
3335 (thread_search_callback): Remove.
3336 (prepare_to_access_memory): Use for_each_thread instead of
3337 find_inferior. Inline code from thread_search_callback.
3338
3339 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3340
3341 * server.c (struct visit_actioned_threads_data): Remove.
3342 (visit_actioned_threads): Change prototype to take arguments
3343 directly.
3344 (resume): Use find_thread instead of find_inferior.
3345
3346 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3347
3348 * server.c (queue_stop_reply_callback): Change prototype, return
3349 void.
3350 (find_status_pending_thread_callback): Remove.
3351 (handle_status): Replace find_inferior with find_thread and
3352 for_each_thread.
3353
3354 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3355
3356 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3357 with REGNO.
3358 (aarch64_store_gregset): Likewise.
3359 (aarch64_fill_fpregset): Likewise.
3360 (aarch64_store_fpregset): Likewise.
3361
3362 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3363
3364 * gdbthread.h (find_thread, for_each_thread): New functions.
3365 * inferiors.c (thread_of_pid): Remove.
3366 (find_any_thread_of_pid): Use find_thread.
3367 * linux-low.c (num_lwps): Use for_each_thread.
3368
3369 2017-10-17 Yao Qi <yao.qi@linaro.org>
3370
3371 * Makefile.in: Remove one rule.
3372 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3373
3374 2017-10-17 Yao Qi <yao.qi@linaro.org>
3375
3376 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3377 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3378
3379 2017-10-17 Yao Qi <yao.qi@linaro.org>
3380
3381 * configure.srv: Rename arm.o with arch/arm.o.
3382
3383 2017-10-17 Yao Qi <yao.qi@linaro.org>
3384
3385 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3386 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3387 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3388 (arch-i386.o, arch-amd64.o): Remove rules.
3389 (arch/%.o): New rule.
3390 Update POSTCOMPILE and COMPILE.pre.
3391 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3392 * configure: Re-generated.
3393 * configure.srv: Replace arch-i386.o with arch/i386.o.
3394 Replace arch-amd64.o with arch/amd64.o.
3395
3396 2017-10-16 Yao Qi <yao.qi@linaro.org>
3397
3398 * configure: Regenerated.
3399
3400 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3401
3402 * inferiors.h: (struct inferior_list): Remove.
3403 (struct inferior_list_entry); Remove.
3404 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3405 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3406 get_first_inferior): Remove.
3407 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3408 find_inferior_id, find_inferior_in_random): Change signature.
3409 * inferiors.c (all_threads): Change type to
3410 std::list<thread_info *>.
3411 (get_thread): Remove macro.
3412 (find_inferior, find_inferior_id): Change signature, implement
3413 using find_thread.
3414 (find_inferior_in_random): Change signature, implement using
3415 find_thread_in_random.
3416 (for_each_inferior, for_each_inferior_with_data): Change
3417 signature, implement using for_each_thread.
3418 (add_inferior_to_list, remove_inferior): Remove.
3419 (add_thread, get_first_thread, thread_of_pid,
3420 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3421 (get_first_inferior, one_inferior_p, clear_inferior_list):
3422 Remove.
3423 (clear_inferiors, get_thread_process): Update.
3424 * gdbthread.h: Include <list>.
3425 (struct thread_info) <entry>: Remove field.
3426 <id>: New field.
3427 (all_threads): Change type to std::list<thread_info *>.
3428 (get_first_inferior): Add doc.
3429 (find_thread, for_each_thread, find_thread_in_random): New
3430 functions.
3431 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3432 * linux-arm-low.c (update_registers_callback): Update.
3433 * linux-low.c (second_thread_of_pid_p): Update.
3434 (kill_one_lwp_callback, linux_detach_lwp_callback,
3435 delete_lwp_callback, status_pending_p_callback, same_lwp,
3436 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3437 iterate_over_lwps, not_stopped_callback,
3438 resume_stopped_resumed_lwps, count_events_callback,
3439 select_singlestep_lwp_callback, select_event_lwp_callback,
3440 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3441 suspend_and_send_sigstop_callback, wait_for_sigstop,
3442 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3443 lwp_running, linux_set_resume_request, resume_status_pending_p,
3444 need_step_over_p, start_step_over, linux_resume_one_thread,
3445 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3446 reset_lwp_ptrace_options_callback): Update.
3447 * linux-mips-low.c (update_watch_registers_callback): Update.
3448 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3449 Update.
3450 (free_register_cache_thread_one): Remove.
3451 (regcache_release): Update.
3452 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3453 handle_qxfer_threads_worker): Update.
3454 (handle_query): Update, use list iterator.
3455 (visit_actioned_threads, handle_pending_status,
3456 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3457 clear_pending_status_callback, set_pending_status_callback,
3458 find_status_pending_thread_callback, handle_status,
3459 process_serial_event): Update.
3460 * target.c (thread_search_callback): Update.
3461 * thread-db.c (thread_db_get_tls_address): Update.
3462 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3463 Update.
3464 * win32-i386-low.c (update_debug_registers_callback): Update.
3465 * win32-low.c (delete_thread_info, child_delete_thread,
3466 continue_one_thread, suspend_one_thread,
3467 get_child_debug_event): Adjust.
3468
3469 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3470
3471 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3472 * inferiors.h: Include <list>.
3473 (struct process_info) <entry>: Remove field.
3474 <pid>: New field.
3475 (pid_of): Change macro to function.
3476 (ptid_of, lwpid_of): Remove macro.
3477 (all_processes): Change type to std::list<process_info *>.
3478 (ALL_PROCESSES): Remove macro.
3479 (for_each_process, find_process): New function.
3480 * inferiors.c (all_processes): Change type to
3481 std::list<process_info *>.
3482 (find_thread_process): Adjust.
3483 (add_process): Likewise.
3484 (remove_process): Likewise.
3485 (find_process_pid): Likewise.
3486 (get_first_process): Likewise.
3487 (started_inferior_callback): Remove.
3488 (have_started_inferiors_p): Adjust.
3489 (attached_inferior_callback): Remove.
3490 (have_attached_inferiors_p): Adjust.
3491 * linux-low.c (check_zombie_leaders): Likewise.
3492 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3493 (x86_linux_update_xmltarget): Adjust.
3494 * server.c (handle_query): Likewise.
3495 (gdb_reattached_process): Remove.
3496 (handle_status): Adjust.
3497 (kill_inferior_callback): Likewise.
3498 (detach_or_kill_inferior): Remove.
3499 (print_started_pid): Likewise.
3500 (print_attached_pid): Likewise.
3501 (detach_or_kill_for_exit): Update.
3502 (process_serial_event): Likewise.
3503 * linux-arm-low.c (arm_new_fork): Likewise.
3504
3505 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3506
3507 * dll.h: Include <list>.
3508 (struct dll_info): Add constructor.
3509 <entry>: Remove field.
3510 (all_dlls): Change type to std::list<dll_info>.
3511 * dll.c: Include <algorithm>.
3512 (get_dll): Remove macro.
3513 (all_dlls): Change type to std::list<dll_info *>.
3514 (free_one_dll): Remove.
3515 (match_dll): Likewise.
3516 (loaded_dll): Adjust.
3517 (unloaded_dll): Adjust to all_dlls type change, use
3518 std::find_if. Inline code from match_dll.
3519 (clear_dlls): Adjust to all_dlls type change.
3520 * server.c (emit_dll_description): Remove.
3521 (handle_qxfer_libraries): Adjust to all_dlls type change,
3522 integrate emit_dll_description's functionality.
3523
3524 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3525
3526 * linux-low.h (struct linux_target_ops) <delete_process>: New
3527 field.
3528 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3529 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3530 (struct linux_target_ops): Add delete_process callback.
3531 * linux-arm-low.c (arm_delete_process): New.
3532 (struct linux_target_ops): Add delete_process callback.
3533 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3534 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3535 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3536 * linux-mips-low.c (mips_linux_delete_process): New.
3537 (struct linux_target_ops): Add delete_process callback.
3538 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3539 * linux-s390-low.c (struct linux_target_ops): Likewise.
3540 * linux-sh-low.c (struct linux_target_ops): Likewise.
3541 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3542 * linux-tile-low.c (struct linux_target_ops): Likewise.
3543 * linux-x86-low.c (x86_linux_delete_process): New.
3544 (struct linux_target_ops): Add delete_process callback.
3545 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3546
3547 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3548
3549 * linux-aarch64-low.c (the_low_target): Add thread delete
3550 callback.
3551 * linux-arm-low.c (arm_delete_thread): New function.
3552 (the_low_target): Add thread delete callback.
3553 * linux-bfin-low.c (the_low_target): Likewise.
3554 * linux-crisv32-low.c (the_low_target): Likewise.
3555 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3556 set.
3557 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3558 field.
3559 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3560 * linux-mips-low.c (mips_linux_delete_thread): New function.
3561 (the_low_target): Add thread delete callback.
3562 * linux-ppc-low.c (the_low_target): Likewise.
3563 * linux-s390-low.c (the_low_target): Likewise.
3564 * linux-sh-low.c (the_low_target): Likewise.
3565 * linux-tic6x-low.c (the_low_target): Likewise.
3566 * linux-tile-low.c (the_low_target): Likewise.
3567 * linux-x86-low.c (the_low_target): Likewise.
3568 * linux-xtensa-low.c (the_low_target): Likewise.
3569
3570 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3571
3572 * win32-low.c: Include "common-inferior.h".
3573
3574 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3575
3576 * inferiors.c (set_inferior_cwd): New function.
3577 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3578 (handle_query): Inform that QSetWorkingDir is supported.
3579 * win32-low.c (create_process): Pass the inferior's cwd to
3580 CreateProcess.
3581
3582 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3583
3584 * inferiors.c (current_inferior_cwd): New global variable.
3585 (get_inferior_cwd): New function.
3586 * inferiors.h (struct process_info) <cwd>: New field.
3587
3588 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3589
3590 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3591 (OBS): Add gdb_tilde_expand.o.
3592
3593 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3594
3595 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3596 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3597
3598 2017-09-29 Pedro Alves <palves@redhat.com>
3599
3600 * ax.c (gdb_parse_agent_expr): Constify.
3601 * ax.h (gdb_parse_agent_expr): Constify.
3602 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3603 Constify.
3604 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3605 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3606 * remote-utils.h (read_ptid): Constify.
3607 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3608 (process_point_options, process_serial_event): Constify.
3609 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3610 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3611 (cmd_qtbuffer): Constify.
3612
3613 2017-09-29 Pedro Alves <palves@redhat.com>
3614
3615 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3616 fails.
3617
3618 2017-09-29 Pedro Alves <palves@redhat.com>
3619
3620 * linux-low.c (handle_extended_wait): Pass parent thread instead
3621 of process to thread_db_notice_clone.
3622 * linux-low.h (thread_db_notice_clone): Replace parent process
3623 parameter with parent thread parameter.
3624 * thread-db.c (find_one_thread): Add comment.
3625 (thread_db_notice_clone): Replace parent process parameter with
3626 parent thread parameter. Temporarily switch to the parent thread.
3627
3628 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3629
3630 * gdbthread.h: Include "common-gdbthread.h".
3631 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3632 "if" when validating the ptid.
3633 * remote-utils.c: Include "gdbthread.h".
3634 (prepare_resume_reply): Use "switch_to_thread".
3635 * target.c (done_accessing_memory): Likewise.
3636
3637 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3638
3639 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3640 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3641 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3642 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3643 s390x-gs-linux64-ipa.o to ipa_obj.
3644 * linux-s390-low.c (HWCAP_S390_GS): New define.
3645 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3646 New functions.
3647 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3648 (s390_arch_setup): Check for guarded-storage support and choose
3649 appropriate tdesc.
3650 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3651 init_registers_s390x_gs_linux64.
3652 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3653 enum value.
3654 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3655 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3656
3657 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3658
3659 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3660
3661 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3662
3663 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3664 (thread_db_thread_handle): Declare.
3665 * linux-low.c (linux_target_ops): Initialize thread_handle.
3666 * server.c (handle_qxfer_threads_worker): Add support for
3667 "handle" attribute.
3668 * target.h (struct target_ops): Add new function pointer,
3669 thread_handle.
3670 (target_thread_handle): Define.
3671 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3672 field in lwp.
3673 (thread_db_thread_handle): New function.
3674
3675 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3676
3677 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3678 * linux-low.h (thread_db_notice_clone): Declare.
3679 * thread-db.c (thread_db_notice_clone): New function.
3680
3681 2017-09-21 Pedro Alves <palves@redhat.com>
3682
3683 * server.c (gdb_read_memory, handle_status, process_serial_event)
3684 (handle_serial_event, handle_target_event): Adjust to
3685 set_desired_thread prototype change.
3686 * target.c (set_desired_thread): Remove 'use_general' parameter
3687 and adjust.
3688 * target.h (set_desired_thread): Remove 'use_general' parameter.
3689
3690 2017-09-20 Tom Tromey <tom@tromey.com>
3691
3692 * target.c (target_terminal::terminal_state): Define.
3693 (target_terminal::init): Rename from target_terminal_init.
3694 (target_terminal::inferior): Rename from
3695 target_terminal_inferior.
3696 (target_terminal::ours): Rename from target_terminal_ours.
3697 (target_terminal::ours_for_output, target_terminal::info): New.
3698
3699 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3700
3701 * server.c (accumulate_file_name_length): Remove.
3702 (emit_dll_description): Adjust to std::string change.
3703 (handle_qxfer_libraries): Use std::string to hold document.
3704
3705 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3706
3707 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3708 return type of xml_escape_text.
3709 * server.c (emit_dll_description): Likewise.
3710
3711 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3712
3713 * server.c (captured_main): Accept argument for --selftest.
3714 Update run_tests call.
3715 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3716 when registering selftests.
3717
3718 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3719
3720 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3721 instead of "VEC" for "target_desc.reg_defs".
3722 (regcache_cpy): Likewise.
3723 (registers_to_string): Likewise.
3724 (registers_from_string): Likewise.
3725 (find_regno): Likewise.
3726 (supply_regblock): Likewise.
3727 (regcache_raw_read_unsigned): Likewise.
3728 * tdesc.c (init_target_desc): Likewise.
3729 (tdesc_create_reg): Likewise.
3730 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3731 (struct target_desc) <reg_defs>: Convert to "std::vector".
3732 (target_desc): Do not initialize "reg_defs".
3733 (~target_desc): Update code to use "std::vector" instead of "VEC"
3734 for "target_desc.reg_defs".
3735 (operator==): Likewise.
3736
3737 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3738
3739 * inferiors.h (thread_to_gdb_id): Remove.
3740 * inferiors.c (thread_to_gdb_id): Remove.
3741 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3742 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3743 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3744 Likewise.
3745 * nto-low.c (nto_fetch_registers, nto_store_registers,
3746 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3747
3748 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3749
3750 * inferiors.h (gdb_id_to_thread_id): Remove.
3751 * inferiors.c (gdb_id_to_thread_id): Remove.
3752 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3753 removal. Move pid declaration closer to where it's used.
3754
3755 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3756
3757 * server.c (handle_detach): New function.
3758 (process_serial_event): Move code out, call handle_detach.
3759
3760 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3761
3762 * server.c (require_running): Rename to ...
3763 (require_running_or_return): ... this ...
3764 (require_running_or_break): ... and this.
3765 (handle_query, process_serial_event): Adjust.
3766
3767 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3768
3769 * linux-low.c (linux_set_resume_request): Remove unused
3770 variables.
3771
3772 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3773
3774 * server.c (first_thread_of): Remove.
3775 (process_serial_event): Replace usage of first_thread_of with
3776 find_any_thread_of_pid.
3777 * tracepoint.c (same_process_p): Remove.
3778 (gdb_agent_about_to_close): Replace usage of same_process_p with
3779 find_any_thread_of_pid.
3780 * linux-x86-low.c (same_process_callback): Remove.
3781 (x86_arch_setup_process_callback): Replace usage of
3782 same_process_callback with find_any_thread_of_pid.
3783 * thread-db.c (any_thread_of): Remove.
3784 (switch_to_process): Replace usage of any_thread_of with
3785 find_any_thread_of_pid.
3786 * inferiors.c (thread_pid_matches_callback): Remove.
3787 (find_thread_process): Adjust to use find_any_thread_of_pid.
3788
3789 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3790
3791 * regcache.c (get_thread_regcache): Guard calls to "memset"
3792 with "!VEC_empty".
3793
3794 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3795
3796 * linux-low.c (handle_extended_wait): Use
3797 "allocate_target_description" instead of "XNEW".
3798 * linux-x86-low.c (initialize_low_arch): Likewise.
3799
3800 2017-09-05 Yao Qi <yao.qi@linaro.org>
3801
3802 * configure.srv (srv_i386_regobj): Remove.
3803 (srv_amd64_regobj): Remove.
3804 (srv_regobj): Set it to "" for x86 non-linux targets.
3805 * linux-x86-tdesc.c (i386_linux_read_description):
3806 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3807 (init_registers_i386): Remove the declaration.
3808 (tdesc_i386): Remove the declaration.
3809 (lynx_i386_arch_setup): Call i386_create_target_description.
3810 * nto-x86-low.c: Likewise.
3811 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3812 [!__x86_64__]: include arch/i386.h.
3813 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3814
3815 2017-09-05 Yao Qi <yao.qi@linaro.org>
3816
3817 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3818 i386/amd64-XXX-linux from it.
3819
3820 2017-09-05 Yao Qi <yao.qi@linaro.org>
3821
3822 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3823 false.
3824 (ipa_amd64_linux_regobj): Remove.
3825 (ipa_x32_linux_regobj): Remove.
3826
3827 2017-09-05 Yao Qi <yao.qi@linaro.org>
3828
3829 * Makefile.in (arch-amd64.o): New rule.
3830 * configure.srv: Append arch-amd64.o.
3831 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3832 (get_ipa_tdesc): Call amd64_linux_read_description.
3833 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3834 and init_registers_amd64_XXX.
3835 * linux-x86-low.c (x86_linux_read_description): Call
3836 amd64_linux_read_description.
3837 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3838 (initialize_low_arch): Don't call init_registers_x32_XXX and
3839 init_registers_amd64_XXX.
3840 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3841 and tdesc_amd64_XXX.
3842 [__x86_64__] (amd64_tdesc_test): New function.
3843 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3844 and init_registers_amd64_XXX.
3845 * linux-x86-tdesc.c: Include arch/amd64.h.
3846 (xcr0_to_tdesc_idx): New function.
3847 (i386_linux_read_description): New function.
3848 (amd64_get_ipa_tdesc_idx): New function.
3849 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3850 (amd64_get_ipa_tdesc): Declare.
3851
3852 2017-09-05 Yao Qi <yao.qi@linaro.org>
3853
3854 * configure.srv (srv_i386_linux_xmlfiles): Remove
3855 i386/i386-XXX-linux.xml from it.
3856
3857 2017-09-05 Yao Qi <yao.qi@linaro.org>
3858
3859 * configure.srv: Set srv_i386_linux_regobj empty if $development
3860 is false.
3861 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3862 initialize_low_tdesc.
3863 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3864 with #if initialize_low_tdesc.
3865 * linux-x86-tdesc-selftest.c: New file.
3866 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3867
3868 2017-09-05 Yao Qi <yao.qi@linaro.org>
3869
3870 * Makefile.in (arch-i386.o): New rule.
3871 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3872 (x86_64-*-linux*): Likewise.
3873 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3874 include arch/i386.h.
3875 (i386_linux_read_description): Remove code and call
3876 i386_create_target_description.
3877 * tdesc.c (allocate_target_description): New function.
3878 * tdesc.h (set_tdesc_architecture): Remove declaration.
3879 (set_tdesc_osabi): Likewise.
3880
3881 2017-09-05 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3884 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3885 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3886 .xmltarget.
3887 * server.c (get_features_xml): Call tdesc_get_features_xml.
3888 * tdesc.c (set_tdesc_architecture): New function.
3889 (set_tdesc_osabi): New function.
3890 (tdesc_get_features_xml): New function.
3891 (tdesc_create_feature): Add an argument.
3892 * tdesc.h (struct target_desc) <features>: New field.
3893 <arch, osabi>: New field.
3894 (~target_desc): xfree features, arch, and osabi.
3895 (target_desc::oerator==): Don't compare .xmltarget.
3896 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3897 (set_tdesc_osabi): Likewise.
3898 (tdesc_get_features_xml): Likewise.
3899
3900 2017-09-05 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-x86-tdesc.c: Include selftest.h.
3903 (i386_tdesc_test): New function.
3904 (initialize_low_tdesc): Call selftests::register_test.
3905 * tdesc.h: Include regdef.h.
3906 (target_desc): Override operator == and !=.
3907
3908 2017-09-05 Yao Qi <yao.qi@linaro.org>
3909
3910 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3911 (ipa_obj): Likewise.
3912 * linux-i386-ipa.c: Include common/x86-xstate.h
3913 (get_ipa_tdesc): Call i386_linux_read_description.
3914 (initialize_low_tracepoint): Don't call init_registers_XXX
3915 functions, call initialize_low_tdesc instead.
3916 * linux-x86-low.c (x86_linux_read_description): Call
3917 i386_linux_read_description.
3918 (initialize_low_arch): Don't call init_registers_i386_XXX
3919 functions, call initialize_low_tdesc.
3920 * linux-x86-tdesc.c: New file.
3921 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3922 (i386_get_ipa_tdesc_idx): Declare.
3923 (i386_get_ipa_tdesc): Declare.
3924 (initialize_low_tdesc): Declare.
3925
3926 2017-09-05 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3929 instead of 0.
3930
3931 2017-09-05 Yao Qi <yao.qi@linaro.org>
3932
3933 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3934 * regcache.c (get_thread_regcache): Use VEC_length.
3935 (init_register_cache): Likewise.
3936 (regcache_cpy): Likewise.
3937 (registers_to_string): Iterate reg_defs via VEC_iterate.
3938 (find_regno): Likewise.
3939 (find_register_by_number): Use VEC_index.
3940 (register_size): Call find_register_by_number.
3941 (register_data): Call find_register_by_number.
3942 (supply_regblock): Use VEC_length.
3943 (regcache_raw_read_unsigned): Likewise.
3944 * tdesc.c (init_target_desc): Iterate reg_defs via
3945 VEC_iterate.
3946 (default_description): Update initializer.
3947 (copy_target_description): Don't update field num_registers.
3948 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3949 <num_registers>: Remove.
3950
3951 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3952
3953 * Makefile.in (.SECONDARY): Define target.
3954
3955 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3956
3957 * linux-low.c (linux_wait_1): Adjust.
3958 * server.c (queue_stop_reply_callback): Adjust.
3959
3960 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3961
3962 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3963 QEnvironmentUnset and QEnvironmentReset packets.
3964 (handle_query): Inform remote that QEnvironmentHexEncoded,
3965 QEnvironmentUnset and QEnvironmentReset are supported.
3966
3967 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3968
3969 * inferiors.h (inferior_target_data): Rename to ...
3970 (thread_target_data): ... this.
3971 (inferior_regcache_data): Rename to ...
3972 (thread_regcache_data): ... this.
3973 (set_inferior_regcache_data): Rename to ...
3974 (set_thread_regcache_data): ... this.
3975 * inferiors.c (inferior_target_data): Rename to ...
3976 (thread_target_data): ... this.
3977 (inferior_regcache_data): Rename to ...
3978 (thread_regcache_data): ... this.
3979 (set_inferior_regcache_data): Rename to ...
3980 (set_thread_regcache_data): ... this.
3981 (free_one_thread): Update.
3982 * linux-low.h (get_thread_lwp): Update.
3983 * regcache.c (get_thread_regcache): Update.
3984 (regcache_invalidate_thread): Update.
3985 (free_register_cache_thread): Update.
3986 * win32-i386-low.c (update_debug_registers_callback): Update.
3987 (win32_get_current_dr): Update.
3988 * win32-low.c (thread_rec): Update.
3989 (delete_thread_info): Update.
3990 (continue_one_thread): Update.
3991 (suspend_one_thread): Update.
3992
3993 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3994
3995 * inferiors.c (set_inferior_target_data): Remove.
3996 * inferiors.h (set_inferior_target_data): Remove.
3997
3998 2017-08-18 Yao Qi <yao.qi@linaro.org>
3999
4000 * Makefile.in (OBS): Add selftest.o.
4001 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4002 * configure, config.in: Re-generated.
4003 * server.c: Include common/sefltest.h.
4004 (captured_main): Handle option --selftest.
4005
4006 2017-08-09 Yao Qi <yao.qi@linaro.org>
4007
4008 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4009 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4010 i386-avx-mpx.o and i386-mmx.o.
4011 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4012 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4013 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4014 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4015 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4016 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4017 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4018 i386/amd64-avx-mpx.xml.
4019
4020 2017-08-09 Yao Qi <yao.qi@linaro.org>
4021
4022 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4023 and x32-avx-avx512.o.
4024 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4025 i386/x32-avx-avx512.xml.
4026
4027 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4028
4029 * tracepoint.h (enum class fast_tpoint_collect_result): New
4030 enumeration.
4031 (fast_tracepoint_collecting): Change return type to
4032 fast_tpoint_collect_result.
4033 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4034 * linux-low.h: Include tracepoint.h.
4035 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4036 fast_tpoint_collect_result.
4037 * linux-low.c (handle_tracepoints): Adjust.
4038 (linux_fast_tracepoint_collecting): Change return type to
4039 fast_tpoint_collect_result.
4040 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4041 linux_wait_1, stuck_in_jump_pad_callback,
4042 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4043 proceed_one_lwp): Adjust to type change.
4044
4045 2017-07-10 Yao Qi <yao.qi@linaro.org>
4046
4047 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4048
4049 2017-06-29 Yao Qi <yao.qi@linaro.org>
4050
4051 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4052 Remove.
4053 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4054
4055 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4058
4059 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4060
4061 * linux-low.c (linux_create_inferior): Adjust code to access the
4062 environment information via 'gdb_environ' class.
4063 * lynx-low.c (lynx_create_inferior): Likewise.
4064 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4065 (get_environ): Return a pointer to 'our_environ'.
4066 (captured_main): Initialize 'our_environ'.
4067 * server.h (get_environ): Adjust prototype.
4068 * spu-low.c (spu_create_inferior): Adjust code to access the
4069 environment information via 'gdb_environ' class.
4070
4071 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4072
4073 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4074 usage of "register" keyword.
4075
4076 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4077
4078 * configure: Re-generate.
4079
4080 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4081
4082 * configure: Re-generate.
4083
4084 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4085
4086 * Makefile.in (COMPILE.pre): Add "-x c++".
4087
4088 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4089
4090 * fork-child.c: Conditionally include <signal.h>.
4091
4092 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4093
4094 * server.c (handle_general_set): Handle new packet
4095 "QStartupWithShell".
4096 (handle_query): Add "QStartupWithShell" to the list of supported
4097 packets.
4098 (gdbserver_usage): Add help text explaining the
4099 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4100 options.
4101 (captured_main): Recognize and act upon the presence of the new
4102 CLI options.
4103
4104 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4105 Pedro Alves <palves@redhat.com>
4106
4107 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4108 * configure: Regenerate.
4109 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4110 "fork-inferior.o".
4111 (i[34567]86-*-lynxos*): Likewise.
4112 (spu*-*-*): Likewise.
4113 * fork-child.c: New file.
4114 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4115 and "environ.h".
4116 (linux_ptrace_fun): New function.
4117 (linux_create_inferior): Adjust function prototype to reflect
4118 change on "target.h". Adjust function code to use
4119 "fork_inferior".
4120 (linux_request_interrupt): Delete "signal_pid".
4121 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4122 (lynx_ptrace_fun): New function.
4123 (lynx_create_inferior): Adjust function prototype to reflect
4124 change on "target.h". Adjust function code to use
4125 "fork_inferior".
4126 * nto-low.c (nto_create_inferior): Adjust function prototype and
4127 code to reflect change on "target.h". Update comments.
4128 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4129 "common-terminal.h" and "environ.h".
4130 (terminal_fd): Moved to fork-child.c.
4131 (old_foreground_pgrp): Likewise.
4132 (restore_old_foreground_pgrp): Likewise.
4133 (last_status): Make it global.
4134 (last_ptid): Likewise.
4135 (our_environ): New variable.
4136 (startup_with_shell): Likewise.
4137 (program_name): Likewise.
4138 (program_argv): Rename to...
4139 (program_args): ...this.
4140 (wrapper_argv): New variable.
4141 (start_inferior): Delete function.
4142 (get_exec_wrapper): New function.
4143 (get_exec_file): Likewise.
4144 (get_environ): Likewise.
4145 (prefork_hook): Likewise.
4146 (post_fork_inferior): Likewise.
4147 (postfork_hook): Likewise.
4148 (postfork_child_hook): Likewise.
4149 (handle_v_run): Update code to deal with arguments coming from the
4150 remote host. Update calls from "start_inferior" to
4151 "create_inferior".
4152 (captured_main): Likewise. Initialize environment variable. Call
4153 "have_job_control".
4154 * server.h (post_fork_inferior): New prototype.
4155 (get_environ): Likewise.
4156 (last_status): Declare.
4157 (last_ptid): Likewise.
4158 (signal_pid): Likewise.
4159 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4160 (spu_ptrace_fun): New function.
4161 (spu_create_inferior): Adjust function prototype to reflect change
4162 on "target.h". Adjust function code to use "fork_inferior".
4163 * target.c (target_terminal_init): New function.
4164 (target_terminal_inferior): Likewise.
4165 (target_terminal_ours): Likewise.
4166 * target.h: Include <vector>.
4167 (struct target_ops) <create_inferior>: Update prototype.
4168 (create_inferior): Update macro.
4169 * utils.c (gdb_flush_out_err): New function.
4170 * win32-low.c (win32_create_inferior): Adjust function prototype
4171 and code to reflect change on "target.h".
4172
4173 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4174
4175 * inferiors.c (switch_to_thread): New function.
4176
4177 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4178
4179 * Makefile.in (SFILE): Add "common/job-control.c".
4180 (OBS): Add "job-control.o".
4181
4182 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4183
4184 * Makefile: Remove "@host_makefile_frag@".
4185
4186 2017-05-05 Pedro Alves <palves@redhat.com>
4187
4188 * configure: Regenerate.
4189
4190 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4191
4192 * configure: Regenerate.
4193
4194 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4195
4196 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4197 software_single_step change of return type to
4198 std::vector<CORE_ADDR>.
4199 * linux-low.c (install_software_single_step_breakpoints):
4200 Likewise.
4201 * linux-low.h (install_software_single_step_breakpoints):
4202 Likewise.
4203
4204 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4205
4206 * remote-utils.c: Include "gdb_termios.h" instead of
4207 "terminal.h".
4208 * terminal.h: Delete file.
4209
4210 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4211
4212 * server.c: Include <vector>.
4213 <program_argv, wrapper_argv>: Convert to std::vector.
4214 (start_inferior): Rewrite function to use C++.
4215 (handle_v_run): Likewise. Update code that calculates the argv
4216 based on the vRun packet; use C++.
4217 (captured_main): Likewise.
4218
4219 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4220
4221 * server.c (handle_v_cont): Initialize thread_resume::thread
4222 with null_ptid.
4223
4224 2017-04-05 Pedro Alves <palves@redhat.com>
4225
4226 * configure: Regenerate.
4227
4228 2017-04-05 Pedro Alves <palves@redhat.com>
4229
4230 * gdbreplay.c (sync_error): Constify.
4231 * linux-x86-low.c (push_opcode): Constify.
4232
4233 2017-04-05 Pedro Alves <palves@redhat.com>
4234
4235 * win32-low.c (get_child_debug_event)
4236 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4237 Report TARGET_WAITKIND_SPURIOUS instead.
4238
4239 2017-04-05 Pedro Alves <palves@redhat.com>
4240
4241 * remote-utils.c (remote_prepare, remote_open): Constify.
4242 * remote-utils.h (remote_prepare, remote_open): Constify.
4243 * server.c (captured_main): Constify 'port' handling.
4244
4245 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4246
4247 * Makefile.in (clean): Clear .deps.
4248
4249 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4250
4251 * .gitignore: Remove generated files, replace with wildcard.
4252 * (clean): Replace removal of generated files with wildcard.
4253 (version.c): Replace with...
4254 (version-generated.c): ...this.
4255 (xml-builtin.c): Replace with...
4256 (xml-builtin-generated.c): ...this.
4257 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4258 (%.c: *regformats*): Replace with...
4259 (%-generated.c: *regformats*): ...this.
4260
4261 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4262
4263 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4264 (xtensa_fill_gregset): Call collect_register_by_name for
4265 threadptr register.
4266 (xtensa_store_gregset): Call supply_register_by_name for
4267 threadptr register.
4268
4269 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4270
4271 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4272 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4273 (xtensa_store_gregset): Call supply_register for all registers in
4274 a0_regnum..a0_regnum + C0_NREGS range.
4275
4276 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4277
4278 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4279 (ax-ipa.o: ax.c): Remove.
4280 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4281 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4282 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4283 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4284 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4285
4286 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4287
4288 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4289 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4290 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4291 (errors-ipa.o: ../common/errors.c): Remove.
4292 (format-ipa.o: ../common/format.c): Remove.
4293 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4294
4295 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4296
4297 * Makefile.in (%-ipa.o: %.c): New rule.
4298 (tracepoint-ipa.o: tracepoint.c): Remove.
4299 (utils-ipa.o: utils.c): Remove.
4300 (remote-utils-ipa.o: remote-utils.c): Remove.
4301 (regcache-ipa.o: regcache.c): Remove.
4302 (i386-linux-ipa.o: i386-linux.c): Remove.
4303 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4304 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4305 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4306 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4307 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4308 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4309 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4310 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4311 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4312 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4313 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4314 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4315 (aarch64-ipa.o: aarch64.c): Remove.
4316 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4317 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4318 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4319 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4320 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4321 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4322 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4323 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4324 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4325 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4326 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4327 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4328 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4329 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4330 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4331 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4332 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4333 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4334 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4335 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4336 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4337 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4338 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4339 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4340 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4341 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4342 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4343 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4344 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4345 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4346 (tdesc-ipa.o: tdesc.c): Remove.
4347 (x32-linux-ipa.o: x32-linux.c): Remove.
4348 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4349 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4350
4351 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4352
4353 * Makefile.in (%.o: ../arch/%.c): New rule.
4354 (arm.o: ../arch/arm.c): Remove.
4355 (arm-linux.o: ../arch/arm-linux.c): Remove.
4356 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4357 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4358
4359 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4360
4361 * Makefile.in (%.o: ../nat/%.c): New rule.
4362 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4363 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4364 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4365 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4366 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4367 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4368 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4369 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4370 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4371 (linux-personality.o: ../nat/linux-personality.c): Remove.
4372 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4373 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4374 (x86-linux.o: ../nat/x86-linux.c): Remove.
4375 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4376 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4377
4378 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4379
4380 * Makefile.in (%.o: ../common/%.c): New rule.
4381 (signals.o: ../common/signals.c): Remove.
4382 (print-utils.o: ../common/print-utils.c): Remove.
4383 (rsp-low.o: ../common/rsp-low.c): Remove.
4384 (common-utils.o: ../common/common-utils.c): Remove.
4385 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4386 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4387 (vec.o: ../common/vec.c): Remove.
4388 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4389 (xml-utils.o: ../common/xml-utils.c): Remove.
4390 (ptid.o: ../common/ptid.c): Remove.
4391 (buffer.o: ../common/buffer.c): Remove.
4392 (format.o: ../common/format.c): Remove.
4393 (filestuff.o: ../common/filestuff.c): Remove.
4394 (agent.o: ../common/agent.c): Remove.
4395 (errors.o: ../common/errors.c): Remove.
4396 (environ.o: ../common/environ.c): Remove.
4397 (common-debug.o: ../common/common-debug.c): Remove.
4398 (cleanups.o: ../common/cleanups.c): Remove.
4399 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4400 (fileio.o: ../common/fileio.c): Remove.
4401 (common-regcache.o: ../common/common-regcache.c): Remove.
4402 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4403 (new-op.o: ../common/new-op.c): Remove.
4404 (btrace-common.o: ../common/btrace-common.c): Remove.
4405
4406 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4407
4408 * Makefile.in (%.o: ../target/%.c): New rule.
4409 (waitstatus.o: ../target/waitstatus.c): Remove.
4410
4411 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4412
4413 * Makefile.in
4414 (%.c: ../regformats/%.dat,
4415 (%.c: ../regformats/arm/%.dat,
4416 (%.c: ../regformats/i386/%.dat,
4417 (%.c: ../regformats/rs6000/%.dat): New rules.
4418 (aarch64.c): Remove.
4419 (reg-arm.c): Remove.
4420 (arm-with-iwmmxt.c): Remove.
4421 (arm-with-vfpv2.c): Remove.
4422 (arm-with-vfpv3.c): Remove.
4423 (arm-with-neon.c): Remove.
4424 (reg-bfin.c): Remove.
4425 (reg-cris.c): Remove.
4426 (reg-crisv32.c): Remove.
4427 (i386.c): Remove.
4428 (i386-linux.c): Remove.
4429 (i386-avx.c): Remove.
4430 (i386-avx-linux.c): Remove.
4431 (i386-avx-avx512.c): Remove.
4432 (i386-avx-avx512-linux.c): Remove.
4433 (i386-mpx.c): Remove.
4434 (i386-mpx-linux.c): Remove.
4435 (i386-avx-mpx-avx512-pku.c): Remove.
4436 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4437 (i386-avx-mpx.c): Remove.
4438 (i386-avx-mpx-linux.c): Remove.
4439 (i386-mmx.c): Remove.
4440 (i386-mmx-linux.c): Remove.
4441 (reg-ia64.c): Remove.
4442 (reg-m32r.c): Remove.
4443 (reg-m68k.c): Remove.
4444 (reg-cf.c): Remove.
4445 (mips-linux.c): Remove.
4446 (mips-dsp-linux.c): Remove.
4447 (mips64-linux.c): Remove.
4448 (mips64-dsp-linux.c): Remove.
4449 (nios2-linux.c): Remove.
4450 (powerpc-32.c): Remove.
4451 (powerpc-32l.c): Remove.
4452 (powerpc-altivec32l.c): Remove.
4453 (powerpc-cell32l.c): Remove.
4454 (powerpc-vsx32l.c): Remove.
4455 (powerpc-isa205-32l.c): Remove.
4456 (powerpc-isa205-altivec32l.c): Remove.
4457 (powerpc-isa205-vsx32l.c): Remove.
4458 (powerpc-e500l.c): Remove.
4459 (powerpc-64l.c): Remove.
4460 (powerpc-altivec64l.c): Remove.
4461 (powerpc-cell64l.c): Remove.
4462 (powerpc-vsx64l.c): Remove.
4463 (powerpc-isa205-64l.c): Remove.
4464 (powerpc-isa205-altivec64l.c): Remove.
4465 (powerpc-isa205-vsx64l.c): Remove.
4466 (s390-linux32.c): Remove.
4467 (s390-linux32v1.c): Remove.
4468 (s390-linux32v2.c): Remove.
4469 (s390-linux64.c): Remove.
4470 (s390-linux64v1.c): Remove.
4471 (s390-linux64v2.c): Remove.
4472 (s390-te-linux64.c): Remove.
4473 (s390-vx-linux64.c): Remove.
4474 (s390-tevx-linux64.c): Remove.
4475 (s390x-linux64.c): Remove.
4476 (s390x-linux64v1.c): Remove.
4477 (s390x-linux64v2.c): Remove.
4478 (s390x-te-linux64.c): Remove.
4479 (s390x-vx-linux64.c): Remove.
4480 (s390x-tevx-linux64.c): Remove.
4481 (tic6x-c64xp-linux.c): Remove.
4482 (tic6x-c64x-linux.c): Remove.
4483 (tic6x-c62x-linux.c): Remove.
4484 (reg-sh.c): Remove.
4485 (reg-sparc64.c): Remove.
4486 (reg-spu.c): Remove.
4487 (amd64.c): Remove.
4488 (amd64-linux.c): Remove.
4489 (amd64-avx.c): Remove.
4490 (amd64-avx-linux.c): Remove.
4491 (amd64-avx-avx512.c): Remove.
4492 (amd64-avx-avx512-linux.c): Remove.
4493 (amd64-mpx.c): Remove.
4494 (amd64-mpx-linux.c): Remove.
4495 (amd64-avx-mpx-avx512-pku.c): Remove.
4496 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4497 (amd64-avx-mpx.c): Remove.
4498 (amd64-avx-mpx-linux.c): Remove.
4499 (x32.c): Remove.
4500 (x32-linux.c): Remove.
4501 (x32-avx.c): Remove.
4502 (x32-avx-linux.c): Remove.
4503 (x32-avx-avx512.c): Remove.
4504 (x32-avx-avx512-linux.c): Remove.
4505 (reg-xtensa.c): Remove.
4506 (reg-tilegx.c): Remove.
4507 (reg-tilegx32.c): Remove.
4508
4509 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4510
4511 * Makefile.in (SFILES): Add "common/environ.c".
4512 (OBJS): Add "common/environ.h".
4513
4514 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4515
4516 * configure.ac: Check if the fs_base and gs_base members of
4517 `struct user_regs_struct' exist.
4518 * config.in: Regenerated.
4519 * configure: Likewise.
4520
4521 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4522
4523 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4524 target_read_memory.
4525 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4526 (get_next_pcs_syscall_next_pc): Likewise.
4527
4528 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4529
4530 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4531 * nto-x86-low.c: Likewise.
4532
4533 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4534
4535 * Makefile.in: Include disable-implicit-rules.mk.
4536
4537 2016-11-23 Pedro Alves <palves@redhat.com>
4538
4539 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4540 (debug_vprintf): Use std::chrono::steady_clock instead of
4541 gettimeofday. Use '.' instead of ':'.
4542 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4543 (get_timestamp): Use std::chrono::steady_clock instead of
4544 gettimeofday.
4545
4546 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4547
4548 * Makefile.in: Fix whitespace formatting.
4549
4550 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4551
4552 * Makefile.in (SFILES, OBS): Flatten list and order
4553 alphabetically.
4554
4555 2016-11-23 Pedro Alves <palves@redhat.com>
4556
4557 * event-loop.c (handle_file_event): Use warning.
4558 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4559 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4560 Use warning.
4561
4562 2016-11-23 Pedro Alves <palves@redhat.com>
4563
4564 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4565 output.
4566 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4567 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4568 debug_printf and debug_flush for debug output.
4569 * server.c (handle_general_set): Likewise.
4570 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4571 output.
4572
4573 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4574
4575 * Makefile.in (.c.o): Replace rule with ...
4576 (%.o: %.c): ... this one.
4577
4578 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4579
4580 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4581 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4582 make.
4583 * configure.ac: Remove checks for the make program.
4584 * configure: Re-generate.
4585
4586 2016-10-28 Pedro Alves <palves@redhat.com>
4587
4588 * Makefile.in (CXX_DIALECT): Get from configure.
4589 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4590 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4591 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4592 * config.in: Regenerate.
4593 * configure: Regenerate.
4594
4595 2016-10-27 Yao Qi <yao.qi@linaro.org>
4596
4597 * linux-low.c (linux_supports_range_stepping): Return true if
4598 can_software_single_step return true.
4599
4600 2016-10-27 Yao Qi <yao.qi@linaro.org>
4601
4602 * inferiors.c (find_inferior_in_random): New function.
4603 * inferiors.h (find_inferior_in_random): Declare.
4604 * linux-low.c (linux_wait_for_event_filtered): Call
4605 find_inferior_in_random instead of find_inferior.
4606
4607 2016-10-27 Yao Qi <yao.qi@linaro.org>
4608
4609 * linux-low.c (linux_wait_1): If single-step breakpoints are
4610 inserted, remove them.
4611
4612 2016-10-26 Pedro Alves <palves@redhat.com>
4613
4614 * linux-low.c (handle_extended_wait): Link parent/child fork
4615 threads.
4616 (linux_wait_1): Unlink them.
4617 (linux_set_resume_request): Ignore resume requests for
4618 already-resumed and unhandled fork child threads.
4619 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4620 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4621 New functions.
4622 (handle_v_requests) <vCont>: Don't call require_running.
4623 * server.h (in_queued_stop_replies): New declaration.
4624
4625 2016-10-24 Yao Qi <yao.qi@linaro.org>
4626
4627 PR server/20733
4628 * linux-aarch64-low.c (append_insns): Cast the return value to
4629 'uint32_t *'.
4630
4631 2016-10-10 Yao Qi <yao.qi@linaro.org>
4632
4633 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4634
4635 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4636
4637 * target.c (target_supports_multi_process): New function, moved
4638 from...
4639 * target.h (target_supports_multi_process): ... here. Remove
4640 macro.
4641
4642 2016-10-05 Tom Tromey <tom@tromey.com>
4643
4644 PR remote/20655:
4645 * tracepoint.c (handle_tracepoint_bkpts): Check
4646 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4647
4648 2016-10-05 Yao Qi <yao.qi@linaro.org>
4649
4650 * configure.srv: Update the path of arm-*.xml files.
4651
4652 2016-10-05 Terry Guo <terry.guo@arm.com>
4653 Yao Qi <yao.qi@linaro.org>
4654
4655 * Makefile.in: Adjust the path of rules.
4656 * configure.srv: Update the path of xml files.
4657 * regformats/arm-with-iwmmxt.dat: Regenerated.
4658 * regformats/arm-with-neon.dat: Likewise.
4659 * regformats/arm-with-vfpv2.dat: Likewise.
4660 * regformats/arm-with-vfpv3.dat Likewise.
4661
4662 2016-09-30 Yao Qi <yao.qi@linaro.org>
4663
4664 PR gdbserver/20627
4665 * target.c (target_stop_and_wait): Don't call
4666 target_continue_no_signal, use resume_stop instead.
4667
4668 2016-09-26 Yao Qi <yao.qi@linaro.org>
4669
4670 * linux-low.c (linux_wait_1): Call debug_exit.
4671
4672 2016-09-23 Pedro Alves <palves@redhat.com>
4673
4674 * Makefile.in (SFILES): Add common/new-op.c.
4675 (OBS): Add common/new-op.o.
4676 (new-op.o): New rule.
4677
4678 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4679
4680 * .gitinore: Ignore more files.
4681
4682 2016-09-21 Yao Qi <yao.qi@linaro.org>
4683
4684 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4685 23.
4686
4687 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4688
4689 * server.c (start_inferior): Call target_mourn_inferior instead of
4690 mourn_inferior; pass ptid_t argument to it.
4691 (resume): Likewise.
4692 (handle_target_event): Likewise.
4693 * target.c (target_mourn_inferior): New function.
4694 * target.h (mourn_inferior): Delete macro.
4695
4696 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4697
4698 * linux-low.c (lwp_is_stepping): New function.
4699
4700 2016-09-06 Carl Love <cel@us.ibm.com>
4701
4702 * server.c (start_inferior): Fixed comment, requested comment change
4703 didn't get updated correctly. Removed reference to ptrace () call as
4704 it is only true on Linux systems.
4705
4706 2016-09-06 Carl Love <cel@us.ibm.com>
4707
4708 * server.c (start_inferior): Do not call
4709 function target_post_create_inferior () if the
4710 inferior process has already exited.
4711
4712 2016-09-05 Pedro Alves <palves@redhat.com>
4713
4714 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4715 (COMPILE.pre, CC_LD): Use CXX directly.
4716 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4717 * acinclude.m4: Don't include build-with-cxx.m4.
4718 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4719 * configure: Regenerate.
4720
4721 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4722
4723 PR gdb/19495
4724 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4725 call writing data to own_buf.
4726
4727 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4728
4729 * target.c (mywait): Call target_wait instead of
4730 the_target->wait.
4731 (target_wait): New function.
4732
4733 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4734
4735 * server.c (start_inferior): New variable 'ptid'. Replace calls
4736 to the_target->resume by target_continue{,_no_signal}, depending
4737 on the case.
4738 * target.c (target_stop_and_wait): Call target_continue_no_signal
4739 instead of the_target->resume.
4740 (target_continue): New function.
4741
4742 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4743
4744 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4745
4746 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4747
4748 PR server/20491
4749 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4750 ps_prochandle.
4751 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4752 * linux-arm-low.c (ps_get_thread_area): Likewise.
4753 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4754 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4755 * linux-mips-low.c (ps_get_thread_area): Likewise.
4756 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4757 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4758 * linux-x86-low.c (ps_get_thread_area): Likewise.
4759 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4760
4761 2016-08-19 Pedro Alves <palves@redhat.com>
4762
4763 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4764
4765 2016-08-19 Pedro Alves <palves@redhat.com>
4766
4767 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4768 comment. Use memcpy instead of casting through unsigned long.
4769
4770 2016-08-19 Pedro Alves <palves@redhat.com>
4771
4772 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4773 allocating around 0x80000000.
4774
4775 2016-08-19 Pedro Alves <palves@redhat.com>
4776
4777 PR gdb/20415
4778 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4779 (x32-avx512-linux-ipa.o): New rules.
4780 * configure.ac (x86_64-*-linux*): New x32 check.
4781 * configure.srv (ipa_x32_linux_regobj): New.
4782 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4783 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4784 descriptions.
4785 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4786 descriptions.
4787 * configure: Regenerate.
4788
4789 2016-08-09 Pedro Alves <palves@redhat.com>
4790
4791 PR gdb/18653
4792 * Makefile.in (OBS): Add signals-state-save-restore.o.
4793 (signals-state-save-restore.o): New rule.
4794 * config.in: Regenerate.
4795 * configure: Regenerate.
4796 * linux-low.c: Include "signals-state-save-restore.h".
4797 (linux_create_inferior): Call
4798 restore_original_signals_state.
4799 * server.c: Include "dispositions-save-restore.h".
4800 (captured_main): Call save_original_signals_state.
4801
4802 2016-08-05 Pedro Alves <palves@redhat.com>
4803
4804 * configure: Regenerate.
4805
4806 2016-08-04 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-low.c (regsets_fetch_inferior_registers): Check
4809 errno is ESRCH or not.
4810
4811 2016-08-02 Yao Qi <yao.qi@linaro.org>
4812
4813 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4814 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4815 (thread_db_load_search): Update.
4816 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4817 td_ta_set_event and td_ta_event_getmsg.
4818
4819 2016-07-26 Pedro Alves <palves@redhat.com>
4820
4821 PR server/20414
4822 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4823 of unsigned long for 64-bit registers and use uint32_t instead of
4824 unsigned int for 32-bit registers.
4825
4826 2016-07-26 Pedro Alves <palves@redhat.com>
4827
4828 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4829 to 'ptrace'.
4830
4831 2016-07-21 Tom Tromey <tom@tromey.com>
4832
4833 * configure: Rebuild.
4834
4835 2016-07-21 Yao Qi <yao.qi@linaro.org>
4836
4837 * mem-break.c (find_gdb_breakpoint): Cast bp to
4838 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4839
4840 2016-07-21 Yao Qi <yao.qi@linaro.org>
4841
4842 * server.c (handle_v_requests): Support s and S actions
4843 if target_supports_software_single_step return true.
4844
4845 2016-07-21 Yao Qi <yao.qi@linaro.org>
4846
4847 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4848 is resume_step, call maybe_hw_step.
4849 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4850 and unstop them.
4851 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4852 breakpoints or not.
4853 (proceed_one_lwp): If resume request is resume_step, install
4854 reinsert breakpoints and call maybe_hw_step.
4855
4856 2016-07-21 Yao Qi <yao.qi@linaro.org>
4857
4858 * linux-low.c (proceed_one_lwp): Declare.
4859 (linux_resume_one_thread): Remove local variable 'step'.
4860 Lift code enqueue signal. Call proceed_one_lwp instead of
4861 linux_resume_one_lwp.
4862
4863 2016-07-21 Yao Qi <yao.qi@linaro.org>
4864
4865 * linux-low.c (linux_resume_one_thread): Call
4866 enqueue_pending_signal.
4867
4868 2016-07-21 Yao Qi <yao.qi@linaro.org>
4869
4870 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4871 * inferiors.c (do_restore_current_thread_cleanup): New function.
4872 (make_cleanup_restore_current_thread): Likewise.
4873 * linux-low.c (install_software_single_step_breakpoints): Call
4874 make_cleanup_restore_current_thread. Switch current_thread to
4875 thread.
4876
4877 2016-07-21 Yao Qi <yao.qi@linaro.org>
4878
4879 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4880 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4881 (clone_one_breakpoint): Likewise.
4882 (delete_reinsert_breakpoints): Change parameter to thread.
4883 Callers updated.
4884 (has_reinsert_breakpoints): Likewise.
4885 (uninsert_reinsert_breakpoints): Likewise.
4886 (reinsert_reinsert_breakpoints): Likewise.
4887 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4888 (delete_reinsert_breakpoints): Likewise.
4889 (reinsert_reinsert_breakpoints): Likewise.
4890 (uninsert_reinsert_breakpoints): Likewise.
4891 (has_reinsert_breakpoints): Likewise.
4892
4893 2016-07-21 Yao Qi <yao.qi@linaro.org>
4894
4895 * inferiors.c (get_thread_process): Make parameter const.
4896 * inferiors.h (get_thread_process): Update declaration.
4897 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4898 Add new parameters child_thread and parent_thread. Callers
4899 updated.
4900 * mem-break.h (clone_all_breakpoints): Update declaration.
4901
4902 2016-07-21 Yao Qi <yao.qi@linaro.org>
4903
4904 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4905 <command_list, handler>: Remove.
4906 (struct gdb_breakpoint): New.
4907 (struct other_breakpoint): New.
4908 (struct reinsert_breakpoint): New.
4909 (is_gdb_breakpoint): New function.
4910 (any_persistent_commands): Update command_list if
4911 is_gdb_breakpoint returns true.
4912 (set_breakpoint): Create breakpoints according to their types.
4913 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4914 (set_gdb_breakpoint_1): Likewise.
4915 (set_gdb_breakpoint): Likewise.
4916 (clear_breakpoint_conditions): Change parameter type to
4917 'struct gdb_breakpoint *'.
4918 (clear_breakpoint_commands): Likewise.
4919 (clear_breakpoint_conditions_and_commands): Likewise.
4920 (add_condition_to_breakpoint): Likewise.
4921 (add_breakpoint_condition): Likewise.
4922 (add_commands_to_breakpoint): Likewise.
4923 (check_breakpoints): Check other_breakpoint.
4924 (clone_one_breakpoint): Clone breakpopint according to its type.
4925 * mem-break.h (struct gdb_breakpoint): Declare.
4926 (set_gdb_breakpoint): Update declaration.
4927 (clear_breakpoint_conditions_and_commands): Likewise.
4928 (add_breakpoint_condition): Likewise.
4929 (add_breakpoint_commands): Likewise.
4930 * server.c (process_point_options): Change parameter type to
4931 'struct gdb_breakpoint *'.
4932
4933 2016-07-21 Yao Qi <yao.qi@linaro.org>
4934
4935 * mem-break.c (set_breakpoint_at): Rename it to ...
4936 (set_breakpoint_type_at): ... it.
4937 (set_breakpoint_at): Call set_breakpoint_type_at.
4938 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4939 * mem-break.h (set_breakpoint_at): Update comments.
4940
4941 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4942
4943 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4944 to buf parameter.
4945 (nios2_store_gregset): Likewise.
4946
4947 2016-07-01 Pedro Alves <palves@redhat.com>
4948 Antoine Tremblay <antoine.tremblay@ericsson.com>
4949
4950 * linux-low.c: Change interface to take the target lwp_info
4951 pointer directly and return void. Handle detaching from a zombie
4952 thread.
4953 (linux_detach_lwp_callback): New function.
4954 (linux_detach): Detach from the leader thread after detaching from
4955 the clone threads.
4956
4957 2016-06-28 Yao Qi <yao.qi@linaro.org>
4958
4959 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4960 for variable new_offset.
4961 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4962 (aarch64_ftrace_insn_reloc_cb): Likewise.
4963 (aarch64_ftrace_insn_reloc_tb): Likewise.
4964 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4965 PRIx64 instead of PRIx32.
4966
4967 2016-06-28 Yao Qi <yao.qi@linaro.org>
4968
4969 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4970 (the_low_target): Install arm_get_syscall_trapinfo.
4971
4972 2016-06-28 Yao Qi <yao.qi@linaro.org>
4973
4974 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4975 function.
4976 (the_low_target): Install aarch64_get_syscall_trapinfo.
4977
4978 2016-06-28 Yao Qi <yao.qi@linaro.org>
4979
4980 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4981 Callers updated.
4982 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4983 Remove parameter sysno.
4984 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4985 sysret.
4986
4987 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4988
4989 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4990 (s390_emit_ne_goto): Likewise.
4991 (s390_emit_lt_goto): Likewise.
4992 (s390_emit_le_goto): Likewise.
4993 (s390_emit_gt_goto): Likewise.
4994 (s390_emit_ge_goto): Likewise.
4995 (s390x_emit_eq_goto): Likewise.
4996 (s390x_emit_ne_goto): Likewise.
4997 (s390x_emit_lt_goto): Likewise.
4998 (s390x_emit_le_goto): Likewise.
4999 (s390x_emit_gt_goto): Likewise.
5000 (s390x_emit_ge_goto): Likewise.
5001 (s390_emit_ops_impl): Mark variable static.
5002 (s390x_emit_ops): Likewise.
5003
5004 2016-06-17 Yao Qi <yao.qi@linaro.org>
5005
5006 * linux-low.c (handle_extended_wait): Call
5007 uninsert_reinsert_breakpoints for the parent process. Remove
5008 reinsert breakpoints from the child process. Reinsert them to
5009 the parent process when vfork is done.
5010 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5011 (reinsert_reinsert_breakpoints): New function.
5012 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5013 (reinsert_reinsert_breakpoints): Declare.
5014
5015 2016-06-17 Yao Qi <yao.qi@linaro.org>
5016
5017 * linux-low.c (handle_extended_wait): If the parent is doing
5018 step-over, remove the reinsert breakpoints from the forked child.
5019
5020 2016-06-17 Yao Qi <yao.qi@linaro.org>
5021
5022 * linux-low.c (unsuspend_all_lwps): Declare.
5023 (linux_low_filter_event): If thread exited, call finish_step_over.
5024 If step-over is finished, unsuspend other threads.
5025
5026 2016-06-17 Yao Qi <yao.qi@linaro.org>
5027
5028 * linux-low.c (linux_resume_one_lwp_throw): Assert
5029 has_reinsert_breakpoints returns false.
5030 * mem-break.c (delete_disabled_breakpoints): Assert
5031 bp type isn't reinsert_breakpoint.
5032
5033 2016-06-17 Yao Qi <yao.qi@linaro.org>
5034
5035 * linux-low.c (maybe_hw_step): New function.
5036 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5037 (finish_step_over): Switch current_thread to lwp temporarily,
5038 and assert has_reinsert_breakpoints returns true.
5039 (proceed_one_lwp): Call maybe_hw_step.
5040 * mem-break.c (has_reinsert_breakpoints): New function.
5041 * mem-break.h (has_reinsert_breakpoints): Declare.
5042
5043 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5044
5045 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5046
5047 2016-05-17 Yao Qi <yao.qi@linaro.org>
5048
5049 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5050 instead of find_inferior.
5051
5052 2016-05-05 Yao Qi <yao.qi@linaro.org>
5053
5054 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5055 Initialize res to zero.
5056
5057 2016-05-05 Yao Qi <yao.qi@linaro.org>
5058
5059 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5060 to uint32_t.
5061
5062 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5063
5064 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5065 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5066 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5067
5068 2016-04-28 Par Olsson <par.olsson@windriver.com>
5069 Simon Marchi <simon.marchi@ericsson.com>
5070
5071 * tracepoint.c (write_inferior_int8): New function.
5072 (cmd_qtenable_disable): Write enable flag using
5073 write_inferior_int8.
5074
5075 2016-04-25 Yao Qi <yao.qi@linaro.org>
5076
5077 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5078 (need_step_over_p): Return zero if the LWP has pending signals
5079 can be delivered on software single step target.
5080
5081 2016-04-25 Yao Qi <yao.qi@linaro.org>
5082
5083 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5084 return instead of error.
5085
5086 2016-04-22 Yao Qi <yao.qi@linaro.org>
5087
5088 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5089 to 23.
5090
5091 2016-04-22 Yao Qi <yao.qi@linaro.org>
5092
5093 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5094 signal when stepping over breakpoint with software single
5095 step.
5096
5097 2016-04-21 Pedro Alves <palves@redhat.com>
5098
5099 * linux-s390-low.c (s390_collect_ptrace_register)
5100 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5101 add casts.
5102 (s390_check_regset): Use void * instead of gdb_byte *.
5103
5104 2016-04-20 Pedro Alves <palves@redhat.com>
5105
5106 * configure: Renegerate.
5107
5108 2016-04-20 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5111 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5112 number 16.
5113 (arm_store_gregset): Likewise.
5114
5115 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5116
5117 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5118 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5119 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5120 (amd64-avx-mpx-linux.c): New rules.
5121 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5122 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5123 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5124 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5125 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5126 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5127 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5128 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5129 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5130 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5131 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5132 * linux-x86-low.c (x86_linux_read_description): Add case for
5133 X86_XSTATE_AVX_MPX_MASK.
5134 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5135 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5136 init_registers_i386_avx_mpx_linux.
5137 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5138 (initialize_low_tracepoint): Call
5139 init_registers_i386_avx_mpx_linux.
5140 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5141 (initialize_low_tracepoint): Call
5142 init_registers_amd64_avx_mpx_linux.
5143 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5144 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5145 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5146 declarations.
5147
5148 2016-04-18 Pedro Alves <palves@redhat.com>
5149
5150 * configure: Regenerate.
5151
5152 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5153
5154 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5155 (aarch64_emit_sub): Likewise.
5156
5157 2016-04-12 Pedro Alves <palves@redhat.com>
5158
5159 * utils.c (prepare_to_throw_exception): Delete.
5160
5161 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5162
5163 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5164
5165 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5166
5167 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5168
5169 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5170
5171 * linux-aarch64-ipa.c: Add <elf.h> include.
5172 * linux-ppc-ipa.c: Add <elf.h> include.
5173 * linux-s390-ipa.c: Add <elf.h> include.
5174
5175 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5176
5177 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5178 (get_raw_reg_ptr): Likewise.
5179 (get_trace_state_variable_value_ptr): Likewise.
5180 (set_trace_state_variable_value_ptr): Likewise.
5181 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5182 char *.
5183
5184 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5185 Marcin Kościelnicki <koriakin@0x04.net>
5186
5187 PR/17221
5188 * linux-ppc-low.c (emit_insns): New function.
5189 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5190 (ppc_emit_prologue): New function.
5191 (ppc_emit_epilogue): New function.
5192 (ppc_emit_add): New function.
5193 (ppc_emit_sub): New function.
5194 (ppc_emit_mul): New function.
5195 (ppc_emit_lsh): New function.
5196 (ppc_emit_rsh_signed): New function.
5197 (ppc_emit_rsh_unsigned): New function.
5198 (ppc_emit_ext): New function.
5199 (ppc_emit_zero_ext): New function.
5200 (ppc_emit_log_not): New function.
5201 (ppc_emit_bit_and): New function.
5202 (ppc_emit_bit_or): New function.
5203 (ppc_emit_bit_xor): New function.
5204 (ppc_emit_bit_not): New function.
5205 (ppc_emit_equal): New function.
5206 (ppc_emit_less_signed): New function.
5207 (ppc_emit_less_unsigned): New function.
5208 (ppc_emit_ref): New function.
5209 (ppc_emit_const): New function.
5210 (ppc_emit_reg): New function.
5211 (ppc_emit_pop): New function.
5212 (ppc_emit_stack_flush): New function.
5213 (ppc_emit_swap): New function.
5214 (ppc_emit_stack_adjust): New function.
5215 (ppc_emit_call): New function.
5216 (ppc_emit_int_call_1): New function.
5217 (ppc_emit_void_call_2): New function.
5218 (ppc_emit_if_goto): New function.
5219 (ppc_emit_goto): New function.
5220 (ppc_emit_eq_goto): New function.
5221 (ppc_emit_ne_goto): New function.
5222 (ppc_emit_lt_goto): New function.
5223 (ppc_emit_le_goto): New function.
5224 (ppc_emit_gt_goto): New function.
5225 (ppc_emit_ge_goto): New function.
5226 (ppc_write_goto_address): New function.
5227 (ppc_emit_ops_impl): New static variable.
5228 (ppc64v1_emit_prologue): New function.
5229 (ppc64v2_emit_prologue): New function.
5230 (ppc64_emit_epilogue): New function.
5231 (ppc64_emit_add): New function.
5232 (ppc64_emit_sub): New function.
5233 (ppc64_emit_mul): New function.
5234 (ppc64_emit_lsh): New function.
5235 (ppc64_emit_rsh_signed): New function.
5236 (ppc64_emit_rsh_unsigned): New function.
5237 (ppc64_emit_ext): New function.
5238 (ppc64_emit_zero_ext): New function.
5239 (ppc64_emit_log_not): New function.
5240 (ppc64_emit_bit_and): New function.
5241 (ppc64_emit_bit_or): New function.
5242 (ppc64_emit_bit_xor): New function.
5243 (ppc64_emit_bit_not): New function.
5244 (ppc64_emit_equal): New function.
5245 (ppc64_emit_less_signed): New function.
5246 (ppc64_emit_less_unsigned): New function.
5247 (ppc64_emit_ref): New function.
5248 (ppc64_emit_const): New function.
5249 (ppc64v1_emit_reg): New function.
5250 (ppc64v2_emit_reg): New function.
5251 (ppc64_emit_pop): New function.
5252 (ppc64_emit_stack_flush): New function.
5253 (ppc64_emit_swap): New function.
5254 (ppc64v1_emit_call): New function.
5255 (ppc64v2_emit_call): New function.
5256 (ppc64v1_emit_int_call_1): New function.
5257 (ppc64v2_emit_int_call_1): New function.
5258 (ppc64v1_emit_void_call_2): New function.
5259 (ppc64v2_emit_void_call_2): New function.
5260 (ppc64_emit_if_goto): New function.
5261 (ppc64_emit_eq_goto): New function.
5262 (ppc64_emit_ne_goto): New function.
5263 (ppc64_emit_lt_goto): New function.
5264 (ppc64_emit_le_goto): New function.
5265 (ppc64_emit_gt_goto): New function.
5266 (ppc64_emit_ge_goto): New function.
5267 (ppc64v1_emit_ops_impl): New static variable.
5268 (ppc64v2_emit_ops_impl): New static variable.
5269 (ppc_emit_ops): New function.
5270 (linux_low_target): Wire in ppc_emit_ops.
5271
5272 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5273 Marcin Kościelnicki <koriakin@0x04.net>
5274
5275 PR/17221
5276 * Makefile.in: Add powerpc-*-ipa.o
5277 * configure.srv: Add ipa_obj for powerpc*-linux.
5278 * linux-ppc-ipa.c: New file.
5279 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5280 includes.
5281 (PPC_FIELD): New macro.
5282 (PPC_SEXT): New macro.
5283 (PPC_OP6): New macro.
5284 (PPC_BO): New macro.
5285 (PPC_LI): New macro.
5286 (PPC_BD): New macro.
5287 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5288 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5289 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5290 (ppc_get_thread_area): New function.
5291 (is_elfv2_inferior): New function.
5292 (gen_ds_form): New function.
5293 (GEN_STD): New macro.
5294 (GEN_STDU): New macro.
5295 (GEN_LD): New macro.
5296 (GEN_LDU): New macro.
5297 (gen_d_form): New function.
5298 (GEN_ADDI): New macro.
5299 (GEN_ADDIS): New macro.
5300 (GEN_LI): New macro.
5301 (GEN_LIS): New macro.
5302 (GEN_ORI): New macro.
5303 (GEN_ORIS): New macro.
5304 (GEN_LWZ): New macro.
5305 (GEN_STW): New macro.
5306 (GEN_STWU): New macro.
5307 (gen_xfx_form): New function.
5308 (GEN_MFSPR): New macro.
5309 (GEN_MTSPR): New macro.
5310 (GEN_MFCR): New macro.
5311 (GEN_MTCR): New macro.
5312 (GEN_SYNC): New macro.
5313 (GEN_LWSYNC): New macro.
5314 (gen_x_form): New function.
5315 (GEN_OR): New macro.
5316 (GEN_MR): New macro.
5317 (GEN_LWARX): New macro.
5318 (GEN_STWCX): New macro.
5319 (GEN_CMPW): New macro.
5320 (gen_md_form): New function.
5321 (GEN_RLDICL): New macro.
5322 (GEN_RLDICR): New macro.
5323 (gen_i_form): New function.
5324 (GEN_B): New macro.
5325 (GEN_BL): New macro.
5326 (gen_b_form): New function.
5327 (GEN_BNE): New macro.
5328 (GEN_LOAD): New macro.
5329 (GEN_STORE): New macro.
5330 (gen_limm): New function.
5331 (gen_atomic_xchg): New function.
5332 (gen_call): New function.
5333 (ppc_relocate_instruction): New function.
5334 (ppc_install_fast_tracepoint_jump_pad): New function.
5335 (ppc_get_min_fast_tracepoint_insn_len): New function.
5336 (ppc_get_ipa_tdesc_idx): New function.
5337 (the_low_target): Wire in the new functions.
5338 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5339 tdescs.
5340 * linux-ppc-tdesc.h: New file.
5341
5342 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5343
5344 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5345 (alloc_jump_pad_buffer): New function.
5346 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5347 (alloc_jump_pad_buffer): New function.
5348 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5349 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5350 (alloc_jump_pad_buffer): New function.
5351 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5352 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5353 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5354 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5355
5356 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5357
5358 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5359 * linux-amd64-ipa.c: Likewise.
5360 * linux-i386-ipa.c: Likewise.
5361 * linux-s390-ipa.c: Likewise.
5362 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5363 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5364 set_trace_state_variable_value_ptr.
5365 (struct ipa_sym_addresses): Likewise.
5366 (symbol_list): Likewise.
5367 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5368 accessing gdb_collect directly.
5369 (gdb_collect_ptr_type): New typedef.
5370 (get_raw_reg_ptr_type): New typedef.
5371 (get_trace_state_variable_value_ptr_type): New typedef.
5372 (set_trace_state_variable_value_ptr_type): New typedef.
5373 (gdb_collect_ptr): New global.
5374 (get_raw_reg_ptr): New global.
5375 (get_trace_state_variable_value_ptr): New global.
5376 (set_trace_state_variable_value_ptr): New global.
5377 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5378 accessing get_raw_reg directly.
5379 (get_get_tsv_func_addr): Likewise for
5380 get_trace_state_variable_value_ptr.
5381 (get_set_tsv_func_addr): Likewise for
5382 set_trace_state_variable_value_ptr.
5383 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5384
5385 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5386
5387 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5388
5389 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5390
5391 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5392 packets.
5393 (relocate_instruction): Remove own_buf.
5394 * server.c (own_buf): Make global.
5395 (handle_v_requests): Make global.
5396 * server.h (own_buf): New declaration.
5397 (handle_v_requests): New prototype.
5398
5399 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5400
5401 PR 18377
5402 * linux-s390-low.c (add_insns): New function.
5403 (s390_emit_prologue): New function.
5404 (s390_emit_epilogue): New function.
5405 (s390_emit_add): New function.
5406 (s390_emit_sub): New function.
5407 (s390_emit_mul): New function.
5408 (s390_emit_lsh): New function.
5409 (s390_emit_rsh_signed): New function.
5410 (s390_emit_rsh_unsigned): New function.
5411 (s390_emit_ext): New function.
5412 (s390_emit_log_not): New function.
5413 (s390_emit_bit_and): New function.
5414 (s390_emit_bit_or): New function.
5415 (s390_emit_bit_xor): New function.
5416 (s390_emit_bit_not): New function.
5417 (s390_emit_equal): New function.
5418 (s390_emit_less_signed): New function.
5419 (s390_emit_less_unsigned): New function.
5420 (s390_emit_ref): New function.
5421 (s390_emit_if_goto): New function.
5422 (s390_emit_goto): New function.
5423 (s390_write_goto_address): New function.
5424 (s390_emit_litpool): New function.
5425 (s390_emit_const): New function.
5426 (s390_emit_call): New function.
5427 (s390_emit_reg): New function.
5428 (s390_emit_pop): New function.
5429 (s390_emit_stack_flush): New function.
5430 (s390_emit_zero_ext): New function.
5431 (s390_emit_swap): New function.
5432 (s390_emit_stack_adjust): New function.
5433 (s390_emit_set_r2): New function.
5434 (s390_emit_int_call_1): New function.
5435 (s390_emit_void_call_2): New function.
5436 (s390_emit_eq_goto): New function.
5437 (s390_emit_ne_goto): New function.
5438 (s390_emit_lt_goto): New function.
5439 (s390_emit_le_goto): New function.
5440 (s390_emit_gt_goto): New function.
5441 (s390_emit_ge_goto): New function.
5442 (s390x_emit_prologue): New function.
5443 (s390x_emit_epilogue): New function.
5444 (s390x_emit_add): New function.
5445 (s390x_emit_sub): New function.
5446 (s390x_emit_mul): New function.
5447 (s390x_emit_lsh): New function.
5448 (s390x_emit_rsh_signed): New function.
5449 (s390x_emit_rsh_unsigned): New function.
5450 (s390x_emit_ext): New function.
5451 (s390x_emit_log_not): New function.
5452 (s390x_emit_bit_and): New function.
5453 (s390x_emit_bit_or): New function.
5454 (s390x_emit_bit_xor): New function.
5455 (s390x_emit_bit_not): New function.
5456 (s390x_emit_equal): New function.
5457 (s390x_emit_less_signed): New function.
5458 (s390x_emit_less_unsigned): New function.
5459 (s390x_emit_ref): New function.
5460 (s390x_emit_if_goto): New function.
5461 (s390x_emit_const): New function.
5462 (s390x_emit_call): New function.
5463 (s390x_emit_reg): New function.
5464 (s390x_emit_pop): New function.
5465 (s390x_emit_stack_flush): New function.
5466 (s390x_emit_zero_ext): New function.
5467 (s390x_emit_swap): New function.
5468 (s390x_emit_stack_adjust): New function.
5469 (s390x_emit_int_call_1): New function.
5470 (s390x_emit_void_call_2): New function.
5471 (s390x_emit_eq_goto): New function.
5472 (s390x_emit_ne_goto): New function.
5473 (s390x_emit_lt_goto): New function.
5474 (s390x_emit_le_goto): New function.
5475 (s390x_emit_gt_goto): New function.
5476 (s390x_emit_ge_goto): New function.
5477 (s390_emit_ops): New function.
5478 (struct linux_target_ops): Fill in emit_ops hook.
5479
5480 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5481
5482 PR 18377
5483 * Makefile.in: Add s390 IPA files.
5484 * configure.srv: Build IPA for s390.
5485 * linux-s390-ipa.c: New file.
5486 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5487 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5488 (tdesc_s390_linux32): Likewise.
5489 (init_registers_s390_linux32v1): Likewise.
5490 (tdesc_s390_linux32v1): Likewise.
5491 (init_registers_s390_linux32v2): Likewise.
5492 (tdesc_s390_linux32v2): Likewise.
5493 (init_registers_s390_linux64): Likewise.
5494 (tdesc_s390_linux64): Likewise.
5495 (init_registers_s390_linux64v1): Likewise.
5496 (tdesc_s390_linux64v1): Likewise.
5497 (init_registers_s390_linux64v2): Likewise.
5498 (tdesc_s390_linux64v2): Likewise.
5499 (init_registers_s390_te_linux64): Likewise.
5500 (tdesc_s390_te_linux64): Likewise.
5501 (init_registers_s390_vx_linux64): Likewise.
5502 (tdesc_s390_vx_linux64): Likewise.
5503 (init_registers_s390_tevx_linux64): Likewise.
5504 (tdesc_s390_tevx_linux64): Likewise.
5505 (init_registers_s390x_linux64): Likewise.
5506 (tdesc_s390x_linux64): Likewise.
5507 (init_registers_s390x_linux64v1): Likewise.
5508 (tdesc_s390x_linux64v1): Likewise.
5509 (init_registers_s390x_linux64v2): Likewise.
5510 (tdesc_s390x_linux64v2): Likewise.
5511 (init_registers_s390x_te_linux64): Likewise.
5512 (tdesc_s390x_te_linux64): Likewise.
5513 (init_registers_s390x_vx_linux64): Likewise.
5514 (tdesc_s390x_vx_linux64): Likewise.
5515 (init_registers_s390x_tevx_linux64): Likewise.
5516 (tdesc_s390x_tevx_linux64): Likewise.
5517 (have_hwcap_s390_vx): New static variable.
5518 (s390_arch_setup): Fill have_hwcap_s390_vx.
5519 (s390_get_thread_area): New function.
5520 (s390_ft_entry_gpr_esa): New const.
5521 (s390_ft_entry_gpr_zarch): New const.
5522 (s390_ft_entry_misc): New const.
5523 (s390_ft_entry_fr): New const.
5524 (s390_ft_entry_vr): New const.
5525 (s390_ft_main_31): New const.
5526 (s390_ft_main_64): New const.
5527 (s390_ft_exit_fr): New const.
5528 (s390_ft_exit_vr): New const.
5529 (s390_ft_exit_misc): New const.
5530 (s390_ft_exit_gpr_esa): New const.
5531 (s390_ft_exit_gpr_zarch): New const.
5532 (append_insns): New function.
5533 (s390_relocate_instruction): New function.
5534 (s390_install_fast_tracepoint_jump_pad): New function.
5535 (s390_get_min_fast_tracepoint_insn_len): New function.
5536 (s390_get_ipa_tdesc_idx): New function.
5537 (struct linux_target_ops): Wire in the above functions.
5538 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5539 * linux-s390-tdesc.h: New file.
5540
5541 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5542
5543 * linux-s390-low.c (s390_supports_tracepoints): New function.
5544 (struct linux_target_ops): Fill supports_tracepoints hook.
5545
5546 2016-03-18 Yao Qi <yao.qi@linaro.org>
5547
5548 * linux-low.c (lwp_signal_can_be_delivered): New function.
5549 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5550
5551 2016-03-18 Yao Qi <yao.qi@linaro.org>
5552
5553 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5554 0 if signal is enqueued. Remove 'signal' from one debugging
5555 message. Move one debugging message to some lines below.
5556 Remove code setting 'signal' to 0.
5557
5558 2016-03-18 Yao Qi <yao.qi@linaro.org>
5559
5560 * linux-low.c (linux_low_filter_event): Remove redundant
5561 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5562
5563 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5564
5565 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5566 (struct linux_target_ops): Wire in the above.
5567
5568 2016-03-03 Yao Qi <yao.qi@linaro.org>
5569
5570 * linux-low.c: Update comments to start_step_over.
5571
5572 2016-03-03 Yao Qi <yao.qi@linaro.org>
5573
5574 PR server/19736
5575 * linux-low.c (handle_extended_wait): Set child suspended
5576 if event_lwp->bp_reinsert isn't zero.
5577
5578 2016-03-02 Yao Qi <yao.qi@linaro.org>
5579
5580 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5581 enqueue_pending_signal.
5582
5583 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5584
5585 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5586 is actually loaded.
5587
5588 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5589
5590 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5591 (s390_regmap_3264) [!__s390x__]: New global.
5592 (s390_collect_ptrace_register): Skip map entries containing -1.
5593 (s390_supply_ptrace_register): Ditto.
5594 (s390_fill_gprs_high): New function.
5595 (s390_store_gprs_high): New function.
5596 (s390_regsets): Add NT_S390_HIGH_GPRS.
5597 (s390_get_hwcap): Enable on 31-bit.
5598 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5599 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5600 Detect NT_S390_HIGH_GPRS.
5601 (s390_usrregs_info_3264): Enable on 31-bit.
5602 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5603 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5604
5605 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5606
5607 PR gdb/13808
5608 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5609 * configure.srv: Ditto.
5610 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5611 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5612 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5613 (init_registers_amd64_linux): Remove prototype.
5614 (tdesc_amd64_linux): Remove declaration.
5615 (get_ipa_tdesc): New function.
5616 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5617 initialize remaining tdescs.
5618 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5619 (init_registers_i386_linux): Remove prototype.
5620 (tdesc_i386_linux): Remove declaration.
5621 (get_ipa_tdesc): New function.
5622 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5623 initialize remaining tdescs.
5624 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5625 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5626 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5627 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5628 (x86_get_ipa_tdesc_idx): New function.
5629 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5630 * linux-x86-tdesc.h: New file.
5631 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5632 (target_get_ipa_tdesc_idx): New macro.
5633 * tracepoint.c (ipa_tdesc_idx): New macro.
5634 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5635 (symbol_list): Add ipa_tdesc_idx.
5636 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5637 (ipa_tdesc): Remove.
5638 (ipa_tdesc_idx): New variable.
5639 (get_context_regcache): Use get_ipa_tdesc.
5640 (gdb_collect): Ditto.
5641 (gdb_probe): Ditto.
5642 * tracepoint.h (get_ipa_tdesc): New prototype.
5643 (ipa_tdesc): Remove.
5644
5645 2016-02-24 Pedro Alves <palves@redhat.com>
5646
5647 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5648 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5649 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5650 Factor out common code between the USE_SIGTRAP_SIGINFO and
5651 !USE_SIGTRAP_SIGINFO blocks.
5652 (linux_low_filter_event): Call save_stop_reason instead of
5653 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5654 Update comments.
5655 (linux_wait_1): Update comments.
5656
5657 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5658
5659 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5660 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5661 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5662 ppc_insert_point, ppc_remove_point.
5663
5664 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5665
5666 * linux-s390-low.c (s390_supports_z_point_type): New function.
5667 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5668
5669 2016-02-16 Yao Qi <yao.qi@linaro.org>
5670
5671 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5672 PC. Get pc from regcache_read_pc.
5673
5674 2016-02-12 Yao Qi <yao.qi@linaro.org>
5675
5676 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5677 or linux_get_pc_32bit.
5678 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5679
5680 2016-02-12 Yao Qi <yao.qi@linaro.org>
5681
5682 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5683 arm_linux_get_next_pcs_fixup.
5684
5685 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5686
5687 * tracepoint.c (x_tracepoint_action_download): Change
5688 write_inferior_data_ptr to write_inferior_data_pointer.
5689 (cmd_qtstart): Likewise.
5690 (write_inferior_data_ptr): Remove.
5691 (download_agent_expr): Change write_inferior_data_ptr to
5692 write_inferior_data_pointer.
5693 (download_tracepoint_1): Likewise.
5694 (download_tracepoint): Likewise.
5695 (download_trace_state_variables): Likewise.
5696
5697 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5698 Marcin Kościelnicki <koriakin@0x04.net>
5699
5700 * tracepoint.c (struct tracepoint_action_ops): Remove.
5701 (struct tracepoint_action): Remove ops.
5702 (m_tracepoint_action_download, r_tracepoint_action_download)
5703 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5704 size and offset accordingly.
5705 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5706 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5707 (tracepoint_action_send, tracepoint_action_download): New functions.
5708 Helpers for trace action handlers.
5709 (add_tracepoint_action): Remove setup actions ops.
5710 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5711
5712 2016-02-10 Yao Qi <yao.qi@linaro.org>
5713
5714 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5715
5716 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5717
5718 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5719 to AC_OUTPUT.
5720 * configure: Regenerate.
5721
5722 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5723
5724 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5725 void * to gdb_byte *.
5726 * linux-low.c (siginfo_fixup): Likewise.
5727 (linux_xfer_siginfo): Likewise.
5728 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5729 Likewise.
5730 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5731
5732 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5733
5734 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5735 to srv_tgtobj.
5736 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5737 to srv_tgtobj.
5738 * linux-x86-low.c [__x86_64__]: Include
5739 "nat/amd64-linux-siginfo.h".
5740 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5741 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5742 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5743 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5744 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5745 (cpt_si_fd, si_timerid, si_overrun): Move from
5746 nat/amd64-linux-siginfo.c.
5747 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5748
5749 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5750
5751 * server.c (skip_to_semicolon): Remove.
5752 (process_point_options): Use strchrnul instead of
5753 skip_to_semicolon.
5754
5755 2016-01-26 Yao Qi <yao.qi@linaro.org>
5756
5757 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5758 * linux-low.c (install_software_single_step_breakpoints): Don't
5759 call regcache_read_pc.
5760 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5761 argument pc.
5762
5763 2016-01-26 Yao Qi <yao.qi@linaro.org>
5764
5765 * linux-low.c (install_software_single_step_breakpoints): Call
5766 regcache_read_pc instead of get_pc.
5767
5768 2016-01-26 Yao Qi <yao.qi@linaro.org>
5769
5770 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5771 (unblock_async_io): Rename to ...
5772 (block_unblock_async_io): ... it. New function.
5773 (enable_async_io): Don't install SIGIO handler. Unblock it
5774 instead.
5775 (disable_async_io): Don't ignore SIGIO. Block it instead.
5776 (initialize_async_io): Install SIGIO handler. Don't call
5777 unblock_async_io.
5778
5779 2016-01-26 Yao Qi <yao.qi@linaro.org>
5780
5781 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5782 first character is '\003', call *the_target->request_interrupt.
5783
5784 2016-01-25 Yao Qi <yao.qi@linaro.org>
5785
5786 * remote-utils.c (new_thread_notify): Remove.
5787 (dead_thread_notify): Likewise.
5788 * remote-utils.h (new_thread_notify): Remove declaration.
5789 (dead_thread_notify): Likewise.
5790
5791 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5792
5793 * gdb.trace/pending.exp: Fix expected message on continue.
5794
5795 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5796
5797 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5798 it works properly on big-endian machines where sizeof (CORE_ADDR)
5799 != sizeof (void *).
5800
5801 2016-01-21 Pedro Alves <palves@redhat.com>
5802
5803 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5804 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5805 * configure: Regenerate.
5806
5807 2016-01-21 Yao Qi <yao.qi@linaro.org>
5808
5809 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5810 is_thumb and set it according to CPSR saved on the stack.
5811 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5812 arm_sigreturn_next_pc.
5813
5814 2016-01-18 Yao Qi <yao.qi@linaro.org>
5815
5816 * linux-low.c (linux_set_pc_64bit): New function.
5817 (linux_get_pc_64bit): New function.
5818 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5819 Declare.
5820 * linux-sparc-low.c (debug_threads): Remove declaration.
5821 (sparc_get_pc): Remove.
5822 (the_low_target): Use linux_get_pc_64bit instead of
5823 sparc_get_pc.
5824 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5825 (the_low_target): Use linux_get_pc_64bit and
5826 linux_set_pc_64bit.
5827
5828 2016-01-18 Yao Qi <yao.qi@linaro.org>
5829
5830 * linux-arm-low.c (debug_threads): Remove declaration.
5831 (arm_get_pc, arm_set_pc): Remove.
5832 (the_low_target): Use linux_get_pc_32bit and
5833 linux_set_pc_32bit.
5834 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5835 (the_low_target): Use linux_get_pc_32bit and
5836 linux_set_pc_32bit.
5837 * linux-cris-low.c (debug_threads): Remove declaration.
5838 (cris_get_pc, cris_set_pc,): Remove.
5839 (the_low_target): Use linux_get_pc_32bit and
5840 linux_set_pc_32bit.
5841 * linux-crisv32-low.c (debug_threads): Remove declaration.
5842 (cris_get_pc, cris_set_pc): Remove.
5843 (the_low_target): Use linux_get_pc_32bit and
5844 linux_set_pc_32bit.
5845 * linux-low.c: Include inttypes.h.
5846 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5847 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5848 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5849 (the_low_target): Use linux_get_pc_32bit and
5850 linux_set_pc_32bit.
5851 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5852 (the_low_target): Use linux_get_pc_32bit and
5853 linux_set_pc_32bit.
5854 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5855 (the_low_target): Use linux_get_pc_32bit and
5856 linux_set_pc_32bit.
5857 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5858 (the_low_target): Use linux_get_pc_32bit and
5859 linux_set_pc_32bit.
5860 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5861 (the_low_target): Use linux_get_pc_32bit and
5862 linux_set_pc_32bit.
5863
5864 2016-01-18 Gary Benson <gbenson@redhat.com>
5865
5866 * configure.ac (AC_FUNC_FORK): New check.
5867 * config.in: Regenerate.
5868 * configure: Likewise.
5869
5870 2016-01-14 Yao Qi <yao.qi@linaro.org>
5871
5872 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5873 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5874 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5875 arm_get_next_pcs_ctor.
5876
5877 2016-01-12 Josh Stone <jistone@redhat.com>
5878 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5879
5880 * inferiors.h: Include "gdb_vecs.h".
5881 (struct process_info): Add syscalls_to_catch.
5882 * inferiors.c (remove_process): Free syscalls_to_catch.
5883 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5884 syscall_return stops.
5885 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5886 * server.c (handle_general_set): Handle QCatchSyscalls.
5887 (handle_query): Report support for QCatchSyscalls.
5888 * target.h (struct target_ops): Add supports_catch_syscall.
5889 (target_supports_catch_syscall): New macro.
5890 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5891 (struct lwp_info): Add syscall_state.
5892 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5893 Maintain syscall_state and syscalls_to_catch across exec.
5894 (get_syscall_trapinfo): New function, proxy to the_low_target.
5895 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5896 (linux_low_filter_event): Toggle syscall_state entry/return for
5897 syscall traps, and set it ignored for all others.
5898 (gdb_catching_syscalls_p): New function.
5899 (gdb_catch_this_syscall_p): New function.
5900 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5901 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5902 (linux_supports_catch_syscall): New function.
5903 (linux_target_ops): Install it.
5904 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5905 (the_low_target): Install it.
5906
5907 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5908
5909 * acinclude.m4: Include new ../warning.m4 file.
5910 * configure: Regenerated.
5911 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5912
5913 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5914
5915 * ax.c (is_goto_target): Mark static.
5916 * linux-low.c (register_addr): Likewise.
5917 (linux_fetch_registers, linux_store_registers): Likewise.
5918 * mem-break.c (any_persistent_commands): Fix old prototype.
5919 (add_commands_to_breakpoint): Mark static.
5920 * regcache.c (find_register_by_name): Delete unused func.
5921 * remote-utils.c (hex_or_minus_one): Mark static.
5922 * server.c (monitor_show_help): Mark static.
5923 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5924 handle_v_requests): Likewise.
5925
5926 2016-01-12 Pedro Alves <palves@redhat.com>
5927
5928 Remove use of the registered trademark symbol throughout.
5929
5930 2016-01-08 Yao Qi <yao.qi@linaro.org>
5931
5932 * remote-utils.c (getpkt): If c is '\003', call target hook
5933 request_interrupt.
5934
5935 2016-01-06 Yao Qi <yao.qi@linaro.org>
5936
5937 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5938 linux-aarch32-low.c.
5939 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5940 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5941 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5942 (thumb2_breakpoint): Declare.
5943 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5944 linux-aarch32-low.h.
5945 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5946 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5947 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5948
5949 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5950
5951 * gdbreplay.c (gdbreplay_version): Change copyright year in
5952 version message.
5953 * server.c (gdbserver_version): Likewise.
5954
5955 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5956
5957 * server.c (crc32_table): Delete.
5958 (crc32): Use libiberty's xcrc32 function.
5959
5960 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5961
5962 * lynx-low.c (lynx_delete_thread_callback): New function.
5963 (lynx_mourn): Properly delete our process and all of its
5964 threads. Remove call to clear_inferiors.
5965
5966 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5967
5968 * target.c (thread_search_callback): Add check that
5969 the thread_stopped target callback is not NULL before
5970 calling it.
5971
5972 2015-12-21 Yao Qi <yao.qi@linaro.org>
5973
5974 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5975 arm breakpoint.
5976
5977 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5978
5979 * server.c (handle_query): Call target_supports_software_single_step.
5980
5981 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5982
5983 * linux-low.c (single_step): New function.
5984 (linux_resume_one_lwp_throw): Call single_step.
5985 (start_step_over): Likewise.
5986
5987 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5988
5989 * Makefile.in (SFILES): Append arch/arm-linux.c,
5990 arch/arm-get-next-pcs.c.
5991 (arm-linux.o): New rule.
5992 (arm-get-next-pcs.o): New rule.
5993 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5994 arm-linux.o.
5995 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5996 to linux-aarch32-low.c.
5997 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5998 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5999 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6000 (thumb2_breakpoint_len): Likewise.
6001 (arm_is_thumb_mode): Make non-static.
6002 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6003 from linux-aarch32-low.c.
6004 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6005 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6006 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6007 (thumb2_breakpoint_len): Likewise.
6008 (arm_is_thumb_mode): New declaration.
6009 * linux-arm-low.c: Include arch/arm-linux.h
6010 aarch/arm-get-next-pcs.h, sys/syscall.h.
6011 (get_next_pcs_ops): New struct.
6012 (get_next_pcs_addr_bits_remove): New function.
6013 (get_next_pcs_is_thumb): New function.
6014 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6015 (arm_sigreturn_next_pc): Likewise.
6016 (get_next_pcs_syscall_next_pc): Likewise.
6017 (arm_gdbserver_get_next_pcs): Likewise.
6018 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6019 Initialize.
6020 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6021 * server.h: Include gdb_vecs.h.
6022
6023 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6024
6025 * Makefile.in (SFILES): Append common/common-regcache.c.
6026 (OBS): Append common-regcache.o.
6027 (common-regcache.o): New rule.
6028 * regcache.c (init_register_cache): Initialize cache to
6029 REG_UNAVAILABLE.
6030 (regcache_raw_read_unsigned): New function.
6031 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6032 register_status enum.
6033
6034 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6035
6036 * linux-aarch64-low.c (the_low_targets): Rename
6037 breakpoint_reinsert_addr to get_next_pcs.
6038 * linux-arm-low.c (the_low_targets): Likewise.
6039 * linux-bfin-low.c (the_low_targets): Likewise.
6040 * linux-cris-low.c (the_low_targets): Likewise.
6041 * linux-crisv32-low.c (the_low_targets): Likewise.
6042 * linux-low.c (can_software_single_step): Likewise.
6043 (install_software_single_step_breakpoints): New function.
6044 (start_step_over): Use install_software_single_step_breakpoints.
6045 * linux-low.h: New CORE_ADDR vector.
6046 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6047 get_next_pcs.
6048 * linux-mips-low.c (the_low_targets): Likewise.
6049 * linux-nios2-low.c (the_low_targets): Likewise.
6050 * linux-sparc-low.c (the_low_targets): Likewise.
6051
6052 2015-12-17 Pedro Alves <palves@redhat.com>
6053
6054 * linux-low.c (linux_kill_one_lwp): Remove references to
6055 LinuxThreads.
6056 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6057 to 'kill'.
6058 (linux_init_signals): Delete.
6059 (initialize_low): Adjust.
6060 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6061
6062 2015-12-16 Pedro Alves <palves@redhat.com>
6063
6064 * configure.ac (compiler warning flags): When testing a
6065 -Wno-foo option, check whether -Wfoo works instead.
6066 * configure: Regenerate.
6067
6068 2015-12-11 Don Breazeal <donb@codesourcery.com>
6069
6070 * server.c (process_serial_event): Don't exit from gdbserver
6071 in remote mode if there are still active inferiors.
6072
6073 2015-12-11 Yao Qi <yao.qi@linaro.org>
6074
6075 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6076 arm_breakpoint_at if the process is 32-bit.
6077
6078 2015-12-11 Yao Qi <yao.qi@linaro.org>
6079
6080 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6081 arm breakpoint.
6082
6083 2015-12-07 Yao Qi <yao.qi@linaro.org>
6084
6085 * configure.srv: Append arm.o to srv_tgtobj for
6086 aarch64*-*-linux* target.
6087 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6088 from linux-arm-low.c.
6089 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6090 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6091 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6092 (thumb2_breakpoint_len): Likewise.
6093 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6094 (arm_breakpoint_kinds): Likewise.
6095 (arm_breakpoint_kind_from_pc): Likewise.
6096 (arm_sw_breakpoint_from_kind): Likewise.
6097 (arm_breakpoint_kind_from_current_state): Likewise.
6098 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6099 (arm_sw_breakpoint_from_kind): Declare.
6100 (arm_breakpoint_kind_from_current_state): Declare.
6101 (arm_breakpoint_at): Declare.
6102 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6103 arm_sw_breakpoint_from_kind if process is 32-bit.
6104 (aarch64_breakpoint_kind_from_pc): New function.
6105 (aarch64_breakpoint_kind_from_current_state): New function.
6106 (the_low_target): Initialize fields breakpoint_kind_from_pc
6107 and breakpoint_kind_from_current_state.
6108 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6109 linux-aarch32-low.c.
6110 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6111 (arm_breakpoint, arm_breakpoint_len): Likewise.
6112 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6113 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6114 (arm_is_thumb_mode): Likewise.
6115 (arm_breakpoint_at): Likewise.
6116 (arm_breakpoint_kind_from_pc): Likewise.
6117 (arm_sw_breakpoint_from_kind): Likewise.
6118 (arm_breakpoint_kind_from_current_state): Likewise.
6119
6120 Revert:
6121 2015-08-04 Yao Qi <yao.qi@linaro.org>
6122
6123 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6124 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6125 * server.c (extended_protocol): Remove "static".
6126 * server.h (extended_protocol): Declare it.
6127
6128 2015-12-04 Josh Stone <jistone@redhat.com>
6129
6130 * target.h (struct target_ops) <arch_setup>: Rename to ...
6131 (struct target_ops) <post_create_inferior>: ... this.
6132 (target_arch_setup): Rename to ...
6133 (target_post_create_inferior): ... this, calling post_create_inferior.
6134 * server.c (start_inferior): Update target_arch_setup calls to
6135 target_post_create_inferior.
6136 * linux-low.c (linux_low_ptrace_options): Forward declare.
6137 (linux_arch_setup): Update its comment for general use.
6138 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6139 (struct linux_target_ops): Use linux_post_create_inferior.
6140 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6141 to post_create_inferior.
6142 * nto-low.c (struct nto_target_ops): Likewise.
6143 * spu-low.c (struct spu_target_ops): Likewise.
6144 * win32-low.c (struct win32_target_ops): Likewise.
6145
6146 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6147
6148 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6149
6150 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6151
6152 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6153 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6154 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6155 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6156 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6157 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6158 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6159 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6160 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6161 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6162 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6163 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6164
6165 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6166
6167 * linux-low.c (linux_look_up_symbols): Don't call
6168 linux_supports_traceclone.
6169 * linux-low.h (thread_db_init): Remove use_events argument.
6170 * thread-db.c (thread_db_use_event): Remove global variable.
6171 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6172 (struct thread_db) <td_create_bp>: Remove field.
6173 (thread_db_create_event): Remove function.
6174 (thread_db_enable_reporting): Likewise.
6175 (find_one_thread): Don't check for thread_db_use_events.
6176 (attach_thread): Likewise.
6177 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6178 (try_thread_db_load_1): Don't check for thread_db_use_events.
6179 (thread_db_init): Remove use_events argument and thread events
6180 handling.
6181 (remove_thread_event_breakpoints): Remove function.
6182 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6183
6184 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6185
6186 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6187 New function.
6188 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6189 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6190 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6191 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6192 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6193 Initialize.
6194 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6195 New function.
6196 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6197 * linux-low.c (can_hardware_single_step): Use
6198 supports_hardware_single_step.
6199 (can_software_single_step): New function.
6200 (start_step_over): Call can_software_single_step.
6201 (linux_supports_hardware_single_step): New function.
6202 (struct target_ops) <supports_software_single_step>: Initialize.
6203 * linux-low.h (struct linux_target_ops)
6204 <supports_hardware_single_step>: Initialize.
6205 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6206 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6207 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6208 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6209 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6210 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6211 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6212 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6213 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6214 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6215 Initialize.
6216 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6217 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6218 Initialize.
6219 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6220 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6221 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6222 New function.
6223 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6224 * target.h (struct target_ops): <supports_software_single_step>:
6225 New field.
6226 (target_supports_software_single_step): New macro.
6227
6228 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6229
6230 * linux-low.c (linux_wait_1): Fix pc advance condition.
6231 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6232 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6233
6234 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6235
6236 * linux-arm-low.c (arm_is_thumb_mode): New function.
6237 (arm_breakpoint_at): Use arm_is_thumb_mode.
6238 (arm_breakpoint_kind_from_current_state): New function.
6239 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6240 Initialize.
6241 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6242 (linux_breakpoint_kind_from_current_state): New function.
6243 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6244 * linux-low.h (struct linux_target_ops)
6245 <breakpoint_kind_from_current_state>: New field.
6246 * target.h (struct target_ops): Likewise.
6247 (target_breakpoint_kind_from_current_state): New macro.
6248
6249 2015-11-30 Pedro Alves <palves@redhat.com>
6250
6251 * linux-low.c (linux_resume): Wake up the event loop before
6252 returning.
6253
6254 2015-11-30 Pedro Alves <palves@redhat.com>
6255
6256 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6257 check.
6258 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6259 to -1.
6260 * target.c (struct thread_search): New structure.
6261 (thread_search_callback): New function.
6262 (prev_general_thread): New global.
6263 (prepare_to_access_memory, done_accessing_memory): New functions.
6264 * target.h (prepare_to_access_memory, done_accessing_memory):
6265 Replace macros with function declarations.
6266
6267 2015-11-30 Pedro Alves <palves@redhat.com>
6268
6269 PR 14618
6270 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6271 report TARGET_WAITKIND_NO_RESUMED.
6272 * remote-utils.c (prepare_resume_reply): Handle
6273 TARGET_WAITKIND_NO_RESUMED.
6274 * server.c (report_no_resumed): New global.
6275 (handle_query) <qSupported>: Handle "no-resumed+". Report
6276 "no-resumed+" support.
6277 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6278 return error if the client doesn't support no-resumed events.
6279 (push_stop_notification): New function.
6280 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6281 events if the client supports them.
6282
6283 2015-11-30 Pedro Alves <palves@redhat.com>
6284
6285 * linux-low.c (thread_still_has_status_pending_p): Don't check
6286 vCont;t here.
6287 (lwp_resumed): New function.
6288 (status_pending_p_callback): Return early if the LWP is not
6289 supposed to be resumed.
6290
6291 2015-11-30 Pedro Alves <palves@redhat.com>
6292
6293 * linux-low.c (handle_extended_wait): Assert that the LWP's
6294 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6295 thread create events, leave the new child's status pending.
6296 (linux_low_filter_event): If GDB wants to hear about thread exit
6297 events, leave the LWP marked dead and don't delete it.
6298 (linux_wait_for_event_filtered): Don't check for thread exit.
6299 (filter_exit_event): New function.
6300 (linux_wait_1): Use it, when returning an exit event.
6301 (linux_resume_one_lwp_throw): Assert that the LWP's
6302 waitstatus is TARGET_WAITKIND_IGNORE.
6303 * remote-utils.c (prepare_resume_reply): Handle
6304 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6305 * server.c (report_thread_events): New global.
6306 (handle_general_set): Handle QThreadEvents.
6307 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6308 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6309 TARGET_WAITKIND_THREAD_EXITED.
6310 * server.h (report_thread_events): Declare.
6311
6312 2015-11-30 Pedro Alves <palves@redhat.com>
6313
6314 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6315 the thread's last_resume_kind was resume_stop.
6316
6317 2015-11-30 Pedro Alves <palves@redhat.com>
6318
6319 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6320 before returning.
6321
6322 2015-11-30 Pedro Alves <palves@redhat.com>
6323
6324 * server.c (handle_v_requests): Handle vCtrlC.
6325
6326 2015-11-30 Pedro Alves <palves@redhat.com>
6327
6328 * gdbthread.h (find_any_thread_of_pid): Declare.
6329 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6330 functions.
6331 * server.c (handle_query): If current_thread is NULL, look for
6332 another thread of the selected process.
6333
6334 2015-11-26 Daniel Colascione <dancol@dancol.org>
6335 Simon Marchi <simon.marchi@ericsson.com>
6336
6337 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6338 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6339 name in reply.
6340 * target.h (struct target_ops) <thread_name>: New field.
6341 (target_thread_name): New macro.
6342
6343 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6344
6345 * regcache.h (regcache_invalidate_pid): Add declaration.
6346 * regcache.c (regcache_invalidate_pid): New function, extracted
6347 from regcache_invalidate.
6348 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6349 Add trivial documentation comment.
6350 * lynx-low.c: Use regcache_invalidate_pid instead of
6351 regcache_invalidate.
6352
6353 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6354
6355 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6356 and Elf64_auxv_t if the target is Android.
6357
6358 2015-11-22 Doug Evans <xdje42@gmail.com>
6359
6360 * target.h: #include <sys/types.h>.
6361
6362 2015-11-19 Pedro Alves <palves@redhat.com>
6363
6364 * linux-low.c (linux_process_qsupported): Change prototype.
6365 Adjust.
6366 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6367 Change prototype.
6368 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6369 and adjust to loop over all features.
6370 * server.c (handle_query) <qSupported>: Adjust to call
6371 target_process_qsupported once, passing it a vector of unprocessed
6372 features.
6373 * target.h (struct target_ops) <process_qsupported>: Change
6374 prototype.
6375 (target_process_qsupported): Adjust.
6376
6377 2015-11-19 Pedro Alves <palves@redhat.com>
6378
6379 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6380 mode.
6381 * configure: Regenerate.
6382
6383 2015-11-19 Pedro Alves <palves@redhat.com>
6384
6385 * configure: Regenerate.
6386
6387 2015-11-19 Yao Qi <yao.qi@linaro.org>
6388
6389 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6390 type to uint32_t.
6391
6392 2015-11-19 Yao Qi <yao.qi@linaro.org>
6393
6394 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6395 (struct aarch64_operand): Move enum out.
6396
6397 2015-11-19 Yao Qi <yao.qi@linaro.org>
6398
6399 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6400 struct user_fpsimd_state *.
6401 (aarch64_store_fpregset): Likewise.
6402
6403 2015-11-19 Yao Qi <yao.qi@linaro.org>
6404
6405 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6406 struct user_pt_regs *.
6407 (aarch64_store_gregset): Likewise.
6408
6409 2015-11-18 Pedro Alves <palves@redhat.com>
6410
6411 * Makefile.in (all_object_files): Add $IPA_OBJS.
6412
6413 2015-11-17 Pedro Alves <palves@redhat.com>
6414
6415 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6416 GDB_SIGNAL_0 and gdb_signal_to_string.
6417
6418 2015-11-17 Pedro Alves <palves@redhat.com>
6419
6420 * win32-low.c (handle_output_debug_string): Remove parameter.
6421 (win32_kill): Remove our_status local and adjust call to
6422 handle_output_debug_string.
6423 (get_child_debug_event): Adjust call to
6424 handle_output_debug_string.
6425
6426 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6427
6428 * linux-mips-low.c (mips_fill_gregset): Add cast.
6429 (mips_store_gregset): Likewise.
6430 (mips_fill_fpregset): Likewise.
6431 (mips_store_fpregset): Likewise.
6432
6433 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6434
6435 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6436 priv.
6437
6438 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6439
6440 * linux-mips-low.c (mips_linux_new_thread): Change type of
6441 watch_type to enum target_hw_bp_type.
6442
6443 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6444
6445 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6446 Change return type to arm_hwbp_type.
6447
6448 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6449
6450 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6451 (arm_store_gregset): Likewise.
6452 * linux-arm-low.c (arm_get_hwcap): Likewise.
6453 (arm_read_description): Likewise.
6454
6455 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6456
6457 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6458
6459 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6460
6461 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6462 (ppc_fill_vsxregset): Likewise.
6463 (ppc_store_vsxregset): Likewise.
6464 (ppc_fill_vrregset): Likewise.
6465 (ppc_store_vrregset): Likewise.
6466 (ppc_fill_evrregset): Likewise.
6467 (ppc_store_evrregset): Likewise.
6468
6469 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6470
6471 * linux-ppc-low.c (ppc_usrregs_info): Remove
6472 forward-declaration.
6473 (ppc_arch_setup): Move lower in file.
6474
6475 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6476
6477 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6478 (ps_pdwrite): Likewise.
6479
6480 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6481
6482 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6483 to after assert checks.
6484
6485 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6486
6487 * proc-service.c (ps_pdread): Add/adjust casts.
6488 (ps_pdwrite): Add/adjust casts.
6489
6490 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6491
6492 * server.c (handle_search_memory_1): Cast return value of
6493 memmem.
6494
6495 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6496
6497 * server.c (write_qxfer_response): Change type of data to
6498 gdb_byte *.
6499
6500 2015-10-29 Pedro Alves <palves@redhat.com>
6501
6502 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6503
6504 2015-10-29 Pedro Alves <palves@redhat.com>
6505
6506 * tracepoint.c (clear_installed_tracepoints): Add casts.
6507
6508 2015-10-29 Pedro Alves <palves@redhat.com>
6509
6510 * server.c (handle_v_cont, process_serial_event): Add enum
6511 gdb_signal casts to signal parsing code.
6512
6513 2015-10-29 Pedro Alves <palves@redhat.com>
6514
6515 * linux-low.h (NULL_REGSET): Define.
6516 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6517 * linux-arm-low.c (arm_regsets): Likewise.
6518 * linux-crisv32-low.c (cris_regsets): Likewise.
6519 * linux-m68k-low.c (m68k_regsets): Likewise.
6520 * linux-mips-low.c (mips_regsets): Likewise.
6521 * linux-nios2-low.c (nios2_regsets): Likewise.
6522 * linux-ppc-low.c (ppc_regsets): Likewise.
6523 * linux-s390-low.c (s390_regsets): Likewise.
6524 * linux-sh-low.c (sh_regsets): Likewise.
6525 * linux-sparc-low.c (sparc_regsets): Likewise.
6526 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6527 * linux-tile-low.c (tile_regsets): Likewise.
6528 * linux-x86-low.c (x86_regsets): Likewise.
6529 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6530
6531 2015-10-29 Pedro Alves <palves@redhat.com>
6532
6533 * linux-low.h (NULL_REGSET): Define.
6534 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6535 * linux-arm-low.c (arm_regsets): Likewise.
6536 * linux-crisv32-low.c (cris_regsets): Likewise.
6537 * linux-m68k-low.c (m68k_regsets): Likewise.
6538 * linux-mips-low.c (mips_regsets): Likewise.
6539 * linux-nios2-low.c (nios2_regsets): Likewise.
6540 * linux-ppc-low.c (ppc_regsets): Likewise.
6541 * linux-s390-low.c (s390_regsets): Likewise.
6542 * linux-sh-low.c (sh_regsets): Likewise.
6543 * linux-sparc-low.c (sparc_regsets): Likewise.
6544 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6545 * linux-tile-low.c (tile_regsets): Likewise.
6546 * linux-x86-low.c (x86_regsets): Likewise.
6547 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6548
6549 2015-10-26 Doug Evans <dje@google.com>
6550
6551 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6552
6553 2015-10-26 Doug Evans <dje@google.com>
6554
6555 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6556
6557 2015-10-26 Doug Evans <dje@google.com>
6558
6559 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6560 for debug_printf.
6561 (attach_thread, find_new_threads_callback): Ditto.
6562
6563 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6564
6565 * mem-break.h (set_breakpoint_data): Remove.
6566
6567 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6568
6569 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6570 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6571 (initialize_low): Remove set_breakpoint_data call.
6572 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6573 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6574 (initialize_low): Remove set_breakpoint_data call.
6575 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6576 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6577 (initialize_low): Remove set_breakpoint_data call.
6578
6579 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6580
6581 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6582 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6583 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6584 * target.h (target_breakpoint_kind_from_pc): New macro.
6585
6586 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6587
6588 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6589 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6590 the default breakpoint kind.
6591
6592 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6593
6594 * linux-arm-low.c (arm_supports_z_point_type): Add software
6595 breakpoint support.
6596
6597 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6598
6599 * linux-arm-low.c: Refactor breakpoint definitions.
6600 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6601 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6602
6603 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6604
6605 * Makefile.in: Add arm.c/o.
6606 * configure.srv: Likewise.
6607 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6608 (arm_breakpoint_kind_from_pc): New function.
6609 (arm_sw_breakpoint_from_kind): Return proper kind.
6610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6611
6612 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6613
6614 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6615 removal.
6616 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6617 (struct raw_breakpoint) <size>: Remove.
6618 (struct raw_breakpoint) <kind>: Add.
6619 (bp_size): New function.
6620 (bp_opcode): Likewise.
6621 (find_raw_breakpoint_at): Adjust for kind.
6622 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6623 (remove_memory_breakpoint): Adjust for kind call bp_size.
6624 (set_raw_breakpoint_at): Adjust for kind.
6625 (set_breakpoint): Likewise.
6626 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6627 (delete_raw_breakpoint): Adjust for kind.
6628 (delete_breakpoint): Likewise.
6629 (find_gdb_breakpoint): Likewise.
6630 (set_gdb_breakpoint_1): Likewise.
6631 (set_gdb_breakpoint): Likewise.
6632 (delete_gdb_breakpoint_1): Likewise.
6633 (delete_gdb_breakpoint): Likewise.
6634 (uninsert_raw_breakpoint): Likewise.
6635 (reinsert_raw_breakpoint): Likewise.
6636 (set_breakpoint_data): Remove.
6637 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6638 (check_mem_read): Adjust for kind call bp_size.
6639 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6640 (clone_one_breakpoint): Adjust for kind.
6641 * mem-break.h (set_gdb_breakpoint): Likewise.
6642 (delete_gdb_breakpoint): Likewise.
6643 * server.c (process_serial_event): Likewise.
6644
6645 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6646
6647 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6648 (struct linux_target_ops) <breakpoint>: Remove.
6649 (struct linux_target_ops) <breakpoint_len>: Remove.
6650 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6651 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6652 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6653 (arm_sw_breakpoint_from_kind): New function.
6654 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6655 (struct linux_target_ops) <breakpoint>: Remove.
6656 (struct linux_target_ops) <breakpoint_len>: Remove.
6657 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6658 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6659 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6660 (struct linux_target_ops) <breakpoint>: Remove.
6661 (struct linux_target_ops) <breakpoint_len>: Remove.
6662 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6663 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6664 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6665 (struct linux_target_ops) <breakpoint>: Remove.
6666 (struct linux_target_ops) <breakpoint_len>: Remove.
6667 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6668 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6669 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6670 and sw_breakpoint_from_kind to increment the pc.
6671 (linux_breakpoint_kind_from_pc): New function.
6672 (linux_sw_breakpoint_from_kind): New function.
6673 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6674 (initialize_low): Call breakpoint_kind_from_pc and
6675 sw_breakpoint_from_kind to replace breakpoint_data/len.
6676 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6677 New field.
6678 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6679 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6680 (struct linux_target_ops) <breakpoint>: Remove.
6681 (struct linux_target_ops) <breakpoint_len>: Remove.
6682 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6683 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6684 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6685 (struct linux_target_ops) <breakpoint>: Remove.
6686 (struct linux_target_ops) <breakpoint_len>: Remove.
6687 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6688 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6689 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6690 (struct linux_target_ops) <breakpoint>: Remove.
6691 (struct linux_target_ops) <breakpoint_len>: Remove.
6692 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6693 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6694 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6695 (struct linux_target_ops) <breakpoint>: Remove.
6696 (struct linux_target_ops) <breakpoint_len>: Remove.
6697 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6698 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6699 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6700 (struct linux_target_ops) <breakpoint>: Remove.
6701 (struct linux_target_ops) <breakpoint_len>: Remove.
6702 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6703 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6704 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6705 (struct linux_target_ops) <breakpoint>: Remove.
6706 (struct linux_target_ops) <breakpoint_len>: Remove.
6707 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6708 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6709 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6710 (struct linux_target_ops) <breakpoint>: Remove.
6711 (struct linux_target_ops) <breakpoint_len>: Remove.
6712 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6713 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6714 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6715 (struct linux_target_ops) <breakpoint>: Remove.
6716 (struct linux_target_ops) <breakpoint_len>: Remove.
6717 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6718 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6719 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6720 (struct linux_target_ops) <breakpoint>: Remove.
6721 (struct linux_target_ops) <breakpoint_len>: Remove.
6722 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6723 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6724 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6725 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6726 (struct linux_target_ops) <breakpoint>: Remove.
6727 (struct linux_target_ops) <breakpoint_len>: Remove.
6728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6730 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6731 (struct linux_target_ops) <breakpoint>: Remove.
6732 (struct linux_target_ops) <breakpoint_len>: Remove.
6733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6735
6736 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6737
6738 * linux-cris-low.c (cris_get_pc): Remove void arg.
6739
6740 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6741
6742 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6743 variable name.
6744
6745 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6746
6747 * inferiors.c (thread_pid_matches_callback): New function.
6748 (find_thread_process): New function.
6749 (remove_thread): Reset current_thread.
6750 (remove_process): Assert threads have been removed first.
6751
6752 2015-10-15 Yao Qi <yao.qi@linaro.org>
6753
6754 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6755 if it is 3.
6756 (aarch64_remove_point): Likewise.
6757 * regcache.c (regcache_register_size): New function.
6758
6759 2015-10-12 Yao Qi <yao.qi@linaro.org>
6760
6761 * linux-aarch64-low.c: Update all callers as emit_load_store
6762 is renamed to aarch64_emit_load_store.
6763
6764 2015-10-12 Yao Qi <yao.qi@linaro.org>
6765
6766 * linux-aarch64-low.c: Update all callers of function renaming
6767 from emit_insn to aarch64_emit_insn.
6768
6769 2015-10-12 Yao Qi <yao.qi@linaro.org>
6770
6771 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6772 arch/aarch64-insn.h.
6773 (struct aarch64_memory_operand): Likewise.
6774 (ENCODE): Likewise.
6775 (emit_insn): Move to arch/aarch64-insn.c.
6776 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6777 (emit_load_store): Move to arch/aarch64-insn.c.
6778 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6779 (can_encode_int32): Remove.
6780
6781 2015-10-12 Yao Qi <yao.qi@linaro.org>
6782
6783 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6784 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6785 (aarch64_relocate_instruction): Likewise.
6786 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6787 (struct aarch64_insn_visitor): Likewise.
6788
6789 2015-10-12 Yao Qi <yao.qi@linaro.org>
6790
6791 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6792 (struct aarch64_insn_visitor): New.
6793 (struct aarch64_insn_relocation_data): New.
6794 (aarch64_ftrace_insn_reloc_b): New function.
6795 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6796 (aarch64_ftrace_insn_reloc_cb): Likewise.
6797 (aarch64_ftrace_insn_reloc_tb): Likewise.
6798 (aarch64_ftrace_insn_reloc_adr): Likewise.
6799 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6800 (aarch64_ftrace_insn_reloc_others): Likewise.
6801 (visitor): New.
6802 (aarch64_relocate_instruction): Use visitor.
6803
6804 2015-10-12 Yao Qi <yao.qi@linaro.org>
6805
6806 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6807 int. Add argument buf.
6808 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6809 aarch64_relocate_instruction.
6810
6811 2015-10-12 Yao Qi <yao.qi@linaro.org>
6812
6813 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6814 argument insn. Remove local variable insn. Don't call
6815 target_read_uint32.
6816 (aarch64_install_fast_tracepoint_jump_pad): Call
6817 target_read_uint32.
6818
6819 2015-09-30 Yao Qi <yao.qi@linaro.org>
6820
6821 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6822 (emit_load_store_pair): Likewise.
6823
6824 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6825
6826 * dll.c (match_dll): Add cast(s).
6827 (unloaded_dll): Likewise.
6828 * linux-low.c (second_thread_of_pid_p): Likewise.
6829 (delete_lwp_callback): Likewise.
6830 (count_events_callback): Likewise.
6831 (select_event_lwp_callback): Likewise.
6832 (linux_set_resume_request): Likewise.
6833 * server.c (accumulate_file_name_length): Likewise.
6834 (emit_dll_description): Likewise.
6835 (handle_qxfer_threads_worker): Likewise.
6836 (visit_actioned_threads): Likewise.
6837 * thread-db.c (any_thread_of): Likewise.
6838 * tracepoint.c (same_process_p): Likewise.
6839 (match_blocktype): Likewise.
6840 (build_traceframe_info_xml): Likewise.
6841
6842 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6843
6844 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6845 assignment.
6846 (gdb_unparse_agent_expr): Likewise.
6847 * hostio.c (require_data): Likewise.
6848 (handle_pread): Likewise.
6849 * linux-low.c (disable_regset): Likewise.
6850 (fetch_register): Likewise.
6851 (store_register): Likewise.
6852 (get_dynamic): Likewise.
6853 (linux_qxfer_libraries_svr4): Likewise.
6854 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6855 (set_fast_tracepoint_jump): Likewise.
6856 (uninsert_fast_tracepoint_jumps_at): Likewise.
6857 (reinsert_fast_tracepoint_jumps_at): Likewise.
6858 (validate_inserted_breakpoint): Likewise.
6859 (clone_agent_expr): Likewise.
6860 * regcache.c (init_register_cache): Likewise.
6861 * remote-utils.c (putpkt_binary_1): Likewise.
6862 (decode_M_packet): Likewise.
6863 (decode_X_packet): Likewise.
6864 (look_up_one_symbol): Likewise.
6865 (relocate_instruction): Likewise.
6866 (monitor_output): Likewise.
6867 * server.c (handle_search_memory): Likewise.
6868 (handle_qxfer_exec_file): Likewise.
6869 (handle_qxfer_libraries): Likewise.
6870 (handle_qxfer): Likewise.
6871 (handle_query): Likewise.
6872 (handle_v_cont): Likewise.
6873 (handle_v_run): Likewise.
6874 (captured_main): Likewise.
6875 * target.c (write_inferior_memory): Likewise.
6876 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6877 * tracepoint.c (init_trace_buffer): Likewise.
6878 (add_tracepoint_action): Likewise.
6879 (add_traceframe): Likewise.
6880 (add_traceframe_block): Likewise.
6881 (cmd_qtdpsrc): Likewise.
6882 (cmd_qtdv): Likewise.
6883 (cmd_qtstatus): Likewise.
6884 (response_source): Likewise.
6885 (response_tsv): Likewise.
6886 (cmd_qtnotes): Likewise.
6887 (gdb_collect): Likewise.
6888 (initialize_tracepoint): Likewise.
6889
6890 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6891
6892 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6893 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6894 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6895 <NOP>: New.
6896 (enum aarch64_condition_codes): New enum.
6897 (w0): New static global.
6898 (fp): Likewise.
6899 (lr): Likewise.
6900 (struct aarch64_memory_operand) <type>: New
6901 MEMORY_OPERAND_POSTINDEX type.
6902 (postindex_memory_operand): New helper function.
6903 (emit_ret): New function.
6904 (emit_load_store_pair): New function, factored out of emit_stp
6905 with support for MEMORY_OPERAND_POSTINDEX.
6906 (emit_stp): Rewrite using emit_load_store_pair.
6907 (emit_ldp): New function.
6908 (emit_load_store): Likewise.
6909 (emit_ldr): Mention post-index instruction in comment.
6910 (emit_ldrh): New function.
6911 (emit_ldrb): New function.
6912 (emit_ldrsw): Mention post-index instruction in comment.
6913 (emit_str): Likewise.
6914 (emit_subs): New function.
6915 (emit_cmp): Likewise.
6916 (emit_and): Likewise.
6917 (emit_orr): Likewise.
6918 (emit_orn): Likewise.
6919 (emit_eor): Likewise.
6920 (emit_mvn): Likewise.
6921 (emit_lslv): Likewise.
6922 (emit_lsrv): Likewise.
6923 (emit_asrv): Likewise.
6924 (emit_mul): Likewise.
6925 (emit_sbfm): Likewise.
6926 (emit_sbfx): Likewise.
6927 (emit_ubfm): Likewise.
6928 (emit_ubfx): Likewise.
6929 (emit_csinc): Likewise.
6930 (emit_cset): Likewise.
6931 (emit_nop): Likewise.
6932 (emit_ops_insns): New helper function.
6933 (emit_pop): Likewise.
6934 (emit_push): Likewise.
6935 (aarch64_emit_prologue): New function.
6936 (aarch64_emit_epilogue): Likewise.
6937 (aarch64_emit_add): Likewise.
6938 (aarch64_emit_sub): Likewise.
6939 (aarch64_emit_mul): Likewise.
6940 (aarch64_emit_lsh): Likewise.
6941 (aarch64_emit_rsh_signed): Likewise.
6942 (aarch64_emit_rsh_unsigned): Likewise.
6943 (aarch64_emit_ext): Likewise.
6944 (aarch64_emit_log_not): Likewise.
6945 (aarch64_emit_bit_and): Likewise.
6946 (aarch64_emit_bit_or): Likewise.
6947 (aarch64_emit_bit_xor): Likewise.
6948 (aarch64_emit_bit_not): Likewise.
6949 (aarch64_emit_equal): Likewise.
6950 (aarch64_emit_less_signed): Likewise.
6951 (aarch64_emit_less_unsigned): Likewise.
6952 (aarch64_emit_ref): Likewise.
6953 (aarch64_emit_if_goto): Likewise.
6954 (aarch64_emit_goto): Likewise.
6955 (aarch64_write_goto_address): Likewise.
6956 (aarch64_emit_const): Likewise.
6957 (aarch64_emit_call): Likewise.
6958 (aarch64_emit_reg): Likewise.
6959 (aarch64_emit_pop): Likewise.
6960 (aarch64_emit_stack_flush): Likewise.
6961 (aarch64_emit_zero_ext): Likewise.
6962 (aarch64_emit_swap): Likewise.
6963 (aarch64_emit_stack_adjust): Likewise.
6964 (aarch64_emit_int_call_1): Likewise.
6965 (aarch64_emit_void_call_2): Likewise.
6966 (aarch64_emit_eq_goto): Likewise.
6967 (aarch64_emit_ne_goto): Likewise.
6968 (aarch64_emit_lt_goto): Likewise.
6969 (aarch64_emit_le_goto): Likewise.
6970 (aarch64_emit_gt_goto): Likewise.
6971 (aarch64_emit_ge_got): Likewise.
6972 (aarch64_emit_ops_impl): New static global variable.
6973 (aarch64_emit_ops): New target function, return
6974 &aarch64_emit_ops_impl.
6975 (struct linux_target_ops): Install it.
6976
6977 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6978
6979 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6980 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6981 aarch64-ipa.o.
6982 * linux-aarch64-ipa.c: New file.
6983 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6984 and endian.h.
6985 (aarch64_get_thread_area): New target method.
6986 (extract_signed_bitfield): New helper function.
6987 (aarch64_decode_ldr_literal): New function.
6988 (enum aarch64_opcodes): New enum.
6989 (struct aarch64_register): New struct.
6990 (struct aarch64_operand): New struct.
6991 (x0): New static global.
6992 (x1): Likewise.
6993 (x2): Likewise.
6994 (x3): Likewise.
6995 (x4): Likewise.
6996 (w2): Likewise.
6997 (ip0): Likewise.
6998 (sp): Likewise.
6999 (xzr): Likewise.
7000 (aarch64_register): New helper function.
7001 (register_operand): Likewise.
7002 (immediate_operand): Likewise.
7003 (struct aarch64_memory_operand): New struct.
7004 (offset_memory_operand): New helper function.
7005 (preindex_memory_operand): Likewise.
7006 (enum aarch64_system_control_registers): New enum.
7007 (ENCODE): New macro.
7008 (emit_insn): New helper function.
7009 (emit_b): New function.
7010 (emit_bcond): Likewise.
7011 (emit_cb): Likewise.
7012 (emit_tb): Likewise.
7013 (emit_blr): Likewise.
7014 (emit_stp): Likewise.
7015 (emit_ldp_q_offset): Likewise.
7016 (emit_stp_q_offset): Likewise.
7017 (emit_load_store): Likewise.
7018 (emit_ldr): Likewise.
7019 (emit_ldrsw): Likewise.
7020 (emit_str): Likewise.
7021 (emit_ldaxr): Likewise.
7022 (emit_stxr): Likewise.
7023 (emit_stlr): Likewise.
7024 (emit_data_processing_reg): Likewise.
7025 (emit_data_processing): Likewise.
7026 (emit_add): Likewise.
7027 (emit_sub): Likewise.
7028 (emit_mov): Likewise.
7029 (emit_movk): Likewise.
7030 (emit_mov_addr): Likewise.
7031 (emit_mrs): Likewise.
7032 (emit_msr): Likewise.
7033 (emit_sevl): Likewise.
7034 (emit_wfe): Likewise.
7035 (append_insns): Likewise.
7036 (can_encode_int32_in): New helper function.
7037 (aarch64_relocate_instruction): New function.
7038 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7039 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7040 (struct linux_target_ops): Install aarch64_get_thread_area,
7041 aarch64_install_fast_tracepoint_jump_pad and
7042 aarch64_get_min_fast_tracepoint_insn_len.
7043
7044 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7045
7046 * Makefile.in (aarch64-insn.o): New rule.
7047 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7048
7049 2015-09-21 Yao Qi <yao.qi@linaro.org>
7050
7051 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7052
7053 2015-09-21 Yao Qi <yao.qi@linaro.org>
7054
7055 * tracepoint.c (max_jump_pad_size): Remove.
7056
7057 2015-09-18 Yao Qi <yao.qi@linaro.org>
7058
7059 * linux-aarch64-low.c: Don't include sys/uio.h.
7060 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7061
7062 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7063
7064 * tracepoint.c (eval_result_type): Change prototype.
7065 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7066
7067 2015-09-15 Pedro Alves <palves@redhat.com>
7068
7069 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7070 Check whether to report exec events instead of checking whether
7071 multiprocess is enabled.
7072
7073 2015-09-15 Pedro Alves <palves@redhat.com>
7074
7075 PR remote/18965
7076 * remote-utils.c (prepare_resume_reply): Merge
7077 TARGET_WAITKIND_VFORK_DONE switch case with the
7078 TARGET_WAITKIND_FORKED case.
7079
7080 2015-09-15 Yao Qi <yao.qi@linaro.org>
7081
7082 * server.c (handle_query): Check string comparison using
7083 "else if" instead of "if".
7084
7085 2015-09-15 Yao Qi <yao.qi@linaro.org>
7086
7087 * server.c (vCont_supported): New global variable.
7088 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7089 matches. Append ";vContSupported+" to own_buf.
7090 (handle_v_requests): Append ";s;S" to own_buf if target supports
7091 hardware single step or vCont_supported is false.
7092 (capture_main): Set vCont_supported to zero.
7093
7094 2015-09-15 Yao Qi <yao.qi@linaro.org>
7095
7096 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7097 it to ...
7098 (linux_supports_hardware_single_step): ... New function.
7099 (linux_target_ops): Update.
7100 * lynx-low.c (lynx_target_ops): Set field
7101 supports_hardware_single_step to target_can_do_hardware_single_step.
7102 * nto-low.c (nto_target_ops): Likewise.
7103 * spu-low.c (spu_target_ops): Likewise.
7104 * win32-low.c (win32_target_ops): Likewise.
7105 * target.c (target_can_do_hardware_single_step): New function.
7106 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7107 Remove. <supports_hardware_single_step>: New field.
7108 (target_supports_conditional_breakpoints): Remove.
7109 (target_supports_hardware_single_step): New macro.
7110 (target_can_do_hardware_single_step): Declare.
7111 * server.c (handle_query): Use target_supports_hardware_single_step
7112 instead of target_supports_conditional_breakpoints.
7113
7114 2015-09-15 Yao Qi <yao.qi@linaro.org>
7115
7116 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7117 function.
7118 (struct linux_target_ops the_low_target): Install
7119 aarch64_linux_siginfo_fixup.
7120
7121 2015-09-11 Don Breazeal <donb@codesourcery.com>
7122 Luis Machado <lgustavo@codesourcery.com>
7123
7124 * linux-low.c (linux_mourn): Static declaration.
7125 (linux_arch_setup): Move in front of
7126 handle_extended_wait.
7127 (linux_arch_setup_thread): New function.
7128 (handle_extended_wait): Handle exec events. Call
7129 linux_arch_setup_thread. Make event_lwp argument a
7130 pointer-to-a-pointer.
7131 (check_zombie_leaders): Do not check stopped threads.
7132 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7133 (linux_low_filter_event): Add lwp and thread for exec'ing
7134 non-leader thread if leader thread has been deleted.
7135 Refactor code into linux_arch_setup_thread and call it.
7136 Pass child lwp pointer by reference to handle_extended_wait.
7137 (linux_wait_for_event_filtered): Update comment.
7138 (linux_wait_1): Prevent clobbering exec event status.
7139 (linux_supports_exec_events): New function.
7140 (linux_target_ops) <supports_exec_events>: Initialize new member.
7141 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7142 new member.
7143 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7144 * server.c (report_exec_events): New global variable.
7145 (handle_query): Handle qSupported query for exec-events feature.
7146 (captured_main): Initialize report_exec_events.
7147 * server.h (report_exec_events): Declare new global variable.
7148 * target.h (struct target_ops) <supports_exec_events>: New
7149 member.
7150 (target_supports_exec_events): New macro.
7151 * win32-low.c (win32_target_ops) <supports_exec_events>:
7152 Initialize new member.
7153
7154 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7155
7156 * linux-low.c (linux_low_enable_btrace): Remove.
7157 (linux_target_ops): Replace linux_low_enable_btrace with
7158 linux_enable_btrace.
7159
7160 2015-09-03 Yao Qi <yao.qi@linaro.org>
7161
7162 * linux-aarch64-low.c (aarch64_insert_point): Call
7163 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7164 returns true.
7165
7166 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7167
7168 * linux-low.c (check_stopped_by_breakpoint): Use
7169 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7170
7171 2015-08-27 Pedro Alves <palves@redhat.com>
7172
7173 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7174
7175 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7176
7177 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7178 the XNEW-family equivalent.
7179 (compile_bytecodes): Likewise.
7180 * dll.c (loaded_dll): Likewise.
7181 * event-loop.c (append_callback_event): Likewise.
7182 (create_file_handler): Likewise.
7183 (create_file_event): Likewise.
7184 * hostio.c (handle_open): Likewise.
7185 * inferiors.c (add_thread): Likewise.
7186 (add_process): Likewise.
7187 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7188 * linux-arm-low.c (arm_new_process): Likewise.
7189 (arm_new_thread): Likewise.
7190 * linux-low.c (add_to_pid_list): Likewise.
7191 (linux_add_process): Likewise.
7192 (handle_extended_wait): Likewise.
7193 (add_lwp): Likewise.
7194 (enqueue_one_deferred_signal): Likewise.
7195 (enqueue_pending_signal): Likewise.
7196 (linux_resume_one_lwp_throw): Likewise.
7197 (linux_resume_one_thread): Likewise.
7198 (linux_read_memory): Likewise.
7199 (linux_write_memory): Likewise.
7200 * linux-mips-low.c (mips_linux_new_process): Likewise.
7201 (mips_linux_new_thread): Likewise.
7202 (mips_add_watchpoint): Likewise.
7203 * linux-x86-low.c (initialize_low_arch): Likewise.
7204 * lynx-low.c (lynx_add_process): Likewise.
7205 * mem-break.c (set_raw_breakpoint_at): Likewise.
7206 (set_breakpoint): Likewise.
7207 (add_condition_to_breakpoint): Likewise.
7208 (add_commands_to_breakpoint): Likewise.
7209 (clone_agent_expr): Likewise.
7210 (clone_one_breakpoint): Likewise.
7211 * regcache.c (new_register_cache): Likewise.
7212 * remote-utils.c (look_up_one_symbol): Likewise.
7213 * server.c (queue_stop_reply): Likewise.
7214 (start_inferior): Likewise.
7215 (queue_stop_reply_callback): Likewise.
7216 (handle_target_event): Likewise.
7217 * spu-low.c (fetch_ppc_memory): Likewise.
7218 (store_ppc_memory): Likewise.
7219 * target.c (set_target_ops): Likewise.
7220 * thread-db.c (thread_db_load_search): Likewise.
7221 (try_thread_db_load_1): Likewise.
7222 * tracepoint.c (add_tracepoint): Likewise.
7223 (add_tracepoint_action): Likewise.
7224 (create_trace_state_variable): Likewise.
7225 (cmd_qtdpsrc): Likewise.
7226 (cmd_qtro): Likewise.
7227 (add_while_stepping_state): Likewise.
7228 * win32-low.c (child_add_thread): Likewise.
7229 (get_image_name): Likewise.
7230
7231 2015-08-25 Yao Qi <yao.qi@linaro.org>
7232
7233 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7234
7235 2015-08-25 Yao Qi <yao.qi@linaro.org>
7236
7237 * Makefile.in (aarch64-linux.o): New rule.
7238 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7239 srv_tgtobj.
7240 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7241 (aarch64_init_debug_reg_state): Make it extern.
7242 (aarch64_linux_prepare_to_resume): Remove.
7243
7244 2015-08-25 Yao Qi <yao.qi@linaro.org>
7245
7246 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7247 lwp_arch_private_info and ptid_of_lwp.
7248
7249 2015-08-25 Yao Qi <yao.qi@linaro.org>
7250
7251 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7252 Find proc_info by find_process_pid. All callers updated.
7253
7254 2015-08-25 Yao Qi <yao.qi@linaro.org>
7255
7256 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7257 Remove.
7258 (debug_reg_change_callback): Remove.
7259 (aarch64_notify_debug_reg_change): Remove.
7260
7261 2015-08-25 Yao Qi <yao.qi@linaro.org>
7262
7263 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7264 Call current_lwp_ptid.
7265
7266 2015-08-25 Yao Qi <yao.qi@linaro.org>
7267
7268 * linux-aarch64-low.c (debug_reg_change_callback): Use
7269 debug_printf.
7270
7271 2015-08-25 Yao Qi <yao.qi@linaro.org>
7272
7273 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7274
7275 2015-08-25 Yao Qi <yao.qi@linaro.org>
7276
7277 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7278
7279 2015-08-25 Yao Qi <yao.qi@linaro.org>
7280
7281 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7282 the code.
7283
7284 2015-08-25 Yao Qi <yao.qi@linaro.org>
7285
7286 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7287 Remove.
7288 (debug_reg_change_callback): Remove argument entry and add argument
7289 lwp. Remove local variable thread. Don't print thread id in the
7290 debugging output. Don't check whether pid of thread equals to pid.
7291 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7292 iterate_over_lwps instead find_inferior.
7293
7294 2015-08-24 Pedro Alves <palves@redhat.com>
7295
7296 * inferiors.c (get_first_process): New function.
7297 * inferiors.h (get_first_process): New declaration.
7298 * remote-utils.c (read_ptid): Default to the first process in the
7299 list, instead of to the current thread's process.
7300
7301 2015-08-24 Pedro Alves <palves@redhat.com>
7302
7303 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7304 * event-loop.c: Likewise.
7305 * remote-utils.c: Likewise.
7306 * tracepoint.c: Likewise.
7307
7308 2015-08-24 Pedro Alves <palves@redhat.com>
7309
7310 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7311 ptid_get_lwp.
7312
7313 2015-08-21 Pedro Alves <palves@redhat.com>
7314
7315 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7316 instead of literal 1.
7317
7318 2015-08-21 Pedro Alves <palves@redhat.com>
7319
7320 * tdesc.c (default_description): Explicitly zero-initialize.
7321
7322 2015-08-21 Pedro Alves <palves@redhat.com>
7323
7324 PR gdb/18749
7325 * inferiors.c (remove_thread): Discard any pending stop reply for
7326 this thread.
7327 * server.c (remove_all_on_match_pid): Rename to ...
7328 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7329 instead of a pid.
7330 (discard_queued_stop_replies): Change parameter to a ptid. Now
7331 extern.
7332 (handle_v_kill, kill_inferior_callback, captured_main)
7333 (process_serial_event): Adjust.
7334 * server.h (discard_queued_stop_replies): Declare.
7335
7336 2015-08-21 Pedro Alves <palves@redhat.com>
7337
7338 * linux-low.c (wait_for_sigstop): Always switch to no thread
7339 selected if the previously current thread dies.
7340 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7341 process instead of the current thread's.
7342 * remote-utils.c (input_interrupt): Don't check if there's no
7343 current thread.
7344 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7345 current thread to the general thread fails, error out.
7346 (handle_qxfer_auxv, handle_qxfer_libraries)
7347 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7348 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7349 (handle_query): Check if there's a thread selected instead of
7350 checking whether there's any thread in the thread list.
7351 (handle_qxfer_threads, handle_qxfer_btrace)
7352 (handle_qxfer_btrace_conf): Don't error out early if there's no
7353 thread in the thread list.
7354 (handle_v_cont, myresume): Don't set the current thread to the
7355 continue thread.
7356 (process_serial_event) <Hg handling>: Also set thread_id if the
7357 previous general thread is still alive.
7358 (process_serial_event) <g/G handling>: If setting the current
7359 thread to the general thread fails, error out.
7360 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7361 thread's lwp instead of the current thread's.
7362 * target.c (set_desired_thread): If the desired thread was not
7363 found, leave the current thread pointing to NULL. Return an int
7364 (boolean) indicating success.
7365 * target.h (set_desired_thread): Change return type to int.
7366
7367 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7368
7369 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7370 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7371 #includes.
7372 (ps_get_thread_area): New function.
7373
7374 2015-08-19 Gary Benson <gbenson@redhat.com>
7375
7376 * hostio.c (handle_pread): Do not attempt to read more data
7377 than hostio_reply_with_data can fit in a packet.
7378
7379 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7380
7381 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7382
7383 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7384
7385 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7386
7387 2015-08-06 Pedro Alves <palves@redhat.com>
7388
7389 * tracepoint.c (expr_eval_result): Now an int.
7390
7391 2015-08-06 Pedro Alves <palves@redhat.com>
7392
7393 * gdbthread.h (struct regcache): Forward declare.
7394 (struct thread_info) <regcache_data>: Now a struct regcache
7395 pointer.
7396 * inferiors.c (inferior_regcache_data)
7397 (set_inferior_regcache_data): Now work with struct regcache
7398 pointers.
7399 * inferiors.h (struct regcache): Forward declare.
7400 (inferior_regcache_data, set_inferior_regcache_data): Now work
7401 with struct regcache pointers.
7402 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7403 (free_register_cache_thread): Remove struct regcache pointer
7404 casts.
7405
7406 2015-08-06 Pedro Alves <palves@redhat.com>
7407
7408 * server.c (captured_main): On error, print the exception message
7409 to stderr, and if run_once is set, throw a quit.
7410
7411 2015-08-06 Pedro Alves <palves@redhat.com>
7412
7413 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7414 the current thread.
7415
7416 2015-08-06 Pedro Alves <palves@redhat.com>
7417
7418 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7419 reading beyond the passed in buffer length.
7420
7421 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7422
7423 * tracepoint.c (symbol_list) <required>: Remove.
7424
7425 2015-08-06 Pedro Alves <palves@redhat.com>
7426
7427 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7428 count if stopping and suspending threads.
7429 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7430 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7431 (linux_detach): Complete an ongoing step-over.
7432 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7433 throughout.
7434 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7435 (linux_wait_1): If passing a signal to the inferior after
7436 finishing a step-over, unsuspend and re-resume all lwps. If we
7437 see a single-step event but the thread should be continuing, don't
7438 pass the trap to gdb.
7439 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7440 internal_error instead of gdb_assert.
7441 (enqueue_pending_signal): New function.
7442 (check_ptrace_stopped_lwp_gone): Add debug output.
7443 (start_step_over): Use internal_error instead of gdb_assert.
7444 (complete_ongoing_step_over): New function.
7445 (linux_resume_one_thread): Don't resume a suspended thread.
7446 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7447 it stepping.
7448
7449 2015-08-06 Pedro Alves <palves@redhat.com>
7450
7451 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7452 (linux_thread_alive): Use lwp_is_marked_dead.
7453 (extended_event_reported): Delete.
7454 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7455 instead of extended_event_reported.
7456 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7457 as well.
7458 (lwp_is_marked_dead): New function.
7459 (lwp_running): Use lwp_is_marked_dead.
7460 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7461 comment.
7462
7463 2015-08-06 Pedro Alves <palves@redhat.com>
7464
7465 * linux-low.c (linux_wait_1): Move fork event output out of the
7466 !report_to_gdb check. Pass event_child->waitstatus to
7467 target_waitstatus_to_string instead of ourstatus.
7468
7469 2015-08-04 Yao Qi <yao.qi@linaro.org>
7470
7471 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7472 if current_thread is 32 bit.
7473
7474 2015-08-04 Yao Qi <yao.qi@linaro.org>
7475
7476 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7477 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7478 * server.c (extended_protocol): Remove "static".
7479 * server.h (extended_protocol): Declare it.
7480
7481 2015-08-04 Yao Qi <yao.qi@linaro.org>
7482
7483 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7484 both aarch64 and aarch32.
7485 (aarch64_set_pc): Likewise.
7486
7487 2015-08-04 Yao Qi <yao.qi@linaro.org>
7488
7489 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7490 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7491 arm-with-neon.xml to srv_xmlfiles.
7492 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7493 (is_64bit_tdesc): New function.
7494 (aarch64_linux_read_description): New function.
7495 (aarch64_arch_setup): Call aarch64_linux_read_description.
7496 (regs_info): Rename to regs_info_aarch64.
7497 (aarch64_regs_info): Return right regs_info.
7498 (initialize_low_arch): Call initialize_low_arch_aarch32.
7499
7500 2015-08-04 Yao Qi <yao.qi@linaro.org>
7501
7502 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7503 * linux-aarch32-low.c: New file.
7504 * linux-aarch32-low.h: New file.
7505 * linux-arm-low.c (arm_fill_gregset): Move it to
7506 linux-aarch32-low.c.
7507 (arm_store_gregset): Likewise.
7508 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7509 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7510 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7511 (regs_info): Rename to regs_info_arm.
7512 (arm_regs_info): Return regs_info_aarch32 if
7513 have_ptrace_getregset is 1 and target description is
7514 arm_with_neon or arm_with_vfpv3.
7515 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7516 Call initialize_low_arch_aarch32 instead.
7517
7518 2015-08-04 Yao Qi <yao.qi@linaro.org>
7519
7520 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7521 * linux-low.c: ... here.
7522 * linux-low.h (have_ptrace_getregset): Declare it.
7523
7524 2015-08-04 Pedro Alves <palves@redhat.com>
7525
7526 * thread-db.c (struct thread_db): Use new typedefs.
7527 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7528 CHK calls.
7529 (disable_thread_event_reporting): Cast result of dlsym to
7530 destination function pointer type.
7531 (thread_db_mourn): Use td_ta_delete_ftype.
7532
7533 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7534
7535 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7536 arch variant.
7537 (CDX_BREAKPOINT): Define for R2.
7538 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7539 (the_low_target): Add comments.
7540
7541 2015-07-30 Yao Qi <yao.qi@linaro.org>
7542
7543 * linux-arm-low.c (arm_hwcap): Remove it.
7544 (arm_read_description): New local variable arm_hwcap. Don't
7545 set arm_hwcap to zero.
7546
7547 2015-07-30 Yao Qi <yao.qi@linaro.org>
7548
7549 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7550 Use regcache->tdesc instead.
7551 (arm_store_wmmxregset): Likewise.
7552 (arm_fill_vfpregset): Likewise.
7553 (arm_store_vfpregset): Likewise.
7554
7555 2015-07-30 Yao Qi <yao.qi@linaro.org>
7556
7557 * linux-arm-low.c: Include arch/arm.h.
7558 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7559 (arm_store_gregset): Likewise.
7560
7561 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7562
7563 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7564 ptrace's 4th parameter.
7565
7566 2015-07-27 Yao Qi <yao.qi@linaro.org>
7567
7568 * configure.srv (case aarch64*-*-linux*): Don't set
7569 srv_linux_usrregs.
7570
7571 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7572
7573 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7574 sys/ptrace.h.
7575 * linux-arm-low.c: Likewise.
7576 * linux-cris-low.c: Likewise.
7577 * linux-crisv32-low.c: Likewise.
7578 * linux-low.c: Likewise.
7579 * linux-m68k-low.c: Likewise.
7580 * linux-mips-low.c: Likewise.
7581 * linux-nios2-low.c: Likewise.
7582 * linux-s390-low.c: Likewise.
7583 * linux-sparc-low.c: Likewise.
7584 * linux-tic6x-low.c: Likewise.
7585 * linux-tile-low.c: Likewise.
7586 * linux-x86-low.c: Likewise.
7587
7588 2015-07-24 Pedro Alves <palves@redhat.com>
7589
7590 * config.in: Regenerate.
7591 * configure: Regenerate.
7592
7593 2015-07-24 Pedro Alves <palves@redhat.com>
7594
7595 * acinclude.m4: Include ../ptrace.m4.
7596 * configure.ac: Call GDB_AC_PTRACE.
7597 * config.in, configure: Regenerate.
7598
7599 2015-07-24 Yao Qi <yao.qi@linaro.org>
7600
7601 * linux-low.c (linux_create_inferior): Remove setting to
7602 proc->priv->new_inferior.
7603 (linux_attach): Likewise.
7604 (linux_low_filter_event): Likewise.
7605 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7606
7607 2015-07-24 Yao Qi <yao.qi@linaro.org>
7608
7609 * linux-low.c (linux_arch_setup): New function.
7610 (linux_low_filter_event): If proc->tdesc is NULL and
7611 proc->attached is true, call the_low_target.arch_setup.
7612 Otherwise, keep status pending, and return.
7613 (linux_resume_one_lwp_throw): Don't call get_pc if
7614 thread->while_stepping isn't NULL. Don't call
7615 get_thread_regcache if proc->tdesc is NULL.
7616 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7617 (linux_target_ops): Install arch_setup.
7618 * server.c (start_inferior): Call the_target->arch_setup.
7619 * target.h (struct target_ops) <arch_setup>: New field.
7620 (target_arch_setup): New marco.
7621 * lynx-low.c (lynx_target_ops): Update.
7622 * nto-low.c (nto_target_ops): Update.
7623 * spu-low.c (spu_target_ops): Update.
7624 * win32-low.c (win32_target_ops): Update.
7625
7626 2015-07-24 Yao Qi <yao.qi@linaro.org>
7627
7628 * linux-low.c (linux_add_process): Don't set
7629 proc->priv->new_inferior.
7630 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7631 (linux_attach): Likewise.
7632
7633 2015-07-24 Yao Qi <yao.qi@linaro.org>
7634
7635 * server.c (start_inferior): Code refactor.
7636
7637 2015-07-24 Yao Qi <yao.qi@linaro.org>
7638
7639 * server.c (process_serial_event): Set general_thread.
7640
7641 2015-07-21 Yao Qi <yao.qi@linaro.org>
7642
7643 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7644 aarch64_linux_get_debug_reg_capacity.
7645
7646 2015-07-17 Yao Qi <yao.qi@linaro.org>
7647
7648 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7649 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7650 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7651 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7652 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7653 (AARCH64_HWP_ALIGNMENT): Likewise.
7654 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7655 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7656 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7657 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7658 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7659 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7660 (struct aarch64_debug_reg_state): Likewise.
7661 (struct arch_lwp_info): Likewise.
7662 (aarch64_align_watchpoint): Likewise.
7663 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7664 (aarch64_watchpoint_length): Likewise.
7665 (aarch64_point_encode_ctrl_reg): Likewise
7666 (aarch64_point_is_aligned): Likewise.
7667 (aarch64_align_watchpoint): Likewise.
7668 (aarch64_linux_set_debug_regs):
7669 (aarch64_dr_state_insert_one_point): Likewise.
7670 (aarch64_dr_state_remove_one_point): Likewise.
7671 (aarch64_handle_breakpoint): Likewise.
7672 (aarch64_handle_aligned_watchpoint): Likewise.
7673 (aarch64_handle_unaligned_watchpoint): Likewise.
7674 (aarch64_handle_watchpoint): Likewise.
7675
7676 2015-07-17 Yao Qi <yao.qi@linaro.org>
7677
7678 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7679 and don't aarch64_get_debug_reg_state. All callers update.
7680 (aarch64_handle_aligned_watchpoint): Likewise.
7681 (aarch64_handle_unaligned_watchpoint): Likewise.
7682 (aarch64_handle_watchpoint): Likewise.
7683 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7684 (aarch64_remove_point): Likewise.
7685
7686 2015-07-17 Yao Qi <yao.qi@linaro.org>
7687
7688 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7689 debug_printf.
7690 (aarch64_handle_unaligned_watchpoint): Likewise.
7691
7692 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7693
7694 Revert the previous 3 commits:
7695 Move gdb_regex* to common/
7696 Move linux_find_memory_regions_full & co.
7697 gdbserver build-id attribute generator
7698
7699 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7700 Jan Kratochvil <jan.kratochvil@redhat.com>
7701
7702 gdbserver build-id attribute generator.
7703 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7704 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7705 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7706 (find_phdr): New.
7707 (get_dynamic): Use find_pdhr to traverse program headers.
7708 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7709 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7710 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7711 (get_hex_build_id): New.
7712 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7713 to reply XML document.
7714
7715 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7716 Jan Kratochvil <jan.kratochvil@redhat.com>
7717
7718 * target.c: Include target/target-utils.h and fcntl.h.
7719 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7720 (target_fileio_read_stralloc): New functions.
7721
7722 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7723
7724 * Makefile.in (OBS): Add gdb_regex.o.
7725 (gdb_regex.o): New.
7726 * config.in: Rebuilt.
7727 * configure: Rebuilt.
7728
7729 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7730 Jan Kratochvil <jan.kratochvil@redhat.com>
7731
7732 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7733 * Makefile.in (OBS): Add target-utils.o.
7734 (linux-maps.o, target-utils.o): New.
7735 * configure.srv (srv_linux_obj): Add linux-maps.o.
7736
7737 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7738
7739 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7740 function, return 1.
7741 (the_low_target): Install it.
7742
7743 2015-07-14 Pedro Alves <palves@redhat.com>
7744
7745 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7746 Instead, ignore ECHILD, and throw an error for other errnos.
7747
7748 2015-07-10 Pedro Alves <palves@redhat.com>
7749
7750 * event-loop.c (struct callback_event) <data>: Change type to
7751 gdb_client_data instance instead of gdb_client_data pointer.
7752 (append_callback_event): Adjust.
7753
7754 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7755
7756 * linux-aarch64-low.c: Add comments for each linux_target_ops
7757 method. Remove comments already covered in target_ops and
7758 linux_target_ops definitions.
7759 (the_low_target): Add comments for each unimplemented method.
7760
7761 2015-07-09 Yao Qi <yao.qi@linaro.org>
7762
7763 * linux-aarch64-low.c (aarch64_regmap): Remove.
7764 (aarch64_usrregs_info): Remove.
7765 (regs_info): Set field usrregs to NULL.
7766
7767 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7768
7769 * linux-low.c: Include "rsp-low.h"
7770 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7771 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7772 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7773 (handle_btrace_enable_pt): New.
7774 (handle_btrace_general_set): Support "pt".
7775 (handle_btrace_conf_general_set): Support "pt:size".
7776
7777 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7778
7779 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7780 Z_PACKET_SW_BP.
7781
7782 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7783
7784 * linux-aarch64-low.c: Remove comment about endianness.
7785 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7786 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7787 memcmp.
7788
7789 2015-06-24 Gary Benson <gbenson@redhat.com>
7790
7791 * linux-i386-ipa.c (stdint.h): Do not include.
7792 * lynx-i386-low.c (stdint.h): Likewise.
7793 * lynx-ppc-low.c (stdint.h): Likewise.
7794 * mem-break.c (stdint.h): Likewise.
7795 * thread-db.c (stdint.h): Likewise.
7796 * tracepoint.c (stdint.h): Likewise.
7797 * win32-low.c (stdint.h): Likewise.
7798
7799 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7800
7801 * server.c (write_qxfer_response): Update call to
7802 remote_escape_output.
7803
7804 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7805 Jan Kratochvil <jan.kratochvil@redhat.com>
7806
7807 Merge multiple hex conversions.
7808 * gdbreplay.c (tohex): Rename to 'fromhex'.
7809 (logchar): Use fromhex.
7810
7811 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7812
7813 * server.c (handle_qxfer_libraries): Set `version' attribute for
7814 <library-list>.
7815
7816 2015-06-10 Gary Benson <gbenson@redhat.com>
7817
7818 * target.h (struct target_ops) <multifs_open>: New field.
7819 <multifs_unlink>: Likewise.
7820 <multifs_readlink>: Likewise.
7821 * linux-low.c (nat/linux-namespaces.h): New include.
7822 (linux_target_ops): Initialize the_target->multifs_open,
7823 the_target->multifs_unlink and the_target->multifs_readlink.
7824 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7825 * hostio.c (hostio_fs_pid): New static variable.
7826 (hostio_handle_new_gdb_connection): New function.
7827 (handle_setfs): Likewise.
7828 (handle_open): Use the_target->multifs_open as appropriate.
7829 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7830 (handle_readlink): Use the_target->multifs_readlink as
7831 appropriate.
7832 (handle_vFile): Handle vFile:setfs packets.
7833 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7834 after target_handle_new_gdb_connection.
7835
7836 2015-06-10 Gary Benson <gbenson@redhat.com>
7837
7838 * configure.ac (AC_CHECK_FUNCS): Add setns.
7839 * config.in: Regenerate.
7840 * configure: Likewise.
7841 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7842 (linux-namespaces.o): New rule.
7843 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7844
7845 2015-06-09 Gary Benson <gbenson@redhat.com>
7846
7847 * hostio.c (handle_open): Process mode argument with
7848 fileio_to_host_mode.
7849
7850 2015-06-01 Yao Qi <yao.qi@linaro.org>
7851
7852 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7853 * linux-x86-low.c: Likewise.
7854
7855 2015-05-28 Don Breazeal <donb@codesourcery.com>
7856
7857 * linux-low.c (handle_extended_wait): Initialize
7858 thread_info.last_resume_kind for new fork children.
7859
7860 2015-05-15 Pedro Alves <palves@redhat.com>
7861
7862 * target.h (target_handle_new_gdb_connection): Rewrite using if
7863 wrapped in do/while.
7864
7865 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7866
7867 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7868 * configure, config.in: Regenerate.
7869 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7870 Declare typedef.
7871
7872 2015-05-12 Don Breazeal <donb@codesourcery.com>
7873
7874 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7875 PTRACE_EVENT_VFORK_DONE.
7876 (linux_low_ptrace_options, extended_event_reported): Add vfork
7877 events.
7878 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7879 and "vforkdone" for RSP 'T' Stop Reply Packet.
7880 * server.h (report_vfork_events): Declare
7881 global variable.
7882
7883 2015-05-12 Don Breazeal <donb@codesourcery.com>
7884
7885 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7886 (the_low_target) <new_fork>: Initialize new member.
7887 * linux-arm-low.c (arm_new_fork): New function.
7888 (the_low_target) <new_fork>: Initialize new member.
7889 * linux-low.c (handle_extended_wait): Call new target function
7890 new_fork.
7891 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7892 * linux-mips-low.c (mips_add_watchpoint): New function
7893 extracted from mips_insert_point.
7894 (the_low_target) <new_fork>: Initialize new member.
7895 (mips_linux_new_fork): New function.
7896 (mips_insert_point): Call mips_add_watchpoint.
7897 * linux-x86-low.c (x86_linux_new_fork): New function.
7898 (the_low_target) <new_fork>: Initialize new member.
7899
7900 2015-05-12 Don Breazeal <donb@codesourcery.com>
7901
7902 * linux-low.c (handle_extended_wait): Implement return value,
7903 rename argument 'event_child' to 'event_lwp', handle
7904 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7905 (linux_low_ptrace_options): New function.
7906 (linux_low_filter_event): Call linux_low_ptrace_options,
7907 use different argument fo linux_enable_event_reporting,
7908 use return value from handle_extended_wait.
7909 (extended_event_reported): New function.
7910 (linux_wait_1): Call extended_event_reported and set
7911 status to report fork events.
7912 (linux_write_memory): Add pid to debug message.
7913 (reset_lwp_ptrace_options_callback): New function.
7914 (linux_handle_new_gdb_connection): New function.
7915 (linux_target_ops): Initialize new structure member.
7916 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7917 * lynx-low.c: Initialize new structure member.
7918 * remote-utils.c (prepare_resume_reply): Implement stop reason
7919 "fork" for "T" stop message.
7920 * server.c (handle_query): Call handle_new_gdb_connection.
7921 * server.h (report_fork_events): Declare global flag.
7922 * target.h (struct target_ops) <handle_new_gdb_connection>:
7923 New member.
7924 (target_handle_new_gdb_connection): New macro.
7925 * win32-low.c: Initialize new structure member.
7926
7927 2015-05-12 Don Breazeal <donb@codesourcery.com>
7928
7929 * mem-break.c (APPEND_TO_LIST): Define macro.
7930 (clone_agent_expr): New function.
7931 (clone_one_breakpoint): New function.
7932 (clone_all_breakpoints): New function.
7933 * mem-break.h: Declare new functions.
7934
7935 2015-05-12 Don Breazeal <donb@codesourcery.com>
7936
7937 * linux-low.c (linux_supports_fork_events): New function.
7938 (linux_supports_vfork_events): New function.
7939 (linux_target_ops): Initialize new structure members.
7940 (initialize_low): Call linux_check_ptrace_features.
7941 * lynx-low.c (lynx_target_ops): Initialize new structure
7942 members.
7943 * server.c (report_fork_events, report_vfork_events):
7944 New global flags.
7945 (handle_query): Add new features to qSupported packet and
7946 response.
7947 (captured_main): Initialize new global variables.
7948 * target.h (struct target_ops) <supports_fork_events>:
7949 New member.
7950 <supports_vfork_events>: New member.
7951 (target_supports_fork_events): New macro.
7952 (target_supports_vfork_events): New macro.
7953 * win32-low.c (win32_target_ops): Initialize new structure
7954 members.
7955
7956 2015-05-12 Gary Benson <gbenson@redhat.com>
7957
7958 * server.c (handle_qxfer_exec_file): Use current process
7959 if annex is empty.
7960
7961 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7962
7963 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7964 Remove HAVE_PTRACE_GETREGS conditionals.
7965 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7966 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7967
7968 2015-05-08 Yao Qi <yao.qi@linaro.org>
7969
7970 * linux-low.c (linux_supports_conditional_breakpoints): New
7971 function.
7972 (linux_target_ops): Install new target method.
7973 * lynx-low.c (lynx_target_ops): Install NULL hook for
7974 supports_conditional_breakpoints.
7975 * nto-low.c (nto_target_ops): Likewise.
7976 * spu-low.c (spu_target_ops): Likewise.
7977 * win32-low.c (win32_target_ops): Likewise.
7978 * server.c (handle_query): Check
7979 target_supports_conditional_breakpoints.
7980 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7981 New field.
7982 (target_supports_conditional_breakpoints): New macro.
7983
7984 2015-05-06 Pedro Alves <palves@redhat.com>
7985
7986 PR server/18081
7987 * server.c (start_inferior): If the process exits, mourn it.
7988
7989 2015-04-21 Gary Benson <gbenson@redhat.com>
7990
7991 * hostio.c (fileio_open_flags_to_host): Factored out to
7992 fileio_to_host_openflags in common/fileio.c. Single use
7993 updated.
7994
7995 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7996
7997 * linux-xtensa-low.c (xtensa_fill_gregset)
7998 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7999 XCHAL_HAVE_LOOP.
8000
8001 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8002
8003 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8004 (regs_info): Replace usrregs pointer with NULL.
8005
8006 2015-04-17 Gary Benson <gbenson@redhat.com>
8007
8008 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8009 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8010 * server.c (handle_qxfer_exec_file): New function.
8011 (qxfer_packets): Add exec-file entry.
8012 (handle_query): Report qXfer:exec-file:read as supported packet.
8013
8014 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8015
8016 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8017
8018 2015-04-09 Gary Benson <gbenson@redhat.com>
8019
8020 * hostio-errno.c (errno_to_fileio_error): Remove function.
8021 Update caller to use remote_fileio_to_fio_error.
8022
8023 2015-04-09 Yao Qi <yao.qi@linaro.org>
8024
8025 * linux-low.c (linux_insert_point): Call
8026 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8027 (linux_remove_point): Call remove_memory_breakpoint if type is
8028 raw_bkpt_type_sw.
8029 * linux-x86-low.c (x86_insert_point): Don't call
8030 insert_memory_breakpoint.
8031 (x86_remove_point): Don't call remove_memory_breakpoint.
8032
8033 2015-04-01 Pedro Alves <palves@redhat.com>
8034 Cleber Rosa <crosa@redhat.com>
8035
8036 * server.c (gdbserver_usage): Reorganize and extend the usage
8037 message.
8038
8039 2015-03-24 Pedro Alves <palves@redhat.com>
8040
8041 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8042 output. Also dump TRAP_TRACE.
8043 (linux_low_filter_event): In debug output, distinguish a
8044 resume_stop SIGSTOP from a delayed SIGSTOP.
8045
8046 2015-03-24 Gary Benson <gbenson@redhat.com>
8047
8048 * linux-x86-low.c (x86_linux_new_thread): Moved to
8049 nat/x86-linux.c.
8050 (x86_linux_prepare_to_resume): Likewise.
8051
8052 2015-03-24 Gary Benson <gbenson@redhat.com>
8053
8054 * Makefile.in (x86-linux-dregs.o): New rule.
8055 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8056 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8057 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8058 (x86_linux_dr_get): Likewise.
8059 (x86_linux_dr_set): Likewise.
8060 (update_debug_registers_callback): Likewise.
8061 (x86_linux_dr_set_addr): Likewise.
8062 (x86_linux_dr_get_addr): Likewise.
8063 (x86_linux_dr_set_control): Likewise.
8064 (x86_linux_dr_get_control): Likewise.
8065 (x86_linux_dr_get_status): Likewise.
8066 (x86_linux_update_debug_registers): Likewise.
8067
8068 2015-03-24 Gary Benson <gbenson@redhat.com>
8069
8070 * linux-x86-low.c (x86_linux_update_debug_registers):
8071 New function, factored out from...
8072 (x86_linux_prepare_to_resume): ...this.
8073
8074 2015-03-24 Gary Benson <gbenson@redhat.com>
8075
8076 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8077 (x86_linux_dr_set): Likewise.
8078 (update_debug_registers_callback): Likewise.
8079 (x86_linux_dr_set_addr): Likewise.
8080 (x86_linux_dr_get_addr): Likewise.
8081 (x86_linux_dr_set_control): Likewise.
8082 (x86_linux_dr_get_control): Likewise.
8083 (x86_linux_dr_get_status): Likewise.
8084 (x86_linux_prepare_to_resume): Likewise.
8085
8086 2015-03-24 Gary Benson <gbenson@redhat.com>
8087
8088 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8089 Use perror_with_name. Pass string through gettext.
8090 (x86_linux_dr_set): Likewise.
8091
8092 2015-03-24 Gary Benson <gbenson@redhat.com>
8093
8094 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8095 (x86_linux_dr_set_addr): ...this.
8096 (x86_dr_low_get_addr): Rename to...
8097 (x86_linux_dr_get_addr): ...this.
8098 (x86_dr_low_set_control): Rename to...
8099 (x86_linux_dr_set_control): ...this.
8100 (x86_dr_low_get_control): Rename to...
8101 (x86_linux_dr_get_control): ...this.
8102 (x86_dr_low_get_status): Rename to...
8103 (x86_linux_dr_get_status): ...this.
8104 (x86_dr_low): Update with new function names.
8105
8106 2015-03-24 Gary Benson <gbenson@redhat.com>
8107
8108 * Makefile.in (x86-linux.o): New rule.
8109 * configure.srv: Add x86-linux.o to relevant targets.
8110 * linux-low.c (lwp_set_arch_private_info): New function.
8111 (lwp_arch_private_info): Likewise.
8112 * linux-x86-low.c: Include nat/x86-linux.h.
8113 (arch_lwp_info): Removed structure.
8114 (update_debug_registers_callback):
8115 Use lwp_set_debug_registers_changed.
8116 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8117 and lwp_set_debug_registers_changed.
8118 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8119
8120 2015-03-24 Gary Benson <gbenson@redhat.com>
8121
8122 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8123 * linux-arm-low.c (arm_new_thread): Likewise.
8124 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8125 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8126 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8127 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8128
8129 2015-03-24 Gary Benson <gbenson@redhat.com>
8130
8131 * linux-low.c (ptid_of_lwp): New function.
8132 (lwp_is_stopped): Likewise.
8133 (lwp_stop_reason): Likewise.
8134 * linux-x86-low.c (update_debug_registers_callback):
8135 Use lwp_is_stopped.
8136 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8137 lwp_stop_reason.
8138
8139 2015-03-24 Gary Benson <gbenson@redhat.com>
8140
8141 * linux-low.h (linux_stop_lwp): Remove declaration.
8142
8143 2015-03-24 Gary Benson <gbenson@redhat.com>
8144
8145 * linux-low.h: Include nat/linux-nat.h.
8146 * linux-low.c (iterate_over_lwps_args): New structure.
8147 (iterate_over_lwps_filter): New function.
8148 (iterate_over_lwps): Likewise.
8149 * linux-x86-low.c (update_debug_registers_callback):
8150 Update signature to what iterate_over_lwps expects.
8151 Remove PID check that iterate_over_lwps now performs.
8152 (x86_dr_low_set_addr): Use iterate_over_lwps.
8153 (x86_dr_low_set_control): Likewise.
8154
8155 2015-03-24 Gary Benson <gbenson@redhat.com>
8156
8157 * linux-x86-low.c (x86_debug_reg_state): New function.
8158 (x86_linux_prepare_to_resume): Use the above.
8159
8160 2015-03-24 Gary Benson <gbenson@redhat.com>
8161
8162 * linux-low.c (current_lwp_ptid): New function.
8163 * linux-x86-low.c: Include nat/linux-nat.h.
8164 (x86_dr_low_get_addr): Use current_lwp_ptid.
8165 (x86_dr_low_get_control): Likewise.
8166 (x86_dr_low_get_status): Likewise.
8167
8168 2015-03-20 Pedro Alves <palves@redhat.com>
8169
8170 * tracepoint.c (cmd_qtstatus): Make "str" const.
8171
8172 2015-03-20 Pedro Alves <palves@redhat.com>
8173
8174 * server.c (handle_general_set): Make "req_str" const.
8175
8176 2015-03-19 Pedro Alves <palves@redhat.com>
8177
8178 * linux-low.c (linux_resume_one_lwp): Rename to ...
8179 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8180 instead call perror_with_name.
8181 (check_ptrace_stopped_lwp_gone): New function.
8182 (linux_resume_one_lwp): Reimplement as wrapper around
8183 linux_resume_one_lwp_throw that swallows errors if the LWP is
8184 gone.
8185
8186 2015-03-19 Pedro Alves <palves@redhat.com>
8187
8188 * linux-low.c (count_events_callback, select_event_lwp_callback):
8189 No longer check whether the thread has resume_stop as last resume
8190 kind.
8191
8192 2015-03-19 Pedro Alves <palves@redhat.com>
8193
8194 * linux-low.c (count_events_callback, select_event_lwp_callback):
8195 Use the lwp's status_pending_p field, not the thread's.
8196
8197 2015-03-19 Pedro Alves <palves@redhat.com>
8198
8199 * linux-low.c (select_event_lwp_callback): Update comments to
8200 no longer mention SIGTRAP.
8201
8202 2015-03-18 Gary Benson <gbenson@redhat.com>
8203
8204 * server.c (handle_query): Do not report vFile:fstat as supported.
8205
8206 2015-03-11 Gary Benson <gbenson@redhat.com>
8207
8208 * hostio.c (sys/types.h): New include.
8209 (sys/stat.h): Likewise.
8210 (common-remote-fileio.h): Likewise.
8211 (handle_fstat): New function.
8212 (handle_vFile): Handle vFile:fstat packets.
8213
8214 2015-03-11 Gary Benson <gbenson@redhat.com>
8215
8216 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8217 struct stat.st_blocks and struct stat.st_blksize.
8218 * configure: Regenerate.
8219 * config.in: Likewise.
8220 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8221 (OBS): Add common-remote-fileio.o.
8222 (common-remote-fileio.o): New rule.
8223
8224 2015-03-09 Pedro Alves <palves@redhat.com>
8225
8226 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8227 'struct sockaddr' pointer in 'accept' call.
8228
8229 2015-03-09 Pedro Alves <palves@redhat.com>
8230
8231 Revert:
8232 2015-03-07 Pedro Alves <palves@redhat.com>
8233 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8234 or <winsock2.h> here. Instead include "gdb_socket.h".
8235 (remote_open): Use union gdb_sockaddr_u.
8236 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8237 or <winsock2.h> here. Instead include "gdb_socket.h".
8238 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8239 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8240 or <sys/un.h>.
8241 (init_named_socket, gdb_agent_helper_thread): Use union
8242 gdb_sockaddr_u.
8243
8244 2015-03-07 Pedro Alves <palves@redhat.com>
8245
8246 * configure.ac (build_warnings): Move
8247 -Wdeclaration-after-statement to the C-specific set.
8248 * configure: Regenerate.
8249
8250 2015-03-07 Pedro Alves <palves@redhat.com>
8251
8252 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8253 or <winsock2.h> here. Instead include "gdb_socket.h".
8254 (remote_open): Use union gdb_sockaddr_u.
8255 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8256 or <winsock2.h> here. Instead include "gdb_socket.h".
8257 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8258 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8259 or <sys/un.h>.
8260 (init_named_socket, gdb_agent_helper_thread): Use union
8261 gdb_sockaddr_u.
8262
8263 2015-03-07 Pedro Alves <palves@redhat.com>
8264
8265 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8266 instead.
8267
8268 2015-03-06 Yao Qi <yao.qi@linaro.org>
8269
8270 * linux-aarch64-low.c (aarch64_insert_point): Use
8271 show_debug_regs as a boolean.
8272 (aarch64_remove_point): Likewise.
8273
8274 2015-03-05 Pedro Alves <palves@redhat.com>
8275
8276 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8277 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8278 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8279 * nto-low.c (nto_target_ops): Likewise.
8280 * spu-low.c (spu_target_ops): Likewise.
8281 * win32-low.c (win32_target_ops): Likewise.
8282
8283 2015-03-04 Pedro Alves <palves@redhat.com>
8284
8285 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8286 Decide whether a breakpoint triggered based on the SIGTRAP's
8287 siginfo.si_code.
8288 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8289 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8290 (linux_low_filter_event): Check for breakpoints before checking
8291 watchpoints.
8292 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8293 siginfo.si_code.
8294 (linux_stopped_by_sw_breakpoint)
8295 (linux_supports_stopped_by_sw_breakpoint)
8296 (linux_stopped_by_hw_breakpoint)
8297 (linux_supports_stopped_by_hw_breakpoint): New functions.
8298 (linux_target_ops): Install new target methods.
8299
8300 2015-03-04 Pedro Alves <palves@redhat.com>
8301
8302 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8303 * server.c (swbreak_feature, hwbreak_feature): New globals.
8304 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8305 (captured_main): Clear swbreak_feature and hwbreak_feature.
8306 * server.h (swbreak_feature, hwbreak_feature): Declare.
8307 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8308 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8309 supports_stopped_by_hw_breakpoint>: New fields.
8310 (target_supports_stopped_by_sw_breakpoint)
8311 (target_stopped_by_sw_breakpoint)
8312 (target_supports_stopped_by_hw_breakpoint)
8313 (target_stopped_by_hw_breakpoint): Declare.
8314
8315 2015-03-04 Pedro Alves <palves@redhat.com>
8316
8317 enum lwp_stop_reason -> enum target_stop_reason
8318 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8319 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8320 (linux_wait_1, stuck_in_jump_pad_callback)
8321 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8322 (linux_stopped_by_watchpoint):
8323 * linux-low.h (enum lwp_stop_reason): Delete.
8324 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8325 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8326
8327 2015-03-04 Yao Qi <yao.qi@linaro.org>
8328
8329 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8330
8331 2015-03-03 Gary Benson <gbenson@redhat.com>
8332
8333 * hostio.c (handle_vFile): Fix prefix lengths.
8334
8335 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8336
8337 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8338 ptr_bits.
8339
8340 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8341
8342 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8343 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8344 (clean): Add "rm -f" for above C files.
8345 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8346 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8347 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8348 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8349 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8350 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8351 (init_registers_s390x_vx_linux64)
8352 (init_registers_s390x_tevx_linux64)
8353 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8354 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8355 declarations.
8356 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8357 (s390_store_vxrs_high): New functions.
8358 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8359 NT_S390_VXRS_HIGH.
8360 (s390_arch_setup): Add logic for selecting one of the new target
8361 descriptions. Activate the new vector regsets if applicable.
8362 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8363 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8364 and init_registers_s390x_tevx_linux64.
8365
8366 2015-03-01 Pedro Alves <palves@redhat.com>
8367
8368 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8369 parameter.
8370
8371 2015-02-27 Pedro Alves <palves@redhat.com>
8372
8373 * linux-x86-low.c (u_debugreg_offset): New function.
8374 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8375
8376 2015-02-27 Pedro Alves <palves@redhat.com>
8377
8378 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8379 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8380 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8381 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8382 (ps_lsetfpregs, ps_getpid)
8383 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8384 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8385 (ps_lsetxregs, ps_plog): Declare.
8386
8387 2015-02-27 Pedro Alves <palves@redhat.com>
8388
8389 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8390 IP_AGENT_EXPORT_FUNC.
8391 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8392 IP_AGENT_EXPORT_FUNC.
8393 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8394 (IP_AGENT_EXPORT): Delete.
8395 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8396 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8397 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8398 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8399 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8400 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8401 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8402 (traceframe_read_count, traceframe_write_count)
8403 (traceframes_created, trace_state_variables, get_raw_reg)
8404 (get_trace_state_variable_value, set_trace_state_variable_value)
8405 (ust_loaded, helper_thread_id, cmd_buf): Use
8406 IPA_SYM_EXPORTED_NAME.
8407 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8408 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8409 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8410 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8411 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8412 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8413 EXTERN_C_PUSH/EXTERN_C_POP.
8414 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8415 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8416 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8417 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8418 (traceframe_write_count, traceframe_read_count)
8419 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8420 (about_to_request_buffer_space, get_trace_state_variable_value)
8421 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8422 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8423 EXTERN_C_PUSH/EXTERN_C_POP.
8424 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8425 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8426 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8427 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8428 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8429 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8430 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8431 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8432 Define.
8433 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8434 (IP_AGENT_EXPORT_VAR_DECL): Define.
8435 (tracing): Declare.
8436 (gdb_agent_get_raw_reg): Declare.
8437
8438 2015-02-27 Tom Tromey <tromey@redhat.com>
8439 Pedro Alves <palves@redhat.com>
8440
8441 Rename symbols whose names are reserved C++ keywords throughout.
8442
8443 2015-02-27 Pedro Alves <palves@redhat.com>
8444
8445 * Makefile.in (COMPILER): New, get it from autoconf.
8446 (CXX): Get from autoconf instead.
8447 (COMPILE.pre): Use COMPILER.
8448 (CC-LD): Rename to ...
8449 (CC_LD): ... this. Use COMPILER.
8450 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8451 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8452 * acinclude.m4: Include build-with-cxx.m4.
8453 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8454 Disable -Werror by default if building in C++ mode.
8455 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8456 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8457 the C++ compiler. Save/restore CXXFLAGS too.
8458 * configure: Regenerate.
8459
8460 2015-02-27 Pedro Alves <palves@redhat.com>
8461
8462 * acinclude.m4: Include libiberty.m4.
8463 * configure.ac: Call libiberty_INIT.
8464 * config.in, configure: Regenerate.
8465
8466 2015-02-26 Pedro Alves <palves@redhat.com>
8467
8468 * linux-low.c (linux_wait_1): When incrementing the PC past a
8469 program breakpoint always use the_low_target.breakpoint_len as
8470 increment, rather than the maximum between that and
8471 the_low_target.decr_pc_after_break.
8472
8473 2015-02-23 Pedro Alves <palves@redhat.com>
8474
8475 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8476 thread was doing a step-over; always adjust the PC if
8477 we stepped over a permanent breakpoint.
8478 (linux_wait_1): If we stepped over breakpoint that was on top of a
8479 permanent breakpoint, manually advance the PC past it.
8480
8481 2015-02-23 Pedro Alves <palves@redhat.com>
8482
8483 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8484 modes.
8485 (x86_fill_gregset, x86_store_gregset): Use it when handling
8486 $orig_eax.
8487
8488 2015-02-20 Pedro Alves <palves@redhat.com>
8489
8490 * thread-db.c: Include "nat/linux-procfs.h".
8491 (thread_db_init): Skip listing new threads if the kernel supports
8492 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8493
8494 2015-02-20 Pedro Alves <palves@redhat.com>
8495
8496 * linux-low.c (status_pending_p_callback): Use ptid_match.
8497
8498 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8499
8500 PR breakpoints/16812
8501 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8502 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8503 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8504
8505 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8506
8507 PR breakpoints/15956
8508 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8509
8510 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8511
8512 * linux-low.c (linux_low_btrace_conf): Print size.
8513 * server.c (handle_btrace_conf_general_set): New.
8514 (hanle_general_set): Call handle_btrace_conf_general_set.
8515 (handle_query): Report Qbtrace-conf:bts:size as supported.
8516
8517 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8518
8519 * linux-low.c (linux_low_enable_btrace): Update parameters.
8520 (linux_low_btrace_conf): New.
8521 (linux_target_ops)<to_btrace_conf>: Initialize.
8522 * server.c (current_btrace_conf): New.
8523 (handle_btrace_enable): Rename to ...
8524 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8525 to target_enable_btrace. Update comment. Update users.
8526 (handle_qxfer_btrace_conf): New.
8527 (qxfer_packets): Add btrace-conf entry.
8528 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8529 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8530 (target_ops)<read_btrace_conf>: New.
8531 (target_enable_btrace): Update parameters.
8532 (target_read_btrace_conf): New.
8533
8534 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8535
8536 * server.c (handle_btrace_general_set): Remove call to
8537 target_supports_btrace.
8538 (supported_btrace_packets): New.
8539 (handle_query): Call supported_btrace_packets.
8540 * target.h: include btrace-common.h.
8541 (btrace_target_info): Removed.
8542 (supports_btrace, target_supports_btrace): Update parameters.
8543
8544 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8545
8546 * Makefile.in (SFILES): Add common/btrace-common.c.
8547 (OBS): Add common/btrace-common.o.
8548 (btrace-common.o): Add build rules.
8549 * linux-low: Include btrace-common.h.
8550 (linux_low_read_btrace): Use struct btrace_data. Call
8551 btrace_data_init and btrace_data_fini.
8552
8553 2015-02-06 Pedro Alves <palves@redhat.com>
8554
8555 * thread-db.c (find_new_threads_callback): Add debug output.
8556
8557 2015-02-04 Pedro Alves <palves@redhat.com>
8558
8559 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8560 (resume_stopped_resumed_lwps): New function.
8561 (linux_wait_for_event_filtered): Use it.
8562
8563 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8564
8565 * Makefile.in (SFILES): Add linux-personality.c.
8566 (linux-personality.o): New rule.
8567 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8568 list of objects to be built.
8569 * linux-low.c: Include nat/linux-personality.h.
8570 (linux_create_inferior): Remove code to disable address space
8571 randomization (moved to ../nat/linux-personality.c). Create
8572 cleanup to disable address space randomization.
8573
8574 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8575
8576 * Makefile.in (posix-strerror.o): New rule.
8577 (mingw-strerror.o): Likewise.
8578 * configure: Regenerated.
8579 * configure.ac: Source file ../common/common.host. Initialize new
8580 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8581
8582 2015-01-14 Yao Qi <yao@codesourcery.com>
8583
8584 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8585 (ppc-linux.o): New rule.
8586 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8587 * configure.ac: AC_CHECK_FUNCS(getauxval).
8588 * config.in: Re-generated.
8589 * configure: Re-generated.
8590 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8591 ppc64_64bit_inferior_p
8592
8593 2015-01-14 Yao Qi <yao@codesourcery.com>
8594
8595 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8596 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8597 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8598 (PT_ORIG_R3, PT_TRAP): Likewise.
8599 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8600 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8601 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8602
8603 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8604
8605 * i387-fp.c (i387_cache_to_xsave): In look over
8606 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8607 zmmh_low_space field by use of zmmh_high_space.
8608
8609 2015-01-09 Pedro Alves <palves@redhat.com>
8610
8611 * linux-low.c (step_over_bkpt): Move higher up in the file.
8612 (handle_extended_wait): Don't store the stop_pc here.
8613 (get_stop_pc): Adjust comments and rename to ...
8614 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8615 stopped for a software breakpoint or hardware breakpoint.
8616 (thread_still_has_status_pending_p): New function.
8617 (status_pending_p_callback): Use
8618 thread_still_has_status_pending_p. If the event is no longer
8619 interesting, resume the LWP.
8620 (handle_tracepoints): Add assert.
8621 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8622 (wstatus_maybe_breakpoint): New function.
8623 (cancel_breakpoint): Delete function.
8624 (check_stopped_by_watchpoint): New function, factored out from
8625 linux_low_filter_event.
8626 (lp_status_maybe_breakpoint): Delete function.
8627 (linux_low_filter_event): Remove filter_ptid argument.
8628 Leave thread group exits pending here. Store the LWP's stop PC.
8629 Always leave events pending.
8630 (linux_wait_for_event_filtered): Pull all events out of the
8631 kernel, and leave them all pending.
8632 (count_events_callback, select_event_lwp_callback): Consider all
8633 events.
8634 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8635 (select_event_lwp): Only give preference to the stepping LWP in
8636 all-stop mode. Adjust comments.
8637 (ignore_event): New function.
8638 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8639 references to cancel_breakpoints. Adjust to renames. Also give
8640 equal priority to all LWPs that have had events in non-stop mode.
8641 If reporting a software breakpoint event, unadjust the LWP's PC.
8642 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8643 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8644 Adjust.
8645 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8646 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8647 (linux_stopped_by_watchpoint): Adjust.
8648 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8649 * linux-low.h (enum lwp_stop_reason): New.
8650 (struct lwp_info) <stop_pc>: Adjust comment.
8651 <stopped_by_watchpoint>: Delete field.
8652 <stop_reason>: New field.
8653 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8654 * mem-break.c (software_breakpoint_inserted_here)
8655 (hardware_breakpoint_inserted_here): New function.
8656 * mem-break.h (software_breakpoint_inserted_here)
8657 (hardware_breakpoint_inserted_here): Declare.
8658 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8659 (cancel_breakpoints): Delete.
8660 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8661 (upload_fast_traceframes): Remove references to
8662 cancel_breakpoints.
8663
8664 2015-01-09 Pedro Alves <palves@redhat.com>
8665
8666 * thread-db.c (find_new_threads_callback): Ignore thread if the
8667 kernel thread ID is -1.
8668
8669 2015-01-09 Pedro Alves <palves@redhat.com>
8670
8671 * linux-low.c (linux_attach_fail_reason_string): Move to
8672 nat/linux-ptrace.c, and rename.
8673 (linux_attach_lwp): Update comment.
8674 (attach_proc_task_lwp_callback): New function.
8675 (linux_attach): Adjust to rename and use
8676 linux_proc_attach_tgid_threads.
8677 (linux_attach_fail_reason_string): Delete declaration.
8678
8679 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8680
8681 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8682 * server.c (gdbserver_version): Likewise.
8683
8684 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8685
8686 * remote-utils.c: Include ctype.h.
8687 (input_interrupt): Explicitly handle the case when the char
8688 received is the NUL byte. Improve the printing of non-ASCII
8689 characters.
8690
8691 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8692
8693 * linux-low.c (linux_low_filter_event): Update call to
8694 linux_enable_event_reporting following the addition of
8695 a new parameter to that function.
8696
8697 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8698
8699 PR server/17457
8700 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8701 (AARCH64_FPCR_REGNO): Likewise.
8702 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8703 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8704 (aarch64_store_fpregset): Likewise.
8705
8706 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8707
8708 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8709 Remove FIXME comment about assumption about N.
8710
8711 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8712
8713 * configure.ac: If large-file support is disabled in GDBserver,
8714 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8715 * configure: Regenerate.
8716
8717 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8718
8719 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8720 warning upon ENODATA from ptrace.
8721 * linux-s390-low.c (s390_store_tdb): New.
8722 (s390_regsets): Add regset for NT_S390_TDB.
8723
8724 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8725
8726 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8727 without a fill_function.
8728 * linux-s390-low.c (s390_fill_last_break): Remove.
8729 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8730 (s390_arch_setup): Use regset's size instead of fill_function for
8731 loop end condition.
8732
8733 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8734
8735 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8736 the regset's store function when ptrace returned an error.
8737 * regcache.c (get_thread_regcache): Invalidate register cache
8738 before fetching inferior's registers.
8739
8740 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8741
8742 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8743 while-loop as for-loop.
8744 (regsets_store_inferior_registers): Likewise.
8745
8746 2014-11-28 Yao Qi <yao@codesourcery.com>
8747
8748 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8749 * config.in, configure: Re-generate.
8750 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8751 is defined.
8752
8753 2014-11-21 Yao Qi <yao@codesourcery.com>
8754
8755 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8756 (AC_CHECK_HEADERS): Remove malloc.h.
8757 * configure: Re-generated.
8758 * config.in: Re-generated.
8759 * server.h: Don't include alloca.h and malloc.h.
8760 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8761 Don't include malloc.h.
8762
8763 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8764
8765 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8766 corresponding ERRNO check in same block.
8767
8768 2014-11-12 Pedro Alves <palves@redhat.com>
8769
8770 * server.c (cont_thread): Update comment.
8771 (start_inferior, attach_inferior): No longer clear cont_thread.
8772 (handle_v_cont): No longer set cont_thread.
8773 (captured_main): Clear cont_thread each time a GDB connects.
8774
8775 2014-11-12 Pedro Alves <palves@redhat.com>
8776
8777 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8778 thread, and don't resume all threads if the Hc thread has exited.
8779
8780 2014-11-12 Pedro Alves <palves@redhat.com>
8781
8782 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8783 the process group instead of to a specific LWP.
8784
8785 2014-10-15 Pedro Alves <palves@redhat.com>
8786
8787 PR server/17487
8788 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8789 parameter.
8790 (arm_set_thread_context): Delete.
8791 (the_low_target): Adjust.
8792 * win32-i386-low.c (debug_registers_changed)
8793 (debug_registers_used): Delete.
8794 (update_debug_registers_callback): New function.
8795 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8796 needing to update their debug registers.
8797 (win32_get_current_dr): New function.
8798 (x86_dr_low_get_addr, x86_dr_low_get_control)
8799 (x86_dr_low_get_status): Fetch the debug register from the thread
8800 record's context.
8801 (i386_initial_stuff): Adjust.
8802 (i386_get_thread_context): Remove current_event parameter. Don't
8803 clear debug_registers_changed nor copy DR values to
8804 debug_reg_state.
8805 (i386_set_thread_context): Delete.
8806 (i386_prepare_to_resume): New function.
8807 (i386_thread_added): Mark the thread as needing to update irs
8808 debug registers.
8809 (the_low_target): Remove i386_set_thread_context and install
8810 i386_prepare_to_resume.
8811 * win32-low.c (win32_get_thread_context): Adjust.
8812 (win32_set_thread_context): Use SetThreadContext
8813 directly.
8814 (win32_prepare_to_resume): New function.
8815 (win32_require_context): New function, factored out from ...
8816 (thread_rec): ... this.
8817 (continue_one_thread): Call win32_prepare_to_resume on each thread
8818 we're about to continue.
8819 (win32_resume): Call win32_prepare_to_resume on the event thread.
8820 * win32-low.h (struct win32_thread_info)
8821 <debug_registers_changed>: New field.
8822 (struct win32_target_ops): Change prototype of set_thread_context,
8823 delete set_thread_context and add prepare_to_resume.
8824 (win32_require_context): New declaration.
8825
8826 2014-10-08 Gary Benson <gbenson@redhat.com>
8827
8828 * server.h: Do not include common-exceptions.h.
8829
8830 2014-10-08 Gary Benson <gbenson@redhat.com>
8831
8832 * server.h: Do not include cleanups.h.
8833
8834 2014-09-30 James Hogan <james.hogan@imgtec.com>
8835
8836 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8837 mips64-dsp-linux.c.
8838
8839 2014-09-23 Yao Qi <yao@codesourcery.com>
8840
8841 * linux-low.c (lp_status_maybe_breakpoint): New function.
8842 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8843 (count_events_callback): Likewise.
8844 (select_event_lwp_callback): Likewise.
8845 (cancel_breakpoints_callback): Likewise.
8846
8847 2014-09-19 Don Breazeal <donb@codesourcery.com>
8848
8849 * linux-low.c (handle_extended_wait): Call
8850 linux_ptrace_get_extended_event.
8851 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8852 linux_is_extended_waitstatus.
8853
8854 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8855
8856 * Makefile.in (CPPFLAGS): Define.
8857 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8858 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8859
8860 2014-09-16 Gary Benson <gbenson@redhat.com>
8861
8862 * inferiors.h (current_inferior): Renamed as...
8863 (current_thread): New variable. All uses updated.
8864 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8865 (maybe_move_out_of_jump_pad): Likewise.
8866 (cancel_breakpoint): Likewise.
8867 (linux_low_filter_event): Likewise.
8868 (wait_for_sigstop): Likewise.
8869 (linux_resume_one_lwp): Likewise.
8870 (need_step_over_p): Likewise.
8871 (start_step_over): Likewise.
8872 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8873 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8874 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8875 and save_inferior as saved_thread.
8876 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8877 saved_thread.
8878 (regcache_invalidate_thread): Likewise.
8879 * remote-utils.c (prepare_resume_reply): Likewise.
8880 * thread-db.c (thread_db_get_tls_address): Likewise.
8881 (disable_thread_event_reporting): Likewise.
8882 (remove_thread_event_breakpoints): Likewise.
8883 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8884 as saved_thread.
8885 * target.h (set_desired_inferior): Renamed as...
8886 (set_desired_thread): New declaration. All uses updated.
8887 * server.c (myresume): Updated comment to reference thread instead
8888 of inferior.
8889 (handle_serial_event): Likewise.
8890 (handle_target_event): Likewise.
8891
8892 2014-09-12 Tom Tromey <tromey@redhat.com>
8893 Gary Benson <gbenson@redhat.com>
8894
8895 * regcache.h: Include common-regcache.h.
8896 (regcache_read_pc): Don't declare.
8897 * regcache.c (get_thread_regcache_for_ptid): New function.
8898
8899 2014-09-11 Tom Tromey <tromey@redhat.com>
8900 Gary Benson <gbenson@redhat.com>
8901
8902 * symbol.c: New file.
8903 * Makefile.in (SFILES): Add symbol.c.
8904 (OBS): Add symbol.o.
8905
8906 2014-09-11 Gary Benson <gbenson@redhat.com>
8907
8908 * target.c (target_stop_ptid, target_continue_ptid): New
8909 functions.
8910
8911 2014-09-11 Tom Tromey <tromey@redhat.com>
8912 Gary Benson <gbenson@redhat.com>
8913
8914 * target.h: Include target/target.h.
8915 * target.c (target_read_memory, target_read_uint32)
8916 (target_write_memory): New functions.
8917
8918 2014-09-11 Gary Benson <gbenson@redhat.com>
8919
8920 * server.h (debug_hw_points): Don't declare.
8921 * server.c (debug_hw_points): Don't define. Replace all uses
8922 with show_debug_regs.
8923 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8924 all uses with show_debug_regs.
8925
8926 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8927
8928 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8929 endianness into account.
8930 (ppc_supply_ptrace_register): Likewise.
8931
8932 2014-09-03 James Hogan <james.hogan@imgtec.com>
8933
8934 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8935 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8936
8937 2014-09-03 Gary Benson <gbenson@redhat.com>
8938
8939 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8940 ALL_DEBUG_ADDRESS_REGISTERS.
8941
8942 2014-09-02 Gary Benson <gbenson@redhat.com>
8943
8944 * i386-low.h: Renamed as...
8945 * x86-low.h: New file. All type, function and variable name
8946 prefixes changed from "i386_" to "x86_". All references updated.
8947 * i386-low.c: Renamed as...
8948 * x86-low.c: New file. All type, function and variable name
8949 prefixes changed from "i386_" to "x86_". All references updated.
8950
8951 2014-09-02 Gary Benson <gbenson@redhat.com>
8952
8953 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8954 (x86_linux_new_thread): Likewise.
8955
8956 2014-08-29 Gary Benson <gbenson@redhat.com>
8957
8958 * server.h (setjmp.h): Do not include.
8959 (toplevel): Do not declare.
8960 (common-exceptions.h): Include.
8961 (cleanups.h): Likewise.
8962 * server.c (toplevel): Do not define.
8963 (exit_code): New static global.
8964 (detach_or_kill_for_exit_cleanup): New function.
8965 (main): New function. Original main renamed to...
8966 (captured_main): New function.
8967 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8968
8969 2014-08-29 Gary Benson <gbenson@redhat.com>
8970
8971 * Makefile.in (SFILES): Add common/common-exceptions.c.
8972 (OBS): Add common-exceptions.o.
8973 (common-exceptions.o): New rule.
8974 * utils.c (prepare_to_throw_exception): New function.
8975
8976 2014-08-29 Gary Benson <gbenson@redhat.com>
8977
8978 * config.in: Regenerate.
8979 * configure: Likewise.
8980
8981 2014-08-29 Gary Benson <gbenson@redhat.com>
8982
8983 * Makefile.in (SFILES): Add common/cleanups.c.
8984 (OBS): cleanups.o.
8985 (cleanups.o): New rule.
8986
8987 2014-08-29 Gary Benson <gbenson@redhat.com>
8988
8989 * utils.c (internal_vwarning): New function.
8990
8991 2014-08-28 Gary Benson <gbenson@redhat.com>
8992
8993 * utils.h (fatal): Remove declaration.
8994 * utils.c (fatal): Remove function.
8995
8996 2014-08-28 Gary Benson <gbenson@redhat.com>
8997
8998 * tracepoint.c (gdb_agent_init): Replace fatal with
8999 perror_with_name.
9000 (initialize_tracepoint): Likewise.
9001
9002 2014-08-28 Gary Benson <gbenson@redhat.com>
9003
9004 * remote-utils.c (remote_prepare): Replace fatal with error.
9005
9006 2014-08-28 Gary Benson <gbenson@redhat.com>
9007
9008 * linux-low.c (linux_async): Replace fatal with warning.
9009 Tidy up and return.
9010 (linux_start_non_stop): Return -1 if linux_async failed.
9011
9012 2014-08-28 Gary Benson <gbenson@redhat.com>
9013
9014 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9015 gdb_assert.
9016 (i386_dr_low_get_addr): Remove vague comment.
9017 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9018 gdb_assert.
9019
9020 2014-08-28 Gary Benson <gbenson@redhat.com>
9021
9022 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9023 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9024 internal_error.
9025 (linux_resume_one_lwp): Likewise.
9026 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9027 gdb_assert.
9028 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9029 with internal_error.
9030 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9031 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9032 (find_register_by_name): Replace fatal with internal_error.
9033 (find_regno): Likewise.
9034 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9035 * thread-db.c (thread_db_create_event): Likewise.
9036 (thread_db_load_search): Likewise.
9037 (try_thread_db_load_1): Likewise.
9038 * tracepoint.c (get_jump_space_head): Replace fatal with
9039 internal_error.
9040 (claim_trampoline_space): Likewise.
9041 (have_fast_tracepoint_trampoline_buffer): Likewise.
9042 (cmd_qtstart): Likewise.
9043 (stop_tracing): Likewise.
9044 (fast_tracepoint_collecting): Likewise.
9045 (target_malloc): Likewise.
9046 (download_tracepoint): Likewise.
9047 (download_trace_state_variables): Replace check with gdb_assert.
9048 (upload_fast_traceframes): Replace fatal with internal_error.
9049
9050 2014-08-19 Tom Tromey <tromey@redhat.com>
9051 Gary Benson <gbenson@redhat.com>
9052
9053 * Makefile.in (SFILES): Add common/common-debug.c.
9054 (OBS): Add common-debug.o.
9055 (common-debug.o): New rule.
9056 * debug.h (debug_printf): Don't declare.
9057 * debug.c (debug_printf): Renamed and rewritten as...
9058 (debug_vprintf): New function.
9059
9060 2014-08-19 Gary Benson <gbenson@redhat.com>
9061
9062 * utils.h: Do not include print-utils.h.
9063
9064 2014-08-19 Tom Tromey <tromey@redhat.com>
9065 Gary Benson <gbenson@redhat.com>
9066
9067 * server.h: Add static assertion.
9068 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9069
9070 2014-08-19 Tom Tromey <tromey@redhat.com>
9071 Gary Benson <gbenson@redhat.com>
9072
9073 * Makefile.in (SFILES): Add common/errors.c.
9074 (OBS): Add errors.o.
9075 (IPA_OBS): Add errors-ipa.o.
9076 (errors.o): New rule.
9077 (errors-ipa.o): Likewise.
9078 * utils.h (perror_with_name, error, warning): Don't declare.
9079 * utils.c (warning): Renamed and rewritten as...
9080 (vwarning): New function.
9081 (error): Renamed and rewritten as...
9082 (verror): New function.
9083 (internal_error): Renamed and rewritten as...
9084 (internal_verror): New function.
9085
9086 2014-08-07 Gary Benson <gbenson@redhat.com>
9087
9088 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9089 * configure: Regenerate.
9090 * config.in: Likewise.
9091 * server.h: Do not include errno.h.
9092 * event-loop.c: Likewise.
9093 * hostio-errno.c: Likewise.
9094 * linux-low.c: Likewise.
9095 * remote-utils.c: Likewise.
9096 * spu-low.c: Likewise.
9097 * utils.c: Likewise.
9098 * gdbreplay.c: Unconditionally include errno.h.
9099
9100 2014-08-07 Gary Benson <gbenson@redhat.com>
9101
9102 * server.h: Do not include string.h.
9103 * event-loop.c: Likewise.
9104 * linux-low.c: Likewise.
9105 * regcache.c: Likewise.
9106 * remote-utils.c: Likewise.
9107 * spu-low.c: Likewise.
9108 * utils.c: Likewise.
9109
9110 2014-08-07 Gary Benson <gbenson@redhat.com>
9111
9112 * server.h: Do not include gdb_assert.h.
9113
9114 2014-08-07 Gary Benson <gbenson@redhat.com>
9115
9116 * server.h: Do not include common-utils.h.
9117
9118 2014-08-07 Gary Benson <gbenson@redhat.com>
9119
9120 * server.h: Do not include ptid.h.
9121 * notif.h: Likewise.
9122
9123 2014-08-07 Gary Benson <gbenson@redhat.com>
9124
9125 * server.h: Do not include gdb_locale.h.
9126
9127 2014-08-07 Gary Benson <gbenson@redhat.com>
9128
9129 * server.h: Do not include gdb/signals.h.
9130 * win32-low.c: Likewise.
9131
9132 2014-08-07 Gary Benson <gbenson@redhat.com>
9133
9134 * server.h: Do not include pathmax.h.
9135
9136 2014-08-07 Gary Benson <gbenson@redhat.com>
9137
9138 * server.h: Do not include libiberty.h.
9139 * linux-bfin-low.c: Likewise.
9140
9141 2014-08-07 Gary Benson <gbenson@redhat.com>
9142
9143 * server.h: Do not include ansidecl.h.
9144
9145 2014-08-07 Gary Benson <gbenson@redhat.com>
9146
9147 * linux-x86-low.c: Do not include stddef.h.
9148 * lynx-ppc-low.c: Likewise.
9149 * tracepoint.c: Likewise.
9150
9151 2014-08-07 Gary Benson <gbenson@redhat.com>
9152
9153 * server.h: Do not include stdarg.h.
9154 * nto-low.c: Likewise.
9155
9156 2014-08-07 Gary Benson <gbenson@redhat.com>
9157
9158 * server.h: Do not include stdlib.h.
9159 * inferiors.c: Likewise.
9160 * linux-low.c: Likewise.
9161 * regcache.c: Likewise.
9162 * spu-low.c: Likewise.
9163 * tracepoint.c: Likewise.
9164 * utils.c: Likewise.
9165
9166 2014-08-07 Gary Benson <gbenson@redhat.com>
9167
9168 * server.h: Do not include stdio.h.
9169 * linux-low.c: Likewise.
9170 * remote-utils.c: Likewise.
9171 * spu-low.c: Likewise.
9172 * utils.c: Likewise.
9173 * wincecompat.c: Likewise.
9174
9175 2014-08-06 Gary Benson <gbenson@redhat.com>
9176
9177 * regcache.c (init_register_cache): Move conditionals inside if.
9178
9179 2014-08-06 Gary Benson <gbenson@redhat.com>
9180
9181 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9182
9183 2014-07-31 Gary Benson <gbenson@redhat.com>
9184
9185 * ax.h: Do not include server.h.
9186 * gdbthread.h: Likewise.
9187 * lynx-low.h: Likewise.
9188 * notif.h: Likewise.
9189
9190 2014-07-30 Gary Benson <gbenson@redhat.com>
9191
9192 * server.h: Include common-defs.h.
9193 Do not include config.h or build-gnulib-gdbserver/config.h.
9194
9195 2014-07-30 Gary Benson <gbenson@redhat.com>
9196
9197 * hostio-errno.c: Move server.h to top of includes list.
9198 * inferiors.c: Likewise.
9199 * linux-x86-low.c: Likewise.
9200 * notif.c: Include server.h.
9201
9202 2014-07-24 Tom Tromey <tromey@redhat.com>
9203 Gary Benson <gbenson@redhat.com>
9204
9205 * server.h (CORE_ADDR): Now unsigned.
9206
9207 2014-07-16 Pedro Alves <palves@redhat.com>
9208
9209 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9210
9211 2014-07-15 Pedro Alves <palves@redhat.com>
9212
9213 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9214 copy.
9215
9216 2014-07-11 Pedro Alves <palves@redhat.com>
9217
9218 * linux-low.c (kill_wait_lwp): New function, based on
9219 kill_one_lwp_callback, but use my_waitpid directly.
9220 (kill_one_lwp_callback, linux_kill): Use it.
9221
9222 2014-06-23 Pedro Alves <palves@redhat.com>
9223
9224 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9225 before setting DR0..DR3.
9226
9227 2014-06-20 Gary Benson <gbenson@redhat.com>
9228
9229 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9230 * configure: Regenerated.
9231 * config.in: Likewise.
9232
9233 2014-06-20 Gary Benson <gbenson@redhat.com>
9234
9235 * Makefile.in (SFILES): Update locations for files moved
9236 from common to nat.
9237 (object file files): Reordered.
9238
9239 2014-06-20 Gary Benson <gbenson@redhat.com>
9240
9241 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9242 (i386_dr_low_set_addr): Likewise.
9243 (i386_dr_low_get_addr): Likewise.
9244 (i386_dr_low_can_set_control): Likewise.
9245 (i386_dr_low_set_control): Likewise.
9246 (i386_dr_low_get_control): Likewise.
9247 (i386_dr_low_get_status): Likewise.
9248 (i386_get_debug_register_length): Likewise.
9249 * linux-x86-low.c (i386_dr_low_set_addr):
9250 Changed signature. Made static.
9251 (i386_dr_low_get_addr): Likewise.
9252 (i386_dr_low_set_control): Likewise.
9253 (i386_dr_low_get_control): Likewise.
9254 (i386_dr_low_get_status): Likewise.
9255 (i386_dr_low): New global variable.
9256 * win32-i386-low.c (i386_dr_low_set_addr):
9257 Changed signature. Made static.
9258 (i386_dr_low_get_addr): Likewise.
9259 (i386_dr_low_set_control): Likewise.
9260 (i386_dr_low_get_control): Likewise.
9261 (i386_dr_low_get_status): Likewise.
9262 (i386_dr_low): New global variable.
9263
9264 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9265
9266 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9267 * Makefile.in (AR, AR_FLAGS): Define.
9268 * configure: Regenerate.
9269
9270 2014-06-19 Gary Benson <gbenson@redhat.com>
9271
9272 * Makefile.in (i386-dregs.o): New rule.
9273 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9274 * i386-low.c (target.h): Remove include.
9275 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9276 (DR_CONTROL_SHIFT): Likewise.
9277 (DR_CONTROL_SIZE): Likewise.
9278 (DR_RW_EXECUTE): Likewise.
9279 (DR_RW_WRITE): Likewise.
9280 (DR_RW_READ): Likewise.
9281 (DR_RW_IORW): Likewise.
9282 (DR_LEN_1): Likewise.
9283 (DR_LEN_2): Likewise.
9284 (DR_LEN_4): Likewise.
9285 (DR_LEN_8): Likewise.
9286 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9287 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9288 (DR_ENABLE_SIZE): Likewise.
9289 (DR_LOCAL_SLOWDOWN): Likewise.
9290 (DR_GLOBAL_SLOWDOWN): Likewise.
9291 (DR_CONTROL_RESERVED): Likewise.
9292 (I386_DR_CONTROL_MASK): Likewise.
9293 (I386_DR_VACANT): Likewise.
9294 (I386_DR_LOCAL_ENABLE): Likewise.
9295 (I386_DR_GLOBAL_ENABLE): Likewise.
9296 (I386_DR_DISABLE): Likewise.
9297 (I386_DR_SET_RW_LEN): Likewise.
9298 (I386_DR_GET_RW_LEN): Likewise.
9299 (I386_DR_WATCH_HIT): Likewise.
9300 (i386_wp_op_t): Likewise.
9301 (i386_show_dr): Likewise.
9302 (i386_length_and_rw_bits): Likewise.
9303 (i386_insert_aligned_watchpoint): Likewise.
9304 (i386_remove_aligned_watchpoint): Likewise.
9305 (i386_handle_nonaligned_watchpoint): Likewise.
9306 i386_update_inferior_debug_regs(): Likewise.
9307 (i386_dr_insert_watchpoint): Likewise.
9308 (i386_dr_remove_watchpoint): Likewise.
9309 (i386_dr_region_ok_for_watchpoint): Likewise.
9310 (i386_dr_stopped_data_address): Likewise.
9311 (i386_dr_stopped_by_watchpoint): Likewise.
9312
9313 2014-06-19 Gary Benson <gbenson@redhat.com>
9314
9315 * i386-low.c (i386_dr_show): Renamed to
9316 i386_show_dr and made static. All uses updated.
9317 (i386_dr_length_and_rw_bits): Renamed to
9318 i386_length_and_rw_bits and made static.
9319 All uses updated.
9320 (i386_dr_insert_aligned_watchpoint): Renamed to
9321 i386_insert_aligned_watchpoint and made static.
9322 All uses updated.
9323 (i386_dr_remove_aligned_watchpoint): Renamed to
9324 i386_remove_aligned_watchpoint and made static.
9325 All uses updated.
9326 (i386_dr_update_inferior_debug_regs): Renamed to
9327 i386_update_inferior_debug_regs and made static.
9328 All uses updated.
9329
9330 2014-06-18 Gary Benson <gbenson@redhat.com>
9331
9332 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9333 (i386_dr_low_can_set_control): Likewise.
9334 (i386_get_debug_register_length): Likewise.
9335 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9336 (i386_dr_low_can_set_control): Likewise.
9337 (i386_get_debug_register_length): Likewise.
9338
9339 2014-06-17 Gary Benson <gbenson@redhat.com>
9340
9341 * i386-low.h (i386-dregs.h): New include.
9342 (DR_FIRSTADDR): Now in i386-dregs.h.
9343 (DR_LASTADDR): Likewise.
9344 (DR_NADDR): Likewise.
9345 (DR_STATUS): Likewise.
9346 (DR_CONTROL): Likewise.
9347 (i386_debug_reg_state): Likewise.
9348 (i386_dr_insert_watchpoint): Likewise.
9349 (i386_dr_remove_watchpoint): Likewise.
9350 (i386_dr_region_ok_for_watchpoint): Likewise.
9351 (i386_dr_stopped_data_address): Likewise.
9352 (i386_dr_stopped_by_watchpoint): Likewise.
9353 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9354
9355 2014-06-18 Gary Benson <gbenson@redhat.com>
9356
9357 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9358 i386_dr_insert_watchpoint.
9359 (i386_low_remove_watchpoint): Renamed to
9360 i386_dr_remove_watchpoint.
9361 (i386_low_region_ok_for_watchpoint): Renamed to
9362 i386_dr_region_ok_for_watchpoint.
9363 (i386_low_stopped_data_address): Renamed to
9364 i386_dr_stopped_data_address.
9365 (i386_low_stopped_by_watchpoint): Renamed to
9366 i386_dr_stopped_by_watchpoint.
9367 * i386-low.c (i386_show_dr): Renamed to
9368 i386_dr_show and made nonstatic. All uses updated.
9369 (i386_length_and_rw_bits): Renamed to
9370 i386_dr_length_and_rw_bits and made nonstatic.
9371 All uses updated.
9372 (i386_insert_aligned_watchpoint): Renamed to
9373 i386_dr_insert_aligned_watchpoint and made nonstatic.
9374 All uses updated.
9375 (i386_remove_aligned_watchpoint): Renamed to
9376 i386_dr_remove_aligned_watchpoint and made nonstatic.
9377 All uses updated.
9378 (i386_update_inferior_debug_regs): Renamed to
9379 i386_dr_update_inferior_debug_regs and made nonstatic.
9380 All uses updated.
9381 (i386_low_insert_watchpoint): Renamed to
9382 i386_dr_insert_watchpoint. All uses updated.
9383 (i386_low_remove_watchpoint): Renamed to
9384 i386_dr_remove_watchpoint. All uses updated.
9385 (i386_low_region_ok_for_watchpoint): Renamed to
9386 i386_dr_region_ok_for_watchpoint. All uses updated.
9387 (i386_low_stopped_data_address): Renamed to
9388 i386_dr_stopped_data_address. All uses updated.
9389 (i386_low_stopped_by_watchpoint): Renamed to
9390 i386_dr_stopped_by_watchpoint. All uses updated.
9391
9392 2014-06-18 Gary Benson <gbenson@redhat.com>
9393
9394 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9395 (i386_dr_low_can_set_control): Likewise.
9396 (i386_insert_aligned_watchpoint): New check.
9397
9398 2014-06-18 Gary Benson <gbenson@redhat.com>
9399
9400 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9401 Renamed to state.
9402
9403 2014-06-18 Gary Benson <gbenson@redhat.com>
9404
9405 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9406 instead of fatal and error.
9407 (i386_handle_nonaligned_watchpoint): Likewise.
9408
9409 2014-06-18 Gary Benson <gbenson@redhat.com>
9410
9411 * i386-low.c (i386_get_debug_register_length): New macro.
9412 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9413 (i386_show_dr): Use debug_printf instead of fprintf. Use
9414 phex to format values.
9415
9416 2014-06-18 Gary Benson <gbenson@redhat.com>
9417
9418 * i386-low.h: Comment changes.
9419 * i386-low.c: Likewise.
9420
9421 2014-06-18 Gary Benson <gbenson@redhat.com>
9422
9423 * i386-low.c: Whitespace changes.
9424
9425 2014-06-12 Tom Tromey <tromey@redhat.com>
9426
9427 * utils.c (freeargv): Remove.
9428
9429 2014-06-12 Tom Tromey <tromey@redhat.com>
9430
9431 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9432 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9433 (parse_debug_format_options): Likewise.
9434 (gdbserver_usage): Likewise.
9435 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9436 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9437 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9438 against libiberty.
9439 ($(LIBGNU)): Depend on libiberty.
9440 (all-lib): Recurse into all subdirs.
9441 (install-only): Invoke "install" target in subdirs.
9442 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9443 targets.
9444 * configure: Rebuild.
9445 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9446 for vasprintf, vsnprintf, or gettimeofday.
9447 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9448 srv_tgtobj.
9449
9450 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9451
9452 * development.sh: Delete.
9453 * Makefile.in (config.status): Adjust dependency on development.sh.
9454 * configure.ac: Adjust development.sh source call.
9455 * configure: Regenerate.
9456
9457 2014-06-02 Pedro Alves <palves@redhat.com>
9458
9459 * ax.c (gdb_free_agent_expr): New function.
9460 * ax.h (gdb_free_agent_expr): New declaration.
9461 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9462 list.
9463 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9464 static.
9465 (clear_breakpoint_conditions_and_commands): New function.
9466 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9467 (clear_breakpoint_conditions_and_commands): New declaration.
9468
9469 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9470
9471 * linux-aarch64-low.c (asm/ptrace.h): Include.
9472
9473 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9474
9475 Fix TLS access for -static -pthread.
9476 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9477 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9478 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9479
9480 2014-05-20 Pedro Alves <palves@redhat.com>
9481
9482 * linux-aarch64-low.c (aarch64_insert_point)
9483 (aarch64_remove_point): No longer check whether the type is
9484 supported here. Adjust to new interface.
9485 (the_low_target): Install aarch64_supports_z_point_type as
9486 supports_z_point_type method.
9487 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9488 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9489 instead of a Z packet char. Adjust.
9490 (arm_supports_z_point_type): New function.
9491 (arm_insert_point, arm_remove_point): Adjust to new interface.
9492 (the_low_target): Install arm_supports_z_point_type.
9493 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9494 (cris_insert_point, cris_remove_point): Adjust to new interface.
9495 Don't check whether the type is supported here.
9496 (the_low_target): Install cris_supports_z_point_type.
9497 * linux-low.c (linux_supports_z_point_type): New function.
9498 (linux_insert_point, linux_remove_point): Adjust to new interface.
9499 * linux-low.h (struct linux_target_ops) <insert_point,
9500 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9501 raw_breakpoint pointer parameter.
9502 <supports_z_point_type>: New method.
9503 * linux-mips-low.c (mips_supports_z_point_type): New function.
9504 (mips_insert_point, mips_remove_point): Adjust to new interface.
9505 Use mips_supports_z_point_type.
9506 (the_low_target): Install mips_supports_z_point_type.
9507 * linux-ppc-low.c (the_low_target): Install NULL as
9508 supports_z_point_type method.
9509 * linux-s390-low.c (the_low_target): Install NULL as
9510 supports_z_point_type method.
9511 * linux-sparc-low.c (the_low_target): Install NULL as
9512 supports_z_point_type method.
9513 * linux-x86-low.c (x86_supports_z_point_type): New function.
9514 (x86_insert_point): Adjust to new insert_point interface. Use
9515 insert_memory_breakpoint. Adjust to new
9516 i386_low_insert_watchpoint interface.
9517 (x86_remove_point): Adjust to remove_point interface. Use
9518 remove_memory_breakpoint. Adjust to new
9519 i386_low_remove_watchpoint interface.
9520 (the_low_target): Install x86_supports_z_point_type.
9521 * lynx-low.c (lynx_target_ops): Install NULL as
9522 supports_z_point_type callback.
9523 * nto-low.c (nto_supports_z_point_type): New.
9524 (nto_insert_point, nto_remove_point): Adjust to new interface.
9525 (nto_target_ops): Install nto_supports_z_point_type.
9526 * mem-break.c: Adjust intro comment.
9527 (struct raw_breakpoint) <raw_type, size>: New fields.
9528 <inserted>: Update comment.
9529 <shlib_disabled>: Delete field.
9530 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9531 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9532 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9533 (raw_bkpt_type_to_target_hw_bp_type): New function.
9534 (find_enabled_raw_code_breakpoint_at): New function.
9535 (find_raw_breakpoint_at): New type and size parameters. Use them.
9536 (insert_memory_breakpoint): New function, based off
9537 set_raw_breakpoint_at.
9538 (remove_memory_breakpoint): New function.
9539 (set_raw_breakpoint_at): Reimplement.
9540 (set_breakpoint): New, based on set_breakpoint_at.
9541 (set_breakpoint_at): Reimplement.
9542 (delete_raw_breakpoint): Go through the_target->remove_point
9543 instead of assuming memory breakpoints.
9544 (find_gdb_breakpoint_at): Delete.
9545 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9546 (find_gdb_breakpoint): New function.
9547 (set_gdb_breakpoint_at): Delete.
9548 (z_type_supported): New function.
9549 (set_gdb_breakpoint_1): New function, loosely based off
9550 set_gdb_breakpoint_at.
9551 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9552 (delete_gdb_breakpoint_at): Delete.
9553 (delete_gdb_breakpoint_1): New function, loosely based off
9554 delete_gdb_breakpoint_at.
9555 (delete_gdb_breakpoint): New function.
9556 (clear_gdb_breakpoint_conditions): Rename to ...
9557 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9558 breakpoint.
9559 (add_condition_to_breakpoint): Make static.
9560 (add_breakpoint_condition): Take a struct breakpoint pointer
9561 instead of an address. Adjust.
9562 (gdb_condition_true_at_breakpoint): Rename to ...
9563 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9564 z_type parameter.
9565 (gdb_condition_true_at_breakpoint): Reimplement.
9566 (add_breakpoint_commands): Take a struct breakpoint pointer
9567 instead of an address. Adjust.
9568 (gdb_no_commands_at_breakpoint): Rename to ...
9569 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9570 parameter. Return true if no breakpoint was found. Change debug
9571 output.
9572 (gdb_no_commands_at_breakpoint): Reimplement.
9573 (run_breakpoint_commands): Rename to ...
9574 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9575 and change return type to boolean.
9576 (run_breakpoint_commands): New function.
9577 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9578 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9579 breakpoint. Go through the_target->remove_point instead of
9580 assuming memory breakpoint.
9581 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9582 software and hardware breakpoints.
9583 (reinsert_raw_breakpoint): Go through the_target->insert_point
9584 instead of assuming memory breakpoint.
9585 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9586 software and hardware breakpoints.
9587 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9588 Check both software and hardware breakpoints.
9589 (validate_inserted_breakpoint): Assert the breakpoint is a
9590 software breakpoint. Set the inserted flag to -1 instead of
9591 setting shlib_disabled.
9592 (delete_disabled_breakpoints): Adjust.
9593 (validate_breakpoints): Only validate software breakpoints.
9594 Adjust to inserted flag change.
9595 (check_mem_read, check_mem_write): Skip breakpoint types other
9596 than software breakpoints. Adjust to inserted flag change.
9597 * mem-break.h (enum raw_bkpt_type): New enum.
9598 (raw_breakpoint, struct process_info): Forward declare.
9599 (Z_packet_to_target_hw_bp_type): Delete declaration.
9600 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9601 (set_gdb_breakpoint, delete_gdb_breakpoint)
9602 (clear_breakpoint_conditions): New declarations.
9603 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9604 (breakpoint_inserted_here): Update comment.
9605 (add_breakpoint_condition, add_breakpoint_commands): Replace
9606 address parameter with a breakpoint pointer parameter.
9607 (gdb_breakpoint_here): Update comment.
9608 (delete_gdb_breakpoint_at): Delete.
9609 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9610 * server.c (process_point_options): Take a struct breakpoint
9611 pointer instead of an address. Adjust.
9612 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9613 delete_gdb_breakpoint.
9614 * spu-low.c (spu_target_ops): Install NULL as
9615 supports_z_point_type method.
9616 * target.h: Include mem-break.h.
9617 (struct target_ops) <prepare_to_access_memory>: Update comment.
9618 <supports_z_point_type>: New field.
9619 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9620 instead of a char. Also take a raw breakpoint pointer.
9621 * win32-arm-low.c (the_low_target): Install NULL as
9622 supports_z_point_type.
9623 * win32-i386-low.c (i386_supports_z_point_type): New function.
9624 (i386_insert_point, i386_remove_point): Adjust to new interface.
9625 (the_low_target): Install i386_supports_z_point_type.
9626 * win32-low.c (win32_supports_z_point_type): New function.
9627 (win32_insert_point, win32_remove_point): Adjust to new interface.
9628 (win32_target_ops): Install win32_supports_z_point_type.
9629 * win32-low.h (struct win32_target_ops):
9630 <supports_z_point_type>: New method.
9631 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9632 instead of a char. Also take a raw breakpoint pointer.
9633
9634 2014-05-20 Pedro Alves <palves@redhat.com>
9635
9636 * mem-break.h: Include break-common.h.
9637 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9638 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9639 (Z_packet_to_target_hw_bp_type): New declaration.
9640 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9641 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9642 (Z_PACKET_ACCESS_WP): Delete macros.
9643 (Z_packet_to_hw_type): Delete function.
9644 * i386-low.h: Don't include break-common.h here.
9645 (Z_packet_to_hw_type): Delete declaration.
9646 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9647 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9648 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9649 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9650 * linux-aarch64-low.c: Don't include break-common.h here.
9651 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9652 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9653 (Z_packet_to_target_hw_bp_type): Delete function.
9654 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9655 function.
9656 (mips_insert_point, mips_remove_point): Use
9657 Z_packet_to_target_hw_bp_type.
9658
9659 2014-05-20 Pedro Alves <palves@redhat.com>
9660
9661 * linux-aarch64-low.c: Include break-common.h.
9662 (enum target_point_type): Delete.
9663 (Z_packet_to_point_type): Rename to ...
9664 (Z_packet_to_target_hw_bp_type): ... this, and return a
9665 target_hw_bp_type instead.
9666 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9667 instead of an enum target_point_type.
9668 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9669 breakpoint type.
9670 (aarch64_dr_state_insert_one_point)
9671 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9672 (aarch64_handle_aligned_watchpoint)
9673 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9674 Take an enum target_hw_bp_type instead of an enum
9675 target_point_type.
9676 (aarch64_supports_z_point_type): New function.
9677 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9678 use Z_packet_to_target_hw_bp_type.
9679
9680 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9681
9682 * configure.ac: Only use -Werror by default when DEVELOPMENT
9683 is true.
9684 * configure: Regenerate.
9685
9686 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9687
9688 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9689 * linux-x86-low.c (X86_64_USER_REGS): New.
9690 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9691
9692 2014-04-28 Yao Qi <yao@codesourcery.com>
9693
9694 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9695 name.
9696
9697 2014-04-25 Pedro Alves <palves@redhat.com>
9698
9699 PR server/16255
9700 * linux-low.c (linux_attach_fail_reason_string): New function.
9701 (linux_attach_lwp): Delete.
9702 (linux_attach_lwp_1): Rename to ...
9703 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9704 argument. Remove "initial" parameter. Return int instead of
9705 void. Don't error or warn here.
9706 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9707 failure to attach to the tgid. Call warning when failing to
9708 attach to an lwp.
9709 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9710 argument. Remove "initial" parameter. Return int instead of
9711 void. Don't error or warn here.
9712 (linux_attach_fail_reason_string): New declaration.
9713 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9714 interface change. Use linux_attach_fail_reason_string.
9715
9716 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9717 Walfred Tedeschi <walfred.tedeschi@intel.com>
9718
9719 * Makefile.in: Added rules to handle new files
9720 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9721 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9722 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9723 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9724 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9725 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9726 x32-avx512-linux.o.
9727 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9728 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9729 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9730 i386/x32-avx512.xml.
9731 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9732 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9733 i386/x32-avx512-linux.xml.
9734 * i387-fp.c (num_avx512_k_registers): New constant for number
9735 of K registers.
9736 (num_avx512_zmmh_low_registers): New constant for number of
9737 lower ZMM registers (0-15).
9738 (num_avx512_zmmh_high_registers): New constant for number of
9739 higher ZMM registers (16-31).
9740 (num_avx512_ymmh_registers): New contant for number of higher
9741 YMM registers (ymm16-31 added by avx521 on x86_64).
9742 (num_avx512_xmm_registers): New constant for number of higher
9743 XMM registers (xmm16-31 added by AVX512 on x86_64).
9744 (struct i387_xsave): Add space for AVX512 registers.
9745 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9746 Add code to handle AVX512 registers.
9747 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9748 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9749 prototypei from generated file.
9750 (tdesc_amd64_avx512_linux): Likewise.
9751 (init_registers_x32_avx512_linux): Likewise.
9752 (tdesc_x32_avx512_linux): Likewise.
9753 (init_registers_i386_avx512_linux): Likewise.
9754 (tdesc_i386_avx512_linux): Likewise.
9755 (x86_64_regmap): Add AVX512 registers.
9756 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9757 mask.
9758 (initialize_low_arch): Add code to initialize AVX512 registers.
9759
9760 2014-04-23 Pedro Alves <palves@redhat.com>
9761
9762 * mem-break.c (find_gdb_breakpoint_at): Make static.
9763 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9764
9765 2014-04-23 Pedro Alves <palves@redhat.com>
9766
9767 * i386-low.c: Don't include break-common.h here.
9768 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9769 prototype to take target_hw_bp_type as argument instead of a Z
9770 packet char.
9771 * i386-low.h: Include break-common.h here.
9772 (Z_packet_to_hw_type): Declare.
9773 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9774 prototypes.
9775 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9776 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9777 (x86_remove_point): Convert the packet number to a
9778 target_hw_bp_type before calling i386_low_remove_watchpoint.
9779 * win32-i386-low.c (i386_insert_point): Convert the packet number
9780 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9781 (i386_remove_point): Convert the packet number to a
9782 target_hw_bp_type before calling i386_low_remove_watchpoint.
9783
9784 2014-04-23 Pedro Alves <palves@redhat.com>
9785
9786 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9787
9788 2014-04-10 Pedro Alves <palves@redhat.com>
9789
9790 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9791 Check if the condition or command is NULL before checking if the
9792 breakpoint is known. On success, return true.
9793 * mem-break.h (add_breakpoint_condition): Document return.
9794 (add_breakpoint_commands): Add describing comment.
9795 * server.c (skip_to_semicolon): New function.
9796 (process_point_options): Use it.
9797
9798 2014-04-09 Pedro Alves <palves@redhat.com>
9799
9800 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9801 to lwpid_of.
9802
9803 2014-02-27 Pedro Alves <palves@redhat.com>
9804
9805 PR 12702
9806 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9807 macros.
9808 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9809 output.
9810 (last_thread_of_process_p): Take a PID argument instead of a
9811 thread pointer.
9812 (linux_wait_for_lwp): Delete.
9813 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9814 functions.
9815 (linux_low_filter_event): New function, party factored out from
9816 linux_wait_for_event.
9817 (linux_wait_for_event): Rename to ...
9818 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9819 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9820 sigsuspend. Check for zombie leaders.
9821 (linux_wait_for_event): Reimplement as wrapper around
9822 linux_wait_for_event_filtered.
9823 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9824 a normal or signal exit is seen, it's the whole process exiting.
9825 (wait_for_sigstop): No longer a for_each_inferior callback.
9826 Rewrite on top of linux_wait_for_event_filtered.
9827 (stop_all_lwps): Call wait_for_sigstop directly.
9828 * server.c (resume, handle_target_event): Handle
9829 TARGET_WAITKIND_NO_RESUMED.
9830
9831 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9832
9833 * win32-low.c (psapi_get_dll_name,
9834 * win32_CreateToolhelp32Snapshot): Delete.
9835 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9836 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9837 Delete.
9838 (handle_load_dll): Add function description.
9839 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9840
9841 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9842
9843 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9844 Add comment.
9845 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9846 base address when calling win32_add_one_solib.
9847 (handle_load_dll): Delete local variable load_addr.
9848 Remove 0x1000 offset applied to DLL base address when calling
9849 win32_add_one_solib.
9850 (handle_unload_dll): Add comment.
9851
9852 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9853
9854 * win32-low.c (win32_add_all_dlls): Renames
9855 win32_ensure_ntdll_loaded. Rewrite function documentation.
9856 Adjust implementation to always load all DLLs.
9857 Add 0x1000 offset to DLL base address when calling
9858 win32_add_one_solib.
9859 (child_initialization_done): New static global.
9860 (do_initial_child_stuff): Set child_initialization_done to
9861 zero during child initialization, and 1 after. Replace call
9862 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9863 Add comment.
9864 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9865 (handle_unload_dll): Add function documentation.
9866 (get_child_debug_event): Ignore load and unload DLL events
9867 during child initialization.
9868
9869 2014-02-20 Doug Evans <dje@google.com>
9870
9871 Remove global all_lwps.
9872 * inferiors.h (ptid_of): Move here from linux-low.h.
9873 (pid_of, lwpid_of): Ditto.
9874 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9875 parameter is a struct thread_info * now.
9876 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9877 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9878 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9879 directly.
9880 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9881 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9882 * linux-arm-low.c (update_registers_callback): Update, "entry"
9883 parameter is a struct thread_info * now.
9884 Fetch lwpid from current_inferior directly.
9885 (arm_insert_point): Pass &all_threads to find_inferior instead of
9886 &all_lwps.
9887 (arm_remove_point): Ditto.
9888 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9889 (arm_prepare_to_resume): Fetch pid from thread.
9890 (arm_read_description): Fetch lwpid from current_inferior directly.
9891 * linux-low.c (all_lwps): Delete.
9892 (delete_lwp): Delete call to remove_inferior.
9893 (handle_extended_wait): Fetch lwpid from thread.
9894 (add_lwp): Don't set lwp->entry.id. Remove call to
9895 add_inferior_to_list.
9896 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9897 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9898 (kill_one_lwp_callback): Ditto.
9899 (linux_kill): Don't dereference NULL pointer.
9900 Fetch ptid,lwpid from thread.
9901 (get_detach_signal): Fetch ptid from thread.
9902 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9903 Simplify call to regcache_invalidate_thread.
9904 (delete_lwp_callback): Update, "entry" parameter is a
9905 struct thread_info * now. Fetch pid from thread.
9906 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9907 (status_pending_p_callback): Update, "entry" parameter is a
9908 struct thread_info * now. Fetch ptid from thread.
9909 (find_lwp_pid): Update, "entry" parameter is a
9910 struct thread_info * now.
9911 (linux_wait_for_lwp): Fetch pid from thread.
9912 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9913 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9914 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9915 (dequeue_one_deferred_signal): Ditto.
9916 (cancel_breakpoint): Fetch ptid from current_inferior.
9917 (linux_wait_for_event): Pass &all_threads to find_inferior,
9918 not &all_lwps. Fetch ptid, lwpid from thread.
9919 (count_events_callback): Update, "entry" parameter is a
9920 struct thread_info * now.
9921 (select_singlestep_lwp_callback): Ditto.
9922 (select_event_lwp_callback): Ditto.
9923 (cancel_breakpoints_callback): Ditto.
9924 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9925 not &all_lwps.
9926 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9927 (unsuspend_one_lwp): Update, "entry" parameter is a
9928 struct thread_info * now.
9929 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9930 not &all_lwps.
9931 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9932 Fetch lwpid from thread, not lwp.
9933 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9934 Pass &all_threads to find_inferior, not &all_lwps.
9935 (send_sigstop): Fetch lwpid from thread, not lwp.
9936 (send_sigstop_callback): Update, "entry" parameter is a
9937 struct thread_info * now.
9938 (suspend_and_send_sigstop_callback): Ditto.
9939 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9940 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9941 struct thread_info * now.
9942 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9943 from thread, lwp.
9944 (lwp_running): Update, "entry" parameter is a
9945 struct thread_info * now.
9946 (stop_all_lwps): Fetch ptid from thread.
9947 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9948 (linux_resume_one_lwp): Fetch lwpid from thread.
9949 (linux_set_resume_request): Update, "entry" parameter is a
9950 struct thread_info * now. Fetch pid, lwpid from thread.
9951 (resume_status_pending_p): Update, "entry" parameter is a
9952 struct thread_info * now.
9953 (need_step_over_p): Ditto. Fetch lwpid from thread.
9954 (start_step_over): Fetch lwpid from thread.
9955 (linux_resume_one_thread): Update, "entry" parameter is a
9956 struct thread_info * now. Fetch lwpid from thread.
9957 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9958 (proceed_one_lwp): Update, "entry" parameter is a
9959 struct thread_info * now. Fetch lwpid from thread.
9960 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9961 struct thread_info * now.
9962 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9963 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9964 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9965 directly.
9966 (regsets_store_inferior_registers): Ditto.
9967 (fetch_register, store_register): Ditto.
9968 (linux_read_memory, linux_write_memory): Ditto.
9969 (linux_request_interrupt): Ditto.
9970 (linux_read_auxv): Ditto.
9971 (linux_xfer_siginfo): Ditto.
9972 (linux_qxfer_spu): Ditto.
9973 (linux_qxfer_libraries_svr4): Ditto.
9974 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9975 moved to inferiors.h.
9976 (get_lwp): Delete.
9977 (get_thread_lwp): Update.
9978 (struct lwp_info): Delete member "entry". Simplify comment for
9979 member "thread".
9980 (all_lwps): Delete.
9981 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9982 current_inferior directly.
9983 (update_watch_registers_callback): Update, "entry" parameter is a
9984 struct thread_info * now. Fetch pid from thread.
9985 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9986 (mips_insert_point): Fetch lwpid from current_inferior.
9987 Pass &all_threads to find_inferior, not &all_lwps.
9988 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9989 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9990 directly.
9991 (mips_stopped_data_address): Ditto.
9992 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9993 directly.
9994 * linux-tile-low.c (tile_arch_setup): Ditto.
9995 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9996 (update_debug_registers_callback): Update, "entry" parameter is a
9997 struct thread_info * now. Fetch pid from thread.
9998 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9999 Pass &all_threads to find_inferior, not &all_lwps.
10000 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10001 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10002 Pass &all_threads to find_inferior, not &all_lwps.
10003 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10004 (i386_dr_low_get_status): Ditto.
10005 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10006 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10007 (x86_linux_read_description): Ditto.
10008 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10009
10010 2014-02-20 Doug Evans <dje@google.com>
10011
10012 * inferiors.c (get_first_inferior): Fix buglet.
10013
10014 2014-02-19 Doug Evans <dje@google.com>
10015
10016 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10017 * inferiors.c (add_thread): Change result type to struct thread_info *.
10018 All callers updated.
10019 (add_lwp): Call add_thread here instead of in callers.
10020 All callers updated.
10021 * linux-low.h (get_lwp_thread): Rewrite.
10022 (struct lwp_info): New member "thread".
10023
10024 2014-02-19 Doug Evans <dje@google.com>
10025
10026 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10027 All callers updated.
10028
10029 2014-02-19 Doug Evans <dje@google.com>
10030
10031 * inferiors.c (add_thread): Fix whitespace.
10032
10033 2014-02-19 Doug Evans <dje@google.com>
10034
10035 * dll.c (clear_dlls): Replace accessing list implemention details
10036 with API function.
10037 * gdbthread.h (get_first_thread): Declare.
10038 * inferiors.c (for_each_inferior_with_data): New function.
10039 (get_first_thread): New function.
10040 (find_thread_ptid): Simplify.
10041 (get_first_inferior): New function.
10042 (clear_list): Delete.
10043 (one_inferior_p): New function.
10044 (clear_inferior_list): New function.
10045 (clear_inferiors): Update.
10046 * inferiors.h (for_each_inferior_with_data): Declare.
10047 (clear_inferior_list): Declare.
10048 (one_inferior_p): Declare.
10049 (get_first_inferior): Declare.
10050 * linux-low.c (linux_wait_for_event): Replace accessing list
10051 implemention details with API function.
10052 * server.c (target_running): Ditto.
10053 (accumulate_file_name_length): New function.
10054 (emit_dll_description): New function.
10055 (handle_qxfer_libraries): Replace accessing list implemention
10056 details with API function.
10057 (handle_qxfer_threads_worker): New function.
10058 (handle_qxfer_threads_proper): Replace accessing list implemention
10059 details with API function.
10060 (handle_query): Ditto.
10061 (visit_actioned_threads_callback_ftype): New typedef.
10062 (visit_actioned_threads_data): New struct.
10063 (visit_actioned_threads): Rewrite to be find_inferior callback.
10064 (resume): Call find_inferior.
10065 (handle_status): Replace accessing list implemention
10066 details with API function.
10067 (process_serial_event): Replace accessing list implemention details
10068 with API function.
10069 * target.c (set_desired_inferior): Replace accessing list implemention
10070 details with API function.
10071 * tracepoint.c (same_process_p): New function.
10072 (gdb_agent_about_to_close): Replace accessing list implemention
10073 details with API function.
10074 * win32-low.c (child_delete_thread): Replace accessing list
10075 implemention details with API function.
10076 (match_dll_by_basename): New function.
10077 (dll_is_loaded_by_basename): New function.
10078 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10079 details call to dll_is_loaded_by_basename.
10080
10081 2014-02-19 Doug Evans <dje@google.com>
10082
10083 * dll.h (struct dll_info): Add comment.
10084 * gdbthread.h (struct thread_info): Add comment.
10085 (current_ptid): Simplify.
10086 * inferiors.c (add_process): Update.
10087 (remove_process): Update.
10088 * inferiors.h (struct process_info): Rename member "head" to "entry".
10089 * linux-low.c (delete_lwp): Update.
10090 (add_lwp): Update.
10091 (last_thread_of_process_p): Update.
10092 (kill_one_lwp_callback, linux_kill): Update.
10093 (status_pending_p_callback): Update.
10094 (wait_for_sigstop): Update. Simplify read of ptid.
10095 (start_step_over): Update.
10096 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10097 (get_lwp_thread): Update.
10098 (struct lwp_info): Rename member "head" to "entry".
10099 * regcache.h (inferior_list_entry): Delete.
10100 * server.c (kill_inferior_callback): Update.
10101 (detach_or_kill_inferior_callback): Update.
10102 (print_started_pid): Update.
10103 (print_attached_pid): Update.
10104 (process_serial_event): Simplify read of ptid.
10105 * thread-db.c (thread_db_create_event): Update.
10106 (thread_db_get_tls_address): Update.
10107 * win32-low.c (current_inferior_ptid): Simplify.
10108
10109 2014-02-19 Tom Tromey <tromey@redhat.com>
10110
10111 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10112 argument.
10113 (target_supports_btrace): Update.
10114
10115 2014-02-14 Yao Qi <yao@codesourcery.com>
10116
10117 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10118 (rsp-low-ipa.o): New target.
10119
10120 2014-02-12 Tom Tromey <tromey@redhat.com>
10121
10122 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10123 convert_ascii_to_int.
10124 * regcache.c (registers_to_string): Likewise.
10125 * remote-utils.c (decode_M_packet): Likewise.
10126 * server.c (process_serial_event): Likewise.
10127
10128 2014-02-12 Tom Tromey <tromey@redhat.com>
10129
10130 * server.c (handle_query, handle_v_run): Use hex2bin, not
10131 unhexify.
10132 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10133
10134 2014-02-12 Tom Tromey <tromey@redhat.com>
10135
10136 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10137 convert_int_to_ascii.
10138 * regcache.c (registers_to_string, collect_register_as_string):
10139 Likewise.
10140 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10141 Likewise.
10142 * server.c (process_serial_event): Likewise.
10143 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10144 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10145
10146 2014-02-12 Tom Tromey <tromey@redhat.com>
10147
10148 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10149 bin2hex, not hexify.
10150 * tracepoint.c (cmd_qtstatus): Likewise.
10151
10152 2014-02-12 Tom Tromey <tromey@redhat.com>
10153
10154 * remote-utils.c (monitor_output): Pass explicit length to
10155 hexify.
10156
10157 2014-02-12 Tom Tromey <tromey@redhat.com>
10158
10159 * tracepoint.c: Include rsp-low.h.
10160 * server.c: Include rsp-low.h.
10161 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10162 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10163 declare.
10164 * remote-utils.c: Include rsp-low.h.
10165 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10166 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10167 (convert_int_to_ascii, convert_ascii_to_int): Move to
10168 common/rsp-low.c.
10169 * regcache.c: Include rsp-low.h.
10170 * ax.c: Include rsp-low.h.
10171 * Makefile.in (SFILES): Add common/rsp-low.c.
10172 (OBS): Add rsp-low.o.
10173 (rsp-low.o): New target.
10174
10175 2014-02-12 Tom Tromey <tromey@redhat.com>
10176
10177 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10178 Include print-utils.h.
10179 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10180 (plongest, thirty_two, phex_nz): Remove.
10181 * Makefile.in (SFILES): Add common/print-utils.c.
10182 (OBS): Add print-utils.o.
10183 (print-utils-ipa.o): New target.
10184 (print-utils.o): New target.
10185 (IPA_OBJS): Add print-utils-ipa.o.
10186
10187 2014-02-06 Tom Tromey <tromey@redhat.com>
10188
10189 * Makefile.in (SFILES): Fix indentation.
10190
10191 2014-02-05 Doug Evans <dje@google.com>
10192
10193 * linux-low.c (linux_wait_for_event): Improve comment.
10194 (linux_wait_1): Keep current_inferior in sync with event_child.
10195
10196 2014-01-22 Doug Evans <dje@google.com>
10197
10198 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10199
10200 2014-01-22 Doug Evans <dje@google.com>
10201
10202 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10203 * configure: Regenerate.
10204 * config.in: Regenerate.
10205 * Makefile.in (SFILES): Add debug.c.
10206 (OBS): Add debug.o.
10207 * debug.c: New file.
10208 * debug.h: New file.
10209 * linux-aarch64-low.c (*): Update all debugging printfs to use
10210 debug_printf instead of fprintf.
10211 * linux-arm-low.c (*): Ditto.
10212 * linux-cris-low.c (*): Ditto.
10213 * linux-crisv32-low.c (*): Ditto.
10214 * linux-m32r-low.c (*): Ditto.
10215 * linux-sparc-low.c (*): Ditto.
10216 * linux-x86.c (*): Ditto.
10217 * linux-low.c (*): Ditto.
10218 (linux_wait_1): Add calls to debug_enter, debug_exit.
10219 (linux_wait): Remove redundant debugging printf.
10220 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10221 (linux_resume, unstop_all_lwps): Ditto.
10222 * mem-break.c (*): Update all debugging printfs to use
10223 debug_printf instead of fprintf.
10224 * remote-utils.c (*): Ditto.
10225 * thread-db.c (*): Ditto.
10226 * server.c #include <ctype.h>, "gdb_vecs.h".
10227 (debug_threads): Moved to debug.c.
10228 (*): Update all debugging printfs to use debug_printf instead of
10229 fprintf.
10230 (start_inferior): Replace call to fflush with call to debug_flush.
10231 (monitor_show_help): Mention set debug-format.
10232 (parse_debug_format_options): New function.
10233 (handle_monitor_command): Handle "monitor set debug-format".
10234 (gdbserver_usage): Mention --debug-format.
10235 (main): Parse --debug-format.
10236 * server.h (debug_threads): Declaration moved to debug.h.
10237 #include "debug.h".
10238 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10239 trace_debug_1 that uses debug_printf.
10240 (tracepoint_look_up_symbols): Update all debugging printfs to use
10241 debug_printf instead of fprintf.
10242
10243 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10244
10245 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10246 sys/ptrace.h.
10247
10248 2014-01-17 Pedro Alves <palves@redhat.com>
10249
10250 PR build/16445
10251 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10252 defined after including gdb_proc_service.h.
10253
10254 2014-01-16 Doug Evans <dje@google.com>
10255
10256 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10257 (match_dll): Use it.
10258
10259 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10260
10261 * target.h (target_ops) <read_btrace>: Change parameters and
10262 return type to allow error reporting.
10263 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10264 trace reading errors on.
10265 * linux-low.c (linux_low_read_btrace): Pass trace reading
10266 errors on.
10267 (linux_low_disable_btrace): New.
10268
10269 2014-01-15 Doug Evans <dje@google.com>
10270
10271 * inferiors.c (thread_id_to_gdb_id): Delete.
10272 * inferiors.h (thread_id_to_gdb_id): Delete.
10273
10274 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10275
10276 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10277 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10278 versions.
10279
10280 2014-01-08 Pedro Alves <palves@redhat.com>
10281
10282 * server.c (handle_status): Don't discard previous queued stop
10283 replies or thread's pending status here.
10284 (main) <disconnection>: Do it here instead.
10285
10286 2014-01-08 Pedro Alves <palves@redhat.com>
10287
10288 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10289 * server.c (visit_actioned_threads, handle_pending_status): New
10290 function.
10291 (handle_v_cont): Factor out parts to ...
10292 (resume): ... this new function. If in all-stop, and a thread
10293 being resumed has a pending status, report it without actually
10294 resuming.
10295 (myresume): Adjust to use the new 'resume' function.
10296 (clear_pending_status_callback, set_pending_status_callback)
10297 (find_status_pending_thread_callback): New functions.
10298 (handle_status): Handle the case of multiple threads having
10299 interesting statuses to report. Report threads' real last signal
10300 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10301 with an interesting thread to report the status for, instead of
10302 always reporting the status of the first thread.
10303
10304 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10305
10306 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10307 * gdbreplay.c (gdbreplay_version): Likewise.
10308
10309 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10310
10311 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10312 iov.iov_len with the real length in use.
10313
10314 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10315
10316 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10317 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10318 for all targets that use win32-low.c.
10319 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10320 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10321
10322 2013-12-13 Pedro Alves <palves@redhat.com>
10323
10324 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10325 if equal to TARGET_WAITKIND_LOADED.
10326 * win32-low.c (cached_status): New static global.
10327 (win32_wait): Add declaration.
10328 (do_initial_child_stuff): Flush all initial pending debug events
10329 up to the initial breakpoint.
10330 (win32_wait): If CACHED_STATUS was set, return that instead
10331 of doing a real wait. Remove the code resuming the execution
10332 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10333 during the initial phase. Also remove the code changing
10334 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10335 TARGET_WAITKIND_STOPPED.
10336
10337 2013-12-11 Yao Qi <yao@codesourcery.com>
10338
10339 * notif.c (handle_notif_ack): Return 0 if no notification
10340 matches.
10341
10342 2013-11-20 Doug Evans <dje@google.com>
10343
10344 * linux-low.c (linux_set_resume_request): Fix comment.
10345
10346 2013-11-20 Doug Evans <dje@google.com>
10347
10348 * linux-low.c (resume_status_pending_p): Tweak comment.
10349
10350 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10351
10352 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10353 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10354 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10355 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10356 (srv_amd64_regobj): Add amd64-mpx.o.
10357 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10358 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10359 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10360 * i387-fp.c (num_pl_bnd_register) Added constant.
10361 (num_pl_bnd_cfg_registers) Added constant.
10362 (struct i387_xsave) Added reserved area and MPX fields.
10363 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10364 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10365 function.
10366 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10367 (init_registers_amd64_mpx_linux): Declare new function.
10368 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10369 (x86_64_regmap): Add MPX registers.
10370 (x86_linux_read_description): Add MPX case.
10371 (initialize_low_arch): Initialize MPX targets.
10372
10373 2013-11-18 Tom Tromey <tromey@redhat.com>
10374
10375 * configure: Rebuild.
10376 * configure.ac: Don't check for stdlib.h.
10377 * gdbreplay.c: Unconditionally include stdlib.h.
10378
10379 2013-11-18 Tom Tromey <tromey@redhat.com>
10380
10381 * config.in: Rebuild.
10382 * configure: Rebuild.
10383 * configure.ac: Don't use AC_HEADER_DIRENT.
10384
10385 2013-11-18 Tom Tromey <tromey@redhat.com>
10386
10387 * server.h: Don't check HAVE_STRING_H.
10388 * gdbreplay.c: Don't check HAVE_STRING_H.
10389 * configure: Rebuild.
10390
10391 2013-11-18 Tom Tromey <tromey@redhat.com>
10392
10393 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10394 LIBGNU.
10395
10396 2013-11-08 Tom Tromey <tromey@redhat.com>
10397
10398 * configure, config.in: Rebuild.
10399 * configure.ac: Remove unused configury.
10400
10401 2013-11-08 Tom Tromey <tromey@redhat.com>
10402
10403 * acinclude.m4: Include common.m4, codeset.m4.
10404 * configure, config.in: Rebuild.
10405 * configure.ac: Use GDB_AC_COMMON.
10406
10407 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10408
10409 * linux-s390-low.c (HWCAP_S390_TE): New define.
10410 (s390_arch_setup): Consider the TE field in the HWCAP for
10411 determining 'have_regset_tdb'.
10412
10413 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10414
10415 PR gdb/16014
10416 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10417 call to sizeof.
10418
10419 2013-10-02 Pedro Alves <palves@redhat.com>
10420
10421 * server.c (process_serial_event): Don't output "GDBserver
10422 exiting" if GDB is connected through stdio.
10423 * target.c (mywait): Likewise, be silent if GDB is connected
10424 through stdio.
10425
10426 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10427
10428 * lynx-low.c (lynx_add_threads_after_attach): New function.
10429 (lynx_attach): Remove call to add_thread. Add call to
10430 lynx_add_threads_after_attach instead.
10431
10432 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10433
10434 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10435 * config.in, configure: Regenerated.
10436
10437 2013-09-18 Yao Qi <yao@codesourcery.com>
10438
10439 PR server/15959
10440 * server.c (start_inferior): Clear 'resume_info'.
10441
10442 2013-09-16 Jiong Wang <jiwang@tilera.com>
10443
10444 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10445 for each register.
10446
10447 2013-09-16 Jiong Wang <jiwang@tilera.com>
10448
10449 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10450 linux-tile-low.o to srv_tgtobj.
10451
10452 2013-09-16 Will Newton <will.newton@linaro.org>
10453
10454 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10455 out regs.
10456
10457 2013-09-06 Pedro Alves <palves@redhat.com>
10458
10459 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10460 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10461 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10462 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10463 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10464 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10465
10466 2013-09-06 Pedro Alves <palves@redhat.com>
10467
10468 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10469 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10470
10471 2013-09-06 Pedro Alves <palves@redhat.com>
10472
10473 * linux-amd64-ipa.c: Include tracepoint.h.
10474 * linux-i386-ipa.c: Include tracepoint.h.
10475
10476 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10477
10478 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10479 (ps_get_thread_area): New function.
10480
10481 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10482
10483 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10484 (initialize_low_arch): Call init_registers_crisv32 rather than
10485 init_register_crisv32.
10486
10487 2013-09-05 Pedro Alves <palves@redhat.com>
10488
10489 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10490 to ...
10491 * hostio.h: ... this new file.
10492 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10493 win32-low.c: Include hostio.h.
10494
10495 2013-09-05 Pedro Alves <palves@redhat.com>
10496
10497 * server.h (gdb_client_data, handler_func, callback_handler_func)
10498 (delete_file_handler, add_file_handler, append_callback_event)
10499 (delete_callback_event, start_event_loop, initialize_event_loop):
10500 Move to event-loop.h and include it.
10501 * event-loop.h: New file.
10502
10503 2013-09-05 Pedro Alves <palves@redhat.com>
10504
10505 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10506 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10507 (loaded_dll, unloaded_dll): Move to ...
10508 * dll.h: ... this new file.
10509 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10510
10511 2013-09-05 Pedro Alves <palves@redhat.com>
10512
10513 * server.h (current_process, get_thread_process, all_processes)
10514 (add_inferior_to_list, for_each_inferior, current_inferior)
10515 (remove_inferior, add_process, remove_process, find_process_pid)
10516 (have_started_inferiors_p, have_attached_inferiors_p)
10517 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10518 (clear_inferiors, find_inferior, find_inferior_id)
10519 (inferior_target_data, set_inferior_target_data)
10520 (inferior_regcache_data, set_inferior_regcache_data): Move to
10521 inferiors.h, and include it.
10522 * inferiors.h: New file.
10523
10524 2013-09-05 Pedro Alves <palves@redhat.com>
10525
10526 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10527 Move ...
10528 * ax.h: ... here.
10529
10530 2013-09-05 Pedro Alves <palves@redhat.com>
10531
10532 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10533 tracepoint.h.
10534 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10535 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10536 (handle_tracepoint_general_set, handle_tracepoint_query)
10537 (tracepoint_finished_step, tracepoint_was_hit)
10538 (release_while_stepping_state_list, current_traceframe)
10539 (in_readonly_region, traceframe_read_mem)
10540 (fetch_traceframe_registers, traceframe_read_sdata)
10541 (traceframe_read_info, struct fast_tpoint_collect_status)
10542 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10543 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10544 (supply_fast_tracepoint_registers)
10545 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10546 (ipa_tdesc, claim_trampoline_space)
10547 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10548 (agent_mem_read, agent_get_trace_state_variable_value)
10549 (agent_set_trace_state_variable_value, agent_tsv_read)
10550 (agent_mem_read_string, get_raw_reg_func_addr)
10551 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10552 * tracepoint.h: ... this new file.
10553
10554 2013-09-05 Pedro Alves <palves@redhat.com>
10555
10556 * server.h (perror_with_name, error, fatal, warning, paddress)
10557 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10558 include it.
10559 * utils.h: New file.
10560
10561 2013-09-05 Pedro Alves <palves@redhat.com>
10562
10563 * server.h (remote_debug, noack_mode, transport_is_reliable)
10564 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10565 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10566 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10567 (write_enn, initialize_async_io, enable_async_io)
10568 (disable_async_io, check_remote_input_interrupt_request)
10569 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10570 (dead_thread_notify, prepare_resume_reply)
10571 (decode_address_to_semicolon, decode_address, decode_m_packet)
10572 (decode_M_packet, decode_X_packet, decode_xfer_write)
10573 (decode_search_memory_packet, unhexify, hexify)
10574 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10575 (look_up_one_symbol, relocate_instruction)
10576 (monitor_output): Move to remote-utils.h, and include it.
10577 * remote-utils.h: New file.
10578
10579 2013-09-05 Pedro Alves <palves@redhat.com>
10580
10581 * server.h (_): Delete.
10582
10583 2013-09-02 Pedro Alves <palves@redhat.com>
10584
10585 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10586 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10587 allocated.
10588 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10589
10590 2013-09-02 Pierre Muller <muller@sourceware.org>
10591
10592 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10593 or WriteProcessMemory complete successfully and handle
10594 ERROR_PARTIAL_COPY error.
10595
10596 2013-09-02 Pedro Alves <palves@redhat.com>
10597
10598 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10599 error instead of EIO.
10600
10601 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10602
10603 PR server/15604
10604 * linux-low.c: Include filestuff.h.
10605 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10606 * lynx-low.c: Include filestuff.h.
10607 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10608 * server.c: Include filestuff.h.
10609 (main): Call notice_open_fds.
10610 * spu-low.c: Include filestuff.h.
10611 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10612
10613 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10614
10615 * Makefile.in: Explain why ../target and ../nat are not
10616 listed as include file search paths.
10617 (linux-waitpid.o): New object file rule.
10618 * configure.srv (srv_native_linux_obj): New variable.
10619 Replace all occurrences of linux native object files with
10620 $srv_native_linux_obj.
10621 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10622 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10623 (linux_enable_event_reporting): Remove declaration.
10624 (my_waitpid): Moved to common/linux-waitpid.c.
10625 (linux_wait_for_event): Pass ptid when calling
10626 linux_enable_event_reporting.
10627 (linux_supports_tracefork_flag): Remove.
10628 (linux_enable_event_reporting): Likewise.
10629 (linux_tracefork_grandchild): Remove.
10630 (STACK_SIZE): Moved to common/linux-ptrace.c.
10631 (linux_tracefork_child): Remove.
10632 (linux_test_for_tracefork): Remove.
10633 (linux_look_up_symbols): Call linux_supports_traceclone.
10634 (initialize_low): Remove call to linux_test_for_tracefork.
10635 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10636 common/linux-ptrace.h.
10637 (PTRACE_TYPE_ARG4): Likewise.
10638 Include linux-ptrace.h.
10639
10640 2013-08-21 Pedro Alves <palves@redhat.com>
10641
10642 * config.in: Renegerate.
10643
10644 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10645
10646 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10647 (SFILES): Remove $(srcdir)/common/target-common.c and
10648 add $(srcdir)/target/waitstatus.c.
10649 (OBS): Remove target-common.o and add waitstatus.o.
10650 (server_h): Remove $(srcdir)/../common/target-common.h and
10651 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10652 and $(srcdir)/../target/waitstatus.h.
10653 (target-common.o): Remove.
10654 (waitstatus.o): New target object file.
10655 * target.h: Do not include target-common.h and
10656 include target/resume.h, target/wait.h and
10657 target/waitstatus.h.
10658
10659 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10660
10661 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10662 to PTRACE_TYPE_ARG3.
10663 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10664 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10665 PTRACE_TYPE_ARG4.
10666 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10667 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10668
10669 2013-07-27 Jie Zhang <jie@codesourcery.com>
10670 Daniel Jacobowitz <dan@codesourcery.com>
10671 Yao Qi <yao@codesourcery.com>
10672
10673 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10674 (mips-linux-watch.o): New rule.
10675 (mips_linux_watch_h): New variable.
10676 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10677 srv_tgtobj.
10678 * linux-mips-low.c: Include mips-linux-watch.h.
10679 (struct arch_process_info, struct arch_lwp_info): New.
10680 (update_watch_registers_callback): New function.
10681 (mips_linux_new_process, mips_linux_new_thread) New functions.
10682 (mips_linux_prepare_to_resume, mips_insert_point): New
10683 functions.
10684 (mips_remove_point, mips_stopped_by_watchpoint): New
10685 functions.
10686 (rsp_bp_type_to_target_hw_bp_type): New function.
10687 (mips_stopped_data_address): New function.
10688 (the_low_target): Add watchpoint support functions.
10689
10690 2013-07-27 Yao Qi <yao@codesourcery.com>
10691
10692 * i386-low.c: Include break-common.h.
10693 (enum target_hw_bp_type): Remove.
10694
10695 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10696
10697 * Makefile.in (SFILES): /common/target-common.c.
10698 (OBS): Add target-common.o.
10699 (server_h): Add $(srcdir)/../common/target-common.h.
10700 (target-common.o): New target.
10701 * server.c (queue_stop_reply_callback): Free
10702 status string after use.
10703 * target.c (target_waitstatus_to_string): Remove.
10704 * target.h: Include target-common.h.
10705 (resume_kind): Likewise.
10706 (target_waitkind): Likewise.
10707 (target_waitstatus): Likewise.
10708 (TARGET_WNOHANG): Likewise.
10709
10710 2013-07-04 Yao Qi <yao@codesourcery.com>
10711
10712 * Makefile.in (host_alias): Use @host_noncanonical@.
10713 (target_alias): Use @target_noncanonical@.
10714 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10715 ACX_NONCANONICAL_HOST.
10716 * configure: Regenerated.
10717
10718 Revert:
10719 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10720
10721 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10722 * configure: Rebuild.
10723 * Makefile.in (version_host, version_target): Get from configure.
10724 (version.c): Use $(version_host) and $(version_target).
10725
10726 2013-07-03 Pedro Alves <palves@redhat.com>
10727
10728 * Makefile.in (config.status): Depend on development.sh.
10729 * acinclude.m4: Include libmcheck.m4.
10730 * configure: Regenerate.
10731
10732 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10733
10734 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10735 attribute inside the parentheses.
10736 (winapi_DebugSetProcessKillOnExit): Ditto.
10737 (winapi_DebugBreakProcess): Ditto.
10738 (winapi_GenerateConsoleCtrlEvent): Ditto.
10739
10740 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10741
10742 * notif.h (notif_event): Add a dummy member to avoid compiler
10743 errors.
10744
10745 2013-07-01 Pedro Alves <palves@redhat.com>
10746
10747 * hostio.c (HOSTIO_PATH_MAX): Define.
10748 (require_filename, handle_open, handle_unlink, handle_readlink):
10749 Use it.
10750
10751 2013-07-01 Pedro Alves <palves@redhat.com>
10752
10753 * server.h: Include "pathmax.h".
10754 * linux-low.c: Don't include sys/param.h.
10755 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10756 MAXPATHLEN.
10757 * win32-low.c: Don't include sys/param.h.
10758 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10759
10760 2013-07-01 Pedro Alves <palves@redhat.com>
10761
10762 * event-loop.c: Don't check HAVE_UNISTD_H before including
10763 <unistd.h>.
10764 * gdbreplay.c: Likewise.
10765 * remote-utils.c: Likewise.
10766 * server.c: Likewise.
10767 * configure.ac: Don't check for unistd.h.
10768 * configure: Regenerate.
10769
10770 2013-06-28 Tom Tromey <tromey@redhat.com>
10771
10772 * Makefile.in (version.c): Use version.in, not
10773 common/version.in.
10774
10775 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10776
10777 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10778 * configure: Rebuild.
10779 * Makefile.in (version_host, version_target): Get from configure.
10780 (version.c): Use $(version_host) and $(version_target).
10781
10782 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10783
10784 Fix trace-status to output user name without trailing colon.
10785 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10786
10787 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10788
10789 Fix trace-status to output proper start-time and stop-time.
10790 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10791 output start time and stop time in hex as gdb expects.
10792
10793 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10794
10795 * tracepoint.c (build_traceframe_info_xml): Output trace state
10796 variables present in the trace buffer.
10797
10798 2013-06-24 Tom Tromey <tromey@redhat.com>
10799
10800 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10801 create-version.sh.
10802 (version.o): Remove.
10803 * gdbreplay.c: Include version.h.
10804 (version, host_name): Don't declare.
10805 * server.h: Include version.h.
10806 (version, host_name): Don't declare.
10807
10808 2013-06-12 Pedro Alves <palves@redhat.com>
10809
10810 * linux-x86-low.c (linux_is_elf64): Delete global.
10811 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10812 with local linux_pid_exe_is_elf_64_file use.
10813
10814 2013-06-11 Pedro Alves <palves@redhat.com>
10815
10816 * linux-low.c (regset_disabled, disable_regset): New functions.
10817 (regsets_fetch_inferior_registers)
10818 (regsets_store_inferior_registers): Use them.
10819 (initialize_regsets_info); Don't allocate the disabled_regsets
10820 array here.
10821 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10822 comment.
10823
10824 2013-06-11 Pedro Alves <palves@redhat.com>
10825
10826 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10827 xmalloc.
10828
10829 2013-06-11 Pedro Alves <palves@redhat.com>
10830
10831 * linux-x86-low.c (initialize_low_arch): Call
10832 init_registers_x32_avx_linux.
10833
10834 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10835
10836 Fix compatibility with Android Bionic.
10837 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10838 it is not empty.
10839
10840 2013-06-07 Pedro Alves <palves@redhat.com>
10841
10842 PR server/14823
10843 * Makefile.in (OBS): Add tdesc.o.
10844 (IPA_OBJS): Add tdesc-ipa.o.
10845 (tdesc-ipa.o): New rule.
10846 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10847 interface.
10848 * linux-low.c (new_inferior): Delete.
10849 (disabled_regsets, num_regsets): Delete.
10850 (linux_add_process): Adjust to set the new per-process
10851 new_inferior flag.
10852 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10853 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10854 was a stop. When calling arch_setup, switch the current inferior
10855 to the thread that got an event.
10856 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10857 (regsets_fetch_inferior_registers)
10858 (regsets_store_inferior_registers): New regsets_info parameter.
10859 Adjust to use it.
10860 (linux_register_in_regsets): New regs_info parameter. Adjust to
10861 use it.
10862 (register_addr, fetch_register, store_register): New usrregs_info
10863 parameter. Adjust to use it.
10864 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10865 parameter regs_info. Adjust to use it.
10866 (linux_fetch_registers): Get the current inferior's regs_info, and
10867 adjust to use it.
10868 (linux_store_registers): Ditto.
10869 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10870 (initialize_low): Don't initialize the target_regsets here. Call
10871 initialize_low_arch.
10872 * linux-low.h (target_regsets): Delete declaration.
10873 (struct regsets_info): New.
10874 (struct usrregs_info): New.
10875 (struct regs_info): New.
10876 (struct process_info_private) <new_inferior>: New field.
10877 (struct linux_target_ops): Delete the num_regs, regmap, and
10878 regset_bitmap fields. New field regs_info.
10879 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10880 * i387-fp.c (num_xmm_registers): Delete.
10881 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10882 calls to new interface.
10883 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10884 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10885 Infer the number of xmm registers from the regcache's target
10886 description.
10887 * i387-fp.h (num_xmm_registers): Delete.
10888 * inferiors.c (add_thread): Don't install the thread's regcache
10889 here.
10890 * proc-service.c (gregset_info): Fetch the current inferior's
10891 regs_info. Adjust to use it.
10892 * regcache.c: Include tdesc.h.
10893 (register_bytes, reg_defs, num_registers)
10894 (gdbserver_expedite_regs): Delete.
10895 (get_thread_regcache): If the thread doesn't have a regcache yet,
10896 create one, instead of aborting gdbserver.
10897 (regcache_invalidate_one): Rename to ...
10898 (regcache_invalidate_thread): ... this.
10899 (regcache_invalidate_one): New.
10900 (regcache_invalidate): Only invalidate registers of the current
10901 process.
10902 (init_register_cache): Add target_desc parameter, and use it.
10903 (new_register_cache): Ditto. Assert the target description has a
10904 non zero registers_size.
10905 (regcache_cpy): Add assertions. Adjust.
10906 (realloc_register_cache, set_register_cache): Delete.
10907 (registers_to_string, registers_from_string): Adjust.
10908 (find_register_by_name, find_regno, find_register_by_number)
10909 (register_cache_size): Add target_desc parameter, and use it.
10910 (free_register_cache_thread, free_register_cache_thread_one)
10911 (regcache_release, register_cache_size): New.
10912 (register_size): Add target_desc parameter, and use it.
10913 (register_data, supply_register, supply_register_zeroed)
10914 (supply_regblock, supply_register_by_name, collect_register)
10915 (collect_register_as_string, collect_register_by_name): Adjust.
10916 * regcache.h (struct target_desc): Forward declare.
10917 (struct regcache) <tdesc>: New field.
10918 (init_register_cache, new_register_cache): Add target_desc
10919 parameter.
10920 (regcache_invalidate_thread): Declare.
10921 (regcache_invalidate_one): Delete declaration.
10922 (regcache_release): Declare.
10923 (find_register_by_number, register_cache_size, register_size)
10924 (find_regno): Add target_desc parameter.
10925 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10926 declarations.
10927 * remote-utils.c: Include tdesc.h.
10928 (outreg, prepare_resume_reply): Adjust.
10929 * server.c: Include tdesc.h.
10930 (gdbserver_xmltarget): Delete declaration.
10931 (get_features_xml, process_serial_event): Adjust.
10932 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10933 declare.
10934 (struct process_info) <tdesc>: New field.
10935 (ipa_tdesc): Declare.
10936 * tdesc.c: New file.
10937 * tdesc.h: New file.
10938 * tracepoint.c: Include tdesc.h.
10939 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10940 (get_context_regcache): Adjust to pass ipa_tdesc down.
10941 (do_action_at_tracepoint): Adjust to get the register cache size
10942 from the context regcache's description.
10943 (traceframe_walk_blocks): Adjust to get the register cache size
10944 from the current trace frame's description.
10945 (traceframe_get_pc): Adjust to get current trace frame's
10946 description and pass it down.
10947 (gdb_collect): Adjust to get the register cache size from the
10948 IPA's description.
10949 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10950 (gdbserver_xmltarget): Delete.
10951 (initialize_low_tracepoint): Set the ipa's target description.
10952 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10953 (initialize_low_tracepoint): Set the ipa's target description.
10954 * linux-x86-low.c: Include tdesc.h.
10955 [__x86_64__] (is_64bit_tdesc): New.
10956 (ps_get_thread_area, x86_get_thread_area): Use it.
10957 (i386_cannot_store_register): Rename to ...
10958 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10959 (i386_cannot_fetch_register): Rename to ...
10960 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10961 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10962 to new interface.
10963 (target_regsets): Rename to ...
10964 (x86_regsets): ... this.
10965 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10966 interface.
10967 (x86_siginfo_fixup): Use is_64bit_tdesc.
10968 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10969 (tdesc_x32_avx_linux, tdesc_x32_linux)
10970 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10971 Declare.
10972 (x86_linux_update_xmltarget): Delete.
10973 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10974 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10975 (AMD64_LINUX_USER64_CS): New.
10976 (x86_linux_read_description): New, based on
10977 x86_linux_update_xmltarget.
10978 (same_process_callback): New.
10979 (x86_arch_setup_process_callback): New.
10980 (x86_linux_update_xmltarget): New.
10981 (x86_regsets_info): New.
10982 (amd64_linux_regs_info): New.
10983 (i386_linux_usrregs_info): New.
10984 (i386_linux_regs_info): New.
10985 (x86_linux_regs_info): New.
10986 (x86_arch_setup): Reimplement.
10987 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10988 (x86_emit_ops): Ditto.
10989 (the_low_target): Adjust. Install x86_linux_regs_info,
10990 x86_cannot_fetch_register, and x86_cannot_store_register.
10991 (initialize_low_arch): New.
10992 * linux-ia64-low.c (tdesc_ia64): Declare.
10993 (ia64_fetch_register): Adjust.
10994 (ia64_usrregs_info, regs_info): New globals.
10995 (ia64_regs_info): New function.
10996 (the_low_target): Adjust.
10997 (initialize_low_arch): New function.
10998 * linux-sparc-low.c (tdesc_sparc64): Declare.
10999 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11000 Adjust.
11001 (sparc_arch_setup): New function.
11002 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11003 (the_low_target): Adjust.
11004 (initialize_low_arch): New function.
11005 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11006 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11007 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11008 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11009 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11010 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11011 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11012 (tdesc_powerpc_isa205_vsx64l): Declare.
11013 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11014 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11015 (ppc_set_pc, ppc_get_hwcap): Adjust.
11016 (ppc_usrregs_info): Forward declare.
11017 (!__powerpc64__) ppc_regmap_adjusted: New global.
11018 (ppc_arch_setup): Adjust to the current process'es target
11019 description.
11020 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11021 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11022 (ppc_store_evrregset): Adjust.
11023 (target_regsets): Rename to ...
11024 (ppc_regsets): ... this, and make static.
11025 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11026 (ppc_regs_info): New function.
11027 (the_low_target): Adjust.
11028 (initialize_low_arch): New function.
11029 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11030 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11031 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11032 (tdesc_s390x_linux64v2): Declare.
11033 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11034 (s390_fill_gregset, s390_store_last_break): Adjust.
11035 (target_regsets): Rename to ...
11036 (s390_regsets): ... this, and make static.
11037 (s390_get_pc, s390_set_pc): Adjust.
11038 (s390_get_hwcap): New target_desc parameter, and use it.
11039 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11040 (s390_arch_setup): Adjust to set the current process'es target
11041 description. Don't adjust the regmap.
11042 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11043 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11044 (regs_info_3264): New globals.
11045 (s390_regs_info): New function.
11046 (the_low_target): Adjust.
11047 (initialize_low_arch): New function.
11048 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11049 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11050 [__mips64] (init_registers_mips_linux)
11051 (init_registers_mips_dsp_linux): Delete defines.
11052 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11053 (have_dsp): New global.
11054 (mips_read_description): New, based on mips_arch_setup.
11055 (mips_arch_setup): Reimplement.
11056 (get_usrregs_info): New function.
11057 (mips_cannot_fetch_register, mips_cannot_store_register)
11058 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11059 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11060 (target_regsets): Rename to ...
11061 (mips_regsets): ... this, and make static.
11062 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11063 (dsp_regs_info, regs_info): New globals.
11064 (mips_regs_info): New function.
11065 (the_low_target): Adjust.
11066 (initialize_low_arch): New function.
11067 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11068 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11069 Declare.
11070 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11071 (arm_read_description): New, with bits factored from
11072 arm_arch_setup.
11073 (arm_arch_setup): Reimplement.
11074 (target_regsets): Rename to ...
11075 (arm_regsets): ... this, and make static.
11076 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11077 (arm_regs_info): New function.
11078 (the_low_target): Adjust.
11079 (initialize_low_arch): New function.
11080 * linux-m68k-low.c (tdesc_m68k): Declare.
11081 (target_regsets): Rename to ...
11082 (m68k_regsets): ... this, and make static.
11083 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11084 (m68k_regs_info): New function.
11085 (m68k_arch_setup): New function.
11086 (the_low_target): Adjust.
11087 (initialize_low_arch): New function.
11088 * linux-sh-low.c (tdesc_sharch): Declare.
11089 (target_regsets): Rename to ...
11090 (sh_regsets): ... this, and make static.
11091 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11092 (sh_regs_info, sh_arch_setup): New functions.
11093 (the_low_target): Adjust.
11094 (initialize_low_arch): New function.
11095 * linux-bfin-low.c (tdesc_bfin): Declare.
11096 (bfin_arch_setup): New function.
11097 (bfin_usrregs_info, regs_info): New globals.
11098 (bfin_regs_info): New function.
11099 (the_low_target): Adjust.
11100 (initialize_low_arch): New function.
11101 * linux-cris-low.c (tdesc_cris): Declare.
11102 (cris_arch_setup): New function.
11103 (cris_usrregs_info, regs_info): New globals.
11104 (cris_regs_info): New function.
11105 (the_low_target): Adjust.
11106 (initialize_low_arch): New function.
11107 * linux-cris-low.c (tdesc_crisv32): Declare.
11108 (cris_arch_setup): New function.
11109 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11110 (cris_regs_info): New function.
11111 (the_low_target): Adjust.
11112 (initialize_low_arch): New function.
11113 * linux-m32r-low.c (tdesc_m32r): Declare.
11114 (m32r_arch_setup): New function.
11115 (m32r_usrregs_info, regs_info): New globals.
11116 (m32r_regs_info): Adjust.
11117 (initialize_low_arch): New function.
11118 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11119 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11120 (tic6x_usrregs_info): Forward declare.
11121 (tic6x_read_description): New function, based on ...
11122 (tic6x_arch_setup): ... this. Reimplement.
11123 (target_regsets): Rename to ...
11124 (tic6x_regsets): ... this, and make static.
11125 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11126 (tic6x_regs_info): New function.
11127 (the_low_target): Adjust.
11128 (initialize_low_arch): New function.
11129 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11130 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11131 (target_regsets): Rename to ...
11132 (xtensa_regsets): ... this, and make static.
11133 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11134 globals.
11135 (xtensa_arch_setup, xtensa_regs_info): New functions.
11136 (the_low_target): Adjust.
11137 (initialize_low_arch): New function.
11138 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11139 (nios2_arch_setup): Set the current process'es tdesc.
11140 (target_regsets): Rename to ...
11141 (nios2_regsets): ... this.
11142 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11143 (nios2_regs_info): New function.
11144 (the_low_target): Adjust.
11145 (initialize_low_arch): New function.
11146 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11147 (aarch64_arch_setup): Set the current process'es tdesc.
11148 (target_regsets): Rename to ...
11149 (aarch64_regsets): ... this.
11150 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11151 (aarch64_regs_info): New function.
11152 (the_low_target): Adjust.
11153 (initialize_low_arch): New function.
11154 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11155 globals.
11156 (target_regsets): Rename to ...
11157 (tile_regsets): ... this.
11158 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11159 (tile_regs_info): New function.
11160 (tile_arch_setup): Set the current process'es tdesc.
11161 (the_low_target): Adjust.
11162 (initialize_low_arch): New function.
11163 * spu-low.c (tdesc_spu): Declare.
11164 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11165 * win32-arm-low.c (tdesc_arm): Declare.
11166 (arm_arch_setup): New function.
11167 (the_low_target): Install arm_arch_setup instead of
11168 init_registers_arm.
11169 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11170 (init_windows_x86): Rename to ...
11171 (i386_arch_setup): ... this. Set `win32_tdesc'.
11172 (the_low_target): Adjust.
11173 * win32-low.c (win32_tdesc): New global.
11174 (child_add_thread): Don't create the thread cache here.
11175 (do_initial_child_stuff): Set the new process'es tdesc.
11176 * win32-low.h (struct target_desc): Forward declare.
11177 (win32_tdesc): Declare.
11178 * lynx-i386-low.c (tdesc_i386): Declare global.
11179 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11180 * lynx-low.c (lynx_tdesc): New global.
11181 (lynx_add_process): Set the new process'es tdesc.
11182 * lynx-low.h (struct target_desc): Forward declare.
11183 (lynx_tdesc): Declare global.
11184 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11185 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11186 * nto-low.c (nto_tdesc): New global.
11187 (do_attach): Set the new process'es tdesc.
11188 * nto-low.h (struct target_desc): Forward declare.
11189 (nto_tdesc): Declare.
11190 * nto-x86-low.c (tdesc_i386): Declare.
11191 (nto_x86_arch_setup): Set `nto_tdesc'.
11192
11193 2013-06-04 Gary Benson <gbenson@redhat.com>
11194
11195 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11196 to qSupported response when appropriate.
11197 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11198 with nonzero-length annex.
11199 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11200 arguments supplied in annex.
11201
11202 2013-05-31 Doug Evans <dje@google.com>
11203
11204 PR server/15594
11205 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11206 64 bits in 64-cross-32 environment.
11207
11208 2013-05-28 Pedro Alves <palves@redhat.com>
11209
11210 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11211 (aarch64-without-fpu.c): Delete rule.
11212 * configure.srv (aarch64*-*-linux*): Remove references to
11213 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11214 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11215 declaration.
11216
11217 2013-05-24 Pedro Alves <palves@redhat.com>
11218
11219 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11220 instead of strchr/decode_address. Error if the range isn't split
11221 with a ','. Don't assume there's be a ':' in the action.
11222
11223 2013-05-23 Yao Qi <yao@codesourcery.com>
11224 Pedro Alves <palves@redhat.com>
11225
11226 * linux-low.c (lwp_in_step_range): New function.
11227 (linux_wait_1): If the thread was range stepping and stopped
11228 outside the stepping range, report the stop to GDB. Otherwise,
11229 continue stepping. Add range stepping debug output.
11230 (linux_set_resume_request): Copy the step range from the resume
11231 request to the lwp.
11232 (linux_supports_range_stepping): New.
11233 (linux_target_ops) <supports_range_stepping>: Set to
11234 linux_supports_range_stepping.
11235 * linux-low.h (struct linux_target_ops)
11236 <supports_range_stepping>: New field.
11237 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11238 * linux-x86-low.c (x86_supports_range_stepping): New.
11239 (the_low_target) <supports_range_stepping>: Set to
11240 x86_supports_range_stepping.
11241 * server.c (handle_v_cont): Handle 'r' action.
11242 (handle_v_requests): Append ";r" if the target supports range
11243 stepping.
11244 * target.h (struct thread_resume) <step_range_start,
11245 step_range_end>: New fields.
11246 (struct target_ops) <supports_range_stepping>:
11247 New field.
11248 (target_supports_range_stepping): New macro.
11249
11250 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11251
11252 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11253 confusion in comment.
11254
11255 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11256
11257 * lynx-low.c (struct process_info_private): New type.
11258 (lynx_add_process): New function.
11259 (lynx_create_inferior, lynx_attach): Replace calls to
11260 add_process by calls to lynx_add_process.
11261 (lynx_resume): If PTID is null, then try using
11262 current_process()->private->last_wait_event_ptid.
11263 Add comments.
11264 (lynx_clear_inferiors): Delete. The contents of that function
11265 has been inlined in lynx_mourn;
11266 (lynx_wait_1): Save the ptid in the process's private data.
11267 (lynx_mourn): Free the process' private data. Replace call
11268 to lynx_clear_inferiors by call to clear_inferiors.
11269
11270 2013-05-17 Yao Qi <yao@codesourcery.com>
11271
11272 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11273 the right place.
11274
11275 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11276
11277 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11278 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11279 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11280 PT_TEXT_END_ADDR guards. Update comments.
11281 (linux_target_op) <read_offsets>: Conditionally define to
11282 linux_read_offsets if the target is UCLIBC and if it defines
11283 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11284
11285 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11286 Andrew Jenner <andrew@codesourcery.com>
11287
11288 * Makefile.in (SFILES): Add linux-nios2-low.c.
11289 (clean): Add action to delete nios2-linux.c.
11290 (nios2-linux.c): New rule.
11291 * configure.srv: Add nios2*-*-linux*.
11292 * linux-nios2-low.c: New.
11293
11294 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11295
11296 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11297
11298 2013-04-25 Hui Zhu <hui@codesourcery.com>
11299
11300 PR gdb/15186
11301 * ax.c (ax_printf): Add fflush.
11302
11303 2013-04-22 Tom Tromey <tromey@redhat.com>
11304
11305 * Makefile.in (SFILES): Add filestuff.c.
11306 (OBS): Add filestuff.o.
11307 (filestuff.o): New target.
11308 * config.in, configure: Rebuild.
11309 * configure.ac: Check for fdwalk, pipe2.
11310
11311 2013-04-17 Pedro Alves <palves@redhat.com>
11312
11313 * configure.ac (USE_THREAD_DB): Delete variable.
11314 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11315 Don't AC_SUBST USE_THREAD_DB.
11316 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11317 * config.in, configure: Regenerate.
11318
11319 2013-04-16 Pedro Alves <palves@redhat.com>
11320
11321 * linux-low.h (struct lwp_info) <thread_known>: Move under
11322 the USE_THREAD_DB #ifdef.
11323
11324 2013-04-16 Pedro Alves <palves@redhat.com>
11325
11326 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11327 (linux-low.o): Delete rule.
11328 * linux-low.h: Always include "gdb_thread_db.h" instead of
11329 conditionally including thread_db.h.
11330 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11331 HAVE_THREAD_DB_H.
11332
11333 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11334
11335 * Makefile.in (install-only): Fix make install regression.
11336
11337 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11338
11339 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11340 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11341 installation.
11342 * gdbserver.1: Remove.
11343
11344 2013-03-22 Pedro Alves <palves@redhat.com>
11345
11346 * linux-low.c (handle_extended_wait): Don't call
11347 linux_enable_event_reporting.
11348
11349 2013-03-15 Tony Theodore <tonyt@logyst.com>
11350
11351 PR build/9098:
11352 * Makefile.in (SHELL): Use @SHELL@.
11353
11354 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11355
11356 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11357 compiler warning.
11358
11359 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11360
11361 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11362 Remove extraneous NULL element.
11363
11364 2013-03-13 Yao Qi <yao@codesourcery.com>
11365
11366 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11367 'V' block in trace frame.
11368
11369 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11370
11371 * target.h (struct target_ops): Add btrace ops.
11372 (target_supports_btrace): New macro.
11373 (target_enable_btrace): New macro.
11374 (target_disable_btrace): New macro.
11375 (target_read_btrace): New macro.
11376 * gdbthread.h (struct thread_info): Add btrace field.
11377 * server.c: Include btrace-common.h.
11378 (handle_btrace_general_set): New function.
11379 (handle_btrace_enable): New function.
11380 (handle_btrace_disable): New function.
11381 (handle_general_set): Call handle_btrace_general_set.
11382 (handle_qxfer_btrace): New function.
11383 (struct qxfer qxfer_packets[]): Add btrace entry.
11384 * inferiors.c (remove_thread): Disable btrace.
11385 * linux-low: Include linux-btrace.h.
11386 (linux_low_enable_btrace): New function.
11387 (linux_low_read_btrace): New function.
11388 (linux_target_ops): Add btrace ops.
11389 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11390 Add srv_linux_btrace=yes.
11391 (x86_64-*-linux*): Add linux-btrace.o.
11392 Add srv_linux_btrace=yes.
11393 * configure.ac: Define HAVE_LINUX_BTRACE.
11394 * config.in: Regenerated.
11395 * configure: Regenerated.
11396
11397 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11398
11399 * server.c (handle_qxfer): Preserve error message if -3 is
11400 returned.
11401 (qxfer): Document the -3 return value.
11402
11403 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11404
11405 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11406 (linux_btrace_h): New variable.
11407 (linux-btrace.o): New rule.
11408
11409 2013-03-08 Stan Shebs <stan@codesourcery.com>
11410 Hafiz Abid Qadeer <abidh@codesourcery.com>
11411
11412 * tracepoint.c (trace_buffer_size): New global.
11413 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11414 (init_trace_buffer): Change to one-argument function. Allocate
11415 trace buffer memory.
11416 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11417 handle QTBuffer:size packet.
11418 (cmd_bigqtbuffer_size): New function.
11419 (initialize_tracepoint): Call init_trace_buffer with
11420 DEFAULT_TRACE_BUFFER_SIZE.
11421 * server.c (handle_query): Add QTBuffer:size in the
11422 supported packets.
11423
11424 2013-03-07 Yao Qi <yao@codesourcery.com>
11425
11426 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11427 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11428 of -1.
11429 (cmd_qtsp): Adjust condition. Do post increment.
11430 Set cur_action and cur_step_action back to 0.
11431
11432 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11433
11434 PR server/15236
11435 * linux-low.c (linux_write_memory): Return early success if LEN is
11436 zero.
11437
11438 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11439
11440 * configure.srv: Add x86_64-*-cygwin* as target.
11441
11442 2013-02-28 Tom Tromey <tromey@redhat.com>
11443
11444 * configure.ac: Invoke AC_SYS_LARGEFILE.
11445 * configure, config.in: Rebuild.
11446
11447 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11448
11449 * win32-low.c: Throughout, fix format strings and casts of
11450 printf-like functions to avoid type related warnings on all
11451 platforms.
11452 (get_child_debug_event): Print dwDebugEventCode as hex since
11453 that's how it's usually documented.
11454
11455 2013-02-28 Yao Qi <yao@codesourcery.com>
11456
11457 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11458 pulongest.
11459
11460 2013-02-27 Jiong Wang <jiwang@tilera.com>
11461
11462 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11463 (reg-tilegx32.c): New rule.
11464 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11465 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11466 different register info initializer according to elf class.
11467 (init_registers_tilgx32): New function. The tilegx32 register info
11468 initializer.
11469 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11470 (tile_store_gregset): Likewise.
11471
11472 2013-02-27 Yao Qi <yao@codesourcery.com>
11473
11474 * server.c (process_point_options): Print debug message when
11475 debug_threads is true.
11476
11477 2013-02-26 Yao Qi <yao@codesourcery.com>
11478
11479 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11480
11481 2013-02-19 Pedro Alves <palves@redhat.com>
11482 Kai Tietz <ktietz@redhat.com>
11483
11484 PR gdb/15161
11485
11486 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11487 instead of strtoul to extract address from packet.
11488 (process_serial_event) <'z'>: Likewise.
11489
11490 2013-02-18 Yao Qi <yao@codesourcery.com>
11491
11492 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11493
11494 2013-02-14 Pedro Alves <palves@redhat.com>
11495
11496 Plug memory leak.
11497
11498 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11499 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11500
11501 2013-02-14 Pedro Alves <palves@redhat.com>
11502
11503 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11504
11505 2013-02-14 Pedro Alves <palves@redhat.com>
11506
11507 * tracepoint.c (save_string): Delete.
11508 (add_tracepoint_action): Use savestring instead of save_string.
11509
11510 2013-02-12 Pedro Alves <palves@redhat.com>
11511
11512 * linux-xtensa-low.c: Ditto.
11513 * xtensa-xtregs.c: Ditto.
11514
11515 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11516
11517 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11518 thread_db.
11519
11520 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11521
11522 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11523 aarch64_num_wp_regs and aarch64_num_bp_regs to
11524 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11525
11526 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11527
11528 * linux-aarch64-low.c (ps_get_thread_area): Replace
11529 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11530
11531 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11532 Marcus Shawcroft <marcus.shawcroft@arm.com>
11533 Nigel Stephens <nigel.stephens@arm.com>
11534 Yufeng Zhang <yufeng.zhang@arm.com>
11535
11536 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11537 (aarch64.c, aarch64-without-fpu.c): New targets.
11538 * configure.srv (aarch64*-*-linux*): New.
11539 * linux-aarch64-low.c: New file.
11540
11541 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11542
11543 * linux-low.c (handle_extended_wait, linux_create_inferior)
11544 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11545 (dequeue_one_deferred_signal, linux_resume_one_thread)
11546 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11547 (linux_tracefork_grandchild, linux_test_for_tracefork)
11548 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11549 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11550 where the argument is 0.
11551
11552 2013-01-25 Yao Qi <yao@codesourcery.com>
11553
11554 * event-loop.c: Include "queue.h".
11555 (gdb_event_p): New typedef.
11556 (struct gdb_event) <next_event>: Remove.
11557 (event_queue): Change to QUEUE(gdb_event_p).
11558 (async_queue_event): Remove.
11559 (gdb_event_xfree): New.
11560 (initialize_event_loop): New.
11561 (process_event): Use API from QUEUE.
11562 (wait_for_event): Likewise.
11563 * server.c (main): Call initialize_event_loop.
11564 * server.h (initialize_event_loop): Declare.
11565
11566 2013-01-18 Yao Qi <yao@codesourcery.com>
11567
11568 * ax.h (struct eval_agent_expr_context): New.
11569 (gdb_eval_agent_expr): Update declaration.
11570 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11571 TFRAME. Add new argument CTX.
11572 * server.h (struct eval_agent_expr_context): Declare.
11573 (agent_mem_read, agent_tsv_read): Update declaration.
11574 (agent_mem_read_string): Likewise.
11575 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11576 (add_traceframe_block): Add new argument TPOINT.
11577 Increase TPOINT->traceframe_usage.
11578 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11579 eval_tracepoint_agent_expr.
11580 (condition_true_at_tracepoint): Likewise.
11581 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11582 (agent_mem_read_string, agent_tsv_read): Likewise.
11583
11584 2013-01-16 Yao Qi <yao@codesourcery.com>
11585
11586 * linux-low.c (linux_resume_one_lwp): Don't check
11587 'lwp->bp_reinsert != 0'.
11588
11589 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11590 Pedro Alves <palves@redhat.com>
11591
11592 * lynx-low.c (ptrace_request_to_str): Define a temporary
11593 macro and use it to simplify this function's implementation.
11594
11595 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11596
11597 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11598 sets errno.
11599
11600 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11601
11602 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11603
11604 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11605
11606 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11607
11608 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11609
11610 * lynx-low.c (lynx_resume): Use the resume_info parameter
11611 to determine the ptid for the lynx_ptrace call, unless
11612 it is equal to minus_one_ptid, in which case we use the
11613 ptid of the current_inferior.
11614 (lynx_wait_1): After having received a thread create/exit
11615 event, resume the inferior's execution using the signaling
11616 thread's ptid, rather than the old ptid.
11617
11618 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11619
11620 * lynx-low.c (lynx_resume): Delete variable ret.
11621
11622 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11623
11624 * gdbreplay.c (gdbreplay_version): Update copyright year.
11625 * server.c (gdbserver_version): Likewise.
11626
11627 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11628
11629 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11630 new thread.
11631
11632 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11633
11634 * lynx-low.c (ptrace_request_to_str): Add handling for
11635 PTRACE_GETTRACESIG.
11636
11637 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11638
11639 * lynx-low.c (lynx_attach): Delete variable new_process.
11640
11641 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11642
11643 * lynx-low.c (lynx_create_inferior): Delete variable
11644 new_process.
11645
11646 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11647
11648 * lynx-low.c (ptrace_request_to_str): Do not handle
11649 PTRACE_GETTHREADLIST if this macro does not exist.
11650
11651 2012-12-15 Yao Qi <yao@codesourcery.com>
11652
11653 * Makefile.in (OBS): Add notif.o.
11654 * notif.c, notif.h: New.
11655 * server.c: Include "notif.h".
11656 (struct vstop_notif) <next>: Remove.
11657 <base>: New field.
11658 (queue_stop_reply): Update.
11659 (push_event, send_next_stop_reply): Remove.
11660 (discard_queued_stop_replies): Update.
11661 (notif_stop): New variable.
11662 (handle_v_stopped): Remove.
11663 (handle_v_requests): Don't call handle_v_stopped. Call
11664 handle_ack_notif instead.
11665 (queue_stop_reply_callback): Call notif_event_enque instead
11666 of queue_stop_reply.
11667 (handle_status): Don't call send_next_stop_reply, call
11668 notif_write_event instead.
11669 (kill_inferior_callback): Likewise.
11670 (detach_or_kill_inferior_callback): Likewise.
11671 (main): Call initialize_notif.
11672 (process_serial_event): Call QUEUE_is_empty.
11673 (handle_target_event): Call notif_push instead of push event.
11674 * server.h (push_event): Remove declaration.
11675
11676 2012-12-10 Tom Tromey <tromey@redhat.com>
11677
11678 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11679 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11680 macros.
11681 (.c.o): Rewrite.
11682 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11683 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11684 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11685 (amd64-linux-ipa.o, ax.o): Rewrite.
11686 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11687 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11688 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11689 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11690 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11691 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11692 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11693 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11694 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11695 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11696 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11697 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11698 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11699 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11700 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11701 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11702 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11703 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11704 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11705 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11706 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11707 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11708 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11709 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11710 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11711 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11712 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11713 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11714 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11715 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11716 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11717 (reg-tilegx.o): Remove.
11718 (all_object_files): New macro.
11719 Include .deps files.
11720 * aclocal.m4, configure: Rebuild.
11721 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11722 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11723 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11724
11725 2012-12-05 Tom Tromey <tromey@redhat.com>
11726
11727 PR gdb/14917:
11728 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11729
11730 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11731
11732 * configure.ac: Check for linux/perf_event.h.
11733 * config.in: Regenerated.
11734 * configure: Regenerated.
11735
11736 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11737
11738 * hostio.c (handle_readlink): Decrease buffer size
11739 parameter passed to readlink by one byte.
11740
11741 2012-11-26 Yao Qi <yao@codesourcery.com>
11742
11743 * configure.ac (build_warnings): Append '-Wempty-body'.
11744 * configure: Regenerated.
11745 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11746 body.
11747
11748 2012-11-15 Pierre Muller <muller@sourceware.org>
11749
11750 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11751 * config.in: Regenerate.
11752 * configure: Regenerate.
11753 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11754 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11755 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11756 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11757 header.
11758 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11759 instead of <sys/wait.h> header.
11760 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11761
11762 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11763
11764 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11765 (various make rules): Remove -DGDBSERVER
11766
11767 2012-11-09 Yao Qi <yao@codesourcery.com>
11768
11769 * spu-low.c (current_ptid): Move it to ..
11770 * gdbthread.h: ... here. New.
11771 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11772 * server.c (myresume, process_serial_event): Likewise.
11773 * thread-db.c (thread_db_find_new_threads): Likewise.
11774 * tracepoint.c (run_inferior_command): Likewise.
11775
11776 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11777
11778 * server.c (handle_search_memory_1): Include access length in
11779 warning message.
11780
11781 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11782
11783 * linux-crisv32-low.c: Fix compile errors.
11784
11785 2012-09-04 Yao Qi <yao@codesourcery.com>
11786
11787 * tracepoint.c (cmd_qtsv): Adjust debug message.
11788 Don't check CUR_TPOINT.
11789
11790 2012-08-28 Yao Qi <yao@codesourcery.com>
11791
11792 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11793 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11794 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11795 Remove declarations of xmalloc, xreallloc, xstrdup and
11796 freeargv.
11797 * Makefile.in (libiberty_h): New.
11798 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11799 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11800
11801 2012-08-23 Yao Qi <yao@codesourcery.com>
11802
11803 * server.h: Remove declaration of 'xsnprintf'.
11804
11805 2012-08-22 Keith Seitz <keiths@redhat.com>
11806
11807 * server.h: Include build-gnulib-gbserver/config.h.
11808 * gdbreplay.c: Likewise.
11809
11810 2012-08-08 Doug Evans <dje@google.com>
11811
11812 * Makefile.in (SFILES): Add gdb_vecs.c.
11813 (OBS): Add gdb_vecs.o.
11814 (gdb_vecs_h, host_defs_h): New variables.
11815 (thread-db.o): Add $(gdb_vecs_h) dependency.
11816 (gdb_vecs.o): New rule.
11817 * thread-db.c: #include "gdb_vecs.h".
11818 (thread_db_load_search): Use a vector to iterate over path elements.
11819 Handle text appearing after "$pdir".
11820
11821 * configure.ac: Add check for strstr.
11822 * config.in: Regenerate.
11823 * configure: Regenerate.
11824
11825 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11826
11827 * hostio.c (handle_pread): If pread fails, fall back to attempting
11828 lseek/read.
11829 (handle_pwrite): Likewise for pwrite.
11830
11831 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11832
11833 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11834 between unsupported TYPE and unimplementable ADDR/LEN combination.
11835 (arm_insert_point): Act on new return value.
11836
11837 2012-07-31 Pedro Alves <palves@redhat.com>
11838
11839 * server.c (process_point_options): Only skip tokens if we find
11840 one that is unrecognized. Don't treat 'X' specially while
11841 skipping unrecognized tokens.
11842
11843 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11844
11845 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11846 to 4-byte-align HW breakpoint addresses for Thumb.
11847
11848 2012-07-27 Yao Qi <yao@codesourcery.com>
11849
11850 PR remote/14161.
11851
11852 * server.h: Declare gdb_agent_about_to_close.
11853 * target.c (kill_inferior): Include "agent.h".
11854 New. Send command 'kill'.
11855 * target.h (kill_inferior): Removed macro.
11856 * tracepoint.c (gdb_agent_about_to_close): New.
11857 (gdb_agent_helper_thread): Handle command 'close'.
11858 Wait endlessly until the inferior stops.
11859 Install gdb_agent_remove_socket to atexit hook.
11860 (agent_socket_name): New static variable.
11861 (gdb_agent_socket_init): Replace local variable 'name' with
11862 'agent_socket_name'.
11863 (gdb_agent_remove_socket): New.
11864
11865 2012-07-27 Yao Qi <yao@codesourcery.com>
11866
11867 * server.c (process_point_options): Stop at 'X' when parsing.
11868
11869 2012-07-19 Michael Eager <eager@eagercon.com>
11870
11871 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11872 to hw_execute.
11873 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11874 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11875 hardware breakpoint.
11876
11877 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11878
11879 * gdbserver/linux-low.c (initialize_low): Call
11880 linux_ptrace_init_warnings.
11881
11882 2012-07-02 Doug Evans <dje@google.com>
11883
11884 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11885 pointer to int.
11886
11887 2012-07-02 Stan Shebs <stan@codesourcery.com>
11888
11889 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11890 (ax.o): Add it to build rule.
11891 (ax-ipa.o): Ditto.
11892 (OBS): Add format.o.
11893 (IPA_OBS): Add format.o.
11894 * server.c (handle_query): Claim support for breakpoint commands.
11895 (process_point_options): Add command case.
11896 (process_serial_event): Leave running if there are printfs in
11897 effect.
11898 * mem-break.h (any_persistent_commands): Declare.
11899 (add_breakpoint_commands): Declare.
11900 (gdb_no_commands_at_breakpoint): Declare.
11901 (run_breakpoint_commands): Declare.
11902 * mem-break.c (struct point_command_list): New struct.
11903 (struct breakpoint): New field command_list.
11904 (any_persistent_commands): New function.
11905 (add_commands_to_breakpoint): New function.
11906 (add_breakpoint_commands): New function.
11907 (gdb_no_commands_at_breakpoint): New function.
11908 (run_breakpoint_commands): New function.
11909 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11910 locally.
11911 * ax.c: Include format.h.
11912 (ax_printf): New function.
11913 (gdb_eval_agent_expr): Add printf opcode.
11914
11915 2012-06-13 Yao Qi <yao@codesourcery.com>
11916
11917 * server.c (start_inferior): Remove duplicated writes to fields
11918 'last_resume_kind' and 'last_status' of 'current_inferior'.
11919
11920 2012-06-12 Yao Qi <yao@codesourcery.com>
11921 Pedro Alves <palves@redhat.com>
11922
11923 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11924 comment.
11925 * server.c (handle_v_cont): Extend comment.
11926
11927 2012-06-11 Yao Qi <yao@codesourcery.com>
11928
11929 * linux-low.c (linux_attach): Add 'static'.
11930
11931 2012-06-06 Yao Qi <yao@codesourcery.com>
11932
11933 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11934
11935 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11936
11937 Fix gcc -flto compilation warning.
11938 * server.c (main): Make variable multi_mode and attach volatile.
11939
11940 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11941
11942 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11943 if the platform doesn't know about it.
11944
11945 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11946
11947 * Makefile.in (SFILES): Add linux-tile-low.c.
11948 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11949 * configure.srv: Handle tilegx-*-linux*.
11950 * linux-tile-low.c: New file.
11951
11952 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11953
11954 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11955
11956 2012-05-24 Pedro Alves <palves@redhat.com>
11957
11958 PR gdb/7205
11959
11960 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11961
11962 2012-05-24 Pedro Alves <palves@redhat.com>
11963
11964 PR gdb/7205
11965
11966 Replace target_signal with gdb_signal throughout.
11967
11968 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11969
11970 * linux-low.c (linux_store_registers): Avoid the copying sequence
11971 when no data has been retrieved by ptrace.
11972
11973 2012-05-22 Will Deacon <will.deacon@arm.com>
11974
11975 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11976 Include asm/ptrace.h.
11977 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11978 already defined.
11979
11980 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11981
11982 * linux-low.c (linux_store_registers): Don't re-retrieve data
11983 with ptrace that has already been obtained from /proc. Always
11984 copy any data retrieved with ptrace to the buffer supplied.
11985
11986 2012-05-11 Yao Qi <yao@codesourcery.com>
11987 Pedro Alves <palves@redhat.com>
11988
11989 * linux-low.c (enum stopping_threads_kind): New.
11990 (stopping_threads): Change type to `enum stopping_threads_kind'.
11991 (handle_extended_wait): If stopping and suspending threads, leave
11992 the new_lwp suspended too.
11993 (linux_wait_for_event): Adjust.
11994 (stop_all_lwps): Set `stopping_threads' to
11995 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11996 whether we're suspending threads or just stopping them. Assert no
11997 recursion happens.
11998
11999 2012-04-29 Yao Qi <yao@codesourcery.com>
12000
12001 * server.h: Move some code to ...
12002 * gdbthread.h: ... here. New.
12003 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12004 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12005 (nto-low.o, win32-low.o): Likewise.
12006 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12007 * regcache.c, remote-utils.c, server.c: Likewise.
12008 * target.c, tracepoint.c, win32-low.c: Likewise.
12009
12010 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12011
12012 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12013 (PTRACE_ARG4_TYPE): Likewise.
12014 (PTRACE_XFER_TYPE): Likewise.
12015 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12016 ptrace to PTRACE_ARG3_TYPE.
12017 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12018 (PTRACE_ARG4_TYPE): Likewise.
12019 (PTRACE_XFER_TYPE): Likewise.
12020 (linux_detach_one_lwp): Cast fourth argument of
12021 ptrace to long then PTRACE_ARG4_TYPE.
12022 (regsets_fetch_inferior_registers): Cast third argument of
12023 ptrace to long then PTRACE_ARG3_TYPE.
12024 (regsets_store_inferior_registers): Likewise.
12025
12026 2012-04-20 Pedro Alves <palves@redhat.com>
12027
12028 * configure: Regenerate.
12029
12030 2012-04-19 Pedro Alves <palves@redhat.com>
12031
12032 * Makefile.in (GNULIB_BUILDDIR): New.
12033 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12034 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12035 (all, install-only, uninstall, clean-info, all-lib, clean): No
12036 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12037 (maintainer-clean realclean distclean): Use subdir_do.
12038 (subdir_do): New.
12039 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12040 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12041 * acinclude.m4: Include acx_configure_dir.m4.
12042 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12043 calls. Call AC_PROG_RANLIB. Configure gnulib using
12044 ACX_CONFIGURE_DIR.
12045 (GNULIB): New.
12046 (GNULIB_STDINT_H): Adjust.
12047 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12048 * gdbreplay.c: Include build-gnulib/config.h.
12049 * server.h: Likewise.
12050 * aclocal.m4: Regenerate.
12051 * config.in: Regenerate.
12052 * configure: Regenerate.
12053
12054 2012-04-19 Pedro Alves <palves@redhat.com>
12055
12056 * Makefile.in (LIBGNU, INCGNU): Adjust.
12057 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12058 (all, install-only, uninstall, clean-info, all-lib, clean)
12059 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12060 * configure.ac: Adjust AC_OUTPUT output.
12061 * aclocal.m4: Regenerate.
12062 * configure: Regenerate.
12063
12064 2012-04-19 Pedro Alves <palves@redhat.com>
12065
12066 * Makefile.in (generated_files): New.
12067 (server_h): Remove the explicit dependency on config.h, and depend
12068 on $generated_files.
12069
12070 2012-04-19 Pedro Alves <palves@redhat.com>
12071
12072 * Makefile.in (INCGNU): Add -Ignulib.
12073
12074 2012-04-19 Pedro Alves <palves@redhat.com>
12075
12076 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12077 (INCGNU): ... this, and spell out -I here.
12078 (GNULIB_LIB): Rename to ...
12079 (LIBGNU): ... this.
12080 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12081
12082 2012-04-19 Pedro Alves <palves@redhat.com>
12083
12084 * config.in: Regenerate.
12085
12086 2012-04-19 Pedro Alves <palves@redhat.com>
12087
12088 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12089 * server.h (memmem): Remove declaration.
12090 * config.in: Regenerate.
12091 * configure: Regenerate.
12092
12093 2012-04-19 Yao Qi <yao@codesourcery.com>
12094
12095 * Makefile.in (SFILES): Add common/vec.c.
12096 (OBS): Add vec.o.
12097 (vec.o): New rule.
12098
12099 2012-04-19 Yao Qi <yao@codesourcery.com>
12100
12101 * remote-utils.c (prepare_resume_reply): Replace with macro
12102 target_core_of_thread.
12103 * server.c (handle_qxfer_threads_proper): Likewise.
12104 * target.h (traget_core_of_thread): New macro.
12105
12106 2012-04-18 Pedro Alves <palves@redhat.com>
12107
12108 * aclocal.m4: Regenerate.
12109 * configure: Regenerate.
12110
12111 2012-04-16 Yao Qi <yao@codesourcery.com>
12112
12113 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12114 duplicated on address.
12115
12116 2012-04-16 Yao Qi <yao@codesourcery.com>
12117
12118 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12119 (struct tracepoint_action_ops) <send>: New field.
12120 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12121 (agent_expr_send, x_tracepoint_action_send): New.
12122 (l_tracepoint_action_send): New.
12123 (cmd_qtdp): Download and install tracepoint
12124 according to `use_agent'.
12125 (run_inferior_command): Add one more parameter `len'.
12126 Update callers.
12127 (tracepoint_send_agent): New.
12128 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12129
12130 2012-04-16 Yao Qi <yao@codesourcery.com>
12131
12132 * tracepoint.c (download_tracepoints): Moved to ...
12133 (cmd_qtstart): ... here.
12134
12135 2012-04-14 Yao Qi <yao@codesourcery.com>
12136
12137 * tracepoint.c: Include inttypes.h.
12138 (struct collect_memory_action): Use sized types.
12139 (struct tracepoint): Likewise.
12140 (cmd_qtdp, stop_tracing): Update print specifiers.
12141 (cmd_qtp, response_tracepoint): Likewise.
12142 (collect_data_at_tracepoint): Likewise.
12143 (collect_data_at_step): Likewise.
12144
12145 2012-04-14 Yao Qi <yao@codesourcery.com>
12146
12147 Import gnulib module inttypes.
12148 * aclocal.m4, config.in, configure: Regenerated.
12149
12150 2012-04-14 Yao Qi <yao@codesourcery.com>
12151
12152 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12153 Makefile and config.status at last.
12154
12155 2012-04-13 Yao Qi <yao@codesourcery.com>
12156
12157 * tracepoint.c: Include stdint.h unconditionally.
12158
12159 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12160
12161 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12162 on BFD_HAVE_SYS_PROCFS_TYPE.
12163 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12164 * configure: Regenerate.
12165 * config.in: Likewise.
12166
12167 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12168
12169 * Makefile.in (clean): Also remove x32.c x32-linux.c
12170 x32-avx.c x32-avx-linux.c.
12171 (x32.o): New target.
12172 (x32.c): Likewise.
12173 (x32-linux.o): Likewise.
12174 (x32-linux.c): Likewise.
12175 (x32-avx.o): Likewise.
12176 (x32-avx.c): Likewise.
12177 (x32-avx-linux.o): Likewise.
12178 (x32-avx-linux.c): Likewise.
12179
12180 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12181 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12182 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12183 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12184 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12185 i386/x32-avx-linux.xml.
12186
12187 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12188 (init_registers_x32_avx_linux): Likwise.
12189 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12190 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12191
12192 2012-04-13 Pedro Alves <palves@redhat.com>
12193
12194 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12195 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12196 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12197 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12198 the sub-make.
12199
12200 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12201
12202 * linux-x86-low.c (compat_x32_clock_t): New.
12203 (compat_x32_siginfo_t): Likewise.
12204 (compat_x32_siginfo_from_siginfo): Likewise.
12205 (siginfo_from_compat_x32_siginfo): Likewise.
12206 (linux_is_elf64): Likewise.
12207 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12208 and siginfo_from_compat_x32_siginfo for x32.
12209 (x86_arch_setup): Set linux_is_elf64.
12210
12211 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12212
12213 PR gdb/13969
12214 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12215 e_machine field.
12216 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12217 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12218 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12219 compatible with process.
12220
12221 2012-04-12 Yao Qi <yao@codesourcery.com>
12222
12223 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12224 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12225 (install-only, install-info, clean): Handle sub dir gnulib.
12226 (all-lib, am--refresh): New targets.
12227 (memmem.o): Remove target.
12228 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12229 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12230 (AC_REPLACE_FUNCS): Remove memmem.
12231 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12232 (AC_OUTPUT): Generate Makefile in gnulib/.
12233 * aclocal.m4, config.in, configure: Regenerated.
12234
12235 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12236
12237 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12238
12239 2012-04-05 Pedro Alves <palves@redhat.com>
12240
12241 -Werror=strict-aliasing
12242
12243 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12244 pointer.
12245
12246 2012-04-04 Pedro Alves <palves@redhat.com>
12247
12248 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12249 (sparc_store_gregset_from_stack, sparc_store_gregset)
12250 (sparc_breakpoint_at): Fix formatting.
12251
12252 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12253
12254 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12255 are available.
12256 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12257 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12258 * config.in: Regenerate.
12259 * configure: Likewise.
12260
12261 2012-03-29 Pedro Alves <palves@redhat.com>
12262
12263 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12264 Correct ptrace arguments.
12265
12266 2012-03-28 Pedro Alves <palves@redhat.com>
12267
12268 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12269 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12270 (IA64_FR1_REGNUM): New defines.
12271 (ia64_fetch_register): New.
12272 (the_low_target): Install it.
12273 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12274 field.
12275 * linux-low.c (linux_fetch_registers): Try the
12276 the_low_target.fetch_register hook first.
12277
12278 * linux-arm-low.c (the_low_target): Adjust.
12279 * linux-bfin-low.c (the_low_target): Adjust.
12280 * linux-cris-low.c (the_low_target): Adjust.
12281 * linux-crisv32-low.c (the_low_target): Adjust.
12282 * linux-m32r-low.c (the_low_target): Adjust.
12283 * linux-m68k-low.c (the_low_target): Adjust.
12284 * linux-mips-low.c (the_low_target): Adjust.
12285 * linux-ppc-low.c (the_low_target): Adjust.
12286 * linux-s390-low.c (the_low_target): Adjust.
12287 * linux-sh-low.c (the_low_target): Adjust.
12288 * linux-sparc-low.c (the_low_target): Adjust.
12289 * linux-tic6x-low.c (the_low_target): Adjust.
12290 * linux-x86-low.c (the_low_target): Adjust.
12291 * linux-xtensa-low.c (the_low_target): Adjust.
12292
12293 2012-03-26 Pedro Alves <palves@redhat.com>
12294
12295 * server.c (handle_qxfer_libraries): Don't bail early if
12296 the_target->qxfer_libraries_svr4 is not NULL.
12297
12298 2012-03-26 Pedro Alves <palves@redhat.com>
12299
12300 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12301
12302 2012-03-23 Pedro Alves <palves@redhat.com>
12303
12304 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12305 "library-list-svr4" element's start tag when the the DSO list is
12306 empty.
12307
12308 2012-03-23 Pedro Alves <palves@redhat.com>
12309
12310 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12311 a variable whose type size is the same as the inferior's pointer
12312 size.
12313
12314 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12315
12316 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12317 struct siginfo.
12318 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12319 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12320 * linux-low.h: Include <signal.h>.
12321 (struct siginfo): Remove forward declaration.
12322 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12323 struct siginfo.
12324
12325 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12326
12327 * .gitignore: Ignore more files.
12328
12329 2012-03-19 Pedro Alves <palves@redhat.com>
12330 Jan Kratochvil <jan.kratochvil@redhat.com>
12331
12332 * server.c (cont_thread, general_thread): Add describing comments.
12333 (start_inferior): Clear `cont_thread'.
12334 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12335 of a process.
12336
12337 2012-03-15 Yao Qi <yao@codesourcery.com>
12338
12339 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12340 handling to ...
12341 (cmd_qtdp): ... here.
12342
12343 2012-03-15 Yao Qi <yao@codesourcery.com>
12344
12345 * tracepoint.c (struct tracepoint_action_ops): New.
12346 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12347 (m_tracepoint_action_download): New.
12348 (r_tracepoint_action_download): New.
12349 (x_tracepoint_action_download): New.
12350 (l_tracepoint_action_download): New.
12351 (add_tracepoint_action): Install `action->ops' according type.
12352 (download_tracepoint_1): Move code `download' function pointer
12353 of various tracepoint_action_ops.
12354
12355 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12356
12357 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12358 linux_ptrace_attach_warnings.
12359
12360 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12361
12362 * Makefile.in (linux-ptrace.o): New.
12363 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12364 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12365 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12366 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12367 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12368 of these targets.
12369 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12370
12371 2012-03-08 Yao Qi <yao@codesourcery.com>
12372 Pedro Alves <palves@redhat.com>
12373
12374 Fix PR server/13392.
12375 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12376 offset of JMP insn.
12377 * tracepoint.c (remove_tracepoint): New.
12378 (cmd_qtdp): Call remove_tracepoint when failed to install.
12379
12380 2012-03-07 Pedro Alves <palves@redhat.com>
12381
12382 * linux-low.c (get_detach_signal): New.
12383 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12384 Pass on pending signals to PTRACE_DETACH. Check the result of the
12385 ptrace call.
12386 * server.c (program_signals, program_signals_p): New.
12387 (handle_general_set): Handle QProgramSignals.
12388 * server.h (program_signals, program_signals_p): Declare.
12389
12390 2012-03-05 Pedro Alves <palves@redhat.com>
12391 Jan Kratochvil <jan.kratochvil@redhat.com>
12392
12393 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12394 New comment why.
12395
12396 2012-03-03 Yao Qi <yao@codesourcery.com>
12397
12398 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12399 agent_look_up_symbols.
12400
12401 2012-03-03 Yao Qi <yao@codesourcery.com>
12402
12403 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12404 (linux-x86-low.o): Likewise.
12405 * server.h: Remove in_process_agent_loaded.
12406 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12407 common/agent.c.
12408 Update callers.
12409
12410 2012-03-03 Yao Qi <yao@codesourcery.com>
12411
12412 * tracepoint.c (gdb_agent_capability): New global.
12413 (in_process_agent_loaded_ust): Renamed to
12414 `in_process_agent_supports_ust'.
12415 Update callers.
12416 (in_process_agent_supports_ust): Call agent_capability_check.
12417 (clear_installed_tracepoints): Assert that agent supports
12418 agent.
12419
12420 2012-03-03 Yao Qi <yao@codesourcery.com>
12421
12422 * linux-low.c (linux_supports_agent): New.
12423 (linux_target_ops): Initialize field `supports_agent' with
12424 linux_supports_agent.
12425 * target.h (struct target_ops) <supports_agent>: New.
12426 (target_supports_agent): New macro.
12427 * server.c (handle_general_set): Handle packet 'QAgent'.
12428 (handle_query): Send `QAgent+'.
12429 * Makefile.in (server.o): Depends on agent.h.
12430
12431 2012-03-03 Yao Qi <yao@codesourcery.com>
12432
12433 * Makefile.in (OBS): Add agent.o.
12434 Add new rule for agent.o.
12435 Track dependence of tracepoint.c on agent.h.
12436 * tracepoint.c (run_inferior_command_1):
12437 (run_inferior_command): Call agent_run_command.
12438 (gdb_ust_connect_sync_socket): Deleted. Move it to
12439 common/agent.c.
12440 (resume_thread, stop_thread): Likewise.
12441 (gdb_ust_socket_init): Renamed to ...
12442 (gdb_agent_socket_init): ... New.
12443 (gdb_ust_thread): Renamed to ...
12444 (gdb_agent_helper_thread): ... New.
12445 (gdb_ust_init): Move some code to ...
12446 (gdb_agent_init): ... here. New.
12447 [HAVE_UST]: Call gdb_ust_init.
12448 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12449 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12450 * config.in, configure: Regenerated.
12451
12452 2012-03-02 Pedro Alves <palves@redhat.com>
12453
12454 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12455 * linux-low.c (struct simple_pid_list): New.
12456 (stopped_pids): New a struct simple_pid_list pointer.
12457 (add_to_pid_list, pull_pid_from_list): New.
12458 (handle_extended_wait): Don't assume the first signal new children
12459 report is SIGSTOP. Adjust call to pull_pid_from_list.
12460 (linux_wait_for_lwp): Adjust.
12461
12462 2012-03-02 Yao Qi <yao@codesourcery.com>
12463
12464 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12465 debug log.
12466
12467 2012-03-02 Yao Qi <yao@codesourcery.com>
12468
12469 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12470 `stop_pc' and `tpoint'. Update caller.
12471
12472 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12473
12474 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12475 * linux-low.c (use_linux_regsets): New macro.
12476 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12477 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12478 (linux_register_in_regsets): New function.
12479 (usr_fetch_inferior_registers): Skip registers covered by
12480 regsets.
12481 (usr_store_inferior_registers): Likewise.
12482 (usr_fetch_inferior_registers): New macro.
12483 (usr_store_inferior_registers): Likewise.
12484 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12485 (linux_store_registers): Likewise.
12486 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12487 prototype.
12488 (init_registers_mips64_dsp_linux): Likewise.
12489 (init_registers_mips_linux): New macro.
12490 (init_registers_mips_dsp_linux): Likewise.
12491 (mips_dsp_num_regs): Likewise.
12492 (DSP_BASE, DSP_CONTROL): New fallback macros.
12493 (mips_base_regs): New macro.
12494 (mips_regmap): Use it. Fix the size.
12495 (mips_dsp_regmap): New variable.
12496 (mips_dsp_regset_bitmap): Likewise.
12497 (mips_arch_setup): New function.
12498 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12499 than mips_regmap.
12500 (mips_cannot_store_register): Likewise.
12501 (the_low_target): Update .arch_setup, .num_regs and .regmap
12502 initializers. Add .regset_bitmap initializer.
12503 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12504 initializer.
12505 * linux-bfin-low.c (the_low_target): Likewise.
12506 * linux-cris-low.c (the_low_target): Likewise.
12507 * linux-crisv32-low.c (the_low_target): Likewise.
12508 * linux-ia64-low.c (the_low_target): Likewise.
12509 * linux-m32r-low.c (the_low_target): Likewise.
12510 * linux-m68k-low.c (the_low_target): Likewise.
12511 * linux-ppc-low.c (the_low_target): Likewise.
12512 * linux-s390-low.c (the_low_target): Likewise.
12513 * linux-sh-low.c (the_low_target): Likewise.
12514 * linux-sparc-low.c (the_low_target): Likewise.
12515 * linux-tic6x-low.c (the_low_target): Likewise.
12516 * linux-x86-low.c (the_low_target): Likewise.
12517 * linux-xtensa-low.c (the_low_target): Likewise.
12518 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12519 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12520 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12521 srv_xmlfiles.
12522 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12523 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12524
12525 2012-02-29 Yao Qi <yao@codesourcery.com>
12526 Pedro Alves <palves@redhat.com>
12527
12528 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12529 `step_over_finished' is true.
12530
12531 2012-02-27 Pedro Alves <palves@redhat.com>
12532
12533 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12534 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12535
12536 2012-02-27 Pedro Alves <palves@redhat.com>
12537
12538 PR server/9684
12539 * linux-low.c (pid_is_stopped): New.
12540 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12541
12542 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12543
12544 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12545 of conditions.
12546
12547 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12548
12549 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12550
12551 2012-02-24 Luis Machado <lgustavo@codesourcery>
12552
12553 * server.c (handle_query): Advertise support for target-side
12554 breakpoint condition evaluation.
12555 (process_point_options): New function.
12556 (process_serial_event): When inserting a breakpoint, check for
12557 a target-side condition that should be evaluated.
12558
12559 * mem-break.c: Include regcache.h and ax.h.
12560 (point_cond_list_t): New data structure.
12561 (breakpoint) <cond_list>: New field.
12562 (find_gdb_breakpoint_at): Make non-static.
12563 (delete_gdb_breakpoint_at): Clear any target-side
12564 conditions.
12565 (clear_gdb_breakpoint_conditions): New function.
12566 (add_condition_to_breakpoint): Likewise.
12567 (add_breakpoint_condition): Likewise.
12568 (gdb_condition_true_at_breakpoint): Likewise.
12569 (gdb_breakpoint_here): Return result directly instead
12570 of going through a local variable.
12571
12572 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12573 (clear_gdb_breakpoint_conditions): Likewise.
12574 (add_breakpoint_condition): Likewise.
12575 (gdb_condition_true_at_breakpoint): Likewise.
12576
12577 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12578 (need_step_over_p): Take target-side breakpoint condition into
12579 consideration.
12580
12581 2012-02-24 Luis Machado <lgustavo@codesourcery>
12582
12583 * server.h: Include tracepoint.h.
12584 (agent_mem_read, agent_get_trace_state_variable_value,
12585 agent_set_trace_state_variable_value,
12586 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12587 get_set_tsv_func_addr): New prototypes.
12588
12589 * ax.h: New include file.
12590 * ax.c: New source file.
12591
12592 * tracepoint.c: Include ax.h.
12593 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12594 agent_expr, eval_result_type): Move to ax.h.
12595 (parse_agent_expr): Rename to ...
12596 (gdb_parse_agent_expr): ... this, make it non-static and move
12597 to ax.h.
12598 (unparse_agent_expr) Rename to ...
12599 (gdb_unparse_agent_expr): ... this, make it non-static and move
12600 to ax.h.
12601 (eval_agent_expr): Rename to ...
12602 (eval_tracepoint_agent_expr): ... this.
12603 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12604 forward declarations.
12605 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12606 (agent_get_trace_state_variable_value): New function.
12607 (agent_set_trace_state_variable_value): New function.
12608 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12609 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12610 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12611 (condition_true_at_tracepoint): Likewise.
12612 (parse_agent_expr): Rename to ...
12613 (gdb_parse_agent_expr): ... this and move to ax.c.
12614 (unparse_agent_expr): Rename to ...
12615 (gdb_unparse_agent_expr): ... this and move to ax.c.
12616 (gdb_agent_op_name): Move to ax.c.
12617 (eval_agent_expr): Rename to ...
12618 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12619 and move to ax.c.
12620 (eval_tracepoint_agent_expr): New function.
12621 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12622 non-static.
12623 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12624 ax.c.
12625 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12626 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12627 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12628 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12629 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12630 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12631 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12632 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12633 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12634 (compile_bytecodes): Remove forward declaration.
12635 (is_goto_target): Move to ax.c.
12636 (compile_bytecodes): Move to ax.c and call
12637 agent_get_trace_state_variable_value (...) and
12638 agent_set_trace_state_variable_value (...).
12639
12640 * Makefile.in: Update ax.c and IPA dependencies.
12641
12642 2012-02-24 Pedro Alves <palves@redhat.com>
12643
12644 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12645 (cmd_bigqtbuffer_circular): ... this. Only handle
12646 'QTBuffer:circular:'.
12647 (handle_tracepoint_general_set): Adjust.
12648
12649 2012-02-16 Yao Qi <yao@codesourcery.com>
12650
12651 * inferiors.c: Move code to ...
12652 * dll.c: .... here. New.
12653 * server.h: Declare clear_dlls.
12654 * Makefile.in (SFILES): Add dll.c.
12655 (OBS): Add dll.o
12656 (dll.o): New rule.
12657
12658 2012-02-11 Yao Qi <yao@codesourcery.com>
12659
12660 * server.c: (handle_monitor_command): Add a new parameter
12661 `own_buf'.
12662 (handle_query): Update caller.
12663
12664 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12665
12666 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12667 * configure, config.in: Regenerate.
12668 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12669 is not defined.
12670
12671 2012-02-02 Pedro Alves <palves@redhat.com>
12672
12673 Try SIGKILL first, then PTRACE_KILL.
12674 * linux-low.c (linux_kill_one_lwp): New.
12675 (linux_kill_one_lwp): Rename to ...
12676 (kill_one_lwp_callback): ... this. Use the new
12677 linux_kill_one_lwp.
12678
12679 2012-02-02 Pedro Alves <palves@redhat.com>
12680
12681 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12682 inferior.
12683
12684 2012-01-27 Pedro Alves <palves@redhat.com>
12685
12686 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12687 (elf_64_file_p): Make static.
12688 (linux_pid_exe_is_elf_64_file): New.
12689 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12690 Delete declarations.
12691 (linux_pid_exe_is_elf_64_file): Declare.
12692 * linux-x86-low.c (x86_arch_setup): Use
12693 linux_pid_exe_is_elf_64_file.
12694
12695 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12696
12697 * linux-low.c (linux_wait_for_event_1): Rename to ...
12698 (linux_wait_for_event): ... here and merge it with former
12699 linux_wait_for_event - new variable wait_ptid, use it.
12700 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12701
12702 2012-01-23 Pedro Alves <palves@redhat.com>
12703
12704 * server.c (main): Avoid yet another case of infinite loop while
12705 detaching/killing after a longjmp.
12706
12707 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12708
12709 Code cleanup.
12710 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12711
12712 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12713
12714 * hostio.c (handle_readlink): New function.
12715 (handle_vFile): Call it to handle "vFile:readlink" packets.
12716
12717 2012-01-20 Pedro Alves <palves@redhat.com>
12718 Ulrich Weigand <ulrich.weigand@linaro.org>
12719
12720 * server.c (handle_v_requests): Only support vAttach and vRun to
12721 start multiple processes when in extended protocol mode.
12722
12723 2012-01-17 Pedro Alves <palves@redhat.com>
12724
12725 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12726 memalign plus mprotect to allocate the scratch buffer.
12727
12728 2012-01-13 Pedro Alves <palves@redhat.com>
12729
12730 * server.c (attach_inferior): Clear `cont_thread'.
12731
12732 2012-01-13 Pedro Alves <palves@redhat.com>
12733
12734 * server.c (main): Avoid infinite loop while detaching/killing
12735 after a longjmp.
12736
12737 2012-01-09 Doug Evans <dje@google.com>
12738
12739 * server.c (start_inferior): Set last_ptid in --wrapper case.
12740
12741 2012-01-06 Yao Qi <yao@codesourcery.com>
12742
12743 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12744 defined.
12745 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12746
12747 2012-01-04 Yao Qi <yao@codesourcery.com>
12748
12749 * tracepoint.c (cmd_qtdp): Print debug message
12750 for static tracepoint.
12751
12752 2012-01-04 Yao Qi <yao@codesourcery.com>
12753
12754 * tracepoint.c (trace_vdebug): Differentiate debug message
12755 between gdbserver and IPA.
12756
12757 2012-01-03 Yao Qi <yao@codesourcery.com>
12758
12759 * tracepoint.c (tracepoint_was_hit): Don't collect for
12760 static tracepoint.
12761
12762 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12763
12764 * terminal.h: Reformat copyright header.
12765
12766 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12767
12768 * server.c (gdbserver_version): Update copyright year.
12769 * gdbreplay.c (gdbreplay_version): Likewise.
12770
12771 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12772
12773 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12774
12775 Revert:
12776 2011-12-18 Hui Zhu <teawater@gmail.com>
12777 * linux-low.c (linux_create_inferior): Save return value to ret.
12778
12779 2011-12-18 Hui Zhu <teawater@gmail.com>
12780
12781 * linux-low.c (linux_create_inferior): Save return value to ret.
12782
12783 2011-12-16 Doug Evans <dje@google.com>
12784
12785 * linux-low.c (linux_create_inferior): If stdio connection,
12786 redirect stdin from /dev/null, stdout to stderr.
12787 * remote-utils.c (remote_is_stdio): New static global.
12788 (remote_connection_is_stdio): New function.
12789 (remote_prepare): Handle stdio connection.
12790 (remote_open): Ditto.
12791 (remote_close): Don't close stdin for stdio connections.
12792 (read_prim,write_prim): New functions. Replace all calls to
12793 read/write to these.
12794 * server.c (main): Watch for "-" argument. Move call to
12795 remote_prepare before start_inferior.
12796 * server.h (STDIO_CONNECTION_NAME): New macro.
12797 (remote_connection_is_stdio): Declare.
12798
12799 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12800 in debugging output.
12801
12802 2011-12-15 Yao Qi <yao@codesourcery.com>
12803
12804 * tracepoint.c: Include sys/syscall.h.
12805 (gdb_ust_thread): Remove preprocessor conditional.
12806
12807 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12808
12809 * linux-low.c (linux_detach_one_lwp): Call
12810 the_low_target.prepare_to_resume before detaching.
12811
12812 2011-12-14 Yao Qi <yao@codesourcery.com>
12813
12814 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12815 of write.
12816
12817 2011-12-14 Yao Qi <yao@codesourcery.com>
12818
12819 * i386-low.c (i386_low_stopped_data_address): Initialize local
12820 variable `control'.
12821
12822 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12823
12824 PR remote/13492
12825
12826 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12827 DR_CONTROL unless necessary. Extend comments.
12828 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12829 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12830
12831 2011-12-13 Yao Qi <yao@codesourcery.com>
12832
12833 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12834 macros.
12835 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12836
12837 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12838
12839 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12840 Print new debug message for such case.
12841
12842 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12843
12844 Fix overlapping memcpy.
12845 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12846 the read_inferior_memory transfer.
12847 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12848 write_inferior_memory transfer.
12849 (set_fast_tracepoint_jump): New variable buf. Use it for the
12850 read_inferior_memory and write_inferior_memory transfers.
12851 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12852 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12853 Use it for the write_inferior_memory transfer.
12854 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12855 buffers.
12856
12857 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12858
12859 * linux-low.c (fetch_register, store_register): Make code
12860 consistent, fix formatting.
12861
12862 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12863
12864 * linux-low.c (usr_store_inferior_registers): Factor out code
12865 to handle individual registers into...
12866 (store_register): ... this new function.
12867
12868 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12869
12870 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12871 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12872 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12873 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12874 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12875 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12876 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12877 (srv_xmlfiles): Add new XML files.
12878
12879 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12880 and <sys/uio.h>.
12881 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12882 (init_registers_s390_linux32v1): Add prototype.
12883 (init_registers_s390_linux32v2): Likewise.
12884 (init_registers_s390_linux64v1): Likewise.
12885 (init_registers_s390_linux64v2): Likewise.
12886 (init_registers_s390x_linux64v1): Likewise.
12887 (init_registers_s390x_linux64v2): Likewise.
12888 (s390_num_regs): Increment to 52.
12889 (s390_regmap): Add orig_r2 register.
12890 (s390_num_regs_3264): Increment to 68.
12891 (s390_regmap_3264): Add orig_r2 register.
12892 (s390_collect_ptrace_register): Handle orig_r2 register.
12893 (s390_supply_ptrace_register): Likewise.
12894 (s390_fill_last_break): New function.
12895 (s390_store_last_break): Likewise.
12896 (s390_fill_system_call): New function.
12897 (s390_store_system_call): Likewise.
12898 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12899 register sets.
12900 (s390_check_regset): New function.
12901 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12902 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12903 Update target_regsets for available register sets.
12904
12905 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12906 Jan Kratochvil <jan.kratochvil@redhat.com>
12907
12908 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12909 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12910 New.
12911 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12912 * linux-low.h (struct process_info_private): New member r_debug.
12913 * server.c (handle_qxfer_libraries): Call
12914 the_target->qxfer_libraries_svr4.
12915 (handle_qxfer_libraries_svr4): New function.
12916 (qxfer_packets): New entry "libraries-svr4".
12917 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12918 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12919 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12920 PACKET_qXfer_libraries_svr4.
12921
12922 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12923
12924 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12925 PSW address/mask between 8-byte and 16-byte formats.
12926 (s390_supply_ptrace_register): Likewise.
12927 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12928 basic addressing mode bit.
12929
12930 2011-11-24 Stan Shebs <stan@codesourcery.com>
12931
12932 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12933
12934 2011-11-17 Stan Shebs <stan@codesourcery.com>
12935
12936 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12937 (tracing_start_time): New global.
12938 (tracing_stop_time): New global.
12939 (tracing_user_name): New global.
12940 (tracing_notes): New global.
12941 (tracing_stop_note): New global.
12942 (cmd_qtstart): Set traceframe_usage, start_time.
12943 (stop_tracing): Set stop_time.
12944 (cmd_qtstatus): Report additional status.
12945 (cmd_qtp): New function.
12946 (handle_tracepoint_query): Call it.
12947 (cmd_qtnotes): New function.
12948 (handle_tracepoint_general_set): Call it.
12949 (get_timestamp): Rename from tsv_get_timestamp.
12950
12951 2011-11-14 Stan Shebs <stan@codesourcery.com>
12952 Kwok Cheung Yeung <kcy@codesourcery.com>
12953
12954 * linux-x86-low.c (small_jump_insn): New.
12955 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12956 trampoline and error message, build a trampoline and issue a small
12957 jump instruction to it.
12958 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12959 trampoline and error message.
12960 (x86_get_min_fast_tracepoint_insn_len): New.
12961 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12962 * linux-low.h (struct linux_target_ops): Add arguments to
12963 install_fast_tracepoint_jump_pad operation, add new operation.
12964 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12965 arguments.
12966 (linux_get_min_fast_tracepoint_insn_len): New function.
12967 (linux_target_op): Add new operation.
12968 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12969 (gdb_trampoline_buffer_end): Ditto.
12970 (gdb_trampoline_buffer_error): Ditto.
12971 (struct ipa_sym_addresses): Add fields for new IPA variables.
12972 (symbol_list): Add entries for new IPA variables.
12973 (struct tracepoint): Add fields to hold the address range of the
12974 trampoline used by the tracepoint.
12975 (trampoline_buffer_head): New static variable.
12976 (trampoline_buffer_tail): Ditto.
12977 (claim_trampoline_space): New function.
12978 (have_fast_tracepoint_trampoline_buffer): New function.
12979 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12980 structure.
12981 (install_fast_tracepoint): Ditto, also add error buffer argument.
12982 (cmd_qtminftpilen): New function.
12983 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12984 (fast_tracepoint_from_trampoline_address): New function.
12985 (fast_tracepoint_collecting): Handle trampoline as part of jump
12986 pad space.
12987 (set_trampoline_buffer_space): New function.
12988 (initialize_tracepoint): Initialize new IPA variables.
12989 * target.h (struct target_ops): Add arguments to
12990 install_fast_tracepoint_jump_pad operation, add new
12991 get_min_fast_tracepoint_insn_len operation.
12992 (target_get_min_fast_tracepoint_insn_len): New.
12993 (install_fast_tracepoint_jump_pad): Add arguments.
12994 * server.h (IPA_BUFSIZ): Define.
12995 * linux-i386-ipa.c: Include extra header files.
12996 (initialize_fast_tracepoint_trampoline_buffer): New function.
12997 (initialize_low_tracepoint): Call it.
12998 * server.h (set_trampoline_buffer_space): Declare.
12999 (claim_trampoline_space): Ditto.
13000 (have_fast_tracepoint_trampoline_buffer): Ditto.
13001
13002 2011-11-14 Yao Qi <yao@codesourcery.com>
13003
13004 * server.c (handle_query): Handle InstallInTrace for qSupported.
13005 * tracepoint.c (add_tracepoint): Sort list.
13006 (install_tracepoint, download_tracepoint): New.
13007 (cmd_qtdp): Call them to install and download tracepoints.
13008 (sort_tracepoints): Removed.
13009 (cmd_qtstart): Update.
13010
13011 2011-11-14 Yao Qi <yao@codesourcery.com>
13012
13013 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13014 * mem-break.h: Declare.
13015 * tracepoint.c (cmd_qtstart): Move some code to ...
13016 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13017 New.
13018 (download_tracepoints): Move some code to ...
13019 (download_tracepoint_1): ... here. New.
13020
13021 2011-11-08 Yao Qi <yao@codesourcery.com>
13022
13023 * remote-utils.c (relocate_instruction): A comment fix.
13024
13025 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13026
13027 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13028 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13029 dr_status_mirror and dr_control_mirror from debug_reg_state.
13030 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13031 (i386_initial_stuff): Remove use of deleted globals.
13032 (i386_get_thread_context, i386_set_thread_context,
13033 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13034 from debug_reg_state.
13035
13036 2011-11-05 Yao Qi <yao@codesourcery.com>
13037
13038 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13039 address as TPOINT's.
13040
13041 2011-11-02 Stan Shebs <stan@codesourcery.com>
13042
13043 * tracepoint.c (agent_mem_read_string): New function.
13044 (eval_agent_expr): Call it for tracenz.
13045 * server.c (handle_query): Report support for tracenz.
13046
13047 2011-11-02 Yao Qi <yao@codesourcery.com>
13048
13049 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13050
13051 2011-11-02 Yao Qi <yao@codesourcery.com>
13052
13053 * target.h: Fix a typo in comment.
13054
13055 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13056
13057 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13058 clobber the breakpoints' shadows with fast tracepoint jumps.
13059 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13060 * target.c (write_inferior_memory): Also pass MYADDR down to
13061 check_mem_write.
13062
13063 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13064
13065 * configure.ac: Check support for personality routine.
13066 * configure: Regenerate.
13067 * config.in: Likewise.
13068 * linux-low.c: Include <sys/personality.h>.
13069 Define ADDR_NO_RANDOMIZE if necessary.
13070 (linux_create_inferior): Disable address space randomization when
13071 forking inferior, if requested.
13072 (linux_supports_disable_randomization): New function.
13073 (linux_target_ops): Install it.
13074 * server.h (disable_randomization): Declare.
13075 * server.c (disable_randomization): New global variable.
13076 (handle_general_set): Handle QDisableRandomization.
13077 (handle_query): Likewise for qSupported.
13078 (main): Support --disable-randomization and --no-disable-randomization
13079 command line arguments.
13080 * target.h (struct target_ops): Add supports_disable_randomization.
13081 (target_supports_disable_randomization): New macro.
13082
13083 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13084
13085 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13086 ifdef check.
13087 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13088 [!PT_GETDSBT] (target_loadmap): New definition.
13089 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13090 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13091 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13092 and PT_GETDSBT to LINUX_LOADMAP.
13093 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13094 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13095
13096 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13097
13098 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13099 (arm_linux_hwbp_cap): New static variable.
13100 (arm_linux_get_hwbp_cap): Replace by ...
13101 (arm_linux_init_hwbp_cap): ... this new function.
13102 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13103 (arm_linux_get_hw_watchpoint_count): Likewise.
13104 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13105 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13106 (arm_prepare_to_resume): Use perror_with_name instead of error.
13107
13108 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13109
13110 * linux-arm-low.c: Include <signal.h>.
13111 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13112 (struct arm_linux_hwbp_cap): New data type.
13113 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13114 (struct arm_linux_hw_breakpoint): New data type.
13115 (MAX_BPTS, MAX_WPTS): Define.
13116 (struct arch_process_info, struct arch_lwp_info): New data types.
13117 (arm_linux_get_hwbp_cap): New function.
13118 (arm_linux_get_hw_breakpoint_count): Likewise.
13119 (arm_linux_get_hw_watchpoint_count): Likewise.
13120 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13121 (arm_hwbp_control_initialize): Likewise.
13122 (arm_hwbp_control_is_enabled): Likewise.
13123 (arm_hwbp_control_is_initialized): Likewise.
13124 (arm_hwbp_control_disable): Likewise.
13125 (arm_linux_hw_breakpoint_equal): Likewise.
13126 (arm_linux_hw_point_initialize): Likewise.
13127 (struct update_registers_data): New data structure.
13128 (update_registers_callback: New function.
13129 (arm_insert_point): Likewise.
13130 (arm_remove_point): Likewise.
13131 (arm_stopped_by_watchpoint): Likewise.
13132 (arm_stopped_data_address): Likewise.
13133 (arm_new_process): Likewise.
13134 (arm_new_thread): Likewise.
13135 (arm_prepare_to_resume): Likewise.
13136 (the_low_target): Register arm_insert_point, arm_remove_point,
13137 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13138 arm_new_thread, and arm_prepare_to_resume.
13139
13140 2011-09-15 Stan Shebs <stan@codesourcery.com>
13141
13142 * server.h (struct emit_ops): Add compare-goto fields.
13143 * tracepoint.c (gdb_agent_op_sizes): New table.
13144 (emit_eq_goto): New function.
13145 (emit_ne_goto): New function.
13146 (emit_lt_goto): New function.
13147 (emit_le_goto): New function.
13148 (emit_gt_goto): New function.
13149 (emit_ge_goto): New function.
13150 (is_goto_target): New function.
13151 (compile_bytecodes): Recognize special cases of compare-goto
13152 combinations and call specialized emitters for them.
13153 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13154 (amd64_emit_ne_goto): New function.
13155 (amd64_emit_lt_goto): New function.
13156 (amd64_emit_le_goto): New function.
13157 (amd64_emit_gt_goto): New function.
13158 (amd64_emit_ge_goto): New function.
13159 (amd64_emit_ops): Add the new functions.
13160 (i386_emit_eq_goto): New function.
13161 (i386_emit_ne_goto): New function.
13162 (i386_emit_lt_goto): New function.
13163 (i386_emit_le_goto): New function.
13164 (i386_emit_gt_goto): New function.
13165 (i386_emit_ge_goto): New function.
13166 (i386_emit_ops): Add the new functions.
13167
13168 2011-09-08 Stan Shebs <stan@codesourcery.com>
13169
13170 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13171 (i386_emit_epilogue): Restore %ebx.
13172
13173 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13174
13175 * server.c (step_thread): Remove definition.
13176 (process_serial_event): Don't handle Hs.
13177 * server.h (step_thread): Remove declaration.
13178 * target.c (set_desired_inferior): Remove use of step_thread.
13179
13180 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13181
13182 * linux-low.c: Include linux-procfs.h.
13183 (linux_attach_lwp_1): Update comments.
13184 (linux_attach): Scan for existing threads when attaching to a
13185 process that is the tgid.
13186 * Makefile.in: Update dependencies.
13187
13188 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13189
13190 * configure.srv: Add linux-procfs.o dependencies.
13191
13192 2011-08-14 Yao Qi <yao@codesourcery.com>
13193
13194 * target.h (struct target_ops): Fix indent.
13195 * win32-low.c (win32_target_ops): Fix comment.
13196
13197 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13198 Yao Qi <yao@codesourcery.com>
13199
13200 * Makefile.in (clean): Remove tic6x-*.c files.
13201 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13202 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13203 (tic6x-c64xp-linux.c): Likewise.
13204 * configure.srv: Add support for tic6x-*-uclinux.
13205 * linux-tic6x-low.c: New.
13206 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13207
13208 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13209 Yao Qi <yao@codesourcery.com>
13210
13211 * target.h (struct target_ops): Add read_loadmap.
13212 * linux-low.c (struct target_loadseg): New type.
13213 (struct target_loadmap): New type.
13214 (linux_read_loadmap): New function.
13215 (linux_target_ops): Add linux_read_loadmap.
13216 * server.c (handle_query): Support qXfer:fdpic:read packet.
13217 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13218 to NULL.
13219
13220 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13221
13222 * win32-low.c: Include <stdint.h>.
13223
13224 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13225
13226 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13227 to the inferior here.
13228 (i386_remove_aligned_watchpoint): Ditto.
13229 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13230 fit part of the watchpoint in the debug registers.
13231 (i386_update_inferior_debug_regs): New.
13232 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13233 registers, and only update the inferior on success.
13234 (i386_low_remove_watchpoint): Ditto.
13235
13236 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13237
13238 * linux-low.c (compare_ints, unique, list_threads, show_process,
13239 linux_core_of_thread): Delete.
13240 (linux_target_ops): Change linux_core_of_thread to
13241 linux_common_core_of_thread.
13242 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13243 * utils.c (malloc_failure): Change type of argument.
13244 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13245 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13246 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13247 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13248 (IPA_OBJS): Add common-utils-ipa.o.
13249 (ptid_h, linux_osdata_h): New macros.
13250 (server_h): Add common/common-utils.h, common/xml-utils.h,
13251 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13252 common/ptid.h.
13253 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13254 ptid.o, buffer.o): New rules.
13255 (linux-low.o): Add common/linux-osdata.h as a dependency.
13256 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13257 * configure.ac: Add AC_HEADER_DIRENT check.
13258 * config.in: Regenerate.
13259 * configure: Regenerate.
13260 * remote-utils.c (xml_escape_text): Delete.
13261 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13262 buffer_xml_printf): Move to common/buffer.c.
13263 * server.c (main): Remove call to initialize_inferiors.
13264 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13265 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13266 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13267 internal_error, gdb_assert, gdb_assert_fail): Delete.
13268 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13269 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13270 common/buffer.h.
13271 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13272 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13273 initialize_inferiors): Delete.
13274
13275 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13276
13277 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13278 symbol error.
13279
13280 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13281
13282 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13283 assertion.
13284 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13285
13286 2011-05-26 Yao Qi <yao@codesourcery.com>
13287
13288 * Makefile.in (thread-db.o): Track dependence to
13289 common/gdb_thread_db.h.
13290 * thread-db.c: include gdb_thread_db.h from right place.
13291
13292 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13293
13294 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13295 __FILE__ and __LINE__ to internal_error.
13296
13297 2011-05-13 Doug Evans <dje@google.com>
13298
13299 * thread-db.c (try_thread_db_load_from_sdir): New function.
13300 (try_thread_db_load_from_dir): New function.
13301 (thread_db_load_search): Handle $sdir, ignore $pdir.
13302 Remove trying of system directories if search of
13303 libthread-db-search-path fails, that is now done via $sdir.
13304
13305 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13306
13307 * server.c (handle_query): Add EnableDisableTracepoints to the list
13308 of supported features.
13309 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13310 tracepoints.
13311 (cmd_qtenable_disable): New.
13312 (cmd_qtstart): Install tracepoints even if disabled.
13313 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13314 receiving a QTEnable or QTDisable packet.
13315 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13316 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13317 tracepoints.
13318 (gdb_probe): Skip data collection if static tracepoint is disabled.
13319
13320 2011-05-10 Doug Evans <dje@google.com>
13321
13322 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13323
13324 2011-05-04 Doug Evans <dje@google.com>
13325
13326 * linux-low.c (linux_join): Skip process lookup.
13327 * spu-low.c (spu_join): Ditto.
13328 * server.c (join_inferiors_callback): Delete.
13329 (process_serial_event): For 'D' packet (detach) call join_inferior
13330 directly.
13331
13332 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13333
13334 * README: Don't mention xscale*-*-linux*.
13335 * configure.srv (xscale*-*-linux*): Don't handle target.
13336
13337 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13338
13339 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13340 casting pointers.
13341 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13342 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13343 (i386_emit_void_call_2): Likewise.
13344
13345 2011-04-26 Yao Qi <yao@codesourcery.com>
13346
13347 * linux-low.c: Move common macros to linux-ptrace.h.
13348 Include linux-ptrace.h.
13349 * Makefile.in (linux_ptrace_h): New.
13350 (linux-low.o): Depends on linux-ptrace.h.
13351
13352 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13353
13354 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13355 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13356 (remote_prepare): New function with most of the TCP code from ...
13357 (remote_open): ... here. Detect PORT here unconditionally. Move also
13358 setting transport_is_reliable.
13359 * server.c (run_once): New variable.
13360 (gdbserver_usage): Document it.
13361 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13362 the first run if RUN_ONCE.
13363 * server.h (run_once, remote_prepare): New declarations.
13364
13365 2011-04-19 Tom Tromey <tromey@redhat.com>
13366
13367 * win32-low.c (handle_load_dll): Remove duplicate "the".
13368
13369 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13370
13371 Remove support for old Cygwin 1.5 versions.
13372 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13373 function to avoid warning.
13374 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13375 warning.
13376
13377 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13378
13379 * gdbserver/server.h (Macro _): Define it if not available.
13380
13381 2011-03-14 Michael Snyder <msnyder@vmware.com>
13382
13383 * hostio.c (handle_close): Remove unnecessary null test.
13384
13385 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13386
13387 * Makefile.in (maintainer-clean realclean distclean): Remove
13388 "make ... subdir_do" command.
13389
13390 2011-03-10 Michael Snyder <msnyder@vmware.com>
13391
13392 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13393
13394 * server.c (handle_v_run): Free alloced buffer on early return.
13395
13396 2011-03-09 Yao Qi <yao@codesourcery.com>
13397
13398 Revert:
13399 2011-03-04 Yao Qi <yao@codesourcery.com>
13400
13401 * Makefile.in: Remove GNU make feature --directory.
13402
13403 2011-03-05 Yao Qi <yao@codesourcery.com>
13404
13405 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13406 (subdir_do): New make target. Copied from gdb/Makefile.
13407 (maintainer-clean, realclean, distclean, clean): Call corresponding
13408 make targets in common/Makefile.
13409
13410 2011-02-11 Yao Qi <yao@codesourcery.com>
13411
13412 * configure.ac: Call AC_PROG_RANLIB.
13413 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13414 * configure: Regenerate.
13415
13416 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13417
13418 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13419
13420 2011-03-06 Yao Qi <yao@codesourcery.com>
13421
13422 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13423
13424 2011-03-05 Yao Qi <yao@codesourcery.com>
13425
13426 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13427 (subdir_do): New make target. Copied from gdb/Makefile.
13428 (maintainer-clean, realclean, distclean, clean): Call corresponding
13429 make targets in common/Makefile.
13430
13431 2011-03-04 Yao Qi <yao@codesourcery.com>
13432
13433 * Makefile.in: Remove GNU make feature --directory.
13434
13435 2011-03-04 Michael Snyder <msnyder@vmware.com>
13436
13437 * server.c (queue_stop_reply): Call xmalloc not malloc.
13438
13439 2011-03-02 Michael Snyder <msnyder@vmware.com>
13440
13441 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13442
13443 2011-02-28 Michael Snyder <msnyder@vmware.com>
13444
13445 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13446 (cmd_qtframe): Ditto.
13447 (cmd_qtbuffer): Ditto.
13448 (cmd_bigqtbuffer): Ditto.
13449
13450 * utils.c (decimal2str): Initialize 'width' to nine, then
13451 don't mess with it.
13452
13453 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13454
13455 * hostio.c (require_data): Free *data, not data.
13456
13457 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13458
13459 * hostio.c (require_data): Use free, not xfree.
13460
13461 2011-02-27 Michael Snyder <msnyder@vmware.com>
13462
13463 * server.c (handle_query): Discard unused value.
13464
13465 * hostio.c (require_data): Free malloc memory before returning
13466 error.
13467
13468 2011-02-26 Michael Snyder <msnyder@vmware.com>
13469
13470 * linux-low.c (list_threads): Call closedir for dirent.
13471
13472 2011-02-27 Michael Snyder <msnyder@vmware.com>
13473
13474 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13475 a case statement falls through.
13476
13477 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13478
13479 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13480 in comparison.
13481
13482 2011-02-26 Michael Snyder <msnyder@vmware.com>
13483
13484 * utils.c (decimal2str): Eliminate dead code and dead param.
13485 (pulongest): Drop dead param from call to decimal2str.
13486 (plongest): Ditto.
13487
13488 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13489
13490 Revert the following patch (not approved yet):
13491 2011-02-21 Hui Zhu <teawater@gmail.com>
13492 * tracepoint.c (tp_printf): New function.
13493 (eval_agent_expr): Handle gdb_agent_op_printf.
13494
13495 2011-02-21 Hui Zhu <teawater@gmail.com>
13496
13497 * tracepoint.c (tp_printf): New function.
13498 (eval_agent_expr): Handle gdb_agent_op_printf.
13499
13500 2011-02-18 Tom Tromey <tromey@redhat.com>
13501
13502 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13503 (tracepoint.o): Likewise.
13504 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13505 (gdb_agent_op_names): Likewise.
13506
13507 2011-02-18 Tom Tromey <tromey@redhat.com>
13508
13509 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13510 gdb_agent_op_rot>: New constants.
13511 (gdb_agent_op_names): Add pick and roll.
13512 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13513 cases.
13514
13515 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13516
13517 * aclocal.m4: Regenerated with aclocal-1.11.1.
13518
13519 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13520
13521 * server.c (handle_qxfer_traceframe_info): New.
13522 (qxfer_packets): Register "traceframe-info".
13523 (handle_query): Report support for qXfer:traceframe-info:read+.
13524 * tracepoint.c (match_blocktype): New.
13525 (traceframe_find_block_type): Rename to ...
13526 (traceframe_walk_blocks): ... this. Add callback filter argument,
13527 and use it.
13528 (traceframe_find_block_type): New, reimplemented on top of
13529 traceframe_walk_blocks.
13530 (build_traceframe_info_xml): New.
13531 (traceframe_read_info): New.
13532 * server.h (traceframe_read_info): Declare.
13533
13534 2011-02-11 Yao Qi <yao@codesourcery.com>
13535
13536 * configure.ac: Call AC_PROG_RANLIB.
13537 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13538 * configure: Regenerate.
13539
13540 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13541
13542 * server.c (gdb_read_memory): Change return semantics to allow
13543 partial transfers.
13544 (handle_search_memory_1): Adjust.
13545 (process_serial_event) <'m' packet>: Handle partial transfers.
13546 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13547
13548 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13549
13550 * regcache.c (init_register_cache): Initialize
13551 regcache->register_status.
13552 (free_register_cache): Release regcache->register_status.
13553 (regcache_cpy): Copy register_status.
13554 (registers_to_string): Print 'x's for unavailable registers.
13555 (supply_register): Mark the register's status valid or
13556 unavailable, depending on whether a buffer was passed in or not.
13557 (supply_register_zeroed): New.
13558 (supply_regblock): Mark the registers' status valid or
13559 unavailable, depending on whether a buffer was passed in or not.
13560 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13561 (struct regcache): New `register_status' field.
13562 (supply_register_zeroed): Declare.
13563 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13564 supply_register_zeroed, rather than passing a NULL buffer to
13565 supply_register.
13566 * tracepoint.c (fetch_traceframe_registers): Update comment.
13567
13568 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13569
13570 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13571 buffer explicit.
13572
13573 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13574
13575 * server.h (decode_xfer_write): Change prototype.
13576 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13577 and don't extract the annex here.
13578 * server.c (decode_xfer_read): Remove `annex' parameter,
13579 and don't extract the annex here.
13580 (decode_xfer): New.
13581 (struct qxfer): New.
13582 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13583 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13584 (handle_qxfer_statictrace): New functions, abstracted out from
13585 handle_query, and made to use the struct qxfer interface.
13586 (handle_threads_qxfer_proper): Rename to ...
13587 (handle_qxfer_threads_proper): ... this.
13588 (handle_threads_qxfer): Rename to ...
13589 (handle_qxfer_threads): ... this. Adjust.
13590 (qxfer_packets): New array.
13591 (handle_qxfer): New function.
13592 (handle_query): Use handle_qxfer.
13593
13594 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13595
13596 * gdbreplay.c: Shorten lines of >= 80 columns.
13597 * linux-low.c: Ditto.
13598 * linux-ppc-low.c: Ditto.
13599 * linux-s390-low.c: Ditto.
13600 * linux-sparc-low.c: Ditto.
13601 * linux-x86-low.c: Ditto.
13602 * linux-xtensa-low.c: Ditto.
13603 * mem-break.c: Ditto.
13604 * nto-low.c: Ditto.
13605 * regcache.h: Ditto.
13606 * remote-utils.c: Ditto.
13607 * server.c: Ditto.
13608 * server.h: Ditto.
13609 * thread-db.c: Ditto.
13610 * tracepoint.c: Ditto.
13611 * utils.c: Ditto.
13612 * win32-low.h: Ditto.
13613
13614 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13615
13616 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13617 update.
13618
13619 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13620
13621 * server.c (gdbserver_version): Update copyright year in version
13622 output.
13623 * gdbreplay.c (gdbreplay_version): Ditto.
13624
13625 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13626
13627 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13628 * linux-bfin-low.c: New file.
13629 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13630 PT_DATA_ADDR for BFIN targets.
13631 * Makefile.in (SFILES): Add linux-bfin-low.c.
13632 (clean): Remove reg-bfin.c.
13633 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13634 * README: Mention supported Blackfin targets.
13635
13636 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13637
13638 * .gitignore: New file.
13639
13640 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13641
13642 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13643
13644 2010-10-22 Jie Zhang <jie@codesourcery.com>
13645
13646 * Makefile.in: Add FLAGS_TO_PASS variable.
13647 (install): Remove dependency of install-only and recursively
13648 invoke make for install-only.
13649
13650 2010-10-04 Doug Evans <dje@google.com>
13651
13652 * Makefile.in (uninstall): Use $(DESTDIR).
13653
13654 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13655
13656 PR gdb/11842
13657
13658 * linux-x86-low.c (compat_siginfo_from_siginfo)
13659 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13660 si_code is < 0. Check for si_code == SI_TIMER before checking for
13661 si_code < 0.
13662
13663 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13664
13665 * lynx-i386-low.c: New file.
13666 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13667
13668 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13669
13670 * lynx-low.c (ptrace_request_to_str): Remove handling for
13671 request values that have been removed in LynxOS 5.x.
13672
13673 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13674
13675 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13676 <ptrace.h>
13677
13678 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13679
13680 * configure.ac: Add --enable-inprocess-agent option.
13681 * configure: Rebuilt.
13682
13683 2010-09-06 Yao Qi <yao@codesourcery.com>
13684
13685 * linux-low.c (linux_kill): Remove unused variable.
13686 (linux_stabilize_threads): Likewise.
13687 * server.c (start_inferior): Likewise.
13688 (queue_stop_reply_callback): Likewise.
13689 * tracepoint.c (do_action_at_tracepoint): Likewise.
13690
13691 2010-09-06 Yao Qi <yao@codesourcery.com>
13692
13693 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13694 on return.
13695
13696 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13697
13698 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13699
13700 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13701
13702 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13703 "$(IPA_DEPFILES)".
13704
13705 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13706
13707 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13708 gdbserver/lynx-ppc-low.c: New files.
13709 * Makefile.in (lynx_low_h): New variable.
13710 (lynx-low.o, lynx-ppc-low.o): New rules.
13711 * configure.ac: On LynxOS, link with -lnetinet.
13712 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13713 * configure: regenerate.
13714
13715 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13716
13717 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13718 * configure.ac: Add check for vasprintf and vsnprintf.
13719 * configure, config.in: Regenerate.
13720 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13721
13722 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13723
13724 * gdbreplay.c: Move include of alloca.h up, next to include of
13725 malloc.h.
13726 * server.h: Add include of malloc.h.
13727 * mem-break.c: Remove include of malloc.h.
13728 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13729
13730 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13731
13732 * Makefile.in (memmem.o): Build with -Wno-error.
13733
13734 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13735
13736 * utils.c (xsnprintf): Make non-static.
13737 * server.h: Add xsnprintf declaration.
13738 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13739 replace calls to snprintf by calls to xsnprintf throughout.
13740
13741 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13742
13743 * configure.ac: Add configure check for alloca.
13744 * configure, config.in: Regenerate.
13745 * server.h: Include alloca.h if it exists.
13746 * gdbreplay.c: Include alloca.h if it exists.
13747
13748 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13749
13750 * linux-low.c (__SIGRTMIN): Define if not already defined.
13751 (linux_create_inferior): Check for __ANDROID__ rather than
13752 __SIGRTMIN.
13753 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13754 are already deferred.
13755 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13756 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13757 stopped and already has a pending signal to report.
13758 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13759 a pending signal to report or is moving out of a jump pad.
13760 (linux_init_signals): Check for __ANDROID__ rather than
13761 __SIGRTMIN.
13762
13763 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13764
13765 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13766 debug_threads check. Avoid a linear search when not doing debug
13767 output.
13768
13769 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13770
13771 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13772 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13773 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13774 (process_event): Change local fd's type to gdb_fildes_t.
13775 (create_file_handler): Adjust prototype.
13776 (delete_file_handler): Adjust prototype.
13777 (handle_file_event): Adjust prototype. Use pfildes.
13778 (create_file_event): Adjsut prototype.
13779 * remote-utils.c (remote_desc, listen_desc): Change type to
13780 gdb_fildes_t.
13781 * server.h: New gdb_fildes_t typedef.
13782 [USE_WIN32API]: Include winsock2.h.
13783 (delete_file_handler, add_file_handler): Adjust prototypes.
13784 (pfildes): Declare.
13785 * utils.c (pfildes): New.
13786
13787 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13788
13789 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13790 * configure: Regenerate.
13791
13792 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13793
13794 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13795 (linux_done_accessing_memory): ... this.
13796 (linux_target_ops): Adjust.
13797 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13798 * nto-low.c (nto_target_ops): Adjust comment.
13799 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13800 * spu-low.c (spu_target_ops): Adjust comment.
13801 * target.h (target_ops): Rename unprepare_to_access_memory field
13802 to done_accessing_memory.
13803 (unprepare_to_access_memory): Rename to ...
13804 (done_accessing_memory): ... this.
13805
13806 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13807
13808 * linux-low.c (linux_prepare_to_access_memory): New.
13809 (linux_unprepare_to_access_memory): New.
13810 (linux_target_ops): Install them.
13811 * server.c (read_memory): Rename to ...
13812 (gdb_read_memory): ... this. Use
13813 prepare_to_access_memory/prepare_to_access_memory.
13814 (write_memory): Rename to ...
13815 (gdb_write_memory): ... this. Use
13816 prepare_to_access_memory/prepare_to_access_memory.
13817 (handle_search_memory_1): Adjust.
13818 (process_serial_event): Adjust.
13819 * target.h (struct target_ops): New fields
13820 prepare_to_access_memory and unprepare_to_access_memory.
13821 (prepare_to_access_memory, unprepare_to_access_memory): New.
13822 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13823 prepare_to_access_memory/prepare_to_access_memory.
13824 * nto-low.c (nto_target_ops): Adjust.
13825 * spu-low.c (spu_target_ops): Adjust.
13826 * win32-low.c (win32_target_ops): Adjust.
13827
13828 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13829
13830 * Makefile.in (WARN_CFLAGS): Get it from configure.
13831 (WERROR_CFLAGS): New.
13832 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13833 * configure.ac: Introduce --enable-werror, which adds -Werror to
13834 the compiler command line. Enabled by default. Disable with
13835 --disable-werror. Add -Wdeclaration-after-statement
13836 Wpointer-arith and -Wformat-nonliteral to warning flags.
13837 * configure: Regenerate.
13838
13839 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13840
13841 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13842
13843 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13844
13845 * gdbreplay.c (remote_error): New.
13846 (gdbchar): New.
13847 (expect): Use gdbchar. Check for error reading from GDB.
13848 Clarify sync error output.
13849 (play): Check for errors writing to GDB.
13850 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13851 * remote-utils.c (getpkt): Check for errors writing to the remote
13852 descriptor.
13853
13854 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13855
13856 * linux-low.c (linux_wait_1): Move non-debugging code out of
13857 `debug_threads' control.
13858
13859 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13860
13861 * linux-low.c (linux_wait_1): Don't set last_status here.
13862 * server.c (push_event, queue_stop_reply_callback): Assert we're
13863 not pushing a TARGET_WAITKIND_IGNORE event.
13864 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13865 (myresume, handle_target_event): Set the thread's last_resume_kind
13866 and last_status from the target returned status.
13867
13868 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13869
13870 PR threads/10729
13871
13872 * linux-x86-low.c (update_debug_registers_callback): New.
13873 (i386_dr_low_set_addr): Use it.
13874 (i386_dr_low_get_addr): New.
13875 (i386_dr_low_set_control): Use update_debug_registers_callback.
13876 (i386_dr_low_get_control): New.
13877 (i386_dr_low_get_status): Adjust.
13878 * linux-low.c (linux_stop_lwp): New.
13879 * linux-low.h (linux_stop_lwp): Declare.
13880
13881 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13882 argument instead of a i386_debug_reg_state.
13883 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13884 a i386_debug_reg_state.
13885 (i386_insert_aligned_watchpoint): Adjust.
13886 (i386_remove_aligned_watchpoint): Adjust.
13887 (i386_low_stopped_data_address): Read the debug registers from the
13888 inferior instead of from the mirrors.
13889 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13890 (i386_dr_low_get_addr): Declare.
13891 (i386_dr_low_get_control): Declare.
13892 (i386_dr_low_get_status): Change prototype.
13893
13894 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13895 (i386_dr_low_get_addr): New.
13896 (i386_dr_low_get_control): New.
13897 (i386_dr_low_get_status): Adjust prototype. Return
13898 dr_status_mirror.
13899 (i386_initial_stuff): Clear dr_status_mirror and
13900 dr_control_mirror.
13901 (i386_get_thread_context): Adjust.
13902 (i386_set_thread_context): Adjust.
13903 (i386_thread_added): Adjust.
13904
13905 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13906
13907 * linux-low.h (linux_thread_area): Delete declaration.
13908
13909 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13910
13911 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13912 after its termination.
13913
13914 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13915
13916 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13917 (gdb_wants_all_stopped): Delete.
13918 (linux_wait_1): Don't call them.
13919 * server.c (handle_v_cont): Tag all threads as want-stopped.
13920 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13921 stopped as "client-wants-stopped".
13922
13923 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13924
13925 * Makefile.in (signals_h): New.
13926 (server_h): Depend on it.
13927 (server.o): Don't depend on $(signals_def).
13928 (signals.o): Depend on $(signals_def).
13929
13930 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13931
13932 * Makefile.in (signals_def): New.
13933 (server_h): Append include/gdb/signals.h and signals_def.
13934 (server.o): Append signals_def.
13935
13936 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13937
13938 * server.c (handle_target_event): Use target_signal_to_host for
13939 resume_info.sig initialization.
13940 * target.h (struct thread_resume) <sig>: New comment.
13941
13942 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13943
13944 * server.c (handle_query): strcpy() the returned string from paddress()
13945 instead of sprintf().
13946 * utils.c (paddress): Return phex_nz().
13947
13948 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13949
13950 * server.c (handle_v_cont): Call mourn_inferior if process
13951 just exited.
13952 (myresume): Likewise.
13953
13954 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13955
13956 Static tracepoints, and integration with UST.
13957
13958 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13959 * mem-break.c (uninsert_all_breakpoints)
13960 (reinsert_all_breakpoints): New.
13961 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13962 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13963 (gdb_agent_ust_loaded, helper_thread_id)
13964 (gdb_agent_helper_thread_id): New macros.
13965 (struct ipa_sym_addresses): Add addr_ust_loaded,
13966 addr_helper_thread_id, addr_cmd_buf.
13967 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13968 (in_process_agent_loaded_ust): New.
13969 (write_e_ust_not_loaded): New.
13970 (maybe_write_ipa_ust_not_loaded): New.
13971 (struct collect_static_trace_data_action): New.
13972 (enum tracepoint_type) <static_tracepoint>: New.
13973 (struct tracepoint) <handle>: Mention static tracepoints.
13974 (struct static_tracepoint_ctx): New.
13975 (CMD_BUF_SIZE): New.
13976 (add_tracepoint_action): Handle static tracepoint actions.
13977 (unprobe_marker_at): New.
13978 (clear_installed_tracepoints): Handle static tracepoints.
13979 (cmd_qtdp): Handle static tracepoints.
13980 (probe_marker_at): New.
13981 (cmd_qtstart): Handle static tracepoints.
13982 (response_tracepoint): Handle static tracepoints.
13983 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13984 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13985 (get_context_regcache): Handle static tracepoints.
13986 (do_action_at_tracepoint): Handle static tracepoint actions.
13987 (traceframe_find_block_type): Handle static trace data blocks.
13988 (traceframe_read_sdata): New.
13989 (download_tracepoints): Download static tracepoint actions.
13990 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13991 (GDB_PROBE_NAME): New.
13992 (ust_ops): New.
13993 (GET_UST_SYM): New.
13994 (USTF): New.
13995 (dlsym_ust): New.
13996 (ust_marker_to_static_tracepoint): New.
13997 (gdb_probe): New.
13998 (collect_ust_data_at_tracepoint): New.
13999 (gdb_ust_probe): New.
14000 (UNIX_PATH_MAX, SOCK_DIR): New.
14001 (gdb_ust_connect_sync_socket): New.
14002 (resume_thread, stop_thread): New.
14003 (run_inferior_command): New.
14004 (init_named_socket): New.
14005 (gdb_ust_socket_init): New.
14006 (cstr_to_hexstr): New.
14007 (next_st): New.
14008 (first_marker, next_marker): New.
14009 (response_ust_marker): New.
14010 (cmd_qtfstm, cmd_qtsstm): New.
14011 (unprobe_marker_at, probe_marker_at): New.
14012 (cmd_qtstmat, gdb_ust_thread): New.
14013 (gdb_ust_init): New.
14014 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14015 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14016 (ST_REGENTRY): New.
14017 (x86_64_st_collect_regmap): New.
14018 (X86_64_NUM_ST_COLLECT_GREGS): New.
14019 (AMD64_RIP_REGNUM): New.
14020 (supply_static_tracepoint_registers): New.
14021 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14022 (ST_REGENTRY): New.
14023 (i386_st_collect_regmap): New.
14024 (i386_NUM_ST_COLLECT_GREGS): New.
14025 (supply_static_tracepoint_registers): New.
14026 * server.c (handle_query): Handle qXfer:statictrace:read.
14027 <qSupported>: Report support for StaticTracepoints, and
14028 qXfer:statictrace:read features.
14029 * server.h (traceframe_read_sdata)
14030 (supply_static_tracepoint_registers): Declare.
14031 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14032 (unpack_varlen_hex): Include in IPA build.
14033 * Makefile.in (ustlibs, ustinc): New.
14034 (IPA_OBJS): Add remote-utils-ipa.o.
14035 ($(IPA_LIB)): Link -ldl and -lpthread.
14036 (UST_CFLAGS): New.
14037 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14038 * config.in, configure: Regenerate.
14039
14040 2010-06-20 Ian Lance Taylor <iant@google.com>
14041 Pedro Alves <pedro@codesourcery.com>
14042
14043 * linux-x86-low.c (always_true): Delete.
14044 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14045 trying to fool the compiler with always_true.
14046
14047 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14048
14049 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14050 conditions in gdbserver.
14051
14052 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14053
14054 * spu-low.c (spu_read_memory): Wrap around local store limit.
14055 (spu_write_memory): Likewise.
14056
14057 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14058
14059 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14060 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14061 LONGEST uses.
14062 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14063 uses.
14064 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14065 uses with LONGEST uses.
14066
14067 2010-06-14 Stan Shebs <stan@codesourcery.com>
14068 Pedro Alves <pedro@codesourcery.com>
14069
14070 Bytecode compiler.
14071
14072 * linux-x86-low.c: Include limits.h.
14073 (add_insns): New.
14074 (always_true): New.
14075 (EMIT_ASM): New.
14076 (EMIT_ASM32): New.
14077 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14078 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14079 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14080 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14081 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14082 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14083 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14084 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14085 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14086 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14087 (amd64_emit_void_call_2): New.
14088 (amd64_emit_ops): New.
14089 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14090 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14091 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14092 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14093 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14094 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14095 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14096 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14097 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14098 (i386_emit_stack_adjust, i386_emit_int_call_1)
14099 (i386_emit_void_call_2): New.
14100 (i386_emit_ops): New.
14101 (x86_emit_ops): New.
14102 (the_low_target): Install x86_emit_ops.
14103 * server.h (struct emit_ops): New.
14104 (get_raw_reg_func_addr): Declare.
14105 (current_insn_ptr, emit_error): Declare.
14106 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14107 (set_trace_state_variable_value): New defines.
14108 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14109 addr_get_trace_state_variable_value and
14110 addr_set_trace_state_variable_value.
14111 (symbol_list): New fields for get_raw_reg,
14112 get_trace_state_variable_value and set_trace_state_variable_value.
14113 (condfn): New typedef.
14114 (struct tracepoint): New field `compiled_cond'.
14115 (do_action_at_tracepoint): Clear compiled_cond.
14116 (get_trace_state_variable_value, set_trace_state_variable_value):
14117 Export in the IPA.
14118 (condition_true_at_tracepoint): If there's a compiled condition,
14119 run that.
14120 (current_insn_ptr, emit_error): New globals.
14121 (struct bytecode_address): New.
14122 (get_raw_reg_func_addr): New.
14123 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14124 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14125 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14126 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14127 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14128 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14129 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14130 (compile_tracepoint_condition, compile_bytecodes): New.
14131 * target.h (emit_ops): Forward declare.
14132 (struct target_ops): New field emit_ops.
14133 (target_emit_ops): New.
14134 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14135 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14136 * linux-low.c (linux_emit_ops): New.
14137 (linux_target_ops): Install it.
14138 * linux-low.h (struct linux_target_ops): New field emit_ops.
14139
14140 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14141
14142 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14143 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14144
14145 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14146 Stan Shebs <stan@codesourcery.com>
14147
14148 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14149 (all): Depend on $(extra_libraries).
14150 (install-only): Install the IPA.
14151 (IPA_OBJS, IPA_LIB): New.
14152 (clean): Remove the IPA lib.
14153 (IPAGENT_CFLAGS): New.
14154 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14155 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14156 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14157 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14158 * configure.ac: Check for atomic builtins support in the compiler.
14159 (IPA_DEPFILES, extra_libraries): Define.
14160 * configure.srv (ipa_obj): Add description.
14161 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14162 (i[34567]86-*-linux*): Set ipa_obj.
14163 (x86_64-*-linux*): Set ipa_obj.
14164 * linux-low.c (stabilizing_threads): New.
14165 (supports_fast_tracepoints): New.
14166 (linux_detach): Stabilize threads before detaching.
14167 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14168 the lwp is either not stabilizing, or is moving out of a jump pad.
14169 (linux_fast_tracepoint_collecting): New.
14170 (maybe_move_out_of_jump_pad): New.
14171 (enqueue_one_deferred_signal): New.
14172 (dequeue_one_deferred_signal): New.
14173 (linux_wait_for_event_1): If moving out of a jump pad, defer
14174 pending signals to later.
14175 (linux_stabilize_threads): New.
14176 (linux_wait_1): Check if threads need moving out of jump pads, and
14177 do it if so.
14178 (stuck_in_jump_pad_callback): New.
14179 (move_out_of_jump_pad_callback): New.
14180 (lwp_running): New.
14181 (linux_resume_one_lwp): Handle moving out of jump pads.
14182 (linux_set_resume_request): Dequeue deferred signals.
14183 (need_step_over_p): Also step over fast tracepoint jumps.
14184 (start_step_over): Also uninsert fast tracepoint jumps.
14185 (finish_step_over): Also reinsert fast tracepoint jumps.
14186 (linux_install_fast_tracepoint_jump): New.
14187 (linux_target_ops): Install linux_stabilize_threads and
14188 linux_install_fast_tracepoint_jump_pad.
14189 * linux-low.h (linux_target_ops) <get_thread_area,
14190 install_fast_tracepoint_jump_pad>: New fields.
14191 (struct lwp_info) <collecting_fast_tracepoint,
14192 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14193 (linux_get_thread_area): Declare.
14194 * linux-x86-low.c (jump_insn): New.
14195 (x86_get_thread_area): New.
14196 (append_insns): New.
14197 (push_opcode): New.
14198 (amd64_install_fast_tracepoint_jump_pad): New.
14199 (i386_install_fast_tracepoint_jump_pad): New.
14200 (x86_install_fast_tracepoint_jump_pad): New.
14201 (the_low_target): Install x86_get_thread_area and
14202 x86_install_fast_tracepoint_jump_pad.
14203 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14204 (struct fast_tracepoint_jump): New.
14205 (fast_tracepoint_jump_insn): New.
14206 (fast_tracepoint_jump_shadow): New.
14207 (find_fast_tracepoint_jump_at): New.
14208 (fast_tracepoint_jump_here): New.
14209 (delete_fast_tracepoint_jump): New.
14210 (set_fast_tracepoint_jump): New.
14211 (uninsert_fast_tracepoint_jumps_at): New.
14212 (reinsert_fast_tracepoint_jumps_at): New.
14213 (set_breakpoint_at): Use write_inferior_memory.
14214 (uninsert_raw_breakpoint): Use write_inferior_memory.
14215 (check_mem_read): Mask out fast tracepoint jumps.
14216 (check_mem_write): Mask out fast tracepoint jumps.
14217 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14218 (set_fast_tracepoint_jump): Declare.
14219 (delete_fast_tracepoint_jump)
14220 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14221 (reinsert_fast_tracepoint_jumps_at): Declare.
14222 * regcache.c: Don't compile many functions when building the
14223 in-process agent library.
14224 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14225 the register buffer in the heap.
14226 (free_register_cache): If the register buffer isn't owned by the
14227 regcache, don't free it.
14228 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14229 pre-existing register caches.
14230 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14231 type.
14232 (convert_ascii_to_int): : Constify `from' parameter type.
14233 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14234 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14235 the needed buffer in-place.
14236 (relocate_instruction): New.
14237 * server.c (handle_query) <qSymbols>: If the target supports
14238 tracepoints, give it a chance of looking up symbols. Report
14239 support for fast tracepoints.
14240 (handle_status): Stabilize threads.
14241 (process_serial_event): Adjust.
14242 * server.h (struct fast_tracepoint_jump): Forward declare.
14243 (struct process_info) <fast_tracepoint_jumps>: New field.
14244 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14245 (decode_X_packet, decode_M_packet): Adjust.
14246 (relocate_instruction): Declare.
14247 (in_process_agent_loaded): Declare.
14248 (tracepoint_look_up_symbols): Declare.
14249 (struct fast_tpoint_collect_status): Declare.
14250 (fast_tracepoint_collecting): Declare.
14251 (force_unlock_trace_buffer): Declare.
14252 (handle_tracepoint_bkpts): Declare.
14253 (initialize_low_tracepoint)
14254 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14255 * target.h (struct target_ops) <stabilize_threads,
14256 install_fast_tracepoint_jump_pad>: New fields.
14257 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14258 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14259 [HAVE_STDINT_H]: Include stdint.h.
14260 (trace_debug_1): Rename to ...
14261 (trace_vdebug): ... this.
14262 (trace_debug): Rename to ...
14263 (trace_debug_1): ... this. Add `level' parameter.
14264 (trace_debug): New.
14265 (ATTR_USED, ATTR_NOINLINE): New.
14266 (IP_AGENT_EXPORT): New.
14267 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14268 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14269 (about_to_request_buffer_space, trace_buffer_is_full)
14270 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14271 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14272 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14273 (traceframe_write_count, traceframes_created)
14274 (trace_state_variables)
14275 New renaming defines.
14276 (struct ipa_sym_addresses): New.
14277 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14278 (symbol_list): New.
14279 (ipa_sym_addrs): New.
14280 (all_tracepoint_symbols_looked_up): New.
14281 (in_process_agent_loaded): New.
14282 (write_e_ipa_not_loaded): New.
14283 (maybe_write_ipa_not_loaded): New.
14284 (tracepoint_look_up_symbols): New.
14285 (debug_threads) [IN_PROCESS_AGENT]: New.
14286 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14287 (UNKNOWN_SIDE_EFFECTS): New.
14288 (stop_tracing): New.
14289 (flush_trace_buffer): New.
14290 (stop_tracing_bkpt): New.
14291 (flush_trace_buffer_bkpt): New.
14292 (read_inferior_integer): New.
14293 (read_inferior_uinteger): New.
14294 (read_inferior_data_pointer): New.
14295 (write_inferior_data_pointer): New.
14296 (write_inferior_integer): New.
14297 (write_inferior_uinteger): New.
14298 (struct collect_static_trace_data_action): Delete.
14299 (enum tracepoint_type): New.
14300 (struct tracepoint) <type>: New field `type'.
14301 <actions_str, step_actions, step_actions_str>: Only include in
14302 GDBserver.
14303 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14304 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14305 (tracepoints): Use IP_AGENT_EXPORT.
14306 (last_tracepoint): Don't include in the IPA.
14307 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14308 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14309 (alloced_trace_state_variables): New.
14310 (trace_state_variables): Use IP_AGENT_EXPORT.
14311 (traceframe_t): Delete unused variable.
14312 (circular_trace_buffer): Don't include in the IPA.
14313 (trace_buffer_start): Delete.
14314 (struct trace_buffer_control): New.
14315 (trace_buffer_free): Delete.
14316 (struct ipa_trace_buffer_control): New.
14317 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14318 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14319 New.
14320 (trace_buffer_ctrl): New.
14321 (TRACE_BUFFER_CTRL_CURR): New.
14322 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14323 Reimplement as macros.
14324 (trace_buffer_wrap): Delete.
14325 (traceframe_write_count, traceframe_read_count)
14326 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14327 (struct tracepoint_hit_ctx) <type>: New field.
14328 (struct fast_tracepoint_ctx): New.
14329 (memory_barrier): New.
14330 (cmpxchg): New.
14331 (record_tracepoint_error): Update atomically in the IPA.
14332 (clear_inferior_trace_buffer): New.
14333 (about_to_request_buffer_space): New.
14334 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14335 updating the same buffer.
14336 (add_tracepoint): Default the tracepoint's type to trap
14337 tracepoint, and orig_size to -1.
14338 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14339 internal variables.
14340 (create_trace_state_variable): New parameter `gdb'. Handle it.
14341 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14342 (cmd_qtdp): Handle fast tracepoints.
14343 (cmd_qtdv): Adjust.
14344 (max_jump_pad_size): New.
14345 (gdb_jump_pad_head): New.
14346 (get_jump_space_head): New.
14347 (claim_jump_space): New.
14348 (sort_tracepoints): New.
14349 (MAX_JUMP_SIZE): New.
14350 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14351 IPA.
14352 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14353 support. Upload fast traceframes, and delete internal IPA
14354 breakpoints.
14355 (stop_tracing_handler): New.
14356 (flush_trace_buffer_handler): New.
14357 (cmd_qtstop): Upload fast tracepoints.
14358 (response_tracepoint): Handle fast tracepoints.
14359 (tracepoint_finished_step): Upload fast traceframes. Set the
14360 tracepoint hit context's tracepoint type.
14361 (handle_tracepoint_bkpts): New.
14362 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14363 type. Add comment about fast tracepoints.
14364 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14365 non-existing action_str field.
14366 (get_context_regcache): Handle fast tracepoints.
14367 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14368 to the regcache.
14369 (fast_tracepoint_from_jump_pad_address): New.
14370 (fast_tracepoint_from_ipa_tpoint_address): New.
14371 (collecting_t): New.
14372 (force_unlock_trace_buffer): New.
14373 (fast_tracepoint_collecting): New.
14374 (collecting): New.
14375 (gdb_collect): New.
14376 (write_inferior_data_ptr): New.
14377 (target_tp_heap): New.
14378 (target_malloc): New.
14379 (download_agent_expr): New.
14380 (UALIGN): New.
14381 (download_tracepoints): New.
14382 (download_trace_state_variables): New.
14383 (upload_fast_traceframes): New.
14384 (IPA_FIRST_TRACEFRAME): New.
14385 (IPA_NEXT_TRACEFRAME_1): New.
14386 (IPA_NEXT_TRACEFRAME): New.
14387 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14388 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14389 (gdb_jump_pad_buffer_end): New.
14390 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14391 (initialize_tracepoint): Adjust.
14392 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14393 buffer. Initialize the low module.
14394 * utils.c (PREFIX, TOOLNAME): New.
14395 (malloc_failure): Use PREFIX.
14396 (error): In the IPA, an error causes an exit.
14397 (fatal, warning): Use PREFIX.
14398 (internal_error): Use TOOLNAME.
14399 (NUMCELLS): Increase to 10.
14400 * configure, config.in: Regenerate.
14401
14402 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14403
14404 * server.c (handle_query) <qSupported>: Do two passes over the
14405 qSupported string to avoid nesting strtok.
14406
14407 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14408
14409 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14410 (CDEPS): New.
14411 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14412 -Wl,--dynamic-list.
14413 * configure: Regenerate.
14414 * proc-service.list: New.
14415
14416 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14417
14418 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14419 New comment.
14420
14421 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14422
14423 * gdbreplay.c (remote_open): Check error return from socket() call by
14424 its equality to -1 not by it being negative.
14425 * remote-utils.c (remote_open): Likewise.
14426
14427 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14428
14429 * config.h: Regenerate.
14430
14431 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14432
14433 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14434 doesn't provide PTRACE_GET_THREAD_AREA.
14435
14436 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14437
14438 * linux-m68k-low.c: Include <asm/ptrace.h>
14439 (ps_get_thread_area): Implement.
14440
14441 2010-05-03 Doug Evans <dje@google.com>
14442
14443 * event-loop.c (struct callback_event): New struct.
14444 (callback_list): New global.
14445 (append_callback_event, delete_callback_event): New functions.
14446 (process_callback): New function.
14447 (start_event_loop): Call it.
14448 * remote-utils.c (NOT_SCHEDULED): Define.
14449 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14450 moved out of readchar.
14451 (readchar): Rewrite. Call reschedule before returning.
14452 (reset_readchar): New function.
14453 (remote_close): Call it.
14454 (process_remaining, reschedule): New functions.
14455 * server.h (callback_handler_func): New typedef.
14456 (append_callback_event, delete_callback_event): Declare.
14457
14458 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14459
14460 * proc-service.c (ps_pglobal_lookup): Use
14461 thread_db_look_up_one_symbol.
14462 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14463 parameter. Use it instead of all_symbols_looked_up.
14464 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14465 field.
14466 (all_symbols_looked_up): Don't declare.
14467 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14468 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14469 field.
14470 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14471 Set all_symbols_looked_up here.
14472 (thread_db_look_up_one_symbol): New.
14473 (thread_db_get_tls_address): Adjust.
14474 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14475 thread_db object on the heap, and tentatively set it in the
14476 process structure.
14477 (thread_db_init): Don't set all_symbols_looked_up here.
14478 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14479
14480 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14481
14482 * linux-low.c (linux_kill, linux_detach): Adjust.
14483 (status_pending_p_callback): Remove redundant statement. Check
14484 for !TARGET_WAITIKIND_IGNORE, instead of
14485 TARGET_WAITKIND_STOPPED.
14486 (handle_tracepoints): Make sure LWP is locked. Adjust.
14487 (linux_wait_for_event_1): Adjust.
14488 (linux_cancel_breakpoints): New.
14489 (unsuspend_one_lwp): New.
14490 (unsuspend_all_lwps): New.
14491 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14492 (send_sigstop_callback): Change return type to int, add new
14493 `except' parameter and handle it.
14494 (suspend_and_send_sigstop_callback): New.
14495 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14496 pass them down. If SUSPEND, also increment the lwp's suspend
14497 count.
14498 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14499 (need_step_over_p): Don't consider suspended LWPs.
14500 (start_step_over): Adjust.
14501 (proceed_one_lwp): Change return type to int, add new `except'
14502 parameter and handle it.
14503 (unsuspend_and_proceed_one_lwp): New.
14504 (proceed_all_lwps): Use find_inferior instead of
14505 for_each_inferior.
14506 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14507 also decrement the suspend count of LWPs. Pass `except' down,
14508 instead of hacking its suspend count.
14509 (linux_pause_all): Add `freeze' parameter. Adjust.
14510 (linux_unpause_all): New.
14511 (linux_target_ops): Install linux_unpause_all.
14512 * server.c (handle_status): Adjust.
14513 * target.h (struct target_ops): New fields `unpause_all' and
14514 `cancel_breakpoints'. Add new parameter to `pause_all'.
14515 (pause_all): Add new `freeze' parameter.
14516 (unpause_all): New.
14517 (cancel_breakpoints): New.
14518 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14519 cancel breakpoints.
14520 (cmd_qtstart): Pause threads.
14521 (stop_tracing): Pause threads, and cancel breakpoints.
14522 * win32-low.c (win32_target_ops): Adjust.
14523
14524 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14525
14526 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14527 the inferior right away from here...
14528 (linux_wait_1): ... to here, and adjust to check the thread's
14529 last_resume_kind instead of the lwp's step or stop_expected flags.
14530
14531 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14532
14533 * README: Use consistent `GDB' and `GDBserver' spellings.
14534
14535 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14536
14537 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14538 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14539 (linux_detach_one_lwp): Assume the lwp is stopped.
14540 (any_thread_of): Delete.
14541 (linux_detach): Stop all lwps here. Don't blindly delete all
14542 breakpoints.
14543 (delete_lwp_callback): New.
14544 (linux_mourn): Delete all lwps of the process that is gone.
14545 (linux_wait_1): Don't delete the last lwp of the process here.
14546 * mem-break.h (mark_breakpoints_out): Declare.
14547 * mem-break.c (mark_breakpoints_out): New.
14548 (free_all_breakpoints): Use it.
14549 * server.c (handle_target_event): If the process is gone, mark
14550 breakpoints out.
14551 * thread-db.c (struct thread_db) <create_bp>: New field.
14552 (thread_db_enable_reporting): Fix prototype. Store a thread event
14553 breakpoint reference in the thread_db struct.
14554 (thread_db_load_search): Clear the thread_db object.
14555 (try_thread_db_load_1): Ditto.
14556 (switch_to_process): New.
14557 (disable_thread_event_reporting): Use it.
14558 (remove_thread_event_breakpoints): New.
14559 (thread_db_detach, thread_db_mourn): Use it.
14560
14561 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14562
14563 * linux-low.c (linux_enable_event_reporting): New.
14564 (linux_wait_for_event_1, handle_extended_wait): Use it.
14565
14566 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14567
14568 * linux-low.c (linux_kill_one_lwp, linux_kill)
14569 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14570 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14571 SIGSTOP even if the LWP is stopped.
14572 (send_sigstop_callback): New.
14573 (stop_all_lwps): Use send_sigstop_callback instead.
14574 (linux_resume_one_thread): Adjust.
14575 (proceed_one_lwp): Still proceed an LWP that the client has
14576 requested to stop, if we haven't reported it as stopped yet. Make
14577 sure that LWPs the client want stopped, have a pending SIGSTOP.
14578
14579 2010-04-26 Doug Evans <dje@google.com>
14580
14581 * server.c (handle_general_set): Make static.
14582
14583 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14584 Print received char after testing for error/eof instead of before.
14585 (input_interrupt): Tweak comment.
14586
14587 2010-04-23 Doug Evans <dje@google.com>
14588
14589 * server.c (start_inferior): Print inferior argv if --debug.
14590
14591 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14592
14593 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14594 * nto-x86-low.c: Include server.h
14595
14596 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14597
14598 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14599 be consistent with other sources of this directory.
14600 (init_registers_amd64): Correct name of source file of this function
14601 in the comment.
14602
14603 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14604
14605 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14606 64-bit executables.
14607
14608 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14609
14610 * win32-i386-low.c: Add 64-bit support.
14611 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14612 (init_registers_amd64): Declare.
14613 (mappings): Add 64-bit version of array.
14614 (init_windows_x86): New function.
14615 (the_low_target): Change init_arch field to init_windows_x86.
14616
14617 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14618
14619 * win32-low.c: Adapt to support also 64-bit architecture.
14620 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14621 (get_image_name): Use SIZE_T type for local variable `done'.
14622 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14623 (toolhelp_get_dll_name): Idem.
14624 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14625 Use uintptr_t typecast to avoid warning.
14626 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14627 (handle_exception): Use phex_nz to avoid warning.
14628 (win32_wait): Remove unused local variable `process'.
14629
14630 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14631
14632 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14633 `amd64-avx.o'.
14634
14635 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14636
14637 * configure.ac: Use `ws2_32' library for srv_mingw.
14638 * configure: Regenerate.
14639 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14640 * remote-utils.c: Likewise.
14641
14642 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14643
14644 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14645 if __x86_64__ is defined.
14646
14647 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14648
14649 * configure: Regenerate.
14650
14651 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14652
14653 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14654 * target.h (target_ops): New get_tib_address field.
14655 * win32-low.h (win32_thread_info): Add thread_local_base field.
14656 * win32-low.c (child_add_thread): Add tlb argument.
14657 Set thread_local_base field to TLB.
14658 (get_child_debug_event): Adapt to child_add_thread change.
14659 (win32_get_tib_address): New function.
14660 (win32_target_ops): Set get_tib_address field to
14661 win32_get_tib_address.
14662 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14663
14664 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14665
14666 * linux-low.c (linux_mourn): Also remove the process.
14667 * server.c (handle_target_event): Don't remove the process here.
14668 * nto-low.c (nto_mourn): New.
14669 (nto_target_ops): Install it.
14670 * spu-low.c (spu_mourn): New.
14671 (spu_target_ops): Install it.
14672 * win32-low.c (win32_mourn): New.
14673 (win32_target_ops): Install it.
14674
14675 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14676
14677 * server.h (buffer_xml_printf): Remove redundant `;'.
14678
14679 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14680
14681 * regcache.c (set_register_cache): Invalidate regcaches before
14682 changing the register cache layout.
14683 (regcache_invalidate_one): Allow a NULL regcache.
14684 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14685 regcaches before changing the register cache layout or the target
14686 regsets.
14687
14688 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14689
14690 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14691 variable warning on Linux/x86-64.
14692
14693 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14694
14695 GDBserver disconnected tracing support.
14696
14697 * linux-low.c (linux_remove_process): Delete.
14698 (add_lwp): Don't set last_resume_kind here.
14699 (linux_kill): Use `mourn'.
14700 (linux_detach): Use `thread_db_detach', and `mourn'.
14701 (linux_mourn): New.
14702 (linux_attach_lwp_1): Adjust comment.
14703 (linux_attach): last_resume_kind moved the thread_info; adjust.
14704 (status_pending_p_callback): Adjust.
14705 (linux_wait_for_event_1): Adjust.
14706 (count_events_callback, select_singlestep_lwp_callback)
14707 (select_event_lwp_callback, cancel_breakpoints_callback)
14708 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14709 (proceed_one_lwp): Adjust.
14710 (linux_async): Add debug output.
14711 (linux_thread_stopped): New.
14712 (linux_pause_all): New.
14713 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14714 linux_pause_all.
14715 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14716 (thread_db_free): Delete declaration.
14717 (thread_db_detach, thread_db_mourn): Declare.
14718 * thread-db.c (thread_db_init): Use thread_db_mourn.
14719 (thread_db_free): Delete, split in two.
14720 (disable_thread_event_reporting): New.
14721 (thread_db_detach): New.
14722 (thread_db_mourn): New.
14723
14724 * server.h (struct thread_info) <last_resume_kind>: New field.
14725 <attached>: Add comment.
14726 <gdb_detached>: New field.
14727 (handler_func): Change return type to int.
14728 (handle_serial_event, handle_target_event): Ditto.
14729 (gdb_connected): Declare.
14730 (tracing): Delete.
14731 (disconnected_tracing): Declare.
14732 (stop_tracing): Declare.
14733
14734 * server.c (handle_query) <qSupported>: Report support for
14735 disconnected tracing.
14736 (queue_stop_reply_callback): Account for running threads.
14737 (gdb_wants_thread_stopped): New.
14738 (gdb_wants_all_threads_stopped): New.
14739 (gdb_reattached_process): New.
14740 (handle_status): Clear the `gdb_detached' flag of all processes.
14741 In all-stop, stop all threads.
14742 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14743 (process_serial_event): If the remote connection breaks, or if an
14744 exit was forced with "monitor exit", force an event loop exit.
14745 Handle disconnected tracing on detach.
14746 (handle_serial_event): Adjust.
14747 (handle_target_event): If GDB isn't connected, forward events back
14748 to the inferior, unless the last process exited, in which case,
14749 exit gdbserver. Adjust interface.
14750
14751 * remote-utils.c (remote_open): Don't block in accept. Instead
14752 register an event loop source on the listen socket file
14753 descriptor. Refactor bits into ...
14754 (listen_desc): ... this new global.
14755 (gdb_connected): ... this new function.
14756 (enable_async_notification): ... this new function.
14757 (handle_accept_event): ... this new function.
14758 (remote_close): Clear remote_desc.
14759
14760 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14761
14762 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14763 New fields.
14764 (mourn_inferior): Define.
14765 (target_process_qsupported): Avoid the dangling else problem.
14766 (thread_stopped): Define.
14767 (pause_all): Define.
14768 (target_waitstatus_to_string): Declare.
14769 * target.c (target_waitstatus_to_string): New.
14770
14771 * tracepoint.c (tracing): Make extern.
14772 (disconnected_tracing): New.
14773 (stop_tracing): Make extern. Handle tracing stops due to GDB
14774 disconnecting.
14775 (cmd_qtdisconnected): New.
14776 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14777 (handle_tracepoint_general_set): Handle QTDisconnected.
14778
14779 * event-loop.c (event_handler_func): Change return type to int.
14780 (process_event): Bail out if the event handler wants the event
14781 loop to stop.
14782 (handle_file_event): Ditto.
14783 (start_event_loop): Bail out if the event handler wants the event
14784 loop to stop.
14785
14786 * nto-low.c (nto_target_ops): Adjust.
14787 * spu-low.c (spu_wait): Don't remove the process here.
14788 (spu_target_ops): Adjust.
14789 * win32-low.c (win32_wait): Don't remove the process here.
14790 (win32_target_ops): Adjust.
14791
14792 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14793
14794 * regcache.c (realloc_register_cache): Invalidate inferior's
14795 regcache before recreating it.
14796
14797 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14798
14799 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14800
14801 2010-04-09 Stan Shebs <stan@codesourcery.com>
14802 Pedro Alves <pedro@codesourcery.com>
14803
14804 * server.h (LONGEST): New.
14805 (struct thread_info) <while_stepping>: New field.
14806 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14807 Declare.
14808 (initialize_tracepoint, handle_tracepoint_general_set)
14809 (handle_tracepoint_query, tracepoint_finished_step)
14810 (tracepoint_was_hit, release_while_stepping_state_list):
14811 (current_traceframe): Declare.
14812 * server.c (handle_general_set): Handle tracepoint packets.
14813 (read_memory): New.
14814 (write_memory): New.
14815 (handle_search_memory_1): Use read_memory.
14816 (handle_query): Report support for conditional tracepoints, trace
14817 state variables, and tracepoint sources. Handle tracepoint
14818 queries.
14819 (main): Initialize the tracepoints module.
14820 (process_serial_event): Handle traceframe reads/writes.
14821
14822 * linux-low.c (handle_tracepoints): New.
14823 (linux_wait_1): Call it.
14824 (linux_resume_one_lwp): Handle while-stepping.
14825 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14826 (linux_target_ops): Install them.
14827 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14828 New field.
14829 * linux-x86-low.c (x86_supports_tracepoints): New.
14830 (the_low_target). Install it.
14831
14832 * mem-break.h (delete_breakpoint): Declare.
14833 * mem-break.c (delete_breakpoint): Make external.
14834
14835 * target.h (struct target_ops): Add `supports_tracepoints',
14836 `read_pc', and `write_pc' fields.
14837 (target_supports_tracepoints): Define.
14838 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14839 (phex_nz): New.
14840
14841 * regcache.h (struct regcache) <registers_owned>: New field.
14842 (init_register_cache, regcache_cpy): Declare.
14843 (regcache_read_pc, regcache_write_pc): Declare.
14844 (register_cache_size): Declare.
14845 (supply_regblock): Declare.
14846 * regcache.c (init_register_cache): New.
14847 (new_register_cache): Use it.
14848 (regcache_cpy): New.
14849 (register_cache_size): New.
14850 (supply_regblock): New.
14851 (regcache_read_pc, regcache_write_pc): New.
14852
14853 * tracepoint.c: New.
14854
14855 * Makefile.in (OBS): Add tracepoint.o.
14856 (tracepoint.o): New rule.
14857
14858 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14859
14860 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14861 (i386-mmx.o): New.
14862 (i386-mmx.c): Likewise.
14863 (i386-mmx-linux.o): Likewise.
14864 (i386-mmx-linux.c): Likewise.
14865
14866 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14867 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14868 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14869 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14870
14871 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14872 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14873 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14874
14875 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14876
14877 * Makefile.in (clean): Updated.
14878 (i386-avx.o): New.
14879 (i386-avx.c): Likewise.
14880 (i386-avx-linux.o): Likewise.
14881 (i386-avx-linux.c): Likewise.
14882 (amd64-avx.o): Likewise.
14883 (amd64-avx.c): Likewise.
14884 (amd64-avx-linux.o): Likewise.
14885 (amd64-avx-linux.c): Likewise.
14886
14887 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14888 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14889 (srv_amd64_regobj): Add amd64-avx.o.
14890 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14891 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14892 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14893 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14894 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14895 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14896 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14897
14898 * i387-fp.c: Include "i386-xstate.h".
14899 (i387_xsave): New.
14900 (i387_cache_to_xsave): Likewise.
14901 (i387_xsave_to_cache): Likewise.
14902 (x86_xcr0): Likewise.
14903
14904 * i387-fp.h (i387_cache_to_xsave): Likewise.
14905 (i387_xsave_to_cache): Likewise.
14906 (x86_xcr0): Likewise.
14907
14908 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14909 * linux-crisv32-low.c (target_regsets): Likewise.
14910 * linux-m68k-low.c (target_regsets): Likewise.
14911 * linux-mips-low.c (target_regsets): Likewise.
14912 * linux-ppc-low.c (target_regsets): Likewise.
14913 * linux-s390-low.c (target_regsets): Likewise.
14914 * linux-sh-low.c (target_regsets): Likewise.
14915 * linux-sparc-low.c (target_regsets): Likewise.
14916 * linux-xtensa-low.c (target_regsets): Likewise.
14917
14918 * linux-low.c: Include <sys/uio.h>.
14919 (regsets_fetch_inferior_registers): Support nt_type.
14920 (regsets_store_inferior_registers): Likewise.
14921 (linux_process_qsupported): New.
14922 (linux_target_ops): Add linux_process_qsupported.
14923
14924 * linux-low.h (regset_info): Add nt_type.
14925 (linux_target_ops): Add process_qsupported.
14926
14927 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14928 and <sys/uio.h>.
14929 (init_registers_i386_avx_linux): New.
14930 (init_registers_amd64_avx_linux): Likewise.
14931 (xmltarget_i386_linux_no_xml): Likewise.
14932 (xmltarget_amd64_linux_no_xml): Likewise.
14933 (PTRACE_GETREGSET): Likewise.
14934 (PTRACE_SETREGSET): Likewise.
14935 (x86_fill_xstateregset): Likewise.
14936 (x86_store_xstateregset): Likewise.
14937 (use_xml): Likewise.
14938 (x86_linux_update_xmltarget): Likewise.
14939 (x86_linux_process_qsupported): Likewise.
14940 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14941 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14942 init_registers_i386_linux here. Call
14943 x86_linux_update_xmltarget.
14944 (the_low_target): Add x86_linux_process_qsupported.
14945
14946 * server.c (handle_query): Call target_process_qsupported.
14947
14948 * target.h (target_ops): Add process_qsupported.
14949 (target_process_qsupported): New.
14950
14951 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14952
14953 * inferiors.c (add_thread): Set last_status kind to
14954 TARGET_WAITKIND_IGNORE.
14955 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14956 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14957 (linux_wait_1): Move `thread' local definition to block that uses
14958 it. Don't NULL initialize `event_child'.
14959 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14960 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14961 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14962
14963 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14964
14965 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14966 an extended waitstatus, or by a watchpoint.
14967 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14968 thread was stepping or has been stopped by a watchpoint.
14969
14970 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14971
14972 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14973 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14974 of another, then delete the previous, and validate all
14975 breakpoints.
14976 (validate_inserted_breakpoint): New.
14977 (delete_disabled_breakpoints): New.
14978 (validate_breakpoints): New.
14979 (check_mem_read): Validate breakpoints before trusting their
14980 shadow. Delete disabled breakpoints.
14981 (check_mem_write): Validate breakpoints before trusting they
14982 should be inserted. Delete disabled breakpoints.
14983 * mem-break.h (validate_breakpoints):
14984 * server.c (handle_query): Validate breakpoints when we see a
14985 qSymbol query.
14986
14987 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14988
14989 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14990 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14991 if we could tell there's a GDB breakpoint at stop_pc.
14992 (need_step_over_p): Don't do a step over if we find a GDB
14993 breakpoint at the resume PC.
14994
14995 * mem-break.c (struct raw_breakpoint): New.
14996 (enum bkpt_type): New type `gdb_breakpoint'.
14997 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14998 fields. New field `raw'.
14999 (find_raw_breakpoint_at): New.
15000 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15001 breakpoint instead.
15002 (set_breakpoint_at): Adjust.
15003 (delete_raw_breakpoint): New.
15004 (release_breakpoint): New.
15005 (delete_breakpoint): Rename to...
15006 (delete_breakpoint_1): ... this. Add proc parameter. Use
15007 release_breakpoint. Return ENOENT.
15008 (delete_breakpoint): Reimplement.
15009 (find_breakpoint_at): Delete.
15010 (find_gdb_breakpoint_at): New.
15011 (delete_breakpoint_at): Delete.
15012 (set_gdb_breakpoint_at): New.
15013 (delete_gdb_breakpoint_at): New.
15014 (gdb_breakpoint_here): New.
15015 (set_reinsert_breakpoint): Use release_breakpoint.
15016 (uninsert_breakpoint): Rename to ...
15017 (uninsert_raw_breakpoint): ... this.
15018 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15019 (reinsert_raw_breakpoint): Change parameter type to
15020 raw_breakpoint.
15021 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15022 instead.
15023 (check_breakpoints): Adjust. Use release_breakpoint.
15024 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15025 (breakpoint_inserted_here): Ditto.
15026 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15027 Don't trust the breakpoint's shadow if it is not inserted.
15028 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15029 (delete_all_breakpoints): Adjust.
15030 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15031 use delete_breakpoint_1.
15032
15033 * mem-break.h (breakpoints_supported): Delete declaration.
15034 (set_gdb_breakpoint_at): Declare.
15035 (gdb_breakpoint_here): Declare.
15036 (delete_breakpoint_at): Delete.
15037 (delete_gdb_breakpoint_at): Declare.
15038
15039 * server.h (struct raw_breakpoint): Forward declare.
15040 (struct process_info): New field `raw_breakpoints'.
15041
15042 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15043 breakpoints.
15044
15045 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15046
15047 * linux-low.c (status_pending_p_callback): Fix comment.
15048 (linux_wait_for_event_1): Move most of the internal breakpoint
15049 handling from here...
15050 (linux_wait_1): ... to here.
15051 (count_events_callback): New.
15052 (select_singlestep_lwp_callback): New.
15053 (select_event_lwp_callback): New.
15054 (cancel_breakpoints_callback): New.
15055 (select_event_lwp): New.
15056 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15057 priority to all LWPs that have had events that should be reported
15058 to the client. Cancel breakpoints when about to reporting the
15059 event to the client, not while stopping lwps. No longer cancel
15060 finished single-steps here.
15061 (cancel_finished_single_step): Delete.
15062 (cancel_finished_single_steps): Delete.
15063
15064 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15065
15066 * mem-break.c (enum bkpt_type): New.
15067 (struct breakpoint): New field `type'.
15068 (set_breakpoint_at): Change return type to struct breakpoint
15069 pointer. Set type to `other_breakpoint' by default.
15070 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15071 in the breakpoint list.
15072 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15073 (reinsert_breakpoint): Rename to ...
15074 (reinsert_raw_breakpoint): ... this.
15075 (reinsert_breakpoints_at): Adjust.
15076 * mem-break.h (struct breakpoint): Declare.
15077 (set_breakpoint_at): Change return type to struct breakpoint
15078 pointer.
15079
15080 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15081
15082 * server.c (handle_query): Assign, not compare.
15083
15084 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15085
15086 Teach linux gdbserver to step-over-breakpoints.
15087
15088 * linux-low.c (can_hardware_single_step): New.
15089 (supports_breakpoints): New.
15090 (handle_extended_wait): If stopping threads, read the stop pc of
15091 the new cloned LWP.
15092 (get_pc): New.
15093 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15094 low target doesn't support retrieving the PC.
15095 (add_lwp): Set last_resume_kind to resume_continue.
15096 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15097 (linux_attach): Don't clear stop_expected. Set the lwp's
15098 last_resume_kind to resume_stop.
15099 (linux_detach_one_lwp): Don't check for removed breakpoints.
15100 (check_removed_breakpoint): Delete.
15101 (status_pending_p): Rename to ...
15102 (status_pending_p_callback): ... this. Don't check for removed
15103 breakpoints. Don't consider threads that are stopped from GDB's
15104 perspective.
15105 (linux_wait_for_lwp): Always read the stop_pc here.
15106 (cancel_breakpoint): New.
15107 (step_over_bkpt): New global.
15108 (linux_wait_for_event_1): Implement stepping over breakpoints.
15109 (gdb_wants_lwp_stopped): New.
15110 (gdb_wants_all_stopped): New.
15111 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15112 single-step traps here. Store the thread's last reported target
15113 wait status.
15114 (send_sigstop): Don't clear stop_expected. Always set it,
15115 instead.
15116 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15117 (cancel_finished_single_step): New.
15118 (cancel_finished_single_steps): New.
15119 (wait_for_sigstop): Don't cancel finished single-step traps here.
15120 (linux_resume_one_lwp): Don't check for removed breakpoints.
15121 Don't set `step' on non-hardware step archs.
15122 (linux_set_resume_request): Ignore resume_stop requests if already
15123 stopping or stopped. Set the lwp's last_resume_kind.
15124 (resume_status_pending_p): Don't check for removed breakpoints.
15125 (need_step_over_p): New.
15126 (start_step_over): New.
15127 (finish_step_over): New.
15128 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15129 requests. Clear the thread's last reported target waitstatus.
15130 Don't use the `suspended' flag. Don't consider pending breakpoints.
15131 (linux_resume): Start a step-over if necessary.
15132 (proceed_one_lwp): New.
15133 (proceed_all_lwps): New.
15134 (unstop_all_lwps): New.
15135 * linux-low.h (struct lwp_info): Rewrite comment for the
15136 `suspended' flag. Add the `stop_pc' field. Delete the
15137 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15138 Add `'last_resume_kind' and `need_step_over' fields.
15139 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15140 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15141 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15142 (set_raw_breakpoint_at): New.
15143 (set_breakpoint_at): Rewrite to use it.
15144 (reinsert_breakpoint_handler): Delete.
15145 (set_reinsert_breakpoint): New.
15146 (reinsert_breakpoint_by_bp): Delete.
15147 (delete_reinsert_breakpoints): New.
15148 (uninsert_breakpoint): Rewrite.
15149 (uninsert_breakpoints_at): New.
15150 (reinsert_breakpoint): Rewrite.
15151 (reinsert_breakpoints_at): New.
15152 (check_breakpoints): Rewrite.
15153 (breakpoint_here): New.
15154 (breakpoint_inserted_here): New.
15155 (check_mem_read): Adjust.
15156 * mem-break.h (breakpoints_supported, breakpoint_here)
15157 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15158 (reinsert_breakpoint_by_bp): Delete declaration.
15159 (delete_reinsert_breakpoints): Declare.
15160 (reinsert_breakpoint): Delete declaration.
15161 (reinsert_breakpoints_at): Declare.
15162 (uninsert_breakpoint): Delete declaration.
15163 (uninsert_breakpoints_at): Declare.
15164 (check_breakpoints): Adjust prototype.
15165 * server.h: Adjust include order.
15166 (struct thread_info): Declare here. Add a `last_status' field.
15167
15168 2010-03-23 Michael Snyder <msnyder@vmware.com>
15169
15170 * server.c (crc32): New function.
15171 (handle_query): Add handling for 'qCRC:' request.
15172
15173 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15174
15175 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15176 lwp had been stopped by a watchpoint.
15177
15178 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15179
15180 * server.h (internal_error): Declare.
15181 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15182 * utils.c (internal_error): New function.
15183
15184 2010-03-15 Andreas Schwab <schwab@redhat.com>
15185
15186 * configure.srv: Fix typo setting srv_regobj.
15187
15188 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15189
15190 * linux-low.c (fetch_register): Avoid passing a non string literal
15191 format to `error'.
15192 (usr_store_inferior_registers): Ditto.
15193
15194 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15195
15196 * linux-low.c (linux_write_memory): Bail out early if peeking
15197 memory failed.
15198
15199 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15200
15201 * linux-low.h (struct lwp_info): New fields
15202 `stopped_by_watchpoint' and `stopped_data_address'.
15203 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15204 here, and cache them in the lwp object.
15205 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15206 directly.
15207 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15208 field.
15209 (linux_stopped_by_watchpoint): Rewrite.
15210 (linux_stopped_data_address): Rewrite.
15211
15212 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15213
15214 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15215 switching the current inferior, not before.
15216
15217 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15218
15219 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15220 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15221 i386-linux.c and amd64-linux.c.
15222 (reg-i386.o): Removed.
15223 (reg-i386.c): Likewise.
15224 (reg-i386-linux.o): Likewise.
15225 (reg-i386-linux.c): Likewise.
15226 (reg-x86-64.o): Likewise.
15227 (reg-x86-64.c): Likewise.
15228 (reg-x86-64-linux.o): Likewise.
15229 (reg-x86-64-linux.c): Likewise.
15230 (i386.o): New.
15231 (i386.c): Likewise.
15232 (i386-linux.o): Likewise.
15233 (i386-linux.c): Likewise.
15234 (amd64.o): Likewise.
15235 (amd64.c): Likewise.
15236 (amd64-linux.o): Likewise.
15237 (amd64-linux.c): Likewise.
15238
15239 * configure.srv (srv_i386_regobj): New.
15240 (srv_i386_linux_regobj): Likewise.
15241 (srv_amd64_regobj): Likewise.
15242 (srv_amd64_linux_regobj): Likewise.
15243 (srv_i386_32bit_xmlfiles): Likewise.
15244 (srv_i386_64bit_xmlfiles): Likewise.
15245 (srv_i386_xmlfiles): Likewise.
15246 (srv_amd64_xmlfiles): Likewise.
15247 (srv_i386_linux_xmlfiles): Likewise.
15248 (srv_amd64_linux_xmlfiles): Likewise.
15249 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15250 srv_xmlfiles to $srv_i386_xmlfiles.
15251 (i[34567]86-*-mingw32ce*): Likewise.
15252 (i[34567]86-*-mingw*): Likewise.
15253 (i[34567]86-*-nto*): Likewise.
15254 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15255 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15256 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15257 (x86_64-*-linux*): Likewise.
15258
15259 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15260 (init_registers_amd64_linux): New.
15261 (x86_arch_setup): Replace init_registers_x86_64_linux with
15262 init_registers_amd64_linux.
15263
15264 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15265
15266 * configure.ac: Check for libdl. If it is not available link against
15267 static libthread_db.
15268 * configure: Regenerate.
15269
15270 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15271
15272 PR9605
15273
15274 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15275 handing a read watchpoint.
15276 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15277
15278 2010-02-12 Doug Evans <dje@google.com>
15279
15280 * linux-low.c (linux_supports_tracefork_flag): Document.
15281 (linux_look_up_symbols): Add comment.
15282
15283 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15284
15285 * regcache.c (supply_register): Clear regcache if buf is NULL.
15286
15287 2010-02-02 Nicolas Roche <roche@sourceware.org>
15288 Joel Brobecker <brobecker@adacore.com>
15289
15290 * inferiors.c (find_inferior): Add function documentation.
15291 (unloaded_dll): Handle the case where the unloaded dll has not
15292 been previously registered in the dll list.
15293
15294 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15295
15296 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15297 (thumb2_breakpoint): New.
15298 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15299
15300 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15301
15302 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15303 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15304 breakpoints.
15305
15306 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15307
15308 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15309
15310 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15311
15312 * linux-s390-low.c (s390_collect_ptrace_register)
15313 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15314
15315 2010-01-21 Doug Evans <dje@google.com>
15316
15317 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15318 (PTRACE_ARG4_TYPE): New macro.
15319 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15320 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15321 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15322 (usr_store_inferior_registers): Ditto.
15323 (linux_read_memory, linux_write_memory): Ditto.
15324 (linux_test_for_tracefork): Ditto.
15325
15326 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15327 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15328
15329 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15330
15331 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15332 target.
15333
15334 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15335
15336 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15337 prototype to take a regcache. Adjust.
15338
15339 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15340
15341 * regcache.h (struct thread_info): Forward declare.
15342 (struct regcache): New.
15343 (new_register_cache): Adjust prototype.
15344 (get_thread_regcache): Declare.
15345 (free_register_cache): Adjust prototype.
15346 (registers_to_string, registers_from_string): Ditto.
15347 (supply_register, supply_register_by_name, collect_register)
15348 (collect_register_as_string, collect_register_by_name): Ditto.
15349 * regcache.c (struct inferior_regcache_data): Delete.
15350 (get_regcache): Rename to ...
15351 (get_thread_regcache): ... this. Adjust. Switch inferior before
15352 fetching registers.
15353 (regcache_invalidate_one): Adjust.
15354 (regcache_invalidate): Fix prototype.
15355 (new_register_cache): Return the new register cache.
15356 (free_register_cache): Change prototype.
15357 (realloc_register_cache): Adjust.
15358 (registers_to_string): Change prototype to take a regcache. Adjust.
15359 (registers_from_string): Ditto.
15360 (register_data): Ditto.
15361 (supply_register): Ditto.
15362 (supply_register_by_name): Ditto.
15363 (collect_register): Ditto.
15364 (collect_register_as_string): Ditto.
15365 (collect_register_by_name): Ditto.
15366 * server.c (process_serial_event): Adjust.
15367 * linux-low.h (regset_fill_func, regset_store_func): Change
15368 prototype.
15369 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15370 Change prototype.
15371 * linux-low.c (get_stop_pc): Adjust.
15372 (check_removed_breakpoint): Adjust.
15373 (linux_wait_for_event): Adjust.
15374 (linux_resume_one_lwp): Adjust.
15375 (fetch_register): Add regcache parameter. Adjust.
15376 (usr_store_inferior_registers): Ditto.
15377 (regsets_fetch_inferior_registers): Ditto.
15378 (regsets_store_inferior_registers): Ditto.
15379 (linux_fetch_registers, linux_store_registers): Ditto.
15380 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15381 regcache. Adjust.
15382 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15383 Ditto.
15384 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15385 prototype to take a regcache.
15386 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15387 * remote-utils.c (convert_ascii_to_int, outreg)
15388 (prepare_resume_reply): Change prototype to take a regcache.
15389 Adjust.
15390 * target.h (struct target_ops) <fetch_registers, store_registers>:
15391 Change prototype to take a regcache.
15392 (fetch_inferior_registers, store_inferior_registers): Change
15393 prototype to take a regcache. Adjust.
15394 * proc-service.c (ps_lgetregs): Adjust.
15395 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15396 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15397 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15398 take a regcache. Adjust.
15399 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15400 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15401 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15402 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15403 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15404 (cris_cannot_fetch_register):
15405 (cris_breakpoint_at): Change prototype to take a regcache.
15406 Adjust.
15407 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15408 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15409 to take a regcache. Adjust.
15410 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15411 Adjust.
15412 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15413 take a regcache. Adjust.
15414 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15415 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15416 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15417 * linux-mips-low.c (mips_get_pc):
15418 (mips_set_pc): Change prototype to take a regcache. Adjust.
15419 (mips_reinsert_addr): Adjust.
15420 (mips_collect_register): Change prototype to take a regcache.
15421 Adjust.
15422 (mips_supply_register):
15423 (mips_collect_register_32bit, mips_supply_register_32bit)
15424 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15425 (mips_store_fpregset): Ditto.
15426 * linux-ppc-low.c (ppc_supply_ptrace_register)
15427 (ppc_supply_ptrace_register): Ditto.
15428 (parse_spufs_run): Adjust.
15429 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15430 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15431 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15432 take a regcache. Adjust.
15433 * linux-s390-low.c (s390_collect_ptrace_register)
15434 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15435 (s390_set_pc): Change prototype to take a regcache. Adjust.
15436 (s390_arch_setup): Adjust.
15437 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15438 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15439 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15440 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15441 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15442 regcache. Adjust.
15443 (sparc_breakpoint_at): Adjust.
15444 * linux-xtensa-low.c (xtensa_fill_gregset):
15445 (xtensa_store_gregset):
15446 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15447 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15448 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15449 prototype to take a regcache. Adjust.
15450 * win32-arm-low.c (arm_fetch_inferior_register)
15451 (arm_store_inferior_register): Change prototype to take a
15452 regcache. Adjust.
15453 * win32-i386-low.c (i386_fetch_inferior_register)
15454 (i386_store_inferior_register): Change prototype to take a
15455 regcache. Adjust.
15456 * win32-low.c (child_fetch_inferior_registers)
15457 (child_store_inferior_registers): Change prototype to take a
15458 regcache. Adjust.
15459 (win32_wait): Adjust.
15460 (win32_fetch_inferior_registers): Change prototype to take a
15461 regcache. Adjust.
15462 (win32_store_inferior_registers): Adjust.
15463 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15464 store_inferior_register>: Change prototype to take a regcache.
15465
15466 2010-01-20 Doug Evans <dje@google.com>
15467
15468 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15469 #ifdef.
15470 (linux_wait_for_event1, linux_init_signals): Ditto.
15471 (W_STOPCODE): Provide definition if missing.
15472
15473 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15474
15475 * linux-low.c (linux_core_of_thread): New.
15476 (compare_ints, show_process, list_threads): New.
15477 (linux_qxfer_osdata): Report threads and cores.
15478 (linux_target_op): Register linux_core_of_thread.
15479 * remote-utils.c (prepare_resume_reply): Report the core.
15480 (buffer_xml_printf): Support %d specifier.
15481 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15482 New.
15483 (handle_query): Handle qXfer:threads. Announce availability
15484 thereof.
15485 * target.h (struct target_ops): New field core_of_thread.
15486
15487 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15488
15489 * Makefile.in (clean): Remove new generated files.
15490 (reg-s390.o, reg-s390.c): Remove rules.
15491 (reg-s390x.o, reg-s390x.c): Likewise.
15492 (s390-linux32.o, s390-linux32.c): Add rules.
15493 (s390-linux64.o, s390-linux64.c): Likewise.
15494 (s390x-linux64.o, s390x-linux64.c): Likewise.
15495 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15496 * linux-s390-low.c: Include <elf.h>.
15497 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15498 (init_registers_s390): Remove prototype.
15499 (init_registers_s390x): Likewise.
15500 (init_registers_s390_linux32): Add prototype.
15501 (init_registers_s390_linux64): Likewise.
15502 (init_registers_s390x_linux64): Likewise.
15503 (s390_num_regs_3264): New define.
15504 (s390_regmap_3264): New global variable.
15505 (s390_cannot_fetch_register): Remove obsolete check.
15506 (s390_cannot_store_register): Likewise.
15507 (s390_collect_ptrace_register): Handle upper/lower register halves.
15508 (s390_supply_ptrace_register): Likewise.
15509 (s390_fill_gregset): Update to register number changes.
15510 (s390_get_hwcap): New routine.
15511 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15512 Install appropriate regmap and register set.
15513
15514 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15515
15516 * server.c (gdbserver_version): Update copyright year to 2010.
15517 * gdbreplay.c (gdbreplay_version): Likewise.
15518
15519 2009-12-28 Doug Evans <dje@google.com>
15520
15521 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15522 elf/external.h. Include <elf.h> instead but only if necessary.
15523
15524 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15525
15526 * linux-low.c (linux_remove_process): Remove `detaching'
15527 parameter. Don't release/detach from thread_db here.
15528 (linux_kill): Release/detach from thread_db here, ...
15529 (linux_detach): ... and here, before actually detaching.
15530 (linux_wait_1): ... and here, when a process exits.
15531 * thread-db.c (any_thread_of): New.
15532 (thread_db_free): Switch the current inferior to a thread of the
15533 passed in process.
15534
15535 2009-12-21 Doug Evans <dje@google.com>
15536
15537 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15538
15539 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15540 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15541 warning ifndef __NR_tkill. Move setting of errno there too.
15542 Delete unnecessary resetting of errno after syscall.
15543 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15544
15545 * configure.ac: Check for dladdr.
15546 * config.in: Regenerate.
15547 * configure: Regenerate.
15548 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15549 (try_thread_db_load): Update.
15550
15551 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15552
15553 2009-12-18 Doug Evans <dje@google.com>
15554
15555 * event-loop.c: Include unistd.h if it exists.
15556
15557 * linux-low.c (my_waitpid): Move definition away from being in
15558 between linux_tracefork_child/linux_test_for_tracefork.
15559
15560 * gdb_proc_service.h (psaddr_t): Fix type.
15561 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15562 signature to match glibc.
15563
15564 2009-12-16 Doug Evans <dje@google.com>
15565
15566 * linux-low.c (linux_read_memory): Fix argument to read.
15567
15568 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15569
15570 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15571 events, don't leave current_inferior pointing at null.
15572
15573 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15574
15575 * win32-low.c (LOG): Delete.
15576 (OUTMSG): Output to stderr.
15577 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15578 on compile time LOG macro.
15579 (win32_wait): Fix debug output.
15580
15581 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15582
15583 * win32-low.c (win32_add_one_solib): If the dll name is
15584 "ntdll.dll", prepend the system directory to the dll path.
15585
15586 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15587
15588 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15589
15590 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15591 Vladimir Prus <vladimir@codesourcery.com>
15592
15593 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15594 * configure.ac: Check for __mcoldfire__ and set
15595 gdb_cv_m68k_is_coldfire.
15596 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15597 reg-cf.o and reg-m68k.o.
15598 * configure: Regenerated.
15599
15600 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15601
15602 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15603 Pass it to thread_db_free.
15604 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15605 proper `detaching' argument to linux_remove_process.
15606 * linux-low.h (thread_db_free): Add `detaching' parameter.
15607 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15608 to thread_db_free.
15609 (thread_db_free): Add `detaching' parameter. Only
15610 call td_ta_clear_event if detaching from process.
15611
15612 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15613
15614 * thread-db.c (thread_db_free): Fix typo.
15615
15616 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15617
15618 PR gdb/10838
15619 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15620
15621 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15622
15623 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15624 with an i686 compiler.
15625 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15626 needed.
15627 * configure: Rebuilt.
15628
15629 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15630
15631 PR gdb/10783
15632
15633 * server.c (handle_search_memory_1): Correct read_addr initialization
15634 in loop for searching subsequent chunks.
15635
15636 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15637
15638 * configure.ac: New --with-libthread-db option.
15639 * thread-db.c: Allow direct dependence on libthread_db.
15640 (thread_db_free): Adjust.
15641 * config.in: Regenerate.
15642 * configure: Likewise.
15643
15644 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15645
15646 PR gdb/10757
15647 * thread-db.c (attach_thread): New function.
15648 (maybe_attach_thread): Return success/failure.
15649 (find_new_threads_callback): Adjust.
15650 (thread_db_find_new_threads): Loop until no new threads.
15651
15652 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15653
15654 * proc-service.c (ps_lgetregs): Formatting.
15655
15656 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15657
15658 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15659 * configure.ac: Adjust.
15660 * linux-low.h (struct process_info_private): Move members to struct
15661 thread_db.
15662 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15663 * linux-low.c (linux_remove_process): Adjust.
15664 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15665 * server.c (handle_query): Move code ...
15666 (handle_monitor_command): ... here. New function.
15667 * target.h (struct target_ops): New member.
15668 * thread-db.c (struct thread_db): New.
15669 (libthread_db_search_path): New variable.
15670 (thread_db_create_event, thread_db_enable_reporting)
15671 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15672 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15673 (try_thread_db_load_1, dladdr_to_soname): New functions.
15674 (try_thread_db_load, thread_db_load_search): New functions.
15675 (thread_db_init): Search for libthread_db.
15676 (thread_db_free): New function.
15677 (thread_db_handle_monitor_command): Likewise.
15678 * config.in: Regenerate.
15679 * configure: Regenerate.
15680
15681 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15682
15683 * spu-low.c (spu_kill): Wait for inferior to terminate.
15684 Call clear_inferiors.
15685 (spu_detach): Call clear_inferiors.
15686
15687 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15688
15689 * aclocal.m4: Regenerate.
15690 * config.in: Likewise.
15691 * configure: Likewise.
15692
15693 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15694
15695 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15696 (parse_spufs_run): New function.
15697 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15698 (ppc_breakpoint_at): Handle SPU breakpoints.
15699
15700 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15701
15702 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15703 (SPUFS_MAGIC): Define.
15704 (spu_enumerate_spu_ids): New function.
15705 (linux_qxfer_spu): New function.
15706 (linux_target_ops): Install linux_qxfer_spu.
15707
15708 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15709
15710 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15711 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15712 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15713 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15714 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15715 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15716 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15717 (init_registers_powerpc_cell32l): Add prototype.
15718 (init_registers_powerpc_cell64l): Likewise.
15719 (ppc_arch_setup): Detect Cell/B.E. architecture.
15720
15721 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15722
15723 * Makefile.in (datarootdir): New variable.
15724
15725 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15726
15727 * linux-low.c (linux_write_memory): Update debugging output.
15728 * Makefile.in (clean): Add new descriptions.
15729 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15730 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15731 * configure.srv: Add new files for arm*-*-linux*.
15732 * linux-arm-low.c: Add new declarations.
15733 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15734 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15735 (HWCAP_VFPv3D16): New.
15736 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15737 instead of __IWMMXT__.
15738 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15739 (arm_arch_setup): New.
15740 (target_regsets): Remove #ifdef. Add VFP regset.
15741 (the_low_target): Use arm_arch_setup.
15742
15743 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15744
15745 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15746 the main thread again.
15747
15748 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15749
15750 Adding Neutrino gdbserver.
15751 * configure: Regenerated.
15752 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15753 * configure.srv (i[34567]86-*-nto*): New target.
15754 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15755 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15756 (nto_comctrl) [__QNX__]: New function.
15757 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15758
15759 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15760
15761 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15762 srv_tgtobj.
15763
15764 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15765 Pedro Alves <pedro@codesourcery.com>
15766
15767 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15768 don't support CONTEXT_EXTENDED_REGISTERS.
15769 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15770 (the_low_target): Install them.
15771 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15772 failing with ERROR_PIPE_NOT_CONNECTED.
15773
15774 2009-06-30 Doug Evans <dje@google.com>
15775 Pierre Muller <muller@ics.u-strasbg.fr>
15776
15777 Add h/w watchpoint support to x86-linux, win32-i386.
15778 * Makefile.in (SFILES): Add i386-low.c
15779 (i386_low_h): Define.
15780 (i386-low.o): Add dependencies.
15781 (linux-x86-low.o): Add i386-low.h dependency.
15782 (win32-i386-low.o): Ditto.
15783 * i386-low.c: New file.
15784 * i386-low.h: New file.
15785 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15786 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15787 * linux-low.c (linux_add_process): Initialize arch_private.
15788 (linux_remove_process): Free arch_private.
15789 (add_lwp): Initialize arch_private.
15790 (delete_lwp): Free arch_private.
15791 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15792 provided.
15793 * linux-low.h (process_info_private): New member arch_private.
15794 (lwp_info): New member arch_private.
15795 (linux_target_ops): New members new_process, new_thread,
15796 prepare_to_resume.
15797 (ptid_of): New macro.
15798 * linux-x86-low.c: Include stddef.h, i386-low.h.
15799 (arch_process_info): New struct.
15800 (arch_lwp_info): New struct.
15801 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15802 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15803 (i386_dr_low_get_status): New function.
15804 (x86_insert_point, x86_remove_point): New functions.
15805 (x86_stopped_by_watchpoint): New function.
15806 (x86_stopped_data_address): New function.
15807 (x86_linux_new_process, x86_linux_new_thread): New functions.
15808 (x86_linux_prepare_to_resume): New function.
15809 (the_low_target): Add entries for insert_point, remove_point,
15810 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15811 prepare_to_resume.
15812 * server.c (debug_hw_points): New global.
15813 (monitor_show_help): Document set debug-hw-points.
15814 (handle_query): Process "set debug-hw-points".
15815 * server.h (debug_hw_points): Declare.
15816 (paddress): Declare.
15817 * utils.c (NUMCELLS, CELLSIZE): New macros.
15818 (get_sell, xsnprintf, paddress): New functions.
15819 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15820 remove_point, stopped_by_watchpoint, stopped_data_address.
15821 * win32-i386-low.c: Include i386-low.h.
15822 (debug_reg_state): Replaces dr.
15823 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15824 (i386_dr_low_get_status): New function.
15825 (i386_insert_point, i386_remove_point): New functions.
15826 (i386_stopped_by_watchpoint): New function.
15827 (i386_stopped_data_address): New function.
15828 (i386_initial_stuff): Update.
15829 (get_thread_context,set_thread_context,i386_thread_added): Update.
15830 (the_low_target): Add entries for insert_point,
15831 remove_point, stopped_by_watchpoint, stopped_data_address.
15832 * win32-low.c (win32_insert_watchpoint): New function.
15833 (win32_remove_watchpoint): New function.
15834 (win32_stopped_by_watchpoint): New function.
15835 (win32_stopped_data_address): New function.
15836 (win32_target_ops): Add entries for insert_watchpoint,
15837 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15838 * win32-low.h (win32_target_ops): New members insert_point,
15839 remove_point, stopped_by_watchpoint, stopped_data_address.
15840
15841 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15842
15843 * server.c (process_serial_event): Re-return unsupported, not
15844 error, if the type isn't recognized. Re-allow supporting only
15845 insert or remove packets. Also call require_running for
15846 breakpoints. Add missing break statement to default case. Tidy.
15847 * target.h (struct target_ops): Rename insert_watchpoint to
15848 insert_point, and remove_watchpoint to remove_point.
15849
15850 * linux-low.h (struct linux_target_ops): Likewise.
15851 * linux-low.c (linux_insert_watchpoint): Rename to ...
15852 (linux_insert_point): ... this. Adjust.
15853 (linux_remove_watchpoint): Rename to ...
15854 (linux_remove_point): ... this. Adjust.
15855 (linux_target_ops): Adjust.
15856 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15857 (cris_insert_point): ... this.
15858 (cris_remove_watchpoint): Rename to ...
15859 (cris_remove_point): ... this.
15860 (the_low_target): Adjust.
15861
15862 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15863
15864 * server.c (handle_v_kill): Pass signal_pid to
15865 kill_inferior if multi_process is zero.
15866
15867 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15868
15869 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15870 * target.h (target_ops): Comment for *_watchpoint to make it clear
15871 the functions can get types '0' and '1'.
15872
15873 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15874
15875 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15876 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15877 * regcache.c (get_regcache): Likewise.
15878 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15879 * win32-low.c (child_fetch_inferior_registers): Remove check for
15880 regno 0.
15881
15882 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15883 Pedro Alves <pedro@codesourcery.com>
15884
15885 * target.h (struct target_ops) <supports_multi_process>: New
15886 callback.
15887 (target_supports_multi_process): New.
15888 * server.c (handle_query): Even if GDB reports support, only
15889 enable multi-process if the target also supports it. Report
15890 multi-process support only if the target backend supports it.
15891 * linux-low.c (linux_supports_multi_process): New function.
15892 (linux_target_ops): Install it as target_supports_multi_process
15893 callback.
15894
15895 2009-05-24 Doug Evans <dje@google.com>
15896
15897 Global renaming of find_thread_pid to find_thread_ptid.
15898 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15899 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15900 All callers updated.
15901
15902 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15903 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15904 directly.
15905
15906 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15907 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15908 (linux_resume_one_lwp): Ditto.
15909
15910 2009-05-23 Doug Evans <dje@google.com>
15911
15912 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15913 from struct inferior_list_entry * to struct lwp_info *.
15914 All callers updated.
15915
15916 2009-05-13 Doug Evans <dje@google.com>
15917
15918 * linux-x86-low.c: Don't include assert.h.
15919 (x86_siginfo_fixup): Use fatal, not assert.
15920 (x86_arch_setup): Fix comment.
15921
15922 2009-05-12 Doug Evans <dje@google.com>
15923
15924 Biarch support for i386/amd64 gdbserver.
15925 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15926 Add linux-x86-low.c.
15927 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15928 (linux-x86-low.o): Add.
15929 * linux-x86-64-low.c: Delete.
15930 * linux-i386-low.c: Delete.
15931 * linux-x86-low.c: New file.
15932 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15933 linux-x86-low.o.
15934 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15935 linux-x86-low.o.
15936 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15937 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15938 (linux_child_pid_to_exec_file): New function.
15939 (elf_64_header_p, elf_64_file_p): New functions.
15940 (siginfo_fixup): New function.
15941 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15942 give target a chance to convert layout.
15943 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15944 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15945
15946 2009-05-07 Doug Evans <dje@google.com>
15947
15948 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15949 (regsets_store_inferior_registers): Ditto.
15950
15951 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15952
15953 PR server/10048
15954
15955 * linux-low.c (must_set_ptrace_flags): Delete.
15956 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15957 of the global.
15958 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15959 `lwp->must_set_ptrace_flags' instead.
15960 (linux_wait_for_event_1): Set ptrace options here.
15961 (linux_wait_1): ... not here.
15962
15963 2009-04-30 Doug Evans <dje@google.com>
15964
15965 * inferiors.c (started_inferior_callback): New function.
15966 (attached_inferior_callback): New function.
15967 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15968 * server.c (print_started_pid, print_attached_pid): New functions.
15969 (detach_or_kill_for_exit): New function.
15970 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15971 * server.h (have_started_inferiors_p): Declare.
15972 (have_attached_inferiors_p): Declare.
15973
15974 * inferiors.c (remove_process): Fix memory leak, free process.
15975 * linux-low.c (linux_remove_process): New function.
15976 (linux_kill): Call it instead of remove_process.
15977 (linux_detach, linux_wait_1): Ditto.
15978
15979 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15980
15981 * configure.srv: Add x86 Windows CE target.
15982
15983 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15984
15985 * inferiors.c (get_thread_process): Make global.
15986 * server.h (get_thread_process): Add prototype.
15987 * thread-db.c (find_one_thread): Use get_thread_process
15988 instead of current_process.
15989 (thread_db_get_tls_address): Do not crash if called when
15990 thread layer is not yet initialized.
15991
15992 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15993
15994 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15995 * spu-low.c (current_tid): Rename to ...
15996 (current_ptid): ... this.
15997 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15998 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15999 ptid_get_lwp (current_ptid) instead of current_tid.
16000 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16001 instead of current_tid. Use find_process_pid to verify pid
16002 argument is valid. Pass proper argument to remove_process.
16003 (spu_thread_alive): Compare current_ptid instead of current_tid.
16004 (spu_resume): Likewise.
16005
16006 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16007
16008 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16009 variable.
16010
16011 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16012
16013 Implement the multiprocess extensions, and add linux multiprocess
16014 support.
16015
16016 * server.h (ULONGEST): Declare.
16017 (struct ptid, ptid_t): New.
16018 (minus_one_ptid, null_ptid): Declare.
16019 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16020 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16021 (struct inferior_list_entry): Change `id' type from unsigned from
16022 to ptid_t.
16023 (struct sym_cache, struct breakpoint, struct
16024 process_info_private): Forward declare.
16025 (struct process_info): Declare.
16026 (current_process): Declare.
16027 (all_processes): Declare.
16028 (initialize_inferiors): Declare.
16029 (add_thread): Adjust to use ptid_t.
16030 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16031 (add_process, remove_process, find_thread_pid): Declare.
16032 (find_inferior_id): Adjust to use ptid_t.
16033 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16034 (multi_process): Declare.
16035 (push_event): Adjust to use ptid_t.
16036 (read_ptid, write_ptid): Declare.
16037 (prepare_resume_reply): Adjust to use ptid_t.
16038 (clear_symbol_cache): Declare.
16039 * inferiors.c (all_processes): New.
16040 (null_ptid, minus_one_ptid): New.
16041 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16042 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16043 (add_thread): Change unsigned long to ptid. Remove gdb_id
16044 parameter. Adjust.
16045 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16046 (gdb_id_to_thread): Rename to ...
16047 (find_thread_pid): ... this. Change unsigned long to ptid.
16048 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16049 (loaded_dll, pull_pid_from_list): Adjust.
16050 (add_process, remove_process, find_process_pid)
16051 (get_thread_process, current_process, initialize_inferiors): New.
16052 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16053 (struct target_waitstatus) <related_pid>: Ditto.
16054 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16055 return type to int.
16056 (struct target_ops) <join>: Add `pid' argument.
16057 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16058 (struct target_ops) <wait>: Add `ptid' field. Change return type
16059 to ptid.
16060 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16061 (mywait): Add `ptid' argument. Change return type to ptid_t.
16062 (target_pid_to_str): Declare.
16063 * target.c (set_desired_inferior): Adjust to use ptids.
16064 (mywait): Add new `ptid' argument. Adjust.
16065 (target_pid_to_str): New.
16066 * mem-break.h (free_all_breakpoints): Declare.
16067 * mem-break.c (breakpoints): Delelete.
16068 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16069 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16070 to use per-process breakpoint list.
16071 (free_all_breakpoints): New.
16072 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16073 (symbol_cache, all_symbols_looked_up): Delete.
16074 (hexchars): New.
16075 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16076 read_ptid): New.
16077 (prepare_resume_reply): Change ptid argument's type from unsigned
16078 long to ptid_t. Adjust. Implement W;process and X;process.
16079 (free_sym_cache, clear_symbol_cache): New.
16080 (look_up_one_symbol): Adjust to per-process symbol cache. *
16081 * server.c (cont_thread, general_thread, step_thread): Change type
16082 to ptid_t.
16083 (attached): Delete.
16084 (multi_process): New.
16085 (last_ptid): Change type to ptid_t.
16086 (struct vstop_notif) <ptid>: Change type to ptid_t.
16087 (queue_stop_reply, push_event): Change `ptid' argument's type to
16088 ptid_t.
16089 (discard_queued_stop_replies): Add `pid' argument.
16090 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16091 changes. Don't reference the `attached' global.
16092 (attach_inferior): Adjust to mywait interface changes.
16093 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16094 features. Handle and report "multiprocess+". Handle
16095 "qAttached:PID".
16096 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16097 changes.
16098 (handle_v_kill): New.
16099 (handle_v_stopped): Adjust to use target_pid_to_str.
16100 (handle_v_requests): Allow multiple attaches and runs when
16101 multiprocess extensions are in effect. Handle "vKill".
16102 (myresume): Adjust to use ptids.
16103 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16104 (handle_status): Adjust to discard_queued_stop_replies interface
16105 change.
16106 (first_thread_of, kill_inferior_callback)
16107 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16108 (main): Call initialize_inferiors. Adjust to use ptids, killing
16109 and detaching from all inferiors. Handle multiprocess packet
16110 variants.
16111 * linux-low.h: Include gdb_proc_service.h.
16112 (struct process_info_private): New.
16113 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16114 <lwpid_of>: Use ptid_get_lwp.
16115 (get_lwp_thread): Adjust.
16116 (struct lwp_info): Add `dead' member.
16117 (find_lwp_pid): Declare.
16118 * linux-low.c (thread_db_active): Delete.
16119 (new_inferior): Adjust comment.
16120 (inferior_pid): Delete.
16121 (linux_add_process): New.
16122 (handle_extended_wait): Adjust.
16123 (add_lwp): Change unsigned long to ptid.
16124 (linux_create_inferior): Add process to processes table. Adjust
16125 to use ptids. Don't set new_inferior here.
16126 (linux_attach_lwp): Rename to ...
16127 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16128 it. Adjust to use ptids.
16129 (linux_attach_lwp): New.
16130 (linux_attach): Add process to processes table. Don't set
16131 new_inferior here.
16132 (struct counter): New.
16133 (second_thread_of_pid_p, last_thread_of_process_p): New.
16134 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16135 multiple processes.
16136 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16137 processes. Remove process from process table.
16138 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16139 to multiple processes.
16140 (any_thread_of): New.
16141 (linux_detach): Add `pid' argument, and handle it. Remove process
16142 from processes table.
16143 (linux_join): Add `pid' argument. Handle it.
16144 (linux_thread_alive): Change unsighed long argument to ptid_t.
16145 Consider dead lwps as not being alive.
16146 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16147 threads we're not interested in.
16148 (same_lwp, find_lwp_pid): New.
16149 (linux_wait_for_lwp): Change `pid' argument's type from int to
16150 ptid_t. Adjust.
16151 (linux_wait_for_event): Rename to ...
16152 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16153 from int to ptid_t. Adjust.
16154 (linux_wait_for_event): New.
16155 (linux_wait_1): Add `ptid' argument. Change return type to
16156 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16157 that exit from the process table.
16158 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16159 Adjust.
16160 (mark_lwp_dead): New.
16161 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16162 stopping all threads, mark its main lwp as dead.
16163 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16164 ptids.
16165 (fetch_register, usr_store_inferior_registers)
16166 (regsets_fetch_inferior_registers)
16167 (regsets_store_inferior_registers, linux_read_memory)
16168 (linux_write_memory): Inline `inferior_pid'.
16169 (linux_look_up_symbols): Adjust to use per-process
16170 `thread_db_active'.
16171 (linux_request_interrupt): Adjust to use ptids.
16172 (linux_read_auxv): Inline `inferior_pid'.
16173 (initialize_low): Don't reference thread_db_active.
16174 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16175 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16176 (ps_getpid): Return the pid of the current inferior.
16177 * thread-db.c (proc_handle, thread_agent): Delete.
16178 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16179 per-process data.
16180 (find_one_thread): Change argument type to ptid_t. Adjust to
16181 per-process data.
16182 (maybe_attach_thread): Adjust to per-process data and ptids.
16183 (thread_db_find_new_threads): Ditto.
16184 (thread_db_init): Ditto.
16185 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16186 processes table. Adjust to use ptids.
16187 (spu_kill, spu_detach): Adjust interface. Remove process from
16188 processes table.
16189 (spu_join, spu_thread_alive): Adjust interface.
16190 (spu_wait): Adjust interface. Remove process from processes
16191 table. Adjust to use ptids.
16192 * win32-low.c (current_inferior_tid): Delete.
16193 (current_inferior_ptid): New.
16194 (debug_event_ptid): New.
16195 (thread_rec): Take a ptid. Adjust.
16196 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16197 (child_delete_thread): Ditto.
16198 (do_initial_child_stuff): Add `attached' argument. Add process to
16199 processes table.
16200 (child_fetch_inferior_registers, child_store_inferior_registers):
16201 Adjust.
16202 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16203 (win32_attach): Pass 1 to do_initial_child_stuff.
16204 (win32_kill): Adjust interface. Remove process from processes
16205 table.
16206 (win32_detach): Ditto.
16207 (win32_join): Adjust interface.
16208 (win32_thread_alive): Take a ptid.
16209 (win32_resume): Adjust to use ptids.
16210 (get_child_debug_event): Ditto.
16211 (win32_wait): Adjust interface. Remove exiting process from
16212 processes table.
16213
16214 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16215
16216 Non-stop mode support.
16217
16218 * server.h (non_stop): Declare.
16219 (gdb_client_data, handler_func): Declare.
16220 (delete_file_handler, add_file_handler, start_event_loop):
16221 Declare.
16222 (handle_serial_event, handle_target_event, push_event)
16223 (putpkt_notif): Declare.
16224 * target.h (enum resume_kind): New.
16225 (struct thread_resume): Replace `step' field by `kind' field.
16226 (TARGET_WNOHANG): Define.
16227 (struct target_ops) <wait>: Add `options' argument.
16228 <supports_non_stop, async, start_non_stop>: New fields.
16229 (target_supports_non_stop, target_async): New.
16230 (start_non_stop): Declare.
16231 (mywait): Add `options' argument.
16232 * target.c (mywait): Add `options' argument. Print child exit
16233 notifications here.
16234 (start_non_stop): New.
16235 * server.c (non_stop, own_buf, mem_buf): New globals.
16236 (struct vstop_notif): New.
16237 (notif_queue): New global.
16238 (queue_stop_reply, push_event, discard_queued_stop_replies)
16239 (send_next_stop_reply): New.
16240 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16241 interface changes.
16242 (attach_inferior): In non-stop mode, don't wait for the target
16243 here.
16244 (handle_general_set): Handle QNonStop.
16245 (handle_query): When handling qC, return the current general
16246 thread, instead of the first thread of the list.
16247 (handle_query): If the backend supports non-stop mode, include
16248 QNonStop+ in the qSupported query response.
16249 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16250 and non-stop mode.
16251 (handle_v_attach, handle_v_run): Handle non-stop mode.
16252 (handle_v_stopped): New.
16253 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16254 (myresume): Adjust to use resume_kind. Handle non-stop.
16255 (queue_stop_reply_callback): New.
16256 (handle_status): Handle non-stop mode.
16257 (main): Clear non_stop flag on reconnection. Use the event-loop.
16258 Refactor serial protocol handling from here ...
16259 (process_serial_event): ... to this new function. When GDB
16260 selects any thread, select one here. In non-stop mode, wait until
16261 GDB acks all pending events before exiting.
16262 (handle_serial_event, handle_target_event): New.
16263 * remote-utils.c (remote_open): Install remote_desc in the event
16264 loop.
16265 (remote_close): Remove remote_desc from the event loop.
16266 (putpkt_binary): Rename to...
16267 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16268 (putpkt_binary): New as wrapper around putpkt_binary_1.
16269 (putpkt_notif): New.
16270 (prepare_resume_reply): In non-stop mode, don't change the
16271 general_thread.
16272 * event-loop.c: New.
16273 * Makefile.in (OBJ): Add event-loop.o.
16274 (event-loop.o): New rule.
16275
16276 * linux-low.h (pid_of): Moved here.
16277 (lwpid_of): New.
16278 (get_lwp_thread): Use lwpid_of.
16279 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16280 * linux-low.c (pid_of): Delete.
16281 (inferior_pid): Use lwpid_of.
16282 (linux_event_pipe): New.
16283 (target_is_async_p): New.
16284 (delete_lwp): New.
16285 (handle_extended_wait): Use lwpid_of.
16286 (add_lwp): Don't set lwpid field.
16287 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16288 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16289 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16290 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16291 first. Adjust to linux_wait_for_event interface changes. Use
16292 lwpid_of.
16293 (linux_detach): Don't delete the main lwp here.
16294 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16295 (status_pending_p): Don't consider explicitly suspended lwps.
16296 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16297 pointer. Add OPTIONS argument. Change return type to int. Use
16298 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16299 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16300 pointer. Add status pointer argument. Return a pid instead of a
16301 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16302 changes. In non-stop mode, don't switch to a random thread.
16303 (linux_wait): Rename to...
16304 (linux_wait_1): ... this. Add target_options argument, and handle
16305 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16306 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16307 clean exit and signal exit code. Don't stop all threads in
16308 non-stop mode. In all-stop mode, only stop all threads when
16309 reporting a stop to GDB. Handle explicit thread stop requests.
16310 (async_file_flush, async_file_mark): New.
16311 (linux_wait): New.
16312 (send_sigstop): Use lwpid_of.
16313 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16314 interface changes. In non-stop mode, don't switch to a random
16315 thread.
16316 (linux_resume_one_lwp): Use lwpid_of.
16317 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16318 (linux_resume_one_thread): ... this. Handle resume_stop. In
16319 non-stop mode, don't look for pending flag in all threads.
16320 (resume_status_pending_p): Don't consider explicitly suspended
16321 threads.
16322 (my_waitpid): Reimplement. Emulate __WALL.
16323 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16324 Use lwpid_of.
16325 (sigchld_handler, linux_supports_non_stop, linux_async)
16326 (linux_start_non_stop): New.
16327 (linux_target_ops): Register linux_supports_non_stop, linux_async
16328 and linux_start_non_stop.
16329 (initialize_low): Install SIGCHLD handler.
16330 * thread-db.c (thread_db_create_event, find_one_thread)
16331 (thread_db_get_tls_address): Use lwpid_of.
16332 * win32-low.c (win32_detach): Adjust to use resume_kind.
16333 (win32_wait): Add `options' argument.
16334 * spu-low.c (spu_resume): Adjust to use resume_kind.
16335 (spu_wait): Add `options' argument.
16336
16337 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16338
16339 Decouple target code from remote protocol.
16340
16341 * target.h (enum target_waitkind): New.
16342 (struct target_waitstatus): New.
16343 (struct target_ops) <wait>: Return an unsigned long. Take a
16344 target_waitstatus pointer instead of a char pointer.
16345 (mywait): Likewise.
16346 * target.c (mywait): Change prototype to return an unsigned long.
16347 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16348 * server.h (thread_from_wait, old_thread_from_wait): Delete
16349 declarations.
16350 (prepare_resume_reply): Change prototype to take a
16351 target_waitstatus.
16352 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16353 (last_status, last_ptid): New.
16354 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16355 pid instead of a signal.
16356 (attach_inferior): Remove "status" and "signal" parameters.
16357 Adjust.
16358 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16359 not as an address.
16360 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16361 (handle_v_requests, myresume): Remove "status" and "signal"
16362 parameters. Adjust.
16363 (handle_status): New.
16364 (main): Delete local `status'. Adjust.
16365 * remote-utils.c: Include target.h.
16366 (prepare_resume_reply): Change prototype to take a
16367 target_waitstatus. Adjust.
16368
16369 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16370 interface.
16371 * spu-low.c (spu_wait): Adjust.
16372 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16373 Delete.
16374 (win32_wait): Adjust.
16375
16376 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16377
16378 * target.h (struct thread_resume): Delete leave_stopped member.
16379 (struct target_ops): Add a `n' argument to the `resume' callback.
16380 * server.c (start_inferior): Adjust.
16381 (handle_v_cont, myresume): Adjust.
16382 * linux-low.c (check_removed_breakpoint): Adjust to resume
16383 interface change, and to removed leave_stopped field.
16384 (resume_ptr): Delete.
16385 (struct thread_resume_array): New.
16386 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16387 resume interface change.
16388 (linux_continue_one_thread, linux_queue_one_thread)
16389 (resume_status_pending_p): Check if the resume field is NULL
16390 instead of checking the leave_stopped member.
16391 (linux_resume): Adjust to the target resume interface change.
16392 * spu-low.c (spu_resume): Adjust to the target resume interface
16393 change.
16394 * win32-low.c (win32_detach, win32_resume): Ditto.
16395
16396 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16397
16398 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16399 flag.
16400 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16401 pending.
16402 (linux_continue_one_thread): Only preserve the stepping flag if
16403 there's a pending breakpoint.
16404
16405 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16406
16407 * server.c (main): After the inferior having exited, call
16408 remote_close before exiting gdbserver.
16409
16410 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16411
16412 Fix size of FPSCR in Power 7 processors.
16413 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16414 (PPC_FEATURE_HAS_DFP): New #define.
16415 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16416 size of the FPSCR.
16417
16418 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16419
16420 * server.c (handle_query) Whitespace and formatting.
16421
16422 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16423
16424 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16425 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16426 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16427 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16428 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16429 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16430 Makefile.in, configure.ac: Fix whitespace throughout.
16431 * configure: Regenerate.
16432
16433 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16434
16435 * inferiors.c (find_inferior): Make it safe for the callback
16436 function to delete the currently iterated inferior.
16437
16438 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16439
16440 * Makefile.in (linuw_low_h): Move higher.
16441 (thread-db.o): Depend on $(linux_low_h).
16442
16443 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16444
16445 Rename "process" to "lwp" throughout.
16446
16447 * linux-low.c (all_processes): Rename to...
16448 (all_lwps): ... this.
16449 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16450 (add_process): Rename to ...
16451 (add_lwp): ... this. Adjust.
16452 (linux_create_inferior): Adjust.
16453 (linux_attach_lwp): Adjust.
16454 (linux_attach): Adjust.
16455 (linux_kill_one_process): Rename to ...
16456 (linux_kill_one_lwp): ... this. Adjust.
16457 (linux_kill): Adjust.
16458 (linux_detach_one_process): Rename to ...
16459 (linux_detach_one_lwp): ... this. Adjust.
16460 (linux_detach): Adjust.
16461 (check_removed_breakpoint): Adjust.
16462 (status_pending_p): Adjust.
16463 (linux_wait_for_process): Rename to ...
16464 (linux_wait_for_lwp): ... this. Adjust.
16465 (linux_wait_for_event): Adjust.
16466 (send_sigstop): Adjust.
16467 (wait_for_sigstop): Adjust.
16468 (stop_all_processes): Rename to ...
16469 (stop_all_lwps): ... this.
16470 (linux_resume_one_process): Rename to ...
16471 (linux_resume_one_lwp): ... this. Adjust.
16472 (linux_set_resume_request, linux_continue_one_thread)
16473 (linux_queue_one_thread, resume_status_pending_p)
16474 (usr_store_inferior_registers, regsets_store_inferior_registers)
16475 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16476 Adjust.
16477 * linux-low.h (get_process): Rename to ...
16478 (get_lwp): ... this. Adjust.
16479 (get_thread_process): Rename to ...
16480 (get_thread_lwp): ... this. Adjust.
16481 (get_process_thread): Rename to ...
16482 (get_lwp_thread): ... this. Adjust.
16483 (struct process_info): Rename to ...
16484 (struct lwp_info): ... this.
16485 (all_processes): Rename to ...
16486 (all_lwps): ... this.
16487 * proc-service.c (ps_lgetregs): Adjust.
16488 * thread-db.c (thread_db_create_event, find_one_thread)
16489 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16490
16491 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16492
16493 * server.c (handle_query): Handle "qAttached".
16494
16495 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16496
16497 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16498 GPLv3, update license URL.
16499
16500 2009-03-01 Doug Evans <dje@google.com>
16501
16502 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16503 (server_h): Add gdb_signals.h.
16504 (signals.o): Update.
16505 * server.h (target_signal_from_host,target_signal_to_host_p)
16506 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16507
16508 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16509
16510 * remote-utils.c (getpkt): Also generate remote-debug
16511 information if noack_mode is set.
16512
16513 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16514
16515 * server.c (handle_query): Report qXfer:siginfo:read and
16516 qXfer:siginfo:write as supported and handle them.
16517 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16518 * linux-low.c (linux_xfer_siginfo): New.
16519 (linux_target_ops): Set it.
16520
16521 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16522
16523 * server.c (gdbserver_usage): Mention --remote-debug.
16524 (main): Accept '--remote-debug' switch.
16525
16526 2009-01-18 Doug Evans <dje@google.com>
16527
16528 * regcache.c (new_register_cache): No need to check result of xcalloc.
16529 * server.c (handle_search_memory): Back out calls to xmalloc,
16530 result is checked and error is returned to user upon failure.
16531 (handle_query): Ditto. Add more checks for result of malloc.
16532 (handle_v_cont): Check result of malloc, report error back to
16533 user upon failure.
16534 (handle_v_run): Ditto. Call freeargv.
16535 * server.h (freeargv): Declare.
16536 * utils.c (freeargv): New fn.
16537
16538 2009-01-15 Doug Evans <dje@google.com>
16539
16540 * gdbreplay.c (perror_with_name): Make arg const char *.
16541 * server.h (target_signal_to_name): Make return type const char *.
16542 * thread-db.c (thread_db_err_str): Make return type const char *.
16543 * utils.c (perror_with_name): Make arg const char *.
16544
16545 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16546
16547 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16548 when handling a EXIT_PROCESS_DEBUG_EVENT.
16549
16550 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16551
16552 * gdbreplay.c (gdbreplay_version): Update copyright year.
16553 * server.c (gdbserver_version): Likewise.
16554
16555 2009-01-05 Doug Evans <dje@google.com>
16556
16557 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16558 (handle_extended_wait): Improve comment.
16559
16560 2008-12-13 Doug Evans <dje@google.com>
16561
16562 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16563 * server.h (ATTR_MALLOC): New macro.
16564 (xmalloc,xcalloc,xstrdup): Declare.
16565 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16566 * inferiors.c: Ditto.
16567 * linux-low.c: Ditto.
16568 * mem-break.c: Ditto.
16569 * regcache.c: Ditto.
16570 * remote-utils.c: Ditto.
16571 * server.c: Ditto.
16572 * target.c: Ditto.
16573 * win32-low.c: Ditto.
16574
16575 2008-12-12 Doug Evans <dje@google.com>
16576
16577 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16578 in debugging printf.
16579
16580 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16581
16582 2008-12-09 Doug Evans <dje@google.com>
16583
16584 * linux-low.h (struct process_info): Delete member tid, unused.
16585 * thread-db.c (find_one_thread): Update.
16586 (maybe_attach_thread): Update.
16587
16588 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16589
16590 * target.h (struct target_ops): Add qxfer_osdata member.
16591 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16592 and dirent.h.
16593 (linux_qxfer_osdata): New functions.
16594 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16595 callback.
16596 * server.c (handle_query): Handle "qXfer:osdata:read:".
16597 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16598 (buffer_xml_printf): New functions.
16599 * server.h (struct buffer): New.
16600 (buffer_grow_str, buffer_grow_str0): New macros.
16601 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16602 (buffer_xml_printf): Declare.
16603
16604 2008-11-24 Doug Evans <dje@google.com>
16605
16606 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16607
16608 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16609
16610 * server.c (handle_v_run): Always use the supplied argument list.
16611
16612 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16613
16614 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16615 (xtensa_regmap_table): Add entry for scompare1.
16616
16617 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16618
16619 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16620 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16621 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16622 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16623 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16624 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16625 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16626 XML target descriptions.
16627 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16628 when inferior is running on an ISA 2.05 or later processor. Add
16629 special case to return offset for full 64-bit slot of FPSCR when
16630 in 32-bits.
16631
16632 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16633
16634 * Makefile.in (SFILES, clean): Added sparc64 files.
16635 (reg-sparc64.o, reg-sparc64.c): New.
16636 * configure.srv (sparc*-*-linux*): New configuration.
16637 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16638 syscall arguments for SPARC.
16639 (regsets_store_inferior_registers): Likewise.
16640 * linux-sparc-low.c: New file.
16641
16642 2008-10-21 Doug Evans <dje@google.com>
16643
16644 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16645 (READLINE_DIR,READLINE_DEP): Delete.
16646 (INTERNAL_CFLAGS): Update.
16647 (LINTFLAGS): Update.
16648
16649 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16650
16651 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16652 whole argv from the last run, not just argv[0].
16653
16654 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16655
16656 * regcache.c (new_register_cache): Return NULL if the register
16657 cache size isn't known yet.
16658 (free_register_cache): Avoid dereferencing a NULL regcache.
16659
16660 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16661
16662 * configure.srv: Merge MIPS and MIPS64.
16663
16664 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16665
16666 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16667
16668 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16669
16670 * Makefile.in: Add required vsx dependencies.
16671
16672 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16673 Declare init_registers_powerpc_vsx32l.
16674 Declare init_registers_powerpc_vsx64l.
16675 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16676 (ppc_arch_setup): Check for VSX in hwcap.
16677 (ppc_fill_vsxregset): New function.
16678 (ppc_store_vsxregset): New function.
16679 Add new VSX entry in regset_info target_regsets.
16680
16681 * configure.srv: Add new VSX dependencies.
16682
16683 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16684
16685 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16686 (remote_open): Set or clear transport_is_reliable.
16687 (putpkt_binary): Don't expect acks in noack mode.
16688 (getpkt): Don't send ack/nac in noack mode.
16689 * server.c (handle_general_set): Handle QStartNoAckMode.
16690 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16691 qSupported.
16692 (main): Reset noack_mode on every connection.
16693 * server.h (noack_mode): Declare.
16694
16695 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16696
16697 * Makefile.in (GDBREPLAY_OBS): New variable.
16698 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16699
16700 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16701 Daniel Jacobowitz <dan@codesourcery.com>
16702
16703 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16704 (usr_store_inferior_registers): Likewise.
16705 (regsets_store_inferior_registers): Likewise.
16706
16707 2008-07-31 Rolf Jansen <rj@surtec.com>
16708 Pedro Alves <pedro@codesourcery.com>
16709
16710 * configure.ac: Check for memmem declaration.
16711 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16712 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16713 (disable_packet_qfThreadInfo): Unconditionally compile.
16714 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16715 * configure, config.in: Regenerate.
16716
16717 2008-07-28 Doug Kwan <dougkwan@google.com>
16718
16719 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16720 (linux_write_memory): Remove declaration of errno.
16721
16722 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16723
16724 * linux-low.c (handle_extended_wait): Do not use "status"
16725 variable uninitialized.
16726
16727 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16728
16729 * server.c (handle_v_attach): Inhibit reporting dll changes.
16730
16731 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16732
16733 * remote-utils.c (prepare_resume_reply): If requested, don't
16734 output "thread:TID" in the T stop reply.
16735
16736 * server.c (disable_packet_vCont, disable_packet_Tthread)
16737 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16738 (handle_query): If requested, disable support for qC, qfThreadInfo
16739 and qsThreadInfo.
16740 (handle_v_requests): If requested, disable support for vCont.
16741 (gdbserver_show_disableable): New.
16742 (main): Handle --disable-packet and --disable-packet=LIST.
16743
16744 * server.h (disable_packet_vCont, disable_packet_Tthread)
16745 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16746
16747 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16748
16749 * server.c (gdbserver_usage): Mention --version.
16750
16751 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16752
16753 * Makefile.in (gdbreplay.o): New rule.
16754
16755 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16756
16757 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16758 message, not gdbserver.
16759
16760 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16761 Nathan Sidwell <nathan@codesourcery.com>
16762 Joseph Myers <joseph@codesourcery.com>
16763
16764 * acinclude.m4: Include ../../config/acx.m4.
16765 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16766 * configure, config.in: Regenerate.
16767 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16768 * server.c (gdbserver_version): Print PKGVERSION.
16769 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16770 (main): Adjust gdbserver_usage calls.
16771 * gdbreplay.c (version, host_name): Add declarations.
16772 (gdbreplay_version, gdbreplay_usage): New.
16773 (main): Accept --version and --help options.
16774
16775 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16776
16777 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16778 (arm_breakpoint_at): Handle Thumb.
16779 (the_low_target): Add comment.
16780
16781 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16782
16783 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16784
16785 2008-05-09 Doug Evans <dje@google.com>
16786
16787 * server.h (decode_search_memory_packet): Declare.
16788 * remote-utils.c (decode_search_memory_packet): New fn.
16789 * server.c (handle_search_memory_1): New fn.
16790 (handle_search_memory): New fn.
16791 (handle_query): Process qSearch:memory packets.
16792
16793 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16794
16795 * regcache.c (registers_length): Remove.
16796 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16797 full register packet.
16798 * regcache.h (registers_length): Remove prototype.
16799 * server.h (PBUFSIZ): Define to 16384.
16800
16801 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16802
16803 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16804 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16805 powerpc-64l.o, and powerpc-altivec64l.o.
16806 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16807 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16808 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16809 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16810 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16811 to srv_xmlfiles.
16812
16813 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16814 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16815 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16816 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16817 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16818 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16819 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16820 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16821 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16822 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16823 (clean): Update.
16824
16825 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16826 (init_registers_powerpc_32l): ... this new prototype.
16827 (init_registers_powerpc_32): Remove, replace by ...
16828 (init_registers_powerpc_altivec32l): ... this new prototype.
16829 (init_registers_powerpc_e500): Remove, replace by ...
16830 (init_registers_powerpc_e500l): ... this new prototype.
16831 (init_registers_ppc64): Remove, replace by ...
16832 (init_registers_powerpc_64l): ... this new prototype.
16833 (init_registers_powerpc_64): Remove, replace by ...
16834 (init_registers_powerpc_altivec64l): ... this new prototype.
16835 (ppc_num_regs): Set to 73.
16836 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16837 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16838 (ppc_cannot_store_register): Handle orig_r3 and trap.
16839 (ppc_arch_setup): Update init_registers_... calls.
16840 (ppc_fill_gregset): Handle orig_r3 and trap.
16841
16842 * inferiors.c (clear_inferiors): Reset current_inferior.
16843
16844 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16845
16846 * acinclude.m4: Add override.m4.
16847 * configure: Regenerate.
16848
16849 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16850
16851 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16852 initial call to init_register_ppc64.
16853
16854 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16855
16856 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16857 single powerpc*-*-linux* case.
16858 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16859
16860 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16861
16862 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16863 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16864 from reg_xmlfiles.
16865 * linux-ppc-low.c: Include <elf.h>.
16866 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16867 (ppc_hwcap): New global variable.
16868 (ppc_regmap): Remove __SPE__ #ifdef sections.
16869 (ppc_regmap_e500): New global variable.
16870 (ppc_cannot_store_register): Update __SPE__ special case.
16871 (ppc_get_hwcap): New function.
16872 (ppc_arch_setup): Use it to determine whether inferior supports
16873 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16874 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16875 Do not access registers if target does not support AltiVec.
16876 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16877 Do not access registers if target does not support SPE.
16878 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16879
16880 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16881
16882 * linux-low.c (disabled_regsets, num_regsets): New.
16883 (use_regsets_p): Delete.
16884 (linux_wait_for_process): Clear disabled_regsets.
16885 (regsets_fetch_inferior_registers): Check and set it.
16886 (regsets_store_inferior_registers): Likewise.
16887 (linux_fetch_registers, linux_store_registers): Do not use
16888 use_regsets_p.
16889 (initialize_low): Allocate disabled_regsets.
16890
16891 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * Makefile.in (LIBOBJS): New.
16894 (OBS): Use LIBOBJS.
16895 (memmem.o): New rule.
16896 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16897 * configure: Regenerated.
16898
16899 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16900
16901 * server.c (handle_query): Never return "unsupported" for
16902 qXfer:features:read queries.
16903
16904 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16905
16906 * server.c (get_features_xml): Fix inverted condition.
16907 (handle_query): Always support qXfer:feature:read.
16908
16909 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16910
16911 * server.c (wrapper_argv): New.
16912 (start_inferior): Handle wrapper_argv. If set, expect an extra
16913 trap.
16914 (gdbserver_usage): Document --wrapper.
16915 (main): Parse --wrapper.
16916
16917 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16918
16919 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16920 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16921 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16922 (ppc_set_pc): Likewise.
16923 (ppc_arch_setup): New function.
16924 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16925 of collect_register.
16926 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16927
16928 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16929
16930 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16931 instead of linux-ppc64-low.o.
16932 * linux-ppc64-low.c: Remove file.
16933 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16934 (linux-ppc64-low.o): Remove rule.
16935
16936 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16937 (init_registers_powerpc_64): Likewise.
16938 (ppc_regmap): Conditionally define depending on __powerpc64__.
16939 (ppc_cannot_store_register): Do not special-case "fpscr" when
16940 compiled on __powerpc64__.
16941 (ppc_collect_ptrace_register): New function.
16942 (ppc_supply_ptrace_register): New function.
16943 (ppc_breakpoint): Change type to "unsigned int".
16944 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16945 (the_low_target): Conditionally provide initializers for the
16946 arch_setup member depending on __powerpc64__. Install
16947 collect_ptrace_register and supply_ptrace_register members.
16948
16949 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16950
16951 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16952 * server.c (gdbserver_xmltarget): Define.
16953 (get_features_xml): Use it to replace "target.xml" and arch_string.
16954
16955 * configure.srv: Remove srv_xmltarget. Add XML files that were
16956 mentioned there to srv_xmlfiles instead. Remove conditional tests
16957 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16958 srv_xmlfiles and srv_regobj to include all possible choices.
16959 * configure.ac (srv_xmltarget): Remove.
16960 (srv_xmlfiles): Do not add "target.xml".
16961 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16962 checks for supplementary target information.
16963 * configure: Regenerate.
16964 * Makefile.in (XML_TARGET): Remove.
16965 (target.xml): Remove rule.
16966 (clean): Do not clean up target.xml.
16967 (.PRECIOUS): Do not mention target.xml.
16968
16969 * target.h (struct target_ops): Remove arch_string member.
16970 * linux-low.c (linux_arch_string): Remove.
16971 (linux_target_ops): Remove arch_string initializer.
16972 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16973 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16974 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16975 * spu-low.c (spu_arch_string): Remove.
16976 (spu_target_ops): Remove arch_string initializer.
16977 * win32-low.c (win32_arch_string): Remove.
16978 (win32_target_ops): Remove arch_string initializer.
16979 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16980 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16981 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16982
16983 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16984
16985 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16986 by collect_ptrace_register and supply_ptrace_register hooks.
16987 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16988 instead of checking for the_low_target.left_pad_xfer.
16989 (usr_store_inferior_registers): Use collect_ptrace_register callback
16990 instead of checking for the_low_target.left_pad_xfer.
16991
16992 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16993 (s390_supply_ptrace_register): Likewise.
16994 (s390_fill_gregset): Call s390_collect_ptrace_register.
16995 (the_low_target): Update.
16996
16997 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16998 (ppc_supply_ptrace_register): Likewise.
16999 (the_low_target): Update.
17000
17001 * linux-i386-low.c (the_low_target): Update.
17002 * linux-x86-64-low.c (the_low_target): Update.
17003
17004 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17005
17006 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17007 reg-s390.o and reg-s390x.o.
17008
17009 * linux-low.c (new_inferior): New global variable.
17010 (linux_create_inferior, linux_attach): Set it.
17011 (linux_wait_for_process): Call the_low_target.arch_setup after the
17012 target has stopped for the first time.
17013 (initialize_low): Do not call the_low_target.arch_setup.
17014
17015 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17016 (s390_set_pc): Likewise.
17017 (s390_arch_setup): New function.
17018 (the_low_target): Use s390_arch_setup as arch_setup routine.
17019
17020 * regcache.c (realloc_register_cache): New function.
17021 (set_register_cache): Call it for each existing regcache.
17022
17023 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17024
17025 * server.h (init_registers): Remove prototype.
17026
17027 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17028 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17029 instead of init_registers ().
17030 * linux-arm-low.c (init_registers_arm): Add prototype.
17031 (init_registers_arm_with_iwmmxt): Likewise.
17032 (the_low_target): Add initializer for arch_setup field.
17033 * linux-cris-low.c (init_registers_cris): Add prototype.
17034 (the_low_target): Add initializer for arch_setup field.
17035 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17036 (the_low_target): Add initializer for arch_setup field.
17037 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17038 (the_low_target): Add initializer for arch_setup field.
17039 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17040 (the_low_target): Add initializer for arch_setup field.
17041 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17042 (the_low_target): Add initializer for arch_setup field.
17043 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17044 (the_low_target): Add initializer for arch_setup field.
17045 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17046 (init_registers_mips64_linux): Likewise.
17047 (the_low_target): Add initializer for arch_setup field.
17048 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17049 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17050 (the_low_target): Add initializer for arch_setup field.
17051 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17052 (init_registers_powerpc_64): Likewise.
17053 (the_low_target): Add initializer for arch_setup field.
17054 * linux-s390-low.c (init_registers_s390): Add prototype.
17055 (init_registers_s390x): Likewise.
17056 (the_low_target): Add initializer for arch_setup field.
17057 * linux-sh-low.c (init_registers_sh): Add prototype.
17058 (the_low_target): Add initializer for arch_setup field.
17059 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17060 (the_low_target): Add initializer for arch_setup field.
17061 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17062 (the_low_target): Add initializer for arch_setup field.
17063
17064 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17065 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17066 instead of init_registers ().
17067 * win32-arm-low.c (init_registers_arm): Add prototype.
17068 (the_low_target): Add initializer for arch_setup field.
17069 * win32-i386-low.c (init_registers_i386): Add prototype.
17070 (the_low_target): Add initializer for arch_setup field.
17071
17072 * spu-low.c (init_registers_spu): Add prototype.
17073 (initialize_low): Call initialie_registers_spu () instead of
17074 initialize_registers ().
17075
17076 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17077
17078 * server.c (handle_v_requests): When handling the vRun and vAttach
17079 packets, if already debugging a process, don't kill it. Return an
17080 error instead.
17081
17082 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17083
17084 * server.c (handle_query): Correct length check.
17085
17086 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17087
17088 * win32-low.c (do_initial_child_stuff): Add process handle
17089 parameter. Set current_process_handle and current_process_id from the
17090 parameters. Clear globals.
17091 (win32_create_inferior): Don't set current_process_handle and
17092 current_process_id here. Instead pass them on the call to
17093 do_initial_child_stuff.
17094 (win32_attach): Likewise.
17095 (win32_clear_inferiors): New.
17096 (win32_kill): Don't close the current process handle or the
17097 current thread handle here. Instead call win32_clear_inferiors.
17098 (win32_detach): Don't open a new handle to the process. Call
17099 win32_clear_inferiors.
17100 (win32_join): Don't rely on current_process_handle; open a new
17101 handle using the process id.
17102 (win32_wait): Call win32_clear_inferiors when the inferior process
17103 has exited.
17104
17105 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17106
17107 * server.c (monitor_show_help): Add "exit".
17108
17109 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17110
17111 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17112 (clean): Add reg-xtensa.c.
17113 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17114 * configure.srv (xtensa*-*-linux*) New target.
17115 * linux-xtensa-low.c: New.
17116 * xtensa-xtregs.c: New.
17117
17118 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17119
17120 * hostio.c: Don't include errno.h.
17121 (errno_to_fileio_errno): Move to hostio-errno.
17122 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17123 error number outputting to the target->hostio_last_error callback.
17124 (hostio_packet_error): Use FILEIO_EINVAL directly.
17125 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17126 calls to hostio_error.
17127 * hostio-errno.c: New.
17128 * server.h (hostio_last_error_from_errno): Declare.
17129 * target.h (target_ops): Add hostio_last_error member.
17130 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17131 as hostio_last_error handler.
17132 * spu-low.c (spu_target_ops): Likewise.
17133 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17134 (wince_hostio_last_error): New functions.
17135 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17136 as hostio_last_error handler.
17137 (win32_target_ops) [!_WIN32_WCE]: Register
17138 hostio_last_error_from_errno as hostio_last_error handler.
17139 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17140 (hostio-errno.o): New rule.
17141 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17142 * configure.srv (srv_hostio_err_objs): New variable. Default to
17143 hostio-errno.o.
17144 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17145 * configure: Regenerate.
17146
17147 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17148
17149 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17150 (linux_kill, linux_detach): Clean up the process list.
17151 * remote-utils.c (remote_open): Improve port number parsing.
17152 (putpkt_binary, input_interrupt): Only send interrupts if the target
17153 is running.
17154 * server.c (extended_protocol): Make static.
17155 (attached): Define earlier.
17156 (exit_requested, response_needed, program_argv): New variables.
17157 (target_running): New.
17158 (start_inferior): Clear attached here.
17159 (attach_inferior): Set attached here.
17160 (require_running): Define.
17161 (handle_query): Use require_running and target_running. Implement
17162 "monitor exit".
17163 (handle_v_attach, handle_v_run): New.
17164 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17165 (gdbserver_usage): Update.
17166 (main): Redo argument parsing. Handle --debug and --multi. Handle
17167 --attach along with other options or after the port. Save
17168 program_argv. Support no initial program. Resynchronize
17169 communication with GDB after an error. Handle "monitor exit".
17170 Use require_running and target_running. Always allow the extended
17171 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17172 restart in extended mode.
17173 * README: Refer to the GDB manual. Update --attach usage.
17174
17175 2007-12-20 Andreas Schwab <schwab@suse.de>
17176
17177 * linux-low.c (STACK_SIZE): Define.
17178 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17179 (linux_test_for_tracefork): Likewise.
17180
17181 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17182
17183 * linux-low.c (linux_wait_for_event): Update messages. Do not
17184 reinsert auto-delete breakpoints.
17185 * mem-break.c (struct breakpoint): Change return type of handler to
17186 int.
17187 (set_breakpoint_at): Update handler type.
17188 (reinsert_breakpoint_handler): Return 1 instead of calling
17189 delete_breakpoint.
17190 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17191 setting a new one.
17192 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17193 * mem-break.h (set_breakpoint_at): Update handler type.
17194 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17195 * win32-low.c (auto_delete_breakpoint): New.
17196 (get_child_debug_event): Use it.
17197
17198 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17199
17200 * configure.ac: Check for pread and pwrite.
17201 * hostio.c (handle_pread): Fall back to lseek and read.
17202 (handle_pwrite): Fall back to lseek and write.
17203 * config.in, configure: Regenerated.
17204
17205 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17206
17207 * server.c (myresume): Add own_buf argument.
17208 (main): Update calls.
17209
17210 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17211
17212 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17213 * remote-utils.c (remote_open): Do not call disable_async_io.
17214 (block_async_io): Delete.
17215 (unblock_async_io): Make static.
17216 (initialize_async_io): New.
17217 * server.c (handle_v_cont): Handle async I/O here.
17218 (myresume): Likewise. Move other common resume tasks here...
17219 (main): ... from here. Call initialize_async_io. Disable async
17220 I/O before the main loop.
17221 * server.h (initialize_async_io): Declare.
17222 (block_async_io, unblock_async_io): Delete prototypes.
17223 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17224
17225 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17226
17227 * remote-utils.c (readchar): Allow binary data in received messages.
17228
17229 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17230
17231 * win32-low.c (attaching): New global.
17232 (win32_create_inferior): Clear the `attaching' global.
17233 (win32_attach): Set the `attaching' global.
17234 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17235 attaching. Only set a breakpoint at the entry point if not
17236 attaching.
17237
17238 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17239
17240 * server.c (main): Don't report dll events on the initial
17241 connection on attaches.
17242
17243 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17244
17245 * server.c (main): Relax numerical bases supported for the pid of
17246 the --attach command line argument.
17247
17248 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17249
17250 * win32-low.c (win32_attach): Call OpenProcess before
17251 DebugActiveProcess, not after. Add last error output to error
17252 call.
17253
17254 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17255
17256 * win32-low.c (win32_get_thread_context)
17257 (win32_set_thread_context): New functions.
17258 (thread_rec): Use win32_get_thread_context.
17259 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17260 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17261 field.
17262
17263 2007-12-03 Leo Zayas
17264 Pedro Alves <pedro_alves@portugalmail.pt>
17265
17266 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17267 global variables.
17268 (child_add_thread): Minor cleanup.
17269 (child_continue): Resume artificially suspended threads before
17270 calling ContinueDebugEvent.
17271 (suspend_one_thread): New.
17272 (fake_breakpoint_event): New.
17273 (get_child_debug_event): Change return type to int. Check here if
17274 gdb sent an interrupt request. If a soft interrupt was requested,
17275 fake a breakpoint event. Return 0 if there is no event to handle,
17276 and 1 otherwise.
17277 (win32_wait): Don't check here if gdb sent an interrupt request.
17278 Ensure there is a valid event to handle.
17279 (win32_request_interrupt): Add soft interruption method as last
17280 resort.
17281
17282 2007-12-03 Leo Zayas
17283 Pedro Alves <pedro_alves@portugalmail.pt>
17284
17285 * win32-low.h (win32_thread_info): Add descriptions to the
17286 structure members. Replace `suspend_count' counter by a
17287 `suspended' flag.
17288 * win32-low.c (thread_rec): Update condition of when to get the
17289 context from the inferior. Rely on ContextFlags being set if it
17290 has already been retrieved. Only suspend the inferior thread if
17291 we haven't already. Warn if that fails.
17292 (continue_one_thread): s/suspend_count/suspended/. Only call
17293 ResumeThread once. Warn if that fails.
17294
17295 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17296
17297 * win32-low.c (win32_wait): Don't read from the inferior when it
17298 has already exited.
17299
17300 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17301
17302 * Makefile.in (win32_low_h): New variable.
17303 (win32-low.o): Add dependency on $(win32_low_h).
17304 (win32-arm-low.o, win32-i386-low.o): New rules.
17305
17306 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17307
17308 * hostio.c: Correct copyright year.
17309
17310 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17311
17312 * Makefile.in (OBS): Add hostio.o.
17313 (hostio.o): New rule.
17314 * server.h (handle_vFile): Declare.
17315 * hostio.c: New file.
17316 * server.c (handle_v_requests): Take packet_len and new_packet_len
17317 for binary packets. Call handle_vFile.
17318 (main): Update call to handle_v_requests.
17319
17320 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17321
17322 * linux-low.c: Include <sched.h>.
17323
17324 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17325
17326 * linux-low.c (linux_tracefork_grandchild): New.
17327 (linux_tracefork_child): Use clone.
17328 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17329
17330 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17331
17332 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17333
17334 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17335
17336 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17337
17338 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17339
17340 * inferiors.c (change_inferior_id): Delete.
17341 (add_pid_to_list, pull_pid_from_list): New.
17342 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17343 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17344 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17345 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17346 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17347 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17348 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17349 (using_threads): Always set to 1.
17350 (handle_extended_wait): New.
17351 (add_process): Do not set TID.
17352 (linux_create_inferior): Set must_set_ptrace_flags.
17353 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17354 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17355 (linux_thread_alive): Rename TID argument to LWPID.
17356 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17357 (linux_wait_for_event): Do not use TID or check using_threads. Update
17358 call to dead_thread_notify. Call handle_extended_wait.
17359 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17360 (send_sigstop): Delete sigstop_sent.
17361 (wait_for_sigstop): Avoid TID.
17362 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17363 (linux_test_for_tracefork): New.
17364 (linux_lookup_signals): Use thread_db_active and
17365 linux_supports_tracefork_flag.
17366 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17367 * linux-low.h (get_process_thread): Avoid TID.
17368 (struct process_ifo): Move thread_known and tid to the end. Remove
17369 sigstop_sent.
17370 (linux_attach_lwp, thread_db_init): Update prototypes.
17371 * server.h (change_inferior_id): Delete prototype.
17372 (add_pid_to_list, pull_pid_from_list): New prototypes.
17373 * thread-db.c (thread_db_use_events): New.
17374 (find_first_thread): Rename to...
17375 (find_one_thread): ...this. Update callers and messages. Do not
17376 call fatal. Check thread_db_use_events. Do not call
17377 change_inferior_id or new_thread_notify.
17378 (maybe_attach_thread): Update. Do not call new_thread_notify.
17379 (thread_db_init): Set thread_db_use_events. Check use_events.
17380 * utils.c (fatal, warning): Correct message prefix.
17381
17382 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17383
17384 * Makefile.in (clean): Remove new files.
17385 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17386 (powerpc-64.o, powerpc-64.c): New rules.
17387 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17388 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17389 with SPE.
17390 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17391 SPE targets.
17392 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17393 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17394 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17395 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17396 (target_regsets): Add AltiVec and SPE register sets.
17397 * configure.ac: Check for AltiVec and SPE.
17398 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17399 (ppc_fill_vrregset, ppc_store_vrregset): New.
17400 (target_regsets): Add AltiVec register set.
17401 * configure: Regenerated.
17402
17403 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17404
17405 * linux-low.c (O_LARGEFILE): Define.
17406 (linux_read_memory): Use /proc/PID/mem.
17407 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17408 * configure, config.in: Regenerated.
17409
17410 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17411
17412 * linux-low.c (linux_wait_for_event): Do not pass signals while
17413 single-stepping.
17414
17415 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17416
17417 * win32-low.c (create_process): New.
17418 (win32_create_inferior): Use create_process instead of
17419 CreateProcess. If create_process failed retry appending an ".exe"
17420 suffix. Store the GetLastError result immediatelly after
17421 create_process calls and use it on the call to error.
17422
17423 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17424
17425 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17426
17427 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17428
17429 * configure.ac: Switch license to GPLv3.
17430
17431 2007-08-01 Michael Snyder <msnyder@access-company.com>
17432
17433 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17434
17435 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17436
17437 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17438 typedef.
17439 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17440 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17441 CloseToolhelp32Snapshot.
17442 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17443 CloseToolhelp32Snapshot.
17444
17445 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17446
17447 * server.c (main): Check for inferior exit before main loop.
17448
17449 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17450
17451 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17452 instead of on tmp_desc.
17453
17454 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17455 Daniel Jacobowitz <dan@codesourcery.com>
17456
17457 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17458 (add_thread): Minor cleanups.
17459 (clear_inferiors): Move lower in the file. Clear the DLL
17460 list.
17461 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17462 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17463 (xml_escape_text): New.
17464 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17465 for qSupported.
17466 (handle_v_cont): Report errors.
17467 (gdbserver_version): Update.
17468 (main): Correct size of own_buf. Do not report initial DLL events.
17469 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17470 (unloaded_dll, xml_escape_text): New.
17471 * win32-low.c (enum target_waitkind): Update comments.
17472 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17473 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17474 (win32_EnumProcessModules, win32_GetModuleInformation)
17475 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17476 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17477 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17478 (win32_Module32First, win32_Module32Next, load_toolhelp)
17479 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17480 (get_child_debug_event): Handle DLL events.
17481 (win32_wait): Likewise.
17482
17483 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17484
17485 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17486 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17487
17488 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17489
17490 * win32-low.c (handle_output_debug_string): Ignore event if not
17491 waiting.
17492
17493 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17494
17495 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17496
17497 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17498
17499 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17500
17501 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17502
17503 * inferiors.c (change_inferior_id): Add comment.
17504 * linux-low.c (check_removed_breakpoint): Add an early
17505 prototype. Improve debug output.
17506 (linux_attach): Doc update.
17507 (linux_detach_one_process, linux_detach): Clean up before releasing
17508 each process.
17509 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17510 * linux-low.h (struct process_info): Doc improvement.
17511 * mem-break.c (delete_all_breakpoints): New.
17512 * mem-break.h (delete_all_breakpoints): New prototype.
17513 * thread-db.c (find_first_thread): New.
17514 (thread_db_create_event): Call it instead of
17515 thread_db_find_new_threads. Clean up unused variables.
17516 (maybe_attach_thread): Remove first thread handling.
17517 (thread_db_find_new_threads): Use find_first_thread.
17518 (thread_db_get_tls_address): Likewise.
17519
17520 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17521
17522 * thread-db.c (thread_db_find_new_threads): Add prototype.
17523 (thread_db_create_event): Check for the main thread before adding
17524 a new thread.
17525 (maybe_attach_thread): Only enable event reporting if TID == 0.
17526 (thread_db_get_tls_address): Check for new threads.
17527
17528 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17529
17530 * linux-low.c (linux_create_inferior): Try execv before execvp.
17531 * spu-low.c (spu_create_inferior): Likewise.
17532
17533 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17534
17535 * linux-low.c (linux_create_inferior): Change execv to execvp.
17536 * spu-low.c (spu_create_inferior): Likewies.
17537
17538 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17539
17540 * Makefile.in (clean): Clean new files instead of deleted ones.
17541 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17542 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17543 rules.
17544 * configure.srv: Specify XML files and new regformats for MIPS and
17545 MIPS64 GNU/Linux.
17546 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17547 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17548 an entry for the restart register.
17549 (mips_cannot_fetch_register, mips_cannot_store_register)
17550 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17551 register names to match the XML descriptions.
17552 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17553 restart register instead of $0.
17554
17555 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17556 Markus Deuling <deuling@de.ibm.com>
17557
17558 * remote-utils.c (decode_xfer_write): New function.
17559 * server.h (decode_xfer_write): Add prototype.
17560 * server.c (handle_query): Add PACKET_LEN argument. Support
17561 qXfer:spu:read and qXfer:spu:write packets.
17562 (main): Pass packet_len to handle_query.
17563 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17564 * target.h (target_ops): Add qxfer_spu.
17565
17566 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17567
17568 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17569 accessing non-seekable spufs files.
17570
17571 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17572
17573 * server.c (handle_query): Add reply for qC packet.
17574
17575 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17576 Leo Zayas <lerele@champenstudios@com>
17577
17578 * server.h (check_remote_input_interrupt_request): New function.
17579 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17580 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17581 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17582 (check_remote_input_interrupt_request): New function.
17583 * server.h (check_remote_input_interrupt_request): Declare.
17584 * win32-low.c (winapi_DebugBreakProcess,
17585 winapi_GenerateConsoleCtrlEvent): New typedefs.
17586 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17587 to 250 ms.
17588 (win32_wait): Check for remote interrupt request
17589 with check_remote_input_interrupt_request.
17590 (win32_request_interrupt): New function.
17591 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17592
17593 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17594
17595 * win32-low.c (debug_registers_changed,
17596 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17597 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17598 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17599 (thread_rec): Get context using the low target.
17600 (child_add_thread): Call thread_added on the low target,
17601 which does the same thing.
17602 (regptr): Delete.
17603 (do_initial_child_stuff): Remove debug registers references.
17604 Set context using the low target. Resume threads after
17605 setting the contexts.
17606 (child_continue): Remove dead variable. Remove debug
17607 registers references.
17608 (child_fetch_inferior_registers): Go through the low target.
17609 (do_child_store_inferior_registers): Remove.
17610 (child_store_inferior_registers): Go through the low target.
17611 (win32_resume): Remove debug registers references.
17612 Set context using the low target.
17613 (handle_exception): Change return type to void. Don't record
17614 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17615 first chance exception.
17616 (get_child_debug_event): Change return type to void. Remove
17617 goto loop. Always return after waiting for debug event.
17618 (win32_wait): Convert to switch statement. Handle spurious
17619 events.
17620
17621 * win32-i386-low.c (debug_registers_changed,
17622 debug_registers_used): New.
17623 (initial_stuff): Rename to ...
17624 (i386_initial_stuff): ... this. Clear debug registers
17625 state variables.
17626 (store_debug_registers): Delete.
17627 (i386_get_thread_context): New.
17628 (load_debug_registers): Delete.
17629 (i386_set_thread_context): New.
17630 (i386_thread_added): New.
17631 (single_step): Rename to ...
17632 (i386_single_step): ... this.
17633 (do_fetch_inferior_registers): Rename to ...
17634 (i386_fetch_inferior_register): ... this.
17635 (i386_store_inferior_register): New.
17636 (the_low_target): Adapt to new interface.
17637
17638 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17639 (arm_get_thread_context): New.
17640 (arm_set_thread_context): New.
17641 (regptr): New.
17642 (do_fetch_inferior_registers): Rename to ...
17643 (arm_fetch_inferior_register): ... this.
17644 (arm_store_inferior_register): New.
17645 (arm_wince_breakpoint): Reimplement as unsigned long.
17646 (arm_wince_breakpoint_len): Define.
17647 (the_low_target): Adapt to new interface.
17648
17649 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17650 load_debug_registers. Add get_thread_context, set_thread_context,
17651 thread_added and store_inferior_register. Rename
17652 fetch_inferior_registers to fetch_inferior_register.
17653 (regptr): Remove declaration.
17654
17655 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17656
17657 * linux-low.c (linux_detach): Change return type to int. Return 0.
17658 * spu-low.c (spu_detach): Likewise.
17659
17660 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17661
17662 * target.h (target_ops): Change return type of detach to int.
17663 Add join.
17664 (join_inferior): New.
17665 * server.c (main): Don't skip detach support on mingw32.
17666 If the inferior doesn't support detaching return error.
17667 Call join_inferior instead of using waitpid.
17668 * linux-low.c (linux_join): New.
17669 (linux_target_op): Add linux_join.
17670 * spu-low.c (spu_join): New.
17671 (spu_target_ops): Add spu_join.
17672 * win32-low.c (win32_detach): Adapt to new interface.
17673 Reopen current_process_handle before detaching. Issue a child
17674 resume before detaching.
17675 (win32_join): New.
17676 (win32_target_op): Add win32_join.
17677
17678 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17679
17680 * win32-low.c (win32-attach): Fix return value.
17681 * target.h (target_ops): Describe ATTACH return values.
17682
17683 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17684
17685 * win32-low.c (GETPROCADDRESS): Define.
17686 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17687 (winapi_DebugSetProcessKillOnExit): Likewise.
17688 (win32_create_inferior): Force usage of ansi CreateProcessA.
17689 (win32_attach): Use GETPROCADDRESS.
17690 (win32_detach): Likewise.
17691
17692 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17693
17694 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17695
17696 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17697
17698 * win32-low.c: Commit leftover changes from 2007-03-29.
17699
17700 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17701
17702 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17703 fields short instead of int. Add explicit padding.
17704 (i387_cache_to_fsave): Remove unnecessary casts.
17705 (i387_fsave_to_cache): Doc fix.
17706 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17707
17708 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17709
17710 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17711 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17712
17713 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17714
17715 * configure.srv (arm*-*-mingw32ce*): Move near the other
17716 arm targets.
17717
17718 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17719
17720 * configure.ac: Add errno checking.
17721 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17722 sys/file.h and malloc.h.
17723 (AC_CHECK_DECLS): Add perror.
17724 (srv_mingwce): Handle.
17725 * configure.srv (i[34567]86-*-cygwin*): Add
17726 win32-i386-low.o to srv_tgtobj.
17727 (i[34567]86-*-mingw*): Likewise.
17728 (arm*-*-mingw32ce*): Add case.
17729 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17730 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17731 [__MINGW32CE__] (strerror): New function.
17732 [__MINGW32CE__] (errno): Define to GetLastError.
17733 [__MINGW32CE__] (COUNTOF): New macro.
17734 (remote_open): Remove extra close call.
17735 * mem-break.c (delete_breakpoint_at): New function.
17736 * mem-break.h (delete_breakpoint_at): Declare.
17737 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17738 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17739 [USE_WIN32API] (read, write): Add char* casts.
17740 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17741 * server.h: Include wincecompat.h on Windows CE.
17742 [HAVE_ERRNO_H]: Check.
17743 (perror): Declare if not declared.
17744 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17745 (perror_with_name): Remove errno declaration.
17746 * wincecompat.h: New.
17747 * wincecompat.c: New.
17748 * win32-low.h: New.
17749 * win32-arm-low.c: New.
17750 * win32-i386-low.c: New.
17751 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17752 (OUTMSG2): Make it safe.
17753 (_T): New macro.
17754 (COUNTOF): New macro.
17755 (NUM_REGS): Get it from the low target.
17756 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17757 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17758 (thread_rec): Let low target handle debug registers.
17759 (child_add_thread): Likewise.
17760 (child_init_thread_list): Likewise.
17761 (continue_one_thread): Likewise.
17762 (regptr): New.
17763 (do_child_fetch_inferior_registers): Move to ...
17764 * win32-i386-low.c: ... here, and rename to ...
17765 (do_fetch_inferior_registers): ... this.
17766 * win32-low.c (child_fetch_inferior_registers):
17767 Go through the low target.
17768 (do_child_store_inferior_registers): Use regptr.
17769 (strwinerror): New function.
17770 (win32_create_inferior): Handle Windows CE.
17771 Use strwinerror instead of strerror on Windows error
17772 codes. Add program to the error output.
17773 Don't close the main thread handle on Windows CE.
17774 (win32_attach): Use coredll.dll on Windows CE.
17775 (win32_kill): Close current process and current
17776 thread handles.
17777 (win32_detach): Use coredll.dll on Windows CE.
17778 (win32_resume): Let low target handle debug registers, and
17779 step request.
17780 (handle_exception): Add/Remove initial breakpoint. Avoid
17781 non-existant WSTOPSIG on Windows CE.
17782 (win32_read_inferior_memory): Cast to remove warning.
17783 (win32_arch_string): Go through the low target.
17784 (initialize_low): Call set_breakpoint_data with the low
17785 target's breakpoint.
17786 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17787 FOP_REGNUM, mappings): Move to ...
17788 * win32-i386-low.c: ... here.
17789 * win32-low.c (win32_thread_info): Move to ...
17790 * win32-low.h: ... here.
17791 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17792 win32-arm-low.c and wincecompat.c.
17793 (all:): Add $EXEEXT.
17794 (install-only:): Likewise.
17795 (gdbserver:): Likewise.
17796 (gdbreplay:): Likewise.
17797 * config.in: Regenerate.
17798 * configure: Regenerate.
17799
17800 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17801
17802 * win32-low.c: Rename typedef thread_info to
17803 win32_thread_info throughout.
17804
17805 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17806
17807 * win32-i386-low.c: Rename to ...
17808 * win32-low.c: ... this.
17809 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17810 * Makefile.in: Likewise.
17811
17812 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17813
17814 * remote-utils.c (monitor_output): Constify msg parameter.
17815 * server.h (monitor_output): Likewise.
17816 * win32-i386-low.c (handle_output_debug_string): New.
17817 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17818 handle_output_debug_string.
17819 (get_child_debug_event): Likewise.
17820
17821 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17822
17823 * server.c (main): Correct strtoul check.
17824
17825 2007-03-27 Jon Ringle <jon@ringle.org>
17826
17827 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17828
17829 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17830
17831 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17832
17833 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17834
17835 * terminal.h: Check HAVE_SGTTY_H.
17836
17837 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17838
17839 * remote-utils.c (remote_open): Print out the assigned port number.
17840
17841 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17842
17843 * remote-utils.c (monitor_output): New function.
17844 * server.c (debug_threads): Define here.
17845 (monitor_show_help): New function.
17846 (handle_query): Handle qRcmd.
17847 (main): Do not handle 'd' packet.
17848 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17849 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17850 of debug_threads.
17851
17852 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17853
17854 * Makefile.in (EXEEXT): New.
17855 (clean): Use $(EXEEXT).
17856
17857 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17858
17859 * target.h (target_ops): Rename send_signal to request_interrupt,
17860 and remove enum target_signal parameter.
17861 * linux-low.c (linux_request_interrupt): Rename from
17862 linux_send_signal, and always send SIGINT.
17863 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17864 and always send SIGINT.
17865 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17866 of send_signal.
17867 (input_interrupt): Likewise.
17868
17869 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17870
17871 * server.c (get_features_xml): Check if target implemented
17872 arch_string.
17873 * win32-i386-low.c (win32_arch_string): New.
17874 (win32_target_ops): Add win32_arch_string as arch_string member.
17875
17876 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17877
17878 * spu-low.c (spu_arch_string): New.
17879 (spu_target_ops): Add spu_arch_string.
17880
17881 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17882
17883 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17884 * configure.ac: Do not check for terminal.h.
17885 * configure, config.in: Regenerated.
17886
17887 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17888
17889 * Makefile.in (OBS): Add $(XML_BUILTIN).
17890 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17891 (clean): Update.
17892 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17893 (arm-with-iwmmxt.c): New.
17894 * config.in, configure: Regenerate.
17895 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17896 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17897 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17898 (arm*-*-linux*): Add iWMMXt and regset support.
17899 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17900 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17901 (arm_store_wmmxregset, target_regsets): New.
17902 * server.c (get_features_xml): Take annex argument. Check builtin
17903 XML documents.
17904 (handle_query): Handle multiple annexes.
17905
17906 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17907
17908 * remote-utils.c [USE_WIN32API] (read, write): Define.
17909 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17910 write.
17911
17912 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17913
17914 * linux-i386-low.c (the_low_target): Set arch_string.
17915 * linux-x86-64-low.c (the_low_target): Likewise.
17916 * linux-low.c (linux_arch_string): New.
17917 (linux_target_ops): Add it.
17918 * linux-low.h (struct linux_target_ops): Add arch_string.
17919 * server.c (write_qxfer_response): Use const void * for DATA.
17920 (get_features_xml): New.
17921 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17922 * target.h (struct target_ops): Add arch_string method.
17923
17924 2007-01-03 Denis Pilat <denis.pilat@st.com>
17925 Daniel Jacobowitz <dan@codesourcery.com>
17926
17927 * linux-low.c (linux_kill): Handle being called with no threads.
17928 * win32-i386-low.c (win32_kill): Likewise.
17929 (get_child_debug_event): Clear current_process_handle.
17930
17931 2006-12-30 Denis PILAT <denis.pilat@st.com>
17932 Daniel Jacobowitz <dan@codesourcery.com>
17933
17934 * remote-utils.c (remote_open): Check the type of specified
17935 serial port devices before opening them.
17936 * server.c (main): Kill the inferior if an error occurs during
17937 the first remote_open.
17938
17939 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17940
17941 * README: Update supported targets.
17942
17943 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17944
17945 * Makefile.in (clean): Remove reg-mips64.c.
17946 (reg-mips64.c, reg-mips64.o): New rules.
17947 * configure.srv: Handle mips64. Include regset support for mips.
17948 * linux-mips-low.c (union mips_register): New.
17949 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17950 (mips_breakpoint, mips_breakpoint_at): Use int.
17951 (mips_collect_register, mips_supply_register)
17952 (mips_collect_register_32bit, mips_supply_register_32bit)
17953 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17954 (mips_store_fpregset, target_regsets): New.
17955 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17956
17957 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17958
17959 * configure.srv: Add target "spu*-*-*".
17960 * Makefile.in (clean): Remove reg-spu.c.
17961 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17962 * spu-low.c: New file.
17963
17964 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17965
17966 * configure.ac: Correct td_thr_tls_get_addr test.
17967 * configure: Regenerated.
17968
17969 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17970
17971 * linux-low.c (linux_wait_for_event): Reformat. Use the
17972 pass_signals array.
17973 * remote-utils.c (decode_address_to_semicolon): New.
17974 * server.c (pass_signals, handle_general_set): New.
17975 (handle_query): Mention QPassSignals for qSupported.
17976 (main): Call handle_general_set.
17977 * server.h (pass_signals, decode_address_to_semicolon): New.
17978
17979 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17980
17981 * server.c (handle_query): Correct error handling for read_auxv.
17982
17983 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17984
17985 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17986 and srv_linux_thread_db to yes.
17987 * linux-s390-low.c (s390_fill_gregset): New function.
17988 (target_regsets): Define data structure.
17989
17990 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17991
17992 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17993 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17994 * config.in, configure: Regenerated.
17995 * inferiors.c (gdb_id_to_thread): New function.
17996 (gdb_id_to_thread_id): Use it.
17997 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17998 * linux-low.h (struct process_info): Add th member.
17999 (thread_db_get_tls_address): New prototype.
18000 * remote-utils.c (decode_address): Make non-static.
18001 * server.c (handle_query): Handle qGetTLSAddr.
18002 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18003 * target.h (struct target_ops): Add get_tls_address.
18004 * thread-db.c (maybe_attach_thread): Save the thread handle.
18005 (thread_db_get_tls_address): New.
18006
18007 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18008
18009 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18010 (linux_resume_one_process): Take a siginfo_t *. Update all
18011 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18012 (struct pending_signals): Add a siginfo_t.
18013 (linux_wait_for_process): Always set last_status.
18014 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18015 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18016 * linux-low.h (struct process_info): Add last_status.
18017
18018 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18019
18020 * remote-utils.c (try_rle): New function.
18021 (putpkt_binary): Use it.
18022
18023 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18024
18025 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18026 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18027 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18028 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18029 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18030 point registers.
18031
18032 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18033
18034 * server.c (terminal_fd): New variable.
18035 (old_foreground_pgrp): Likewise.
18036 (restore_old_foreground_pgrp): New function.
18037 (start_inferior): Record the terminal file descriptor in terminal_fd
18038 and its original foreground group in old_foreground_pgrp. Register
18039 restore_old_foreground_pgrp with atexit().
18040
18041 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18042
18043 * server.c (handle_query): Correct qPart to qXfer.
18044
18045 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18046
18047 * configure.ac: Check for more headers which are missing on
18048 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18049 * configure.srv: Add Cygwin and mingw32.
18050 * remote-utils.c: Don't include headers unconditionally which
18051 are missing on mingw32. Include <winsock.h> for mingw32.
18052 (remote_open): Adjust for mingw32 support. Flush
18053 standard error after writing to it.
18054 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18055 (unblock_async_io, enable_async_io, disable_async_io)
18056 (readchar, getpkt): Update for Winsock support.
18057 (prepare_resume_reply): Expect a protocol signal number.
18058 * server.c: Disable <sys/wait.h> on mingw32.
18059 (start_inferior): Adjust for mingw32 support. Flush
18060 standard error after writing to it.
18061 (attach_inferior): Likewise. Use protocol signal
18062 numbers.
18063 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18064 and names.
18065 * win32-i386-low.c: New file.
18066 * Makefile.in (XM_CLIBS): Set.
18067 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18068 (win32-i386-low.o): New dependency rule.
18069 * linux-low.c (linux_wait): Use target signal numbers.
18070 * target.h (struct target_ops): Doc fix.
18071 * server.h (target_signal_to_name): New prototype.
18072 * gdbreplay.c: Don't include headers unconditionally which
18073 are missing on mingw32. Include <winsock.h> for mingw32.
18074 (remote_close, remote_open): Adjust for Winsock support.
18075 * configure, config.in: Regenerated.
18076
18077 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18078
18079 * server.c (decode_xfer_read, write_qxfer_response): New.
18080 (handle_query): Take a packet length argument. Handle
18081 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18082 the qSupported response.
18083 (main): Update call to handle_query.
18084
18085 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18086
18087 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18088 (putpkt_binary): Renamed from putpkt and adjusted for binary
18089 data.
18090 (putpkt): New wrapper for putpkt_binary.
18091 (readchar): Don't mask off the high bit.
18092 (decode_X_packet): New function.
18093 * server.c (main): Call putpkt_binary if a handler sets the packet
18094 length. Save the length of the incoming packet. Handle 'X'.
18095 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18096
18097 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18098
18099 * server.c (handle_query): Handle qSupported.
18100
18101 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18102
18103 * remote-utils.c (all_symbols_looked_up): New variable.
18104 (look_up_one_symbol): Check it.
18105 * server.h (look_up_one_symbol): New declaration.
18106 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18107
18108 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18109
18110 * Makefile.in (linux-arm-low.o): Update dependencies.
18111 * linux-arm-low.c: Include "gdb_proc_service.h".
18112 (PTRACE_GET_THREAD_AREA): Define.
18113 (ps_get_thread_area): New function.
18114
18115 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18116
18117 * configure.srv (m68k*-*-uclinux*): New target.
18118 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18119 (linux_resume_one_process): Remove extraneous cast.
18120 (linux_read_offsets): New.
18121 (linux_target_op): Add linux_read_offsets on mmuless systems.
18122 * server.c (handle_query): Add qOffsets logic.
18123 * target.h (struct target_ops): Add read_offsets.
18124
18125 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18126
18127 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18128 (PTRACE_GET_THREAD_AREA): Define.
18129 (ps_get_thread_area): New function.
18130 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18131 (linux-x86-64-low.o): Update.
18132
18133 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18134
18135 * configure.ac: Remove checks for prfpregset_t.
18136 * gdb_proc_service.h: New file.
18137 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18138 new "gdb_proc_service.h".
18139 * proc-service.c: Likewise.
18140 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18141 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18142 * Makefile.in (gdb_proc_service_h): Updated.
18143 * configure, config.in: Regenerated.
18144
18145 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18146
18147 * remote-utils.c (prepare_resume_reply): Move declaration
18148 of gdb_id_from_wait to the top of the block.
18149
18150 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18151
18152 * linux-low.c (regsets_store_inferior_registers): Read the regset
18153 from the target before filling it.
18154
18155 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18156
18157 * server.c (attach_inferior): Return SIGTRAP for a successful
18158 attach.
18159
18160 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18161
18162 * Makefile.in (OBS): Add version.o.
18163 (STAGESTUFF): Delete.
18164 (version.o): Add dependencies.
18165 (version.c): Replace rule.
18166 (clean): Remove version.c.
18167 * server.c (gdbserver_version): New.
18168 (gdbserver_usage): Use printf.
18169 (main): Handle --version and --help.
18170 * server.h (version, host_name): Add declarations.
18171
18172 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18173
18174 * linux-arm-low.c:
18175 * linux-arm-low.c:
18176 * inferiors.c:
18177 * i387-fp.h:
18178 * i387-fp.c:
18179 * gdbreplay.c:
18180 * regcache.c:
18181 * proc-service.c:
18182 * mem-break.h:
18183 * mem-break.c:
18184 * linux-x86-64-low.c:
18185 * linux-sh-low.c:
18186 * linux-s390-low.c:
18187 * linux-ppc64-low.c:
18188 * linux-ppc-low.c:
18189 * linux-mips-low.c:
18190 * linux-m68k-low.c:
18191 * linux-m32r-low.c:
18192 * linux-low.h:
18193 * linux-low.c:
18194 * linux-ia64-low.c:
18195 * linux-i386-low.c:
18196 * linux-crisv32-low.c:
18197 * thread-db.c:
18198 * terminal.h:
18199 * target.h:
18200 * target.c:
18201 * server.h:
18202 * server.c:
18203 * remote-utils.c:
18204 * regcache.h:
18205 * utils.c:
18206 * Makefile.in:
18207 * configure.ac:
18208 * gdbserver.1: Add (C) after Copyright. Update the FSF
18209 address.
18210
18211 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18212
18213 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18214 (arm_breakpoint_at): Recognize both breakpoints.
18215 (the_low_target): Use the correct breakpoint instruction.
18216
18217 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18218
18219 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18220 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18221 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18222 (the_low_target): Update.
18223
18224 2005-10-25 Andreas Schwab <schwab@suse.de>
18225
18226 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18227
18228 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18229 (ia64_num_regs): Reduce to 462.
18230
18231 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18232
18233 * acinclude.m4: Correct quoting.
18234 * aclocal.m4: Regenerated.
18235
18236 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18237 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18238 (thread_db_init): Call thread_db_err_str.
18239 * configure.ac: Check for TD_VERSION.
18240 * config.in, configure: Regenerated.
18241
18242 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18243
18244 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18245
18246 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18247
18248 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18249 is not available. Define HAVE_PTRACE_GETREGS if it is.
18250 * config.in, configure: Regenerated.
18251 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18252 * linux-i386-low.c, linux-m68k-low.c: Update to use
18253 HAVE_PTRACE_GETREGS.
18254 * linux-low.c (regsets_fetch_inferior_registers)
18255 (regsets_store_inferior_registers): Only return 0 if we processed
18256 GENERAL_REGS.
18257 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18258 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18259
18260 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18261
18262 * inferiors.c (struct thread_info): Add gdb_id.
18263 (add_thread): Add gdb_id argument.
18264 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18265 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18266 calls to add_thread.
18267 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18268 * server.c (handle_query): Use thread_to_gdb_id.
18269 (handle_v_cont, main): Use gdb_id_to_thread_id.
18270 * server.h (add_thread): Update prototype.
18271 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18272 prototypes.
18273
18274 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18275
18276 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18277 left-padded registers.
18278 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18279 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18280
18281 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18282
18283 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18284 * configure: Regenerate.
18285 * config.in: Regenerate.
18286 * server.h (NEED_DECLARATION_STRERROR):
18287 Replace with !HAVE_DECL_STRERROR.
18288
18289 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18290
18291 * linux-low.c (linux_wait, linux_send_signal): Don't test
18292 an unsigned long variable for > 0 if it could be MAX_ULONG.
18293 * server.c (myresume): Likewise.
18294 * target.c (set_desired_inferior): Likewise.
18295
18296 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18297
18298 * configure.ac: Simplify and improve check for socklen_t.
18299 * configure, config.in: Regenerate.
18300
18301 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18302
18303 * acconfig.h: Remove.
18304 * configure.ac: Add a test for socklen_t. Use three-argument
18305 AC_DEFINE throughout.
18306 * config.in: Regenerated using autoheader 2.59.
18307 * configure: Regenerated.
18308
18309 * gdbreplay.c (socklen_t): Provide a default.
18310 (remote_open): Use socklen_t.
18311 * remote-utils.c (socklen_t): Provide a default.
18312 (remote_open): Use socklen_t.
18313 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18314 unsigned char.
18315
18316 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18317 char for buffers.
18318 * linux-low.c (linux_read_memory, linux_write_memory)
18319 (linux_read_auxv): Likewise.
18320 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18321 (check_mem_write): Likewise.
18322 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18323 Likewise.
18324 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18325 (registers_from_string, register_data): Likewise.
18326 * server.c (handle_query, main): Likewise.
18327 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18328 (decode_M_packet): Likewise.
18329 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18330 * target.h (struct target_ops): Update read_memory, write_memory,
18331 and read_auxv.
18332 (read_inferior_memory, write_inferior_memory): Update.
18333 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18334 to unsigned char *.
18335 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18336 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18337 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18338 linux-s390-low.c, linux-sh-low.c: Update for changes in
18339 read_inferior_memory and the_low_target->breakpoint.
18340
18341 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18342
18343 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18344 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18345 * configure.srv: Add powerpc64-*-linux*.
18346 * linux-ppc64-low.c: New file.
18347
18348 2005-05-23 Orjan Friberg <orjanf@axis.com>
18349
18350 * linux-cris-low.c: New file with support for CRIS.
18351 * linux-crisv32-low.c: Ditto for CRISv32.
18352 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18353 (clean): Add reg-cris.c and reg-crisv32.c.
18354 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18355 reg-crisv32.o, and reg-crisv32.c to make rules.
18356 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18357 recognized targets.
18358
18359 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18360
18361 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18362 of sizeof (PTRACE_XFER_TYPE).
18363 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18364
18365 2005-05-12 Orjan Friberg <orjanf@axis.com>
18366
18367 * target.h (struct target_ops): Add insert_watchpoint,
18368 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18369 pointers for hardware watchpoint support.
18370 * linux-low.h (struct linux_target_ops): Ditto.
18371 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18372 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18373 to linux_target_ops.
18374 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18375 reply packet.
18376 * server.c (main): Recognize 'Z' and 'z' packets.
18377
18378 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18379
18380 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18381 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18382 (the_low_target): Add new members.
18383
18384 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18385
18386 * proc-service.c (ps_lgetregs): Search all_processes instead of
18387 all_threads.
18388
18389 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18390
18391 * server.c (start_inferior): Change return type to int.
18392 (attach_inferior): Change sigptr to int *.
18393 (handle_v_cont, handle_v_requests): Change signal to int *.
18394 (main): Change signal to int.
18395
18396 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18397
18398 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18399 * configure.srv: Add m32r*-*-linux*.
18400 * linux-m32r-low.c: New file.
18401
18402 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18403
18404 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18405
18406 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18407
18408 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18409 Take unsigned long arguments for PIDs.
18410 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18411 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18412 (wait_for_sigstop, linux_resume_one_process)
18413 (regsets_fetch_inferior_registers, linux_send_signal)
18414 (linux_read_auxv): Likewise. Update the types of variables holding
18415 PIDs. Update format string specifiers.
18416 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18417 * remote-utils.c (prepare_resume_reply): Likewise.
18418 * server.c (cont_thread, general_thread, step_thread)
18419 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18420 unsigned long.
18421 (handle_query): Update format specifiers.
18422 (handle_v_cont, main): Use strtoul for thread IDs.
18423 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18424 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18425 (general_thread, step_thread, thread_from_wait)
18426 (old_thread_from_wait): Update.
18427 * target.h (struct thread_resume): Use unsigned long for THREAD.
18428 (struct target_ops): Use unsigned long for arguments to attach and
18429 thread_alive.
18430
18431 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18432
18433 * acinclude.m4: Include bfd/bfd.m4 directly.
18434 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18435 <agriffis@toolchain.org>.
18436 * aclocal.m4, configure: Regenerated.
18437
18438 2005-01-07 Andrew Cagney <cagney@gnu.org>
18439
18440 * configure.ac: Rename configure.in, require autoconf 2.59.
18441 * configure: Re-generate.
18442
18443 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18444
18445 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18446 LIBS when finished.
18447 * aclocal.m4: Regenerated.
18448 * configure: Regenerated.
18449
18450 2004-11-21 Andreas Schwab <schwab@suse.de>
18451
18452 * linux-m68k-low.c (m68k_num_gregs): Define.
18453 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18454 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18455 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18456 (m68k_breakpoint_at): New. Add to the_low_target.
18457
18458 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18459 srv_linux_thread_db to yes.
18460
18461 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18462
18463 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18464 (ARCH_SET_FS): Likewise.
18465 (ARCH_GET_FS): Likewise.
18466 (ARCH_GET_GS): Likewise.
18467
18468 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18469
18470 * linux-i386-low.c (ps_get_thread_area): New.
18471 * linux-x86-64-low.c (ps_get_thread_area): New.
18472 * linux-low.c: Include <sys/syscall.h>.
18473 (linux_kill_one_process): Don't kill the first thread here.
18474 (linux_kill): Kill the first thread here.
18475 (kill_lwp): New function.
18476 (send_sigstop, linux_send_signal): Use it.
18477 * proc-service.c: Clean up #ifdefs.
18478 (fpregset_info): Delete.
18479 (ps_lgetregs): Update and enable implementation.
18480 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18481 implementations.
18482 * remote-utils.c (struct sym_cache, symbol_cache): New.
18483 (input_interrupt): Print a clearer message.
18484 (async_io_enabled): New variable.
18485 (enable_async_io, disable_async_io): Use it. Update comments.
18486 (look_up_one_symbol): Use the symbol cache.
18487 * thread-db.c (thread_db_look_up_symbols): New function.
18488 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18489
18490 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18491
18492 * configure.in: Test for -rdynamic.
18493 * configure: Regenerated.
18494 * Makefile (INTERNAL_LDFLAGS): New.
18495 (gdbserver, gdbreplay): Use it.
18496
18497 2004-09-02 Andrew Cagney <cagney@gnu.org>
18498
18499 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18500
18501 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18502
18503 * linux-low.c (linux_wait): Clear all_processes list also.
18504
18505 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18506
18507 * linux-low.c: Include <errno.h>. Remove extern declaration of
18508 errno.
18509
18510 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18511
18512 * gdbreplay.c, server.h, utils.c: Update copyright years.
18513
18514 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18515
18516 * server.c (main): Print child status or termination signal from
18517 variable 'signal', not 'sig'.
18518
18519 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18520
18521 * linux-low.c (linux_read_memory): Change return type to
18522 int. Check for and return error from ptrace().
18523 * target.c (read_inferior_memory): Change return type to int. Pass
18524 back return status from the_target->read_memory().
18525 * target.h (struct target_ops): Adapt *read_memory() prototype.
18526 Update comment.
18527 (read_inferior_memory): Adapt prototype.
18528 * server.c (main): Return an error packet if
18529 read_inferior_memory() returns an error.
18530
18531 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18532
18533 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18534 Unify with other clean targets.
18535
18536 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18537
18538 * server.c (handle_v_cont): Call set_desired_inferior.
18539
18540 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18541
18542 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18543
18544 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18545
18546 * linux-low.c (linux_wait): Unblock async I/O.
18547 (linux_resume): Block and enable async I/O.
18548 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18549 * server.h (block_async_io, unblock_async_io): Add prototypes.
18550
18551 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18552
18553 * remote-utils.c (remote_open): Print a status notice after
18554 opening a TCP port.
18555 * server.c (attach_inferior): Print a status notice after
18556 attaching.
18557
18558 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18559
18560 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18561
18562 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18563
18564 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18565 error packet.
18566 * server.c, target.h: Update copyright years.
18567
18568 2004-02-25 Roland McGrath <roland@redhat.com>
18569
18570 * target.h (struct target_ops): New member `read_auxv'.
18571 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18572 * linux-low.c (linux_read_auxv): New function.
18573 (linux_target_ops): Initialize `read_auxv' member to that.
18574
18575 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18576
18577 Committed by Jim Blandy <jimb@redhat.com>.
18578
18579 * linux-s390-low.c (s390_num_regs): Update.
18580 (s390_regmap): Remove control registers. Use __s390x__ predefine
18581 instead of GPR_SIZE to distiguish s390 and s390x targets.
18582
18583 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18584
18585 * linux-low.c: Update copyright year.
18586 (check_removed_breakpoint): Clear pending_is_breakpoint.
18587 (linux_set_resume_request, linux_queue_one_thread)
18588 (resume_status_pending_p): New functions.
18589 (linux_continue_one_thread): Use process->resume.
18590 (linux_resume): Only resume threads if there are no pending events.
18591 * linux-low.h (struct process_info): Add resume request
18592 pointer.
18593
18594 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18595
18596 * regcache.c (new_register_cache): Clear the allocated register
18597 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18598
18599 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18600
18601 * linux-low.c (linux_resume): Take a struct thread_resume *
18602 argument.
18603 (linux_wait): Update call.
18604 (resume_ptr): New static variable.
18605 (linux_continue_one_thread): Renamed from
18606 linux_continue_one_process. Use resume_ptr.
18607 (linux_resume): Use linux_continue_one_thread.
18608 * server.c (handle_v_cont, handle_v_requests): New functions.
18609 (myresume): New function.
18610 (main): Handle 'v' case.
18611 * target.h (struct thread_resume): New type.
18612 (struct target_ops): Change argument of "resume" to struct
18613 thread_resume *.
18614 (myresume): Delete macro.
18615
18616 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18617
18618 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18619 (uninstall): Support DESTDIR.
18620
18621 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18622
18623 * configure.srv: Add xscale*linux copy of arm*linux entry.
18624
18625 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18626
18627 * linux-arm-low.c (arm_reinsert_addr): New function.
18628 (the_low_target): Add arm_reinsert_addr.
18629
18630 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18631
18632 * mem-break.c: Remove whitespace at end of file.
18633
18634 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18635
18636 * configure.in: Check whether we need to prototype strerror.
18637 * server.h: Optionally prototype strerror.
18638 * gdbreplay.c (perror_with_name): Use strerror.
18639 * linux-low.c (linux_attach_lwp): Use strerror.
18640 * utils.c (perror_with_name): Use strerror.
18641 * config.in, configure: Regenerated.
18642
18643 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18644
18645 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18646 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18647
18648 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18649
18650 * Makefile.in (SFILES): Update.
18651 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18652 low-sun3.c: Remove files.
18653
18654 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18655
18656 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18657 (linux_detach_one_process, linux_detach): New functions.
18658 (linux_target_ops): Add linux_detach.
18659 * server.c (main): Handle 'D' packet.
18660 * target.h (struct target_ops): Add "detach" member.
18661 (detach_inferior): Define.
18662
18663 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18664
18665 From Kelley Cook <kelleycook@wideopenwest.com>:
18666 * configure.srv: Accept i[34567]86 variants.
18667
18668 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18669
18670 * linux-low.c (linux_wait_for_event): Correct comment typos.
18671 (linux_resume_one_process): Call check_removed_breakpoint.
18672 (linux_send_signal): New function.
18673 (linux_target_ops): Add linux_send_signal.
18674 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18675 of kill.
18676 * target.h (struct target_ops): Add send_signal.
18677
18678 2003-05-29 Jim Blandy <jimb@redhat.com>
18679
18680 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18681 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18682 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18683 away part of the register's value.
18684
18685 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18686
18687 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18688 (linux_wait_for_event, linux_init_signals): Likewise.
18689
18690 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18691
18692 * configure.in: Check for stdlib.h.
18693 * configure: Regenerated.
18694 * config.in: Regenerated.
18695
18696 2003-01-04 Andreas Schwab <schwab@suse.de>
18697
18698 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18699
18700 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18701
18702 * Makefile.in: Remove obsolete code.
18703
18704 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18705
18706 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18707 defined(PT_FPR0_HI).
18708
18709 2002-11-17 Stuart Hughes <seh@zee2.com>
18710
18711 * linux-arm-low.c (arm_num_regs): Increase.
18712 (arm_regmap): Include status register.
18713
18714 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18715
18716 * linux-low.c (register_addr): Remove incorrect -1 check.
18717
18718 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18719
18720 * linux-low.c (linux_create_inferior): Call setpgid. Return
18721 the new PID.
18722 (unstopped_p, linux_signal_pid): Remove.
18723 (linux_target_ops): Remove linux_signal_pid.
18724 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18725 global instead of target method.
18726 * target.h (struct target_ops): Remove signal_pid. Update comment
18727 for create_inferior.
18728 * server.c (signal_pid): New variable.
18729 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18730 gdbserver. Set the child to be the foreground process group.
18731 (attach_inferior): Set signal_pid.
18732
18733 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18734
18735 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18736
18737 2002-08-20 Jim Blandy <jimb@redhat.com>
18738
18739 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18740 default for this.
18741
18742 2002-08-01 Andrew Cagney <cagney@redhat.com>
18743
18744 * Makefile.in: Make chill references obsolete.
18745
18746 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18747
18748 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18749 * configure: Regenerate.
18750 * config.in: Regenerate.
18751
18752 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18753
18754 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18755 (perror_with_name, remote_close, remote_open, expect, play): Static.
18756
18757 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18758
18759 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18760 byte offsets instead of an array of indexes.
18761 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18762
18763 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18764
18765 * regcache.c: Add comment.
18766
18767 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18768
18769 * thread-db.c: New file.
18770 * proc-service.c: New file.
18771 * acinclude.m4: New file.
18772 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18773 proc-service.o, and thread-db.o.
18774 (linux-low.o): Add USE_THREAD_DB.
18775 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18776 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18777 * aclocal.m4: Regenerated.
18778 * config.in: Regenerated.
18779 * configure: Regenerated.
18780 * configure.in: Check for proc_service.h, sys/procfs.h,
18781 thread_db.h, and linux/elf.h headrs.
18782 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18783 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18784 Check for -lthread_db and thread support.
18785 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18786 PowerPC, and SuperH.
18787 * i387-fp.c: Constify arguments.
18788 * i387-fp.h: Likewise.
18789 * inferiors.c: (struct thread_info): Renamed from
18790 `struct inferior_info'. Remove PID member. Use generic inferior
18791 list header. All uses updated.
18792 (inferiors, signal_pid): Removed.
18793 (all_threads): New variable.
18794 (get_thread): Define.
18795 (add_inferior_to_list): New function.
18796 (for_each_inferior): New function.
18797 (change_inferior_id): New function.
18798 (add_inferior): Removed.
18799 (remove_inferior): New function.
18800 (add_thread): New function.
18801 (free_one_thread): New function.
18802 (remove_thread): New function.
18803 (clear_inferiors): Use for_each_inferior and free_one_thread.
18804 (find_inferior): New function.
18805 (find_inferior_id): New function.
18806 (inferior_target_data): Update argument type.
18807 (set_inferior_target_data): Likewise.
18808 (inferior_regcache_data): Likewise.
18809 (set_inferior_regcache_data): Likewise.
18810 * linux-low.c (linux_bp_reinsert): Remove.
18811 (all_processes, stopping_threads, using_thrads)
18812 (struct pending_signals, debug_threads, pid_of): New.
18813 (inferior_pid): Replace with macro.
18814 (struct inferior_linux_data): Remove.
18815 (get_stop_pc, add_process): New functions.
18816 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18817 Use add_process and add_thread.
18818 (linux_attach_lwp): New function, based on old linux_attach. Use
18819 add_process and add_thread. Set stop_expected for new threads.
18820 (linux_attach): New function.
18821 (linux_kill_one_process): New function.
18822 (linux_kill): Kill all LWPs.
18823 (linux_thread_alive): Use find_inferior_id.
18824 (check_removed_breakpoints, status_pending_p): New functions.
18825 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18826 Update. Use WNOHANG. Wait for cloned processes also. Update process
18827 struct for the found process.
18828 (linux_wait_for_event): New function.
18829 (linux_wait): Use it. Support LWPs.
18830 (send_sigstop, wait_for_sigstop, stop_all_processes)
18831 (linux_resume_one_process, linux_continue_one_process): New functions.
18832 (linux_resume): Support LWPs.
18833 (REGISTER_RAW_SIZE): Remove.
18834 (fetch_register): Use register_size instead. Call supply_register.
18835 (usr_store_inferior_registers): Likewise. Call collect_register.
18836 Fix recursive case.
18837 (regsets_fetch_inferior_registers): Improve error message.
18838 (regsets_store_inferior_registers): Add debugging.
18839 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18840 (unstopped_p, linux_signal_pid): New functions.
18841 (linux_target_ops): Add linux_signal_pid.
18842 (linux_init_signals): New function.
18843 (initialize_low): Call it. Initialize using_threads.
18844 * regcache.c (inferior_regcache_data): Add valid
18845 flag.
18846 (get_regcache): Fetch registers lazily. Add fetch argument
18847 and update all callers.
18848 (regcache_invalidate_one, regcache_invalidate): New
18849 functions.
18850 (new_register_cache): Renamed from create_register_cache.
18851 Return the new regcache.
18852 (free_register_cache): Change argument to a void *.
18853 (registers_to_string, registers_from_string): Call get_regcache
18854 with fetch flag set.
18855 (register_data): Make static. Pass fetch flag to get_regcache.
18856 (supply_register): Call get_regcache with fetch flag clear.
18857 (collect_register): Call get_regcache with fetch flag set.
18858 (collect_register_as_string): New function.
18859 * regcache.h: Update.
18860 * remote-utils.c (putpkt): Flush after debug output and use
18861 stderr.
18862 Handle input interrupts while waiting for an ACK.
18863 (input_interrupt): Use signal_pid method.
18864 (getpkt): Flush after debug output and use stderr.
18865 (outreg): Use collect_register_as_string.
18866 (new_thread_notify, dead_thread_notify): New functions.
18867 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18868 and general_thread.
18869 (look_up_one_symbol): Flush after debug output.
18870 * server.c (step_thread, server_waiting): New variables.
18871 (start_inferior): Don't use signal_pid. Update call to mywait.
18872 (attach_inferior): Update call to mywait.
18873 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18874 (main): Don't fetch/store registers explicitly. Use
18875 set_desired_inferior. Support proposed ``Hs'' packet. Update
18876 calls to mywait.
18877 * server.h: Update.
18878 (struct inferior_list, struct_inferior_list_entry): New.
18879 * target.c (set_desired_inferior): New.
18880 (write_inferior_memory): Constify.
18881 (mywait): New function.
18882 * target.h: Update.
18883 (struct target_ops): New signal_pid method.
18884 (mywait): Removed macro, added prototype.
18885
18886 * linux-low.h (regset_func): Removed.
18887 (regset_fill_func, regset_store_func): New.
18888 (enum regset_type): New.
18889 (struct regset_info): Add type field. Use new operation types.
18890 (struct linux_target_ops): stop_pc renamed to get_pc.
18891 Add decr_pc_after_break and breakpoint_at.
18892 (get_process, get_thread_proess, get_process_thread)
18893 (strut process_info, all_processes, linux_attach_lwp)
18894 (thread_db_init): New.
18895
18896 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18897 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18898 (the_low_target): Add new members.
18899 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18900 (i386_store_fpxregset): Constify.
18901 (target_regsets): Add new kind identifier.
18902 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18903 (i386_set_pc): Add debugging.
18904 (i386_breakpoint_at): New function.
18905 (the_low_target): Add new members.
18906 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18907 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18908 (mips_breakpoint_at): New.
18909 (the_low_target): Add new members.
18910 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18911 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18912 (the_low_target): Add new members.
18913 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18914 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18915 (the_low_target): Add new members.
18916 * linux-x86-64-low.c (target_regsets): Add new kind
18917 identifier.
18918
18919 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18920
18921 From Martin Pool <mbp@samba.org>:
18922 * server.c (gdbserver_usage): New function.
18923 (main): Call it.
18924
18925 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18926
18927 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18928 stop_at -> stop_pc.
18929
18930 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18931
18932 * Makefile.in: Remove obsolete code.
18933
18934 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18935
18936 * linux-low.c (regsets_fetch_inferior_registers),
18937 (regsets_store_inferior_registers): Removed cast to int from
18938 ptrace() calls.
18939 * regcache.h: Added declaration of struct inferior_info.
18940
18941 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18942
18943 * inferiors.c (struct inferior_info): Add regcache_data.
18944 (add_inferior): Call create_register_cache.
18945 (clear_inferiors): Call free_register_cache.
18946 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18947 * regcache.c (struct inferior_regcache_data): New.
18948 (registers): Remove.
18949 (get_regcache): New function.
18950 (create_register_cache, free_register_cache): New functions.
18951 (set_register_cache): Don't initialize the register cache here.
18952 (registers_to_string, registers_from_string, register_data): Call
18953 get_regcache.
18954 * regcache.h: Add prototypes.
18955 * server.h: Likewise.
18956
18957 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18958
18959 * mem-break.c: New file.
18960 * mem-break.h: New file.
18961 * Makefile.in: Add mem-break.o rule; update server.h
18962 dependencies.
18963 * inferiors.c (struct inferior_info): Add target_data
18964 member.
18965 (clear_inferiors): Free target_data member if set.
18966 (inferior_target_data, set_inferior_target_data): New functions.
18967 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18968 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18969 * linux-low.c (linux_bp_reinsert): New variable.
18970 (struct inferior_linux_data): New.
18971 (linux_create_inferior): Use set_inferior_target_data.
18972 (linux_attach): Likewise. Call add_inferior.
18973 (linux_wait_for_one_inferior): New function.
18974 (linux_wait): Call it.
18975 (linux_write_memory): Add const.
18976 (initialize_low): Call set_breakpoint_data.
18977 * linux-low.h (struct linux_target_ops): Add breakpoint
18978 handling members.
18979 * server.c (attach_inferior): Remove extra add_inferior
18980 call.
18981 * server.h: Include mem-break.h. Update inferior.c
18982 prototypes.
18983 * target.c (read_inferior_memory)
18984 (write_inferior_memory): New functions.
18985 * target.h (read_inferior_memory)
18986 (write_inferior_memory): Change macros to prototypes.
18987 (struct target_ops): Update comments. Add const to write_memory
18988 definition.
18989
18990 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18991
18992 * linux-low.c (usr_store_inferior_registers): Support
18993 registers which are allowed to fail to store.
18994 * linux-low.h (linux_target_ops): Likewise.
18995 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18996 (ppc_cannot_store_register): FPSCR may not be storable.
18997
18998 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18999
19000 * server.h: Include <string.h> if HAVE_STRING_H.
19001 * ChangeLog: Correct paths in last ChangeLog entry.
19002
19003 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19004
19005 * linux-low.h: Remove obsolete prototypes.
19006 (struct linux_target_ops): New.
19007 (extern the_low_target): New.
19008 * linux-low.c (num_regs, regmap): Remove declarations.
19009 (register_addr): Use the_low_target explicitly.
19010 (fetch_register): Likewise.
19011 (usr_fetch_inferior_registers): Likewise.
19012 (usr_store_inferior_registers): Likewise.
19013 * linux-arm-low.c (num_regs): Remove.
19014 (arm_num_regs): Define.
19015 (arm_regmap): Renamed from regmap, made static.
19016 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19017 made static.
19018 (arm_cannot_store_register): Renamed from cannot_store_register,
19019 made static.
19020 (the_low_target): New.
19021 * linux-i386-low.c (num_regs): Remove.
19022 (i386_num_regs): Define.
19023 (i386_regmap): Renamed from regmap, made static.
19024 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19025 made static.
19026 (i386_cannot_store_register): Renamed from cannot_store_register,
19027 made static.
19028 (the_low_target): New.
19029 * linux-ia64-low.c (num_regs): Remove.
19030 (ia64_num_regs): Define.
19031 (ia64_regmap): Renamed from regmap, made static.
19032 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19033 made static.
19034 (ia64_cannot_store_register): Renamed from cannot_store_register,
19035 made static.
19036 (the_low_target): New.
19037 * linux-m68k-low.c (num_regs): Remove.
19038 (m68k_num_regs): Define.
19039 (m68k_regmap): Renamed from regmap, made static.
19040 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19041 made static.
19042 (m68k_cannot_store_register): Renamed from cannot_store_register,
19043 made static.
19044 (the_low_target): New.
19045 * linux-mips-low.c (num_regs): Remove.
19046 (mips_num_regs): Define.
19047 (mips_regmap): Renamed from regmap, made static.
19048 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19049 made static.
19050 (mips_cannot_store_register): Renamed from cannot_store_register,
19051 made static.
19052 (the_low_target): New.
19053 * linux-ppc-low.c (num_regs): Remove.
19054 (ppc_num_regs): Define.
19055 (ppc_regmap): Renamed from regmap, made static.
19056 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19057 made static.
19058 (ppc_cannot_store_register): Renamed from cannot_store_register,
19059 made static.
19060 (the_low_target): New.
19061 * linux-s390-low.c (num_regs): Remove.
19062 (s390_num_regs): Define.
19063 (s390_regmap): Renamed from regmap, made static.
19064 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19065 made static.
19066 (s390_cannot_store_register): Renamed from cannot_store_register,
19067 made static.
19068 (the_low_target): New.
19069 * linux-sh-low.c (num_regs): Remove.
19070 (sh_num_regs): Define.
19071 (sh_regmap): Renamed from regmap, made static.
19072 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19073 made static.
19074 (sh_cannot_store_register): Renamed from cannot_store_register,
19075 made static.
19076 (the_low_target): New.
19077 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19078 (the_low_target): New.
19079
19080 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19081
19082 * Makefile.in: Add stamp-h target.
19083 * configure.in: Create stamp-h.
19084 * configure: Regenerated.
19085
19086 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19087
19088 * inferiors.c: New file.
19089 * target.c: New file.
19090 * target.h: New file.
19091 * Makefile.in: Add target.o and inferiors.o. Update
19092 dependencies.
19093 * linux-low.c (inferior_pid): New static variable,
19094 moved from server.c.
19095 (linux_create_inferior): Renamed from create_inferior.
19096 Call add_inferior. Return 0 on success instead of a PID.
19097 (linux_attach): Renamed from myattach.
19098 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19099 (linux_thread_alive): Renamed from mythread_alive.
19100 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19101 child dies.
19102 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19103 (regsets_store_inferior_registers): Correct error message.
19104 Add missing ``return 0''.
19105 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19106 (linux_store_registers): Renamed from store_inferior_registers.
19107 (linux_read_memory): Renamed from read_inferior_memory.
19108 (linux_write_memory): Renamed from write_inferior_memory.
19109 (linux_target_ops): New structure.
19110 (initialize_low): Call set_target_ops ().
19111 * remote-utils.c (unhexify): New function.
19112 (hexify): New function.
19113 (input_interrupt): Send signals to ``signal_pid''.
19114 * server.c (inferior_pid): Remove.
19115 (start_inferior): Update create_inferior call.
19116 (attach_inferior): Call add_inferior.
19117 (handle_query): New function.
19118 (main): Call handle_query for `q' packets.
19119 * server.h: Include "target.h". Remove obsolete prototypes.
19120 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19121
19122 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19123
19124 * Makefile.in: Add WARN_CFLAGS. Update configury
19125 dependencies.
19126 * configure.in: Check for <string.h>
19127 * configure: Regenerate.
19128 * config.in: Regenerate.
19129 * gdbreplay.c: Include needed system headers.
19130 (remote_open): Remove strchr prototype.
19131 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19132 * regcache.c (supply_register): Change buf argument to const void *.
19133 (supply_register_by_name): Likewise.
19134 (collect_register): Change buf argument to void *.
19135 (collect_register_by_name): Likewise.
19136 * regcache.h: Add missing prototypes.
19137 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19138 * server.c (handle_query): New function.
19139 (attached): New static variable, moved out of main.
19140 (main): Quiet longjmp clobber warnings.
19141 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19142 * utils.c (error): Remove NORETURN.
19143 (fatal): Likewise.
This page took 0.495381 seconds and 4 git commands to generate.