gdbserver: turn target op 'read_loadmap' into a method
[binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's read_loadmap 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_read_loadmap'.
9 * target.cc (process_target::read_loadmap): Define.
10 (process_target::supports_read_loadmap): Define.
11
12 Update the derived classes and callers below.
13
14 * server.cc (handle_qxfer_fdpic): Update.
15 (handle_query): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_process_target::supports_read_loadmap): Define.
18 (linux_read_loadmap): Turn into ...
19 (linux_process_target::read_loadmap): ... this.
20 * linux-low.h (class linux_process_target): Update.
21 * lynx-low.cc (lynx_target_ops): Update.
22 * nto-low.cc (nto_target_ops): Update.
23 * win32-low.cc (win32_target_ops): Update.
24
25 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
26
27 Turn process_stratum_target's core_of_thread op into a method of
28 process_target.
29
30 * target.h (struct process_stratum_target): Remove the target op.
31 (class process_target): Add the target op.
32 (target_core_of_thread): Update the macro.
33 * target.cc (process_target::core_of_thread): Define.
34
35 Update the derived classes and callers below.
36
37 * linux-low.cc (linux_target_ops): Update.
38 (linux_process_target::core_of_thread): Define.
39 * linux-low.h (class linux_process_target): Update.
40 * lynx-low.cc (lynx_target_ops): Update.
41 * nto-low.cc (nto_target_ops): Update.
42 * win32-low.cc (win32_target_ops): Update.
43
44 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
45
46 Turn process_stratum_target's handle_monitor_command op into a
47 method of process_target.
48
49 * target.h (struct process_stratum_target): Remove the target op.
50 (class process_target): Add the target op.
51 (target_handle_monitor_command): Update the macro.
52 * target.cc (process_target::handle_monitor_command): Define.
53
54 Update the derived classes and callers below.
55
56 * server.cc (handle_query): Update.
57 * linux-low.cc (linux_target_ops): Update.
58 (linux_process_target::handle_monitor_command): Define.
59 * linux-low.h (class linux_process_target): Update.
60 * lynx-low.cc (lynx_target_ops): Update.
61 * nto-low.cc (nto_target_ops): Update.
62 * win32-low.cc (win32_target_ops): Update.
63
64 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
65
66 Turn process_stratum_target's handle_new_gdb_connection op into a
67 method of process_target.
68
69 * target.h (struct process_stratum_target): Remove the target op.
70 (class process_target): Add the target op.
71 (target_handle_new_gdb_connection): Update the macro.
72 * target.cc (process_target::handle_new_gdb_connection): Define.
73
74 Update the derived classes and callers below.
75
76 * linux-low.cc (linux_target_ops): Update.
77 (linux_handle_new_gdb_connection): Turn into ...
78 (linux_process_target::handle_new_gdb_connection): ... this.
79 * linux-low.h (class linux_process_target): Update.
80 * lynx-low.cc (lynx_target_ops): Update.
81 * nto-low.cc (nto_target_ops): Update.
82 * win32-low.cc (win32_target_ops): Update.
83
84 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
85
86 Turn process_stratum_target's supports_fork_events,
87 supports_vfork_events, and supports_exec_events ops into methods
88 of process_target.
89
90 * target.h (struct process_stratum_target): Remove the target ops.
91 (class process_target): Add the target ops.
92 (target_supports_fork_events): Update the macro.
93 (target_supports_vfork_events): Update the macro.
94 (target_supports_exec_events): Update the macro.
95 * target.cc (process_target::supports_fork_events): Define.
96 (process_target::supports_vfork_events): Define.
97 (process_target::supports_exec_events): Define.
98
99 Update the derived classes and callers below.
100
101 * linux-low.cc (linux_target_ops): Update.
102 (linux_supports_fork_events): Turn into ...
103 (linux_process_target::supports_fork_events): ... this.
104 (linux_supports_vfork_events): Turn into ...
105 (linux_process_target::supports_vfork_events): ... this.
106 (linux_supports_exec_events): Turn into ...
107 (linux_process_target::supports_exec_events): ... 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 supports_multi_process op into a
116 method of process_target.
117
118 * target.h (struct process_stratum_target): Remove the target op.
119 (class process_target): Add the target op.
120 * target.cc (process_target::supports_multi_process): Define.
121 (target_supports_multi_process): Update.
122
123 Update the derived classes and callers below.
124
125 * linux-low.cc (linux_target_ops): Update.
126 (linux_supports_multi_process): Turn into ...
127 (linux_process_target::supports_multi_process): ... this.
128 * linux-low.h (class linux_process_target): Update.
129 * lynx-low.cc (lynx_target_ops): Update.
130 * nto-low.cc (nto_target_ops): Update.
131 * win32-low.cc (win32_target_ops): Update.
132
133 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
134
135 Turn process_stratum_target's supports_non_stop, async, and
136 start_non_stop ops into methods of process_target.
137
138 * target.h (struct process_stratum_target): Remove the target ops.
139 (class process_target): Add the target ops.
140 (target_supports_non_stop): Update the macro.
141 (target_async): Update the macro.
142 (start_non_stop): Remove declaration.
143 * target.cc (process_target::supports_non_stop): Define.
144 (process_target::async): Define.
145 (process_target::start_non_stop): Define.
146 (start_non_stop): Remove.
147
148 Update the derived classes and callers below.
149
150 * server.cc (handle_qxfer_siginfo): Update.
151 (handle_query): Update.
152 * linux-low.cc (linux_target_ops): Update.
153 (linux_supports_non_stop): Turn into ...
154 (linux_process_target::supports_non_stop): ... this.
155 (linux_async): Turn into ...
156 (linux_process_target::async): ... this.
157 (linux_start_non_stop): Turn into ...
158 (linux_process_target::start_non_stop): ... this.
159 * linux-low.h (class linux_process_target): Update.
160 * lynx-low.cc (lynx_target_ops): Update.
161 * nto-low.cc (nto_target_ops): Update.
162 (nto_supports_non_stop): Remove; rely on the default behavior
163 instead.
164 * win32-low.cc (win32_target_ops): Update.
165
166 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
167
168 Turn process_stratum_target's qxfer_siginfo op into a method of
169 process_target.
170
171 * target.h (struct process_stratum_target): Remove the target op.
172 (class process_target): Add the target op. Also add
173 'supports_qxfer_siginfo'.
174 * target.cc (process_target::qxfer_siginfo): Define.
175 (process_target::supports_qxfer_siginfo): Define.
176
177 Update the derived classes and callers below.
178
179 * server.cc (handle_qxfer_siginfo): Update.
180 (handle_query): Update.
181 * linux-low.cc (linux_target_ops): Update.
182 (linux_process_target::supports_qxfer_siginfo): Define.
183 (linux_xfer_siginfo): Turn into ...
184 (linux_process_target::qxfer_siginfo): ... this.
185 * linux-low.h (class linux_process_target): Update.
186 * lynx-low.cc (lynx_target_ops): Update.
187 * nto-low.cc (nto_target_ops): Update.
188 * win32-low.cc (win32_target_ops): Update.
189
190 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
191
192 Turn process_stratum_target's qxfer_osdata op into a method of
193 process_target.
194
195 * target.h (struct process_stratum_target): Remove the target op.
196 (class process_target): Add the target op. Also add
197 'supports_qxfer_osdata'.
198 * target.cc (process_target::qxfer_osdata): Define.
199 (process_target::supports_qxfer_osdata): Define.
200
201 Update the derived classes and callers below.
202
203 * server.cc (handle_qxfer_osdata): Update.
204 (handle_query): Update.
205 * linux-low.cc (linux_target_ops): Update.
206 (linux_process_target::supports_qxfer_osdata): Define.
207 (linux_qxfer_osdata): Turn into ...
208 (linux_process_target::qxfer_osdata): ... this.
209 * linux-low.h (class linux_process_target): Update.
210 * lynx-low.cc (lynx_target_ops): Update.
211 * nto-low.cc (nto_target_ops): Update.
212 * win32-low.cc (win32_target_ops): Update.
213
214 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
215
216 Turn process_stratum_target's hostio_last_error op into a
217 method of process_target.
218
219 * target.h (struct process_stratum_target): Remove the target op.
220 (class process_target): Add the target op.
221 * target.cc: Add "hostio.h" to includes.
222 (process_target::hostio_last_error): Define.
223
224 Update the derived classes and callers below.
225
226 * hostio.cc (hostio_error): Update.
227 * linux-low.cc: Remove "hostio.h" from includes.
228 (linux_target_ops): Update.
229 * lynx-low.cc (lynx_target_ops): Update.
230 * nto-low.cc (nto_target_ops): Update.
231 * win32-low.h (class win32_process_target): Update.
232 * win32-low.cc (win32_target_ops): Update.
233 (wince_hostio_last_error): Turn into ...
234 (win32_process_target::hostio_last_error): ... this.
235
236 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
237
238 Turn process_stratum_target's get_tls_address op into a method of
239 process_target.
240
241 * target.h (struct process_stratum_target): Remove the target op.
242 (class process_target): Add the target op. Also add
243 'supports_get_tls_address'.
244 * target.cc (process_target::get_tls_address): Define.
245 (process_target::supports_get_tls_address): Define.
246
247 Update the derived classes and callers below.
248
249 * server.cc (handle_query): Update.
250 * linux-low.cc (linux_target_ops): Update.
251 (linux_process_target::supports_get_tls_address): Define.
252 (linux_process_target::get_tls_address): Define.
253 * linux-low.h (class linux_process_target): Update.
254 * lynx-low.cc (lynx_target_ops): Update.
255 * nto-low.cc (nto_target_ops): Update.
256 * win32-low.cc (win32_target_ops): Update.
257
258 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
259
260 Turn process_stratum_target's read_offsets op into a method of
261 process_target.
262
263 * target.h (struct process_stratum_target): Remove the target op.
264 (class process_target): Add the target op. Also add
265 'supports_read_offsets'.
266 * target.cc (process_target::read_offsets): Define.
267 (process_target::supports_read_offsets): Define.
268
269 Update the derived classes and callers below.
270
271 * server.cc (handle_query): Update.
272 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
273 (linux_target_ops): Update.
274 (linux_process_target::supports_read_offsets): Define.
275 (linux_read_offsets): Turn into ...
276 (linux_process_target::read_offsets): ... this.
277 * linux-low.h (class linux_process_target): Update.
278 * lynx-low.cc (lynx_target_ops): Update.
279 * nto-low.cc (nto_target_ops): Update.
280 * win32-low.cc (win32_target_ops): Update.
281
282 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
283
284 Turn process_stratum_target's stopped_by_watchpoint and
285 stopped_data_address ops into methods of process_target.
286
287 * target.h (struct process_stratum_target): Remove the target ops.
288 (class process_target): Add the target ops.
289 * target.cc (process_target::stopped_by_watchpoint): Define.
290 (process_target::stopped_data_address): Define.
291
292 Update the derived classes and callers below.
293
294 * remote-utils.cc (prepare_resume_reply): Update.
295 * linux-low.cc (linux_target_ops): Update.
296 (linux_stopped_by_watchpoint): Turn into ...
297 (linux_process_target::stopped_by_watchpoint): ... this.
298 (linux_stopped_data_address): Turn into ...
299 (linux_process_target::stopped_data_address): ... this.
300 * linux-low.h (class linux_process_target): Update.
301 * lynx-low.cc (lynx_target_ops): Update.
302 * nto-low.cc (nto_target_ops): Update.
303 (nto_stopped_by_watchpoint): Turn into ...
304 (nto_process_target::stopped_by_watchpoint): ... this.
305 (nto_stopped_data_address): Turn into ...
306 (nto_process_target::stopped_data_address): ... this.
307 * nto-low.h (class nto_process_target): Update.
308 * win32-low.cc (win32_target_ops): Update.
309 (win32_stopped_by_watchpoint): Turn into ...
310 (win32_process_target::stopped_by_watchpoint): ... this.
311 (win32_stopped_data_address): Turn into ...
312 (win32_process_target::stopped_data_address): ... this.
313 * win32-low.h (class win32_process_target): Update.
314
315 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
316
317 Turn process_stratum_target's supports_hardware_single_step op into
318 a method of process_target.
319
320 * target.h (struct process_stratum_target): Remove the target op.
321 (class process_target): Add the target op.
322 (target_supports_hardware_single_step): Update the macro.
323 (target_can_do_hardware_single_step): Remove declaration.
324 * target.cc (process_target::supports_hardware_single_step): Define.
325 (target_can_do_hardware_single_step): Remove.
326
327 Update the derived classes and callers below.
328
329 * linux-low.h (class linux_process_target): Update.
330 * linux-low.cc (linux_target_ops): Update.
331 (linux_supports_hardware_single_step): Turn into ...
332 (linux_process_target::supports_hardware_single_step): ... this.
333 * lynx-low.h (class lynx_process_target): Update.
334 * lynx-low.cc (lynx_target_ops): Update.
335 (lynx_process_target::supports_hardware_single_step): Define.
336 * nto-low.h (class nto_process_target): Update.
337 * nto-low.cc (nto_target_ops): Update.
338 (nto_process_target::supports_hardware_single_step): Define.
339 * win32-low.h (class win32_process_target): Update.
340 * win32-low.cc (win32_target_ops): Update.
341 (win32_process_target::supports_hardware_single_step): Define.
342
343 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
344
345 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
346 ops into methods of process_target.
347
348 * target.h (struct process_stratum_target): Remove the target ops.
349 (class process_target): Add the target ops.
350 (target_stopped_by_hw_breakpoint): Update the macro.
351 (target_supports_stopped_by_hw_breakpoint): Update the macro.
352 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
353 (process_target::supports_stopped_by_hw_breakpoint): Define.
354
355 Update the derived classes and callers below.
356
357 * linux-low.cc (linux_target_ops): Update.
358 (linux_stopped_by_hw_breakpoint): Turn into ...
359 (linux_process_target::stopped_by_hw_breakpoint): ... this.
360 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
361 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
362 * linux-low.h (class linux_process_target): Update.
363 * lynx-low.cc (lynx_target_ops): Update.
364 * nto-low.cc (nto_target_ops): Update.
365 * win32-low.cc (win32_target_ops): Update.
366
367 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
368
369 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
370 ops into methods of process_target.
371
372 * target.h (struct process_stratum_target): Remove the target ops.
373 (class process_target): Add the target ops.
374 (target_stopped_by_sw_breakpoint): Update the macro.
375 (target_supports_stopped_by_sw_breakpoint): Update the macro.
376 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
377 (process_target::supports_stopped_by_sw_breakpoint): Define.
378
379 Update the derived classes and callers below.
380
381 * linux-low.cc (linux_target_ops): Update.
382 (linux_stopped_by_sw_breakpoint): Turn into ...
383 (linux_process_target::stopped_by_sw_breakpoint): ... this.
384 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
385 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
386 * linux-low.h (class linux_process_target): Update.
387 * lynx-low.cc (lynx_target_ops): Update.
388 * nto-low.cc (nto_target_ops): Update.
389 * win32-low.cc (win32_target_ops): Update.
390
391 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
392
393 Turn process_stratum_target's insert_point and remove_point ops
394 into methods of process_target.
395
396 * target.h (struct process_stratum_target): Remove the target ops.
397 (class process_target): Add the target ops.
398 * target.cc (process_target::insert_point): Define.
399 (process_target::remove_point): Define.
400
401 Update the derived classes and callers below.
402
403 * mem-break.cc (set_raw_breakpoint_at): Update.
404 (delete_raw_breakpoint): Update.
405 (uninsert_raw_breakpoint): Update.
406 (reinsert_raw_breakpoint): Update.
407 * linux-low.cc (linux_target_ops): Update.
408 (linux_insert_point): Turn into ...
409 (linux_process_target::insert_point): ... this.
410 (linux_remove_point): Turn into ...
411 (linux_process_target::remove_point): ... 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_insert_point): Turn into ...
416 (nto_process_target::insert_point): ... this.
417 (nto_remove_point): Turn into ...
418 (nto_process_target::remove_point): ... this.
419 * nto-low.h (class nto_process_target): Update.
420 * win32-low.cc (win32_target_ops): Update.
421 (win32_insert_point): Turn into ...
422 (win32_process_target::insert_point): ... this.
423 (win32_remove_point): Turn into ...
424 (win32_process_target::remove_point): ... 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_z_point_type op into a
430 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.cc (process_target::supports_z_point_type): Define.
435
436 Update the derived classes and callers below.
437
438 * mem-break.cc (z_type_supported): Update.
439 * linux-low.cc (linux_target_ops): Update.
440 (linux_supports_z_point_type): Turn into ...
441 (linux_process_target::supports_z_point_type): ... this.
442 * linux-low.h (class linux_process_target): Update.
443 * lynx-low.cc (lynx_target_ops): Update.
444 * nto-low.cc (nto_target_ops): Update.
445 (nto_supports_z_point_type): Turn into ...
446 (nto_process_target::supports_z_point_type): ... this.
447 * nto-low.h (class nto_process_target): Update.
448 * win32-low.cc (win32_target_ops): Update.
449 (win32_supports_z_point_type): Turn into ...
450 (win32_process_target::supports_z_point_type): ... this.
451 * win32-low.h (class win32_process_target): Update.
452
453 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
454
455 Turn process_stratum_target's read_auxv op into a method of
456 process_target.
457
458 * target.h (class process_stratum_target): Remove the target op.
459 (struct process_target): Add the target op. Also add
460 'supports_read_auxv'.
461 * target.cc (process_target::read_auxv): Define.
462 (process_target::supports_read_auxv): Define.
463
464 Update the derived classes and callers below.
465
466 * server.cc (handle_qxfer_auxv): Update.
467 (handle_query): Update.
468 * linux-low.cc (linux_target_ops): Update.
469 (linux_process_target::supports_read_auxv): Define.
470 (linux_read_auxv): Turn into ...
471 (linux_process_target::read_auxv): ... this.
472 * linux-low.h (class linux_process_target): Update.
473 * lynx-low.cc (lynx_target_ops): Update.
474 * nto-low.cc (nto_target_ops): Update.
475 (nto_process_target::supports_read_auxv): Define.
476 (nto_read_auxv): Turn into ...
477 (nto_process_target::read_auxv): ... this.
478 * nto-low.h (class nto_process_target): Update.
479 * win32-low.cc (win32_target_ops): Update.
480
481 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
482
483 Turn process_stratum_target's request_interrupt op into a method of
484 process_target.
485
486 * target.h (struct process_stratum_target): Remove the target op.
487 (class process_target): Add the target op.
488
489 Update the derived classes and callers below.
490
491 * remote-utils.cc (putpkt_binary_1): Update.
492 (input_interrupt): Update.
493 (getpkt): Update.
494 * server.cc (handle_v_requests): Update.
495 * linux-low.cc (linux_target_ops): Update.
496 (linux_request_interrupt): Turn into ...
497 (linux_process_target::request_interrupt): ... this.
498 * linux-low.h (class linux_process_target): Update.
499 * lynx-low.cc (lynx_target_ops): Update.
500 (lynx_request_interrupt): Turn into ...
501 (lynx_process_target::request_interrupt): ... this.
502 * lynx-low.h (class lynx_process_target): Update.
503 * nto-low.cc (nto_target_ops): Update.
504 (nto_request_interrupt): Turn into ...
505 (nto_process_target::request_interrupt): ... this.
506 * nto-low.h (class nto_process_target): Update.
507 * win32-low.cc (win32_target_ops): Update.
508 (win32_request_interrupt): Turn into ...
509 (win32_process_target::request_interrupt): ... this.
510 * win32-low.h (class win32_process_target): Update.
511
512 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
513
514 Turn process_stratum_target's look_up_symbols op into a method of
515 process_target.
516
517 * target.h (struct process_stratum_target): Remove the target op.
518 (class process_target): Add the target op.
519 * target.cc (process_target::look_up_symbols): Define.
520
521 Update the derived classes and callers below.
522
523 * server.cc (handle_query): Update.
524 * linux-low.cc (linux_target_ops): Update.
525 (linux_look_up_symbols): Turn into ...
526 (linux_process_target::look_up_symbols): ... this.
527 * linux-low.h (class linux_process_target): Update.
528 * lynx-low.cc (lynx_target_ops): Update.
529 * nto-low.cc (nto_target_ops): Update.
530 * win32-low.cc (win32_target_ops): Update.
531
532 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
533
534 Turn process_stratum_target's read_memory and write_memory
535 ops into methods of process_target.
536
537 * target.h (struct process_stratum_target): Remove the target ops.
538 (class process_target): Add the target ops.
539
540 Update the derived classes and callers below.
541
542 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
543 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
544 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
545 (arm_get_syscall_trapinfo): Update.
546 * linux-cris-low.cc (cris_breakpoint_at): Update.
547 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
548 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
549 * linux-mips-low.cc (mips_breakpoint_at): Update.
550 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
551 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
552 * linux-sh-low.cc (sh_breakpoint_at): Update.
553 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
554 (sparc_store_gregset_from_stack): Update.
555 (sparc_breakpoint_at): Update.
556 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
557 * linux-tile-low.cc (tile_breakpoint_at): Update.
558 * linux-x86-low.cc (x86_breakpoint_at): Update.
559 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
560 * mem-brea.cc (insert_memory_breakpoint): Update.
561 (validate_inserted_breakpoint): Update.
562 * target.cc (read_inferior_memory): Update.
563 (target_write_memory): Update.
564 * linux-low.cc (linux_target_ops): Update.
565 (linux_read_memory): Make a wrapper around the read_memory target
566 op call.
567 (linux_process_target::read_memory): Rename from linux_read_memory.
568 (linux_write_memory): Turn into ...
569 (linux_process_target::write_memory): ... this.
570 * linux-low.h (class linux_process_target): Update.
571 * lynx-low.cc (lynx_target_ops): Update.
572 (lynx_read_memory): Turn into ...
573 (lynx_process_target::read_memory): ... this.
574 (lynx_write_memory): Turn into ...
575 (lynx_process_target::write_memory): ... this.
576 * lynx-low.h (class lynx_process_target): Update.
577 * nto-low.cc (nto_target_ops): Update.
578 (nto_read_memory): Turn into ...
579 (nto_process_target::read_memory): ... this.
580 (nto_write_memory): Turn into ...
581 (nto_process_target::write_memory): ... this.
582 * nto-low.h (class nto_process_target): Update.
583 * win32-low.cc (win32_target_ops): Update.
584 (win32_read_inferior_memory): Turn into ...
585 (win32_process_target::read_memory): ... this.
586 (win32_write_inferior_memory): Turn into ...
587 (win32_process_target::write_memory): ... this.
588 * win32-low.h (class win32_process_target): Update.
589
590 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
591
592 Turn process_stratum_target's prepare_to_access_memory and
593 done_accessing_memory ops into methods of process_target.
594
595 * target.h (struct process_stratum_target): Remove the target ops.
596 (class process_target): Add the target ops.
597 * target.cc (process_target::prepare_to_access_memory): Define.
598 (process_target::done_accessing_memory): Define.
599 (prepare_to_access_memory): Update.
600 (done_accessing_memory): Update.
601
602 Update the derived classes and callers below.
603
604 * linux-low.cc (linux_target_ops): Update.
605 (linux_prepare_to_access_memory): Turn into ...
606 (linux_process_target::prepare_to_access_memory): ... this.
607 (linux_done_accessing_memory): Turn into ...
608 (linux_process_target::done_accessing_memory): ... this.
609 * linux-low.h (class linux_process_target): Update.
610 * lynx-low.cc (lynx_target_ops): Update.
611 * nto-low.cc (nto_target_ops): Update.
612 * win32-low.cc (win32_target_ops): Update.
613
614 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
615
616 Turn process_stratum_target's fetch_registers and store_registers
617 ops into methods of process_target.
618
619 * target.h (struct process_stratum_target): Remove the target ops.
620 (class process_target): Add the target ops.
621 (fetch_inferior_registers): Update the macro.
622 (store_inferior_registers): Update the macro.
623
624 Update the derived classes and callers below.
625
626 * linux-low.cc (linux_target_ops): Update.
627 (linux_fetch_registers): Turn into ...
628 (linux_process_target::fetch_registers): ... this.
629 (linux_store_registers): Turn into ...
630 (linux_process_target::store_registers): ... this.
631 * linux-low.h (class linux_process_target): Update.
632 * lynx-low.cc (lynx_target_ops): Update.
633 (lynx_fetch_registers): Turn into ...
634 (lynx_process_target::fetch_registers): ... this.
635 (lynx_store_registers): Turn into ...
636 (lynx_process_target::store_registers): ... this.
637 * lynx-low.h (class lynx_process_target): Update.
638 * nto-low.cc (nto_target_ops): Update.
639 (nto_fetch_registers): Turn into ...
640 (nto_process_target::fetch_registers): ... this.
641 (nto_store_registers): Turn into ...
642 (nto_process_target::store_registers): ... this.
643 * nto-low.h (class nto_process_target): Update.
644 * win32-low.cc (win32_target_ops): Update.
645 (win32_fetch_inferior_registers): Turn into ...
646 (win32_process_target::fetch_registers): ... this.
647 (win32_store_inferior_registers): Turn into ...
648 (win32_process_target::store_registers): ... this.
649 * win32-low.h (class win32_process_target): Update.
650
651 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
652
653 Turn process_stratum_target's wait op into a method of
654 process_target.
655
656 * target.h (struct process_stratum_target): Remove the target op.
657 (class process_target): Add the target op.
658
659 Update the derived classes and callers below.
660
661 * target.cc (target_wait): Update.
662 * linux-low.cc (linux_target_ops): Update.
663 (linux_wait): Turn into ...
664 (linux_process_target::wait): ... this.
665 * linux-low.h (class linux_process_target): Update.
666 * lynx-low.cc (lynx_target_ops): Update.
667 (lynx_wait): Turn into ...
668 (lynx_process_target::wait): ... this.
669 * lynx-low.h (class lynx_process_target): Update.
670 * nto-low.cc (nto_target_ops): Update.
671 (nto_wait): Turn into ...
672 (nto_process_target::wait): ... this.
673 * nto-low.h (class nto_process_target): Update.
674 * win32-low.cc (win32_target_ops): Update.
675 (win32_wait): Turn into ...
676 (win32_process_target::wait): ... this.
677 (do_initial_child_stuff): Update.
678 * win32-low.h (class win32_process_target): Update.
679
680 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
681
682 Turn process_stratum_target's resume op into a method of
683 process_target.
684
685 * target.h (struct process_stratum_target): Remove the target op.
686 (class process_target): Add the target op.
687
688 Update the derived classes and callers below.
689
690 * server.cc (resume): Update.
691 * target.cc (target_stop_and_wait): Update.
692 (target_continue_no_signal): Update.
693 (target_continue): Update.
694 * linux-low.cc (linux_target_ops): Update.
695 (linux_resume): Turn into ...
696 (linux_process_target::resume): ... this.
697 * linux-low.h (class linux_process_target): Update.
698 * lynx-low.cc (lynx_target_ops): Update.
699 (lynx_resume): Turn into ...
700 (lynx_process_target::resume): ... this.
701 * lynx-low.h (class lynx_process_target): Update.
702 * nto-low.cc (nto_target_ops): Update.
703 (nto_resume): Turn into ...
704 (nto_process_target::resume): ... this.
705 * nto-low.h (class nto_process_target): Update.
706 * win32-low.cc (win32_target_ops): Update.
707 (win32_resume): Turn into ...
708 (win32_process_target::resume): ... this.
709 (win32_process_target::detach): Update.
710 (do_initial_child_stuff): Update.
711 * win32-low.h (class win32_process_target): Update.
712
713 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
714
715 Turn process_stratum_target's thread_alive op into a method of
716 process_target.
717
718 * target.h (struct process_stratum_target): Remove the target op.
719 (class process_target): Add the target op.
720 (mythread_alive): Update the macro.
721
722 Update the derived classes and callers below.
723
724 * linux-low.cc (linux_target_ops): Update.
725 (linux_thread_alive): Turn into ...
726 (linux_process_target::thread_alive): ... this.
727 (wait_for_sigstop): Update.
728 * linux-low.h (class linux_process_target): Update.
729 * lynx-low.cc (lynx_target_ops): Update.
730 (lynx_thread_alive): Turn into ...
731 (lynx_process_target::thread_alive): ... this.
732 * lynx-low.h (class lynx_process_target): Update.
733 * nto-low.cc (nto_target_ops): Update.
734 (nto_thread_alive): Turn into ...
735 (nto_process_target::thread_alive): ... this.
736 * nto-low.h (class nto_process_target): Update.
737 * win32-low.cc (win32_target_ops): Update.
738 (win32_thread_alive): Turn into ...
739 (win32_process_target::thread_alive): ... this.
740 * win32-low.h (class win32_process_target): Update.
741
742 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
743
744 Turn process_stratum_target's join op into a method of
745 process_target.
746
747 * target.h (struct process_stratum_target): Remove the target op.
748 (class process_target): Add the target op.
749 (join_inferior): Update the macro.
750
751 Update the derived classes and callers below.
752
753 * linux-low.cc (linux_target_ops): Update.
754 (linux_join): Turn into ...
755 (linux_process_target::join): ... this.
756 * linux-low.h (class linux_process_target): Update.
757 * lynx-low.cc (lynx_target_ops): Update.
758 (lynx_join): Turn into ...
759 (lynx_process_target::join): ... this.
760 * lynx-low.h (class lynx_process_target): Update.
761 * nto-low.cc (nto_target_ops): Update.
762 (nto_process_target::join): Define.
763 * nto-low.h (class nto_process_target): Update.
764 * win32-low.cc (win32_target_ops): Update.
765 (win32_join): Turn into ...
766 (win32_process_target::join): ... this.
767 * win32-low.h (class win32_process_target): Update.
768
769 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
770
771 Turn process_stratum_target's mourn op into a method of
772 process_target.
773
774 * target.h (struct process_stratum_target): Remove the target op.
775 (class process_target): Add the target op.
776
777 Update the derived classes and callers below.
778
779 * target.cc (target_mourn_inferior): Update.
780 * linux-low.cc (linux_target_ops): Update.
781 (linux_mourn): Turn into ...
782 (linux_process_target::mourn): ... this.
783 (handle_extended_wait): Update.
784 (linux_process_target::kill): Update.
785 (linux_process_target::detach): Update.
786 * linux-low.h (class linux_process_target): Update.
787 * lynx-low.cc (lynx_target_ops): Update.
788 (lynx_mourn): Turn into ...
789 (lynx_process_target::mourn): ... this.
790 * lynx-low.h (class lynx_process_target): Update.
791 * nto-low.cc (nto_target_ops): Update.
792 (nto_mourn): Turn into ...
793 (nto_process_target::mourn): ... this.
794 * nto-low.h (class nto_process_target): Update.
795 * win32-low.cc (win32_target_ops): Update.
796 (win32_mourn): Turn into ...
797 (win32_process_target::mourn): ... this.
798 * win32-low.h (class win32_process_target): Update.
799
800 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
801
802 Turn process_stratum_target's detach op into a method of
803 process_target.
804
805 * target.h (struct process_stratum_target): Remove the target op.
806 (class process_target): Add the target op.
807 (detach_inferior): Update the macro.
808
809 Update the derived classes and callers below.
810
811 * linux-low.cc (linux_target_ops): Update.
812 (linux_detach): Turn into ...
813 (linux_process_target::detach): ... this.
814 * linux-low.h (class linux_process_target): Update.
815 * lynx-low.cc (lynx_target_ops): Update.
816 (lynx_detach): Turn into ...
817 (lynx_process_target::detach): ... this.
818 * lynx-low.h (class lynx_process_target): Update.
819 * nto-low.cc (nto_target_ops): Update.
820 (nto_detach): Turn into ...
821 (nto_process_target::detach): ... this.
822 * nto-low.h (class nto_process_target): Update.
823 * win32-low.cc (win32_target_ops): Update.
824 (win32_detach): Turn into ...
825 (win32_process_target::detach): ... this.
826 * win32-low.h (class win32_process_target): Update.
827
828 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
829
830 Turn process_stratum_target's kill op into a method of
831 process_target.
832
833 * target.h (struct process_stratum_target): Remove the target op.
834 (class process_target): Add the target op.
835
836 Update the derived classes and callers below.
837
838 * target.cc (kill_inferior): Update.
839 * linux-low.cc (linux_target_ops): Update.
840 (linux_kill): Turn into ...
841 (linux_process_target::kill): ... this.
842 * linux-low.h (class linux_process_target): Update.
843 * lynx-low.cc (lynx_target_ops): Update.
844 (lynx_kill): Turn into ...
845 (lynx_process_target::kill): ... this.
846 * lynx-low.h (class lynx_process_target): Update.
847 * nto-low.cc (nto_target_ops): Update.
848 (nto_kill): Turn into ...
849 (nto_process_target::kill): ... this.
850 * nto-low.h (class nto_process_target): Update.
851 * win32-low.cc (win32_target_ops): Update.
852 (win32_kill): Turn into ...
853 (win32_process_target::kill): ... this.
854 * win32-low.h (class win32_process_target): Update.
855
856 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
857
858 Turn process_stratum_target's attach op into a method of
859 process_target.
860
861 * target.h (struct process_stratum_target): Remove the target op.
862 (class process_target): Add the target op.
863 (myattach): Update the macro.
864
865 Update the derived classes and callers below.
866
867 * linux-low.cc (linux_target_ops): Update.
868 (linux_attach): Turn into ...
869 (linux_process_target::attach): ... this.
870 * linux-low.h (class linux_process_target): Update.
871 * lynx-low.cc (lynx_target_ops): Update.
872 (lynx_attach): Turn into ...
873 (lynx_process_target::attach): ... this.
874 * lynx-low.h (class lynx_process_target): Update.
875 * nto-low.cc (nto_target_ops): Update.
876 (nto_attach): Turn into ...
877 (nto_process_target::attach): ... this.
878 * nto-low.h (class nto_process_target): Update.
879 * win32-low.cc (win32_target_ops): Update.
880 (win32_attach): Turn into ...
881 (win32_process_target::attach): ... this.
882 * win32-low.h (class win32_process_target): Update.
883
884 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
885
886 Turn process_stratum_target's post_create_inferior op into a method
887 of process_target.
888
889 * target.h (struct process_stratum_target): Remove the target op.
890 (class process_target): Add the target op.
891 (target_post_create_inferior): Update the macro.
892 * target.cc (process_target::post_create_inferior): Define.
893
894 Update the derived classes and callers below.
895
896 * linux-low.cc (linux_target_ops): Update.
897 (linux_post_create_inferior): Turn into ...
898 (linux_process_target::post_create_inferior): ... this.
899 * linux-low.h (class linux_process_target): Update.
900 * lynx-low.cc (lynx_target_ops): Update.
901 * nto-low.cc (nto_target_ops): Update.
902 * win32-low.cc (win32_target_ops): Update.
903
904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
905
906 Turn process_stratum_target's create_inferior op into a method of
907 process_target.
908
909 * target.h (struct process_stratum_target): Remove the target op.
910 (class process_target): Add the target op.
911 (create_inferior): Rename the macro to ...
912 (target_create_inferior): ... this.
913
914 Update the derived classes and callers below.
915
916 * server.cc (handle_v_run): Update.
917 (captured_main): Update.
918 (process_serial_event): Update.
919 * linux-low.cc (linux_target_ops): Update.
920 (linux_create_inferior): Turn into ...
921 (linux_process_target::create_inferior): ... this.
922 * linux-low.h (class linux_process_target): Update.
923 * lynx-low.cc (lynx_target_ops): Update.
924 (lynx_create_inferior): Turn into ...
925 (lynx_process_target::create_inferior): ... this.
926 * lynx-low.h (class lynx_process_target): Update.
927 * nto-low.cc (nto_target_ops): Update.
928 (nto_create_inferior): Turn into ...
929 (nto_process_target::create_inferior): ... this.
930 * nto-low.h (class nto_process_target): Update.
931 * win32-low.cc (win32_target_ops): Update.
932 (win32_create_inferior): Turn into ...
933 (win32_process_target::create_inferior): ... this.
934 * win32-low.h (class win32_process_target): Update.
935
936 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
937
938 * target.h (class process_target): New class definition.
939 (struct process_stratum_target) <pt>: New field with type
940 'process_target*'.
941 * linux-low.h (class linux_process_target): Define as a derived
942 class of 'process_target'.
943 * linux-low.cc (linux_target_ops): Add a linux_process_target*
944 as the 'pt' field.
945 * lynx-low.h (class lynx_process_target): Define as a derived
946 class of 'process_target'.
947 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
948 as the 'pt' field.
949 * nto-low.h (class nto_process_target): Define as a derived
950 class of 'process_target'.
951 * nto-low.cc (nto_target_ops): Add an nto_process_target*
952 as the 'pt' field.
953 * win32-low.h (class win32_process_target): Define as a derived
954 class of 'process_target'.
955 * win32-low.cc (win32_target_ops): Add a win32_process_target*
956 as the 'pt' field.
957
958 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
959
960 * configure: Regenerate.
961
962 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
963 Andrew Burgess <andrew.burgess@embecosm.com>
964
965 * linux-riscv-low.cc: New file.
966 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
967 and nat/riscv-linux-tdesc.c.
968 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
969 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
970 Define.
971
972 2020-02-14 Tom Tromey <tom@tromey.com>
973
974 * acinclude.m4: Don't include acx_configure_dir.m4.
975 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
976 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
977 (all, install-only, uninstall, clean-info, clean)
978 (maintainer-clean): Don't recurse.
979 (subdir_do, all-lib): Remove.
980 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
981 (GNULIB_H): Remove.
982 (generated_files): Update.
983 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
984 * configure: Rebuild.
985 * configure.ac: Don't configure gnulib or libiberty.
986 (GNULIB): Update.
987
988 2020-02-14 Eli Zaretskii <eliz@gnu.org>
989
990 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
991 preparing the command line for CreateProcess.
992 (win32_create_inferior): Reflect the program name in debugging
993 output that shows the process and its command line.
994
995 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
996
997 * Makefile.in: Rename source files from .c to .cc.
998 * %.c: Rename to %.cc.
999 * configure.ac: Rename server.c to server.cc.
1000 * configure: Re-generate.
1001
1002 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1003
1004 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1005
1006 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1007
1008 * win32-low.c (win32_create_inferior): Set signal_pid.
1009
1010 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1011 Pedro Alves <palves@redhat.com>
1012
1013 Skip building gdbserver in a cross-configuration.
1014 * configure.srv: Set $gdbserver_host depending on whether $target
1015 is $host. Use $gdbserver_host instead of $host.
1016
1017 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1018
1019 * configure: Re-generate.
1020
1021 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1022
1023 * configure: Re-generate.
1024
1025 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1026
1027 * acinclude.m4: Update warning.m4 path.
1028
1029 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1030
1031 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1032 (handle_exception): Set siginfo_er.
1033 (win32_xfer_siginfo): New function.
1034
1035 2020-02-07 Tom Tromey <tom@tromey.com>
1036 Pedro Alves <palves@redhat.com>
1037
1038 * README: Update build documentation.
1039 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1040 host, not target.
1041 * configure.ac: Update paths.
1042 * configure: Rebuild.
1043 * acinclude.m4: Update paths.
1044 * Makefile.in: Update include paths.
1045 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1046 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1047 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1048 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1049 (%-generated.c): Update paths.
1050 * Move entire directory from ../gdb/gdbserver.
1051
1052 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1053
1054 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1055
1056 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1057
1058 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1059 assignment instead of srv_linux_obj.
1060
1061 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1062
1063 * server.c (handle_qxfer_libraries): Write segment-address with
1064 paddress.
1065
1066 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1067
1068 * Makefile.in (install-strip): New target.
1069 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1070 * aclocal.m4: Regenerate.
1071 * configure: Regenerate.
1072 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1073
1074 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1075
1076 * Makefile.in (SFILES): Adjust paths to point to real files.
1077 (OBS): Move waitstatus.o to target/waitstatus.o.
1078 (TAGS): Transform paths appropriately.
1079 (%.o): Rename to...
1080 (nat/%.o): ... this pattern rule.
1081 (%.o): Rename to...
1082 (target/%.o): ... this pattern rule.
1083 * configure.srv: Adjust paths throughout to include nat/ prefix
1084 with the revant files.
1085 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1086 * configure: Regenerate.
1087
1088 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1089
1090 * Makefile.in (TAGS): Remove config files from the recipe.
1091
1092 2020-01-14 Tom Tromey <tom@tromey.com>
1093
1094 * configure: Rebuild.
1095 * configure.ac: Remove any checks that were added to common.m4.
1096 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1097 lib-link.m4.
1098
1099 2020-01-14 Tom Tromey <tom@tromey.com>
1100
1101 * server.h: Include config.h.
1102 * gdbreplay.c: Include config.h.
1103 * configure: Rebuild.
1104 * configure.ac: Don't source common.host.
1105 * acinclude.m4: Update path.
1106 * Makefile.in (INCSUPPORT): New variable.
1107 (INCLUDE_CFLAGS): Add INCSUPPORT.
1108 (SFILES): Update paths.
1109 (version-generated.c): Update path to create-version.sh.
1110 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1111
1112 2020-01-14 Tom Tromey <tom@tromey.com>
1113
1114 * configure.ac (LIBS): Use WIN32APILIBS.
1115 (USE_WIN32API): Don't define.
1116 * configure: Rebuild.
1117
1118 2020-01-14 Tom Tromey <tom@tromey.com>
1119
1120 * configure: Rebuild.
1121
1122 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1123
1124 * Makefile.in (%-generated.c): Remove rule for files from
1125 regformats/i386.
1126
1127 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1128
1129 * configure: Re-generate.
1130
1131 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1132
1133 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1134 Define to static.
1135 * tracepoint.c (stop_tracing, flush_trace_buffer,
1136 about_to_request_buffer_space, get_trace_state_variable_value,
1137 set_trace_state_variable_value, gdb_collect): Add declaration.
1138
1139 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1140
1141 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1142 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1143 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1144 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1145 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1146 static.
1147
1148 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1149
1150 * inferiors.c: Include gdbsupport/common-inferior.h.
1151
1152 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1153
1154 * hostio-errno.c: Include hostio.h.
1155
1156 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1157
1158 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1159 prerequisite.
1160
1161 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1162
1163 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1164 * linux-arm-tdesc.h: Include arch/arm.h.
1165
1166 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1167
1168 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1169
1170 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1171
1172 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1173 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1174
1175 2020-01-10 Pedro Alves <palves@redhat.com>
1176
1177 * fork-child.c (post_fork_inferior): Pass target down to
1178 startup_inferior.
1179 * inferiors.c (switch_to_thread): Add process_stratum_target
1180 parameter.
1181 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1182 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1183 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1184 * remote-utils.c (prepare_resume_reply): Pass the target to
1185 switch_to_thread.
1186 * target.c (the_target): Now a process_stratum_target.
1187 (done_accessing_memory): Pass the target to switch_to_thread.
1188 (set_target_ops): Ajust to use process_stratum_target.
1189 * target.h (struct target_ops): Rename to ...
1190 (struct process_stratum_target): ... this.
1191 (the_target, set_target_ops): Adjust.
1192 (prepare_to_access_memory): Adjust comment.
1193 * win32-low.c (child_xfer_memory): Adjust to use
1194 process_stratum_target.
1195 (win32_target_ops): Now a process_stratum_target.
1196
1197 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1198 Pedro Alves <palves@redhat.com>
1199
1200 * win32-low.c (get_child_debug_event): Extract the fatal exception
1201 from the exit status and convert to the equivalent Posix signal
1202 number.
1203 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1204 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1205
1206 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1207
1208 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1209
1210 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1211
1212 * server.c (gdbserver_version): Change copyright year to 2020.
1213 * gdbreplay.c (gdbreplay_version): Likewise.
1214
1215 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1216
1217 * configure: Regenerate.
1218 * configure.ac: Quote variable arguments of test.
1219
1220 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1221
1222 * Makefile.in: Fix build with GNU Make 3.81
1223
1224 2019-12-16 Tom Tromey <tromey@adacore.com>
1225
1226 * server.c (get_exec_file): Constify result.
1227
1228 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1229
1230 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1231 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1232 * config.in: Regenerate.
1233 * configure: Regenerate.
1234 * configure.ac: Don't check for strerror.
1235 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1236 Call safe_strerror instead of strerror.
1237 * server.h (strerror): Remove this now-unnecessary declaration.
1238 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1239 strerror.
1240 (gdb_agent_helper_thread): Likewise.
1241 * utils.c (perror_with_name): Likewise.
1242
1243 2019-11-26 Tom Tromey <tom@tromey.com>
1244
1245 * configure, config.in: Rebuild.
1246
1247 2019-11-26 Tom Tromey <tom@tromey.com>
1248
1249 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1250 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1251 gdb_sigmask.
1252 * configure, config.in: Rebuild.
1253
1254 2019-11-26 Tom Tromey <tom@tromey.com>
1255
1256 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1257 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1258 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1259 * acinclude.m4: Include ax_pthread.m4.
1260 * config.in, configure: Rebuild.
1261
1262 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1263
1264 * debug.c (debug_set_output): Call safe_strerror instead of
1265 strerror.
1266 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1267 (linux_kill_one_lwp): Likewise.
1268 (linux_detach_one_lwp): Likewise.
1269 (linux_wait_for_event_filtered): Likewise.
1270 (store_register): Likewise.
1271 * lynx-low.c (lynx_attach): Likewise.
1272 * mem-break.c (insert_memory_breakpoint): Likewise.
1273 (remove_memory_breakpoint): Likewise.
1274 (delete_fast_tracepoint_jump): Likewise.
1275 (set_fast_tracepoint_jump): Likewise.
1276 (uninsert_fast_tracepoint_jumps_at): Likewise.
1277 (reinsert_fast_tracepoint_jumps_at): Likewise.
1278 * nto-low.c (nto_xfer_memory): Likewise.
1279 (nto_resume): Likewise.
1280
1281 2019-11-20 Luis Machado <luis.machado@linaro.org>
1282
1283 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1284 instead of register count.
1285 * tdesc.c (tdesc_contains_feature): New function.
1286 * tdesc.h (tdesc_contains_feature): New prototype.
1287
1288 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1289
1290 * Makefile.in: Add safe-strerror.c.
1291 * configure: Regenerate.
1292 * configure.ac: Don't source common.host.
1293
1294 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1295
1296 * config.in: Regenerate.
1297 * configure: Regenerate.
1298
1299 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1300
1301 * ax.c (ax_printf): Handle size_t_arg.
1302
1303 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1304
1305 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1306 * mi/mi-main.c (output_cores): Likewise.
1307 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1308 (linux_xfer_osdata_modules): Likewise.
1309 * remote.c (register_remote_support_xml): Likewise.
1310 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1311 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1312
1313 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1314
1315 * configure: Regenerate.
1316 * configure.ac: Remove check for strerror_r.
1317
1318 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1319
1320 * config.in: Regenerate.
1321 * configure: Regenerate.
1322 * configure.ac: Also check for strerror_r.
1323
1324 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1325
1326 * ax.h (debug_agent): Remove duplicate declaration.
1327
1328 2019-10-26 Tom de Vries <tdevries@suse.de>
1329
1330 * linux-aarch64-low.c: Fix typos in comments.
1331 * linux-arm-low.c: Same.
1332 * linux-low.c: Same.
1333 * linux-ppc-low.c: Same.
1334 * proc-service.c: Same.
1335 * regcache.h: Same.
1336 * server.c: Same.
1337 * tracepoint.c: Same.
1338 * win32-low.c: Same.
1339
1340 2019-10-25 Tom Tromey <tromey@adacore.com>
1341
1342 * utils.c (xstrdup): Remove.
1343
1344 2019-10-23 Tom Tromey <tom@tromey.com>
1345
1346 * configure, config.in: Rebuild.
1347
1348 2019-10-23 Tom Tromey <tom@tromey.com>
1349
1350 * configure: Rebuild.
1351 * acinclude.m4: Use m4_include, not sinclude.
1352
1353 2019-10-17 Tom Tromey <tromey@adacore.com>
1354
1355 * configure: Rebuild.
1356 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1357 in AC_CONFIG_FILES invocation.
1358 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1359 invocation.
1360
1361 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1362
1363 * server.c: Include xml-builtin.h.
1364 (get_xml_features): Don't declare xml_builtins here.
1365
1366 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1367
1368 * Makefile.in: Remove references to vec-ipa.o.
1369
1370 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1371
1372 * Makefile.in: Remove references to vec.c.
1373
1374 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1375
1376 * server.c (server_waiting): Change to bool.
1377 (extended_protocol): Likewise.
1378 (response_needed): Likewise.
1379 (exit_requested): Likewise.
1380 (run_once): Likewise.
1381 (report_no_resumed): Likewise.
1382 (non_stop): Likewise.
1383 (disable_packet_vCont): Likewise.
1384 (disable_packet_Tthread): Likewise.
1385 (disable_packet_qC): Likewise.
1386 (disable_packet_qfThreadInfo): Likewise.
1387 (handle_general_set): Update.
1388 (handle_detach): Update.
1389 (handle_monitor_command): Update.
1390 (handle_query): Update.
1391 (captured_main): Update.
1392 (process_serial_event): Update.
1393 * server.h (server_waiting): Change to bool.
1394 (disable_packet_vCont): Likewise.
1395 (disable_packet_Tthread): Likewise.
1396 (disable_packet_qC): Likewise.
1397 (disable_packet_qfThreadInfo): Likewise.
1398 (run_once): Likewise.
1399 (non_stop): Likewise.
1400 * target.c (target_stop_and_wait): Update.
1401
1402 2019-10-02 Tom Tromey <tromey@adacore.com>
1403
1404 * Makefile.in (SFILES): Add common-inferior.c.
1405 (OBS): Add common-inferior.o.
1406 * server.c (startup_with_shell): Don't define.
1407
1408 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1409
1410 * linux-low.c (linux_low_read_btrace): Update for change to
1411 std::vector.
1412
1413 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1414
1415 * debug.c (debug_threads): Remove comment in favor of the header.
1416 * debug.h (using_threads): Add declaration.
1417 (debug_threads): Add comment.
1418 * linux-aarch64-low.c: Include debug.h and remove declaration of
1419 debug_threads.
1420 * nto-low.c: Likewise.
1421 * remote-utils.c: Likewise.
1422 * thread-db.c: Likewise.
1423
1424 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1425
1426 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1427 and powerpc-cell64l-ipa.o.
1428 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1429 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1430 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1431 (spu*-*-*): Remove.
1432
1433 * spu-low.c: Remove file.
1434
1435 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1436 (parse_spufs_run): Remove.
1437 (ppc_get_pc): Remove Cell/B.E. support.
1438 (ppc_set_pc): Likewise.
1439 (ppc_breakpoint_at): Likewise.
1440 (ppc_arch_setup): Likewise.
1441 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1442 tdesc_powerpc_cell32l.
1443 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1444 or init_registers_powerpc_cell32l.
1445 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1446 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1447 or init_registers_powerpc_cell32l.
1448 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1449 (init_registers_powerpc_cell32l): Remove prototype.
1450 (init_registers_powerpc_cell64l): Likewise.
1451
1452 * target.h (struct target_ops): Remove qxfer_spu member.
1453 * server.c (handle_qxfer_spu): Remove.
1454 (qxfer_packets): Remove entry for "spu".
1455 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1456 * linux-low.c (SPUFS_MAGIC): Remove.
1457 (spu_enumerate_spu_ids): Remove.
1458 (linux_qxfer_spu): Remove.
1459 (linux_target_ops): Remove qxfer_spu member.
1460 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1461 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1462 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1463
1464 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1465
1466 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1467 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1468 * config.in: Regenerate.
1469 * configure: Regenerate.
1470
1471 2019-08-15 Tom Tromey <tromey@adacore.com>
1472
1473 * target.c (target_write_memory): Use gdb::byte_vector.
1474
1475 2019-08-15 Tom Tromey <tromey@adacore.com>
1476
1477 * tracepoint.c (write_inferior_data_pointer)
1478 (write_inferior_integer, write_inferior_int8)
1479 (write_inferior_uinteger, m_tracepoint_action_download)
1480 (r_tracepoint_action_download, x_tracepoint_action_download)
1481 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1482 (download_agent_expr, download_tracepoint_1)
1483 (download_trace_state_variables, upload_fast_traceframes): Update.
1484 * server.c (gdb_write_memory): Update.
1485 * remote-utils.c (relocate_instruction): Update.
1486 * proc-service.c (ps_pdwrite): Update.
1487 * mem-break.c (remove_memory_breakpoint)
1488 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1489 (uninsert_fast_tracepoint_jumps_at)
1490 (reinsert_fast_tracepoint_jumps_at): Update.
1491 * linux-x86-low.c (append_insns)
1492 (i386_install_fast_tracepoint_jump_pad)
1493 (amd64_write_goto_address, i386_write_goto_address): Update.
1494 * linux-s390-low.c (append_insns, s390_write_goto_address):
1495 Update.
1496 * linux-ppc-low.c (ppc_relocate_instruction)
1497 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1498 (ppc_write_goto_address): Update.
1499 * linux-aarch64-low.c (append_insns): Update.
1500 * target.h (struct target_ops): Update.
1501 (write_inferior_memory): Don't declare.
1502 * target.c (target_write_memory): Rename from
1503 write_inferior_memory. Remove old target_write_memory.
1504
1505 2019-08-15 Tom Tromey <tromey@adacore.com>
1506
1507 * target.c (write_inferior_memory): Use std::vector.
1508
1509 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1510
1511 PR build/24886
1512 * configure.ac: Drop enable-libmcheck support.
1513 * configure, config.in: Rebuild.
1514 * acinclude.m4: Don't include it.
1515
1516 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1517
1518 * configure.srv: Remove Arm xml files.
1519
1520 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1521
1522 * configure.srv: Add new files. Remove xml generated files.
1523 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1524 registers.
1525 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1526 * linux-aarch32-tdesc.c: New file.
1527 * linux-aarch32-tdesc.h: New file.
1528 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1529 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1530 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1531 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1532 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1533 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1534 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1535 (arm_read_description): Call arm_linux_read_description.
1536 (initialize_low_arch): Don't init registers.
1537 * linux-arm-tdesc.c: New file.
1538 * linux-arm-tdesc.h: New file.
1539
1540 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1541
1542 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1543 Move counter inside for.
1544 (arm_read_description): Check ptrace earlier.
1545 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1546
1547 2019-07-09 Tom Tromey <tom@tromey.com>
1548
1549 * configure: Rebuild.
1550 * configure.ac: Change common to gdbsupport.
1551 * acinclude.m4: Change common to gdbsupport.
1552 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1553 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1554 common to gdbsupport.
1555 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1556 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1557 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1558 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1559 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1560 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1561 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1562 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1563 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1564 common to gdbsupport.
1565
1566 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1567
1568 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1569 defines.
1570 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1571
1572 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1573
1574 * configure.srv: Remove legacy xml.
1575 * linux-aarch64-low.c (initialize_low_arch): Remove
1576 initialize_low_tdesc call.
1577 * linux-aarch64-tdesc-selftest.c: Remove file.
1578 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1579 * linux-x86-low.c (initialize_low_arch): Remove
1580 initialize_low_tdesc call.
1581 * linux-x86-tdesc-selftest.c: Remove file.
1582 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1583
1584 2019-06-20 Tom de Vries <tdevries@suse.de>
1585
1586 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1587 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1588
1589 2019-06-19 Tom de Vries <tdevries@suse.de>
1590
1591 * debug.h (debug_write): Change return type to ssize_t.
1592 * debug.c (debug_write): Same.
1593
1594 2019-06-14 Tom Tromey <tom@tromey.com>
1595
1596 * configure.ac: Use new path to gnulib.
1597 * configure: Rebuild.
1598 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1599 to gnulib.
1600
1601 2019-06-11 Tom Tromey <tom@tromey.com>
1602
1603 * Makefile.in (SFILES): Add alloc.c.
1604 (OBS): Add alloc.o.
1605 (IPA_OBJS): Add alloc-ipa.o.
1606 (alloc-ipa.o): New target.
1607 (%.o: ../%.c): New pattern rule.
1608
1609 2019-06-10 Tom Tromey <tromey@adacore.com>
1610
1611 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1612 end warning with a newline.
1613 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1614 newline.
1615 * thread-db.c (attach_thread): Don't end warning with a newline.
1616 (thread_db_notice_clone): Likewise.
1617 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1618 newline.
1619 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1620 end warning with a newline.
1621
1622 2019-06-04 Pedro Alves <palves@redhat.com>
1623
1624 * server.c (captured_main): Use make_unique_xstrdup.
1625
1626 2019-06-02 Tom Tromey <tom@tromey.com>
1627
1628 * gdbreplay.c (fromhex): Remove.
1629 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1630
1631 2019-05-29 Tom Tromey <tromey@adacore.com>
1632
1633 * configure: Rebuild.
1634
1635 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1636
1637 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1638 sign extension code on 32-bit builds.
1639
1640 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1641
1642 * remote-utils.c:
1643 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1644
1645 2019-04-19 Tom Tromey <tom@tromey.com>
1646
1647 * server.c (struct vstop_notif): Derive from notif_event.
1648 <base>: Remove.
1649 (queue_stop_reply): Update.
1650 (remove_all_on_match_ptid): Change type. Rewrite.
1651 (discard_queued_stop_replies): Rewrite.
1652 (in_queued_stop_replies_ptid): Change type.
1653 (in_queued_stop_replies): Rewrite.
1654 (notif_stop): Update.
1655 (queue_stop_reply_callback): Update.
1656 (captured_main): Don't call initialize_notif.
1657 (push_stop_notification): Update.
1658 * notif.c (notif_write_event, handle_notif_ack)
1659 (notif_event_enque, notif_push): Update.
1660 (notif_event_xfree, initialize_notif): Remove.
1661 * notif.h (struct notif_event): Include <list>, not
1662 "common/queue.h".
1663 (struct notif_server) <queue>: Now a std::list.
1664 (notif_event_p): Remove typedef.
1665 (initialize_notif): Don't declare.
1666 (struct notif_event): Add virtual destructor.
1667
1668 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1669
1670 * ax.c (ax_vdebug): Call debug_printf.
1671 * debug.c (debug_write): New function.
1672 * debug.h (debug_write): New declaration.
1673 * linux-low.c (sigchld_handler): Call debug_write.
1674
1675 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1676
1677 * debug.c (debug_set_output): New function.
1678 (debug_vprintf): Send output to debug_file.
1679 (debug_flush): Likewise.
1680 * debug.h (debug_set_output): New declaration.
1681 * server.c (handle_monitor_command): Add debug-file option.
1682 (captured_main): Likewise.
1683
1684 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1685
1686 * debug.c (remote_debug): Add definition.
1687 * debug.h (remote_debug): Add declaration.
1688 * hostio.c (remote_debug): Remove declaration.
1689 * remote-utils.c (struct ui_file): Likewise.
1690 (remote_debug): Likewise.
1691 * remote-utils.h (remote_debug): Likewise,
1692 * server.c (remote_debug): Remove definition.
1693
1694 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1695
1696 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1697 when using a 64-bit gdbserver.
1698
1699 2019-04-09 Tom Tromey <tromey@adacore.com>
1700
1701 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1702
1703 2019-04-08 Tom Tromey <tom@tromey.com>
1704
1705 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1706 throw.
1707 (linux_resume_one_lwp): Likewise.
1708
1709 2019-04-08 Tom Tromey <tom@tromey.com>
1710
1711 * gdbreplay.c: Update.
1712 * linux-low.c: Update.
1713 * server.c: Update.
1714
1715 2019-04-08 Tom Tromey <tom@tromey.com>
1716
1717 * server.c: Use C++ exception handling.
1718 * linux-low.c: Use C++ exception handling.
1719 * gdbreplay.c: Use C++ exception handling.
1720
1721 2019-04-08 Tom Tromey <tom@tromey.com>
1722
1723 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1724 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1725 (captured_main, main): Update.
1726 * gdbreplay.c (main): Update.
1727
1728 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1729
1730 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1731 value in argument pointer, return 1 if the entry is found and 0
1732 otherwise. Move comment.
1733 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1734 * linux-low.h (linux_get_auxv): Declare.
1735 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1736
1737 2019-04-05 Tom Tromey <tromey@adacore.com>
1738
1739 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1740 variables.
1741
1742 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1743
1744 * linux-low.c (AT_HWCAP2): Add define if not already included.
1745
1746 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1747
1748 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1749 (aarch64_arch_setup): Call linux_get_hwcap.
1750 * linux-arm-low.c (arm_get_hwcap): Remove function.
1751 (arm_read_description): Call linux_get_hwcap.
1752 * linux-low.c (linux_get_auxv): New function.
1753 (linux_get_hwcap): Likewise.
1754 (linux_get_hwcap2): Likewise.
1755 * linux-low.h (linux_get_hwcap): New declaration.
1756 (linux_get_hwcap2): Likewise.
1757 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1758 (ppc_arch_setup): Call linux_get_hwcap.
1759 * linux-s390-low.c (s390_get_hwcap): Remove function.
1760 (s390_arch_setup): Call linux_get_hwcap.
1761
1762 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1763 Jiong Wang <jiong.wang@arm.com>
1764
1765 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1766 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1767 to fail.
1768 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1769
1770 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1771 Jiong Wang <jiong.wang@arm.com>
1772
1773 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1774 (aarch64_get_hwcap): New function.
1775 (aarch64_arch_setup): Read APIA hwcap.
1776
1777 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1778 Jiong Wang <jiong.wang@arm.com>
1779
1780 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1781 (initialize_low_tracepoint): Likewise.
1782 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1783 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1784 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1785 (aarch64_linux_read_description): Likewise.
1786 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1787
1788 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1789
1790 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1791 i386_create_target_description for 'segments' parameter.
1792 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1793 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1794 * win32-i386-low.c (i386_arch_setup): Likewise.
1795
1796 2019-03-12 Tom Tromey <tromey@adacore.com>
1797
1798 * linux-low.c (iterate_over_lwps): Update.
1799
1800 2019-03-06 Tom Tromey <tom@tromey.com>
1801
1802 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1803 (captured_main): Use SCOPE_EXIT.
1804
1805 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1806
1807 * configure.srv: Use '$enable_unittest' instead of '$development'
1808 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1809 case.
1810
1811 2019-02-27 Tom Tromey <tromey@adacore.com>
1812
1813 * gdbreplay.c (logchar): Handle \r\n.
1814
1815 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1816
1817 * linux-low.c (linux_attach): Add process before lwp.
1818 * server.c (attach_inferior): Check if already attached.
1819
1820 2019-02-07 Tom Tromey <tom@tromey.com>
1821
1822 * x86-tdesc.h: Rename include guard.
1823 * x86-low.h: Add include guard.
1824 * wincecompat.h: Rename include guard.
1825 * win32-low.h: Add include guard.
1826 * utils.h: Rename include guard.
1827 * tracepoint.h: Rename include guard.
1828 * tdesc.h: Rename include guard.
1829 * target.h: Rename include guard.
1830 * server.h: Rename include guard.
1831 * remote-utils.h: Rename include guard.
1832 * regcache.h: Rename include guard.
1833 * nto-low.h: Rename include guard.
1834 * notif.h: Add include guard.
1835 * mem-break.h: Rename include guard.
1836 * lynx-low.h: Add include guard.
1837 * linux-x86-tdesc.h: Add include guard.
1838 * linux-s390-tdesc.h: Add include guard.
1839 * linux-ppc-tdesc-init.h: Add include guard.
1840 * linux-low.h: Add include guard.
1841 * linux-aarch64-tdesc.h: Add include guard.
1842 * linux-aarch32-low.h: Add include guard.
1843 * inferiors.h: Rename include guard.
1844 * i387-fp.h: Rename include guard.
1845 * hostio.h: Rename include guard.
1846 * gdbthread.h: Rename include guard.
1847 * gdb_proc_service.h: Rename include guard.
1848 * event-loop.h: Rename include guard.
1849 * dll.h: Rename include guard.
1850 * debug.h: Rename include guard.
1851 * ax.h: Rename include guard.
1852
1853 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1854
1855 PR gdb/23985
1856 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1857 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1858
1859 2019-01-25 Tom Tromey <tom@tromey.com>
1860
1861 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1862
1863 2019-01-25 Tom Tromey <tom@tromey.com>
1864
1865 * win32-low.c: Fix common/ includes.
1866 * win32-i386-low.c: Fix common/ includes.
1867 * tracepoint.c: Fix common/ includes.
1868 * thread-db.c: Fix common/ includes.
1869 * target.h: Fix common/ includes.
1870 * symbol.c: Fix common/ includes.
1871 * spu-low.c: Fix common/ includes.
1872 * server.h: Fix common/ includes.
1873 * server.c: Fix common/ includes.
1874 * remote-utils.c: Fix common/ includes.
1875 * regcache.h: Fix common/ includes.
1876 * regcache.c: Fix common/ includes.
1877 * nto-x86-low.c: Fix common/ includes.
1878 * notif.h: Fix common/ includes.
1879 * mem-break.h: Fix common/ includes.
1880 * lynx-low.c: Fix common/ includes.
1881 * lynx-i386-low.c: Fix common/ includes.
1882 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1883 * linux-x86-low.c: Fix common/ includes.
1884 * linux-low.c: Fix common/ includes.
1885 * inferiors.h: Fix common/ includes.
1886 * i387-fp.c: Fix common/ includes.
1887 * hostio.c: Fix common/ includes.
1888 * hostio-errno.c: Fix common/ includes.
1889 * gdbthread.h: Fix common/ includes.
1890 * gdbreplay.c: Fix common/ includes.
1891 * fork-child.c: Fix common/ includes.
1892 * event-loop.c: Fix common/ includes.
1893 * ax.c:
1894 (enum gdb_agent_op): Fix common/ includes.
1895
1896 2019-01-21 Tom Tromey <tom@tromey.com>
1897
1898 * tracepoint.c: Fix includes.
1899 * remote-utils.c: Fix includes.
1900 * linux-x86-low.c: Fix includes.
1901
1902 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1903
1904 * gdbreplay.c (gdbreplay_version): Update copyright year in
1905 version message.
1906 * server.c (gdbserver_version): Likewise.
1907
1908 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1909
1910 * linux-low.c (add_lwp): Switch ordering.
1911
1912 2018-11-29 Tom Tromey <tom@tromey.com>
1913
1914 * win32-low.c (win32_join): Take pid, not process.
1915 * target.h (struct target_ops) <join>: Change argument type.
1916 (join_inferior): Change argument name.
1917 * spu-low.c (spu_join): Take pid, not process.
1918 * server.c (handle_detach): Preserve pid before destroying
1919 process.
1920 * lynx-low.c (lynx_join): Take pid, not process.
1921 * linux-low.c (linux_join): Take pid, not process.
1922
1923 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1924
1925 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1926 (aarch64_cannot_fetch_register): Likewise.
1927 (struct linux_target_ops): Update references.
1928
1929 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1930
1931 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1932
1933 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1934
1935 * configure.srv (ipa_ppc_linux_regobj): Add
1936 powerpc-isa207-htm-vsx32l-ipa.o and
1937 powerpc-isa207-htm-vsx64l-ipa.o.
1938 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1939 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1940 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1941 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1942 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1943 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1944 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1945 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1946 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1947 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1948 (init_registers_powerpc_isa207_htm_vsx32l)
1949 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1950 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1951 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1952 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1953 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1954 (ppc_store_tm_ctarregset): New functions.
1955 (ppc_regsets): Add entries for HTM regsets.
1956 (ppc_arch_setup): Set htm in features struct when needed. Set
1957 sizes for the HTM regsets.
1958 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1959 (initialize_low_arch): Call
1960 init_registers_powerpc_isa207_htm_vsx32l and
1961 init_registers_powerpc_isa207_htm_vsx64l.
1962 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1963 PPC_TDESC_ISA207_HTM_VSX.
1964 (initialize_low_tracepoint): Call
1965 init_registers_powerpc_isa207_htm_vsx32l and
1966 init_registers_powerpc_isa207_htm_vsx64l.
1967
1968 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1969
1970 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1971 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1972 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1973 (ppc_store_pmuregset): New functions.
1974 (ppc_regsets): Add entries for ebb and pmu regsets.
1975 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1976 pmu regsets are available. Set sizes for these regsets.
1977
1978 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1979
1980 * configure.srv (ipa_ppc_linux_regobj): Add
1981 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1982 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1983 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1984 rs6000/powerpc-isa207-vsx32l.xml, and
1985 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1986 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1987 <PPC_TDESC_ISA207_VSX>: New enum value.
1988 (init_registers_powerpc_isa207_vsx32l): Declare.
1989 (init_registers_powerpc_isa207_vsx64l): Declare.
1990 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1991 (ppc_store_tarregset): New function.
1992 (ppc_regsets): Add entry for the TAR regset.
1993 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1994 size for the TAR regsets.
1995 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1996 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1997 and init_registers_powerpc_isa207_vsx64l.
1998 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1999 (initialize_low_tracepoint): Call
2000 init_registers_powerpc_isa207_vsx32l and
2001 init_registers_powerpc_isa207_vsx64l.
2002
2003 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2004 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2005
2006 * configure.srv (ipa_ppc_linux_regobj): Add
2007 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2008 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2009 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2010 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2011 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2012 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2013 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2014 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2015 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2016 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2017 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2018 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2019 (ppc_hwcap): Add comment.
2020 (ppc_hwcap2): New global.
2021 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2022 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2023 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2024 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2025 when needed. Set sizes for the the DSCR and PPR regsets.
2026 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2027 (initialize_low_arch): Call
2028 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2029 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2030 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2031 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2032 (initialize_low_tracepoint): Call
2033 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2034 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2035
2036 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2037
2038 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2039
2040 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2041 Simon Marchi <simark@simark.ca>
2042
2043 * acinclude.m4: Include "../selftest.m4".
2044 * configure: Regenerate.
2045 * configure.ac: Use "GDB_AC_SELFTEST".
2046 * configure.srv: Use "$enable_unittests" instead of
2047 "$development" when checking whether unit tests have been
2048 enabled.
2049 * server.c (captured_main): Update message informing that
2050 selftests have been disabled.
2051
2052 2018-10-04 Tom Tromey <tom@tromey.com>
2053
2054 * configure: Rebuild.
2055
2056 2018-10-04 Tom Tromey <tom@tromey.com>
2057
2058 * server.c (handle_status): Rename inner "thread".
2059 (process_serial_event): Declare "res" in 'm' case.
2060 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2061 (iterate_over_lwps): Rename inner "thread".
2062 (linux_qxfer_libraries_svr4): Rename inner "len".
2063 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2064
2065 2018-10-01 Gary Benson <gbenson@redhat.com>
2066
2067 * gdb_proc_service.h: Moved common code to
2068 common/gdb_proc_service.h.
2069
2070 2018-10-01 Gary Benson <gbenson@redhat.com>
2071
2072 * gdb_proc_service.h: Synchronize comments and whitespace with
2073 GDB's version of this file.
2074
2075 2018-09-25 Tom Tromey <tom@tromey.com>
2076
2077 * configure: Rebuild.
2078 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2079
2080 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2081
2082 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2083 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2084 ($(IPA_LIB)): Sort IPA_OBJS.
2085
2086 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2087
2088 * Makefile.in: Remove references to $(ADD_DEPS).
2089
2090 2018-09-16 Tom Tromey <tom@tromey.com>
2091
2092 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2093 variables.
2094 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2095 variables.
2096
2097 2018-09-05 Tom Tromey <tom@tromey.com>
2098
2099 * configure: Rebuild.
2100
2101 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2102
2103 PR build/23399
2104 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2105
2106 2018-08-27 Tom Tromey <tom@tromey.com>
2107
2108 PR build/23087:
2109 * configure: Rebuild.
2110
2111 2018-08-27 Tom Tromey <tom@tromey.com>
2112
2113 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2114 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2115 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2116 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2117 (s390x_emit_stack_adjust): Add casts to unsigned char.
2118
2119 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2120
2121 PR gdb/23374
2122 PR gdb/23375
2123 * server.h (struct client_state) <disable_randomization>:
2124 Initialize to 1.
2125
2126 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2127
2128 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2129 variable.
2130 (mips_supply_ptrace_register): Likewise.
2131
2132 2018-07-22 Tom Tromey <tom@tromey.com>
2133
2134 * configure: Rebuild.
2135
2136 2018-07-22 Tom Tromey <tom@tromey.com>
2137
2138 * win32-low.c (win32_create_inferior): Remove unused variables.
2139 * gdbreplay.c (remote_open): Remove unused variable.
2140 * remote-utils.c (remote_prepare): Remove unused variable.
2141 * x86-tdesc.h (X86_TDESC_H): Define.
2142 (amd64_expedite_regs): Define conditionally.
2143 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2144 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2145 * remote-utils.c (readchar): Remove unused variable.
2146
2147 2018-07-13 Pedro Alves <palves@redhat.com>
2148
2149 * linux-low.c (linux_kill): Change parameter to process_info
2150 pointer instead of pid. Adjust.
2151 * lynx-low.c (lynx_kill): Likewise.
2152 * nto-low.c (nto_kill): Likewise.
2153 * spu-low.c (spu_kill): Likewise.
2154 * win32-low.c (win32_kill): Likewise.
2155 * server.c (handle_v_kill, kill_inferior_callback)
2156 (detach_or_kill_for_exit): Adjust.
2157 * target.c (kill_inferior): Change parameter to process_info
2158 pointer instead of pid. Adjust.
2159 * target.h (struct target_ops) <kill>: Change parameter to
2160 process_info pointer instead of pid. Adjust all implementations
2161 and callers.
2162 (kill_inferior): Likewise.
2163
2164 2018-07-13 Pedro Alves <palves@redhat.com>
2165
2166 * linux-low.c (linux_detach, linux_join): Change parameter to
2167 process_info pointer instead of pid. Adjust.
2168 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2169 * nto-low.c (nto_detach): Likewise.
2170 * spu-low.c (spu_detach, spu_join): Likewise.
2171 * win32-low.c (win32_detach, win32_join): Likewise.
2172 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2173 * target.h (struct target_ops) <detach, join>: Change parameter to
2174 process_info pointer instead of pid. Adjust all implementations
2175 and callers.
2176 (detach_inferior, join_inferior): Rename 'pid' parameter to
2177 'proc'.
2178
2179 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2180 Jan Kratochvil <jan.kratochvil@redhat.com>
2181 Paul Fertser <fercerpav@gmail.com>
2182 Tsutomu Seki <sekiriki@gmail.com>
2183
2184 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2185 (OBS): Add 'common/netstuff.o'.
2186 (GDBREPLAY_OBS): Likewise.
2187 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2188 (remote_open): Implement support for IPv6
2189 connections.
2190 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2191 and 'wspiapi.h'.
2192 (handle_accept_event): Accept connections from IPv6 sources.
2193 (remote_prepare): Handle IPv6-style hostnames; implement
2194 support for IPv6 connections.
2195 (remote_open): Implement support for printing connections from
2196 IPv6 sources.
2197
2198 2018-07-11 Pedro Alves <palves@redhat.com>
2199
2200 PR gdb/23377
2201 * mem-break.c (any_persistent_commands): Add process_info
2202 parameter and use it instead of relying on the current process.
2203 Change return type to bool.
2204 * mem-break.h (any_persistent_commands): Add process_info
2205 parameter and change return type to bool.
2206 * server.c (handle_detach): Remove require_running_or_return call.
2207 Look up the process_info for the process we're about to detach.
2208 If not found, return back error to GDB. Adjust
2209 any_persistent_commands call to pass down a process pointer.
2210
2211 2018-07-11 Pedro Alves <palves@redhat.com>
2212
2213 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2214 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2215 instead of collect_register_by_name.
2216 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2217 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2218
2219 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2220 Pedro Alves <palves@redhat.com>
2221
2222 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2223
2224 2018-07-03 Tom Tromey <tom@tromey.com>
2225
2226 * linux-low.c: Update.
2227 * lynx-low.c: Update.
2228 * mem-break.c: Update.
2229 * nto-low.c: Update.
2230 * remote-utils.c: Update.
2231 * server.c: Update.
2232 * spu-low.c: Update.
2233 * target.c: Update.
2234 * win32-low.c: Update.
2235
2236 2018-07-03 Tom Tromey <tom@tromey.com>
2237
2238 * server.c: Update.
2239
2240 2018-07-03 Tom Tromey <tom@tromey.com>
2241
2242 * linux-low.c: Update.
2243
2244 2018-07-03 Tom Tromey <tom@tromey.com>
2245
2246 * target.c: Update.
2247
2248 2018-07-03 Tom Tromey <tom@tromey.com>
2249
2250 * linux-low.c: Update.
2251 * linux-mips-low.c: Update.
2252 * lynx-low.c: Update.
2253 * nto-low.c: Update.
2254 * remote-utils.c: Update.
2255 * server.c: Update.
2256 * spu-low.c: Update.
2257 * target.c: Update.
2258 * thread-db.c: Update.
2259
2260 2018-07-03 Tom Tromey <tom@tromey.com>
2261
2262 * linux-low.c: Update.
2263 * linux-mips-low.c: Update.
2264 * lynx-low.c: Update.
2265 * mem-break.c: Update.
2266 * nto-low.c: Update.
2267 * remote-utils.c: Update.
2268 * server.c: Update.
2269 * spu-low.c: Update.
2270 * target.c: Update.
2271 * tracepoint.c: Update.
2272
2273 2018-07-03 Tom Tromey <tom@tromey.com>
2274
2275 * linux-low.c: Update.
2276 * linux-ppc-low.c: Update.
2277 * linux-x86-low.c: Update.
2278 * proc-service.c: Update.
2279 * server.c: Update.
2280 * spu-low.c: Update.
2281 * thread-db.c: Update.
2282 * win32-low.c: Update.
2283
2284 2018-07-03 Tom Tromey <tom@tromey.com>
2285
2286 * linux-low.c: Update.
2287 * lynx-low.c: Update.
2288 * nto-low.c: Update.
2289 * remote-utils.c: Update.
2290 * spu-low.c: Update.
2291 * thread-db.c: Update.
2292 * win32-low.c: Update.
2293
2294 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2295
2296 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2297 parameter in call to 'amd64_create_target_description'.
2298
2299 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2300
2301 * x86-tdesc.h: Remove executable permission flag.
2302
2303 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2304
2305 * configure.ac: Remove AC_PREREQ, add missing quoting.
2306 * configure: Re-generate.
2307 * config.in: Re-generate.
2308 * aclocal.m4: Re-generate.
2309
2310 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2311
2312 * tracepoint.h (current_traceframe): Remove declaration.
2313
2314 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2315
2316 * linux-aarch64-low.c (is_sve_tdesc): New function.
2317 (aarch64_sve_regs_copy_to_regcache): Likewise.
2318 (aarch64_sve_regs_copy_from_regcache): Likewise.
2319 (aarch64_regs_info): Add SVE checks.
2320 (initialize_low_arch): Initialize SVE.
2321
2322 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2323
2324 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2325
2326 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2327
2328 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2329 (initialize_low_tracepoint): Likewise
2330 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2331 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2332 param.
2333 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2334 checks.
2335 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2336
2337 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2338
2339 * server.h (PBUFSIZ): Increase size
2340
2341 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2342
2343 * regcache.c (regcache::raw_compare): New function.
2344 * regcache.h (regcache::raw_compare): New declaration.
2345
2346 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2347
2348 * regcache.c (new_register_cache): Use new.
2349 (free_register_cache): Use delete.
2350 (register_data): Use const.
2351 (supply_register): Move body inside regcache.
2352 (regcache::raw_supply): New override function.
2353 (collect_register): Move body inside regcache.
2354 (regcache::raw_collect): New override function.
2355 (regcache::get_register_status): New override function.
2356 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2357
2358 2018-06-09 Tom Tromey <tom@tromey.com>
2359
2360 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2361 declare queue.
2362 (event_queue): Use std::queue.
2363 (gdb_event_xfree): Remove.
2364 (initialize_event_loop, process_event, wait_for_event): Update.
2365
2366 2018-06-08 Stan Cox <scox@redhat.com>
2367
2368 * win32-low.c (win32_create_inferior): last_ptid and last_status
2369 moved to client_state.
2370
2371 2018-06-08 Pedro Alves <palves@redhat.com>
2372
2373 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2374 common/common-exceptions.o, common/common-utils.o,
2375 common/errors.o, common/print-utils.o and utils.o.
2376 * gdbreplay.c: Include "common-defs.h" instead of the two
2377 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2378 string.h or alloca.h.
2379 (perror_with_name): Delete.
2380 (remote_open): Use xstrdup instead of strdup.
2381 (main): Rename to ...
2382 (captured_main): ... this.
2383 (main): New.
2384
2385 2018-06-08 Tom Tromey <tom@tromey.com>
2386
2387 * linux-low.c (linux_low_read_btrace): Update.
2388
2389 2018-06-04 Stan Cox <scox@redhat.com>
2390
2391 * server.h (struct client_state): New.
2392 * server.c (cont_thread, general_thread, multi_process)
2393 (report_fork_events, report_vfork_events, report_exec_events)
2394 (report_thread_events, swbreak_feature, hwbreak_feature)
2395 (vCont_supported, disable_randomization, pass_signals)
2396 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2397 Moved to client_state.
2398 * remote-utils.c (remote_debug, noack_mode)
2399 (transport_is_reliable): Moved to client_state.
2400 * tracepoint.c (current_traceframe): Moved to client_state.
2401
2402 Update all callers.
2403 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2404 linux-low.c, remote-utils.h, target.c: Use client_state.
2405
2406 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2407
2408 * configure.srv: Add new c/h file.
2409
2410 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2411
2412 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2413 null VQ.
2414
2415 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2416
2417 * gdb.arch/mips-fpregset-core.exp: New test.
2418 * gdb.arch/mips-fpregset-core.c: New test source.
2419
2420 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2421
2422 PR server/23198
2423 * hostio.c (require_int): Do not report overflow for integers
2424 between 0xfffffff and 0x7fffffff.
2425
2426 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2427
2428 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2429 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2430 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2431 functions.
2432 (the_low_target): Wire them.
2433
2434 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2435
2436 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2437 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2438 mode. Call collect_register_by_name with vscr using
2439 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2440 (ppc_store_vrregset): Add and set vscr_offset variable as in
2441 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2442 vscr_offset.
2443
2444 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2445
2446 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2447 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2448 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2449
2450 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2451
2452 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2453 (ppc_store_vsxregset): Likewise.
2454 (ppc_fill_vrregset): Likewise.
2455 (ppc_store_vrregset): Likewise.
2456 (ppc_fill_evrregset): Likewise.
2457 (ppc_store_evrregset): Likewise.
2458 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2459 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2460 needed.
2461
2462 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2463
2464 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2465 wordsize of the inferior. Call ppc_linux_target_wordsize.
2466
2467 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2468
2469 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2470 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2471 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2472 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2473 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2474 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2475 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2476 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2477 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2478 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2479 (tdesc_powerpc_e500l): Remove.
2480 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2481 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2482 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2483 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2484 linux-ppc-tdesc.h.
2485 (ppc_arch_setup): Remove target description matching code. Fill a
2486 ppc_linux_features struct and call ppc_linux_match_description
2487 with it.
2488
2489 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2490
2491 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2492 width of the requested register exceeds the width of the
2493 `ptrace' data type.
2494 (mips_cannot_store_register): Likewise.
2495
2496 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2497
2498 * linux-mips-low.c (mips_fetch_register): New function. Update
2499 preceding comment.
2500 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2501 (the_low_target): Wire `mips_fetch_register'.
2502
2503 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2504
2505 * lynx-i386-low.c (LYNXOS_178): New macro.
2506 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2507 the layout on LynxOS-178.
2508 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2509 handle floating point registers that are not supported by
2510 LynxOS-178.
2511
2512 2018-05-10 Tom Tromey <tom@tromey.com>
2513
2514 * configure: Rebuild.
2515
2516 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2517
2518 PR server/23158:
2519 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2520 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2521 Use it to set the expedite_regs field in the given tdesc.
2522 * x86-tdesc.h: New file.
2523 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2524 Adjust following the addition of the new expedite_regs parameter
2525 to init_target_desc.
2526 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2527 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2528 (i386_linux_read_description, amd64_linux_read_description):
2529 Adjust following the addition of the new expedite_regs parameter
2530 to init_target_desc.
2531 * lynx-i386-low.c: #include "x86-tdesc.h".
2532 (lynx_i386_arch_setup): Adjust following the addition of the new
2533 expedite_regs parameter to init_target_desc.
2534 * nto-x86-low.c: #include "x86-tdesc.h".
2535 (nto_x86_arch_setup): Adjust following the addition of the new
2536 expedite_regs parameter to init_target_desc.
2537 * win32-i386-low.c: #include "x86-tdesc.h".
2538 (i386_arch_setup): Adjust following the addition of the new
2539 expedite_regs parameter to init_target_desc.
2540
2541 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2542
2543 PR server/23158:
2544 * win32-low.c (win32_create_inferior): Add call to my_wait
2545 setting last_status global.
2546
2547 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2548
2549 PR server/23158:
2550 * win32-low.c (create_process): Only call gdb_tilde_expand if
2551 inferior_cwd is not NULL.
2552
2553 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2554
2555 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2556 registers to the cache if their values have changed.
2557 (i387_xsave_to_cache): Provide default values for x87 control
2558 registers when these features are available, but disabled.
2559 * regcache.c (supply_register_by_name_zeroed): New function.
2560 * regcache.h (supply_register_by_name_zeroed): Declare new
2561 function.
2562
2563 2018-05-07 Tom Tromey <tom@tromey.com>
2564
2565 * configure: Rebuild.
2566
2567 2018-05-04 Tom Tromey <tom@tromey.com>
2568
2569 * configure: Rebuild.
2570
2571 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2572 Pedro Alves <palves@redhat.com>
2573
2574 * linux-aarch64-low.c (aarch64_stopped_data_address):
2575 Likewise.
2576
2577 2018-04-27 Tom Tromey <tom@tromey.com>
2578
2579 * configure: Rebuild.
2580
2581 2018-04-23 Tom Tromey <tom@tromey.com>
2582
2583 * configure: Rebuild.
2584
2585 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2586
2587 * Makefile.in (depcomp): Add "..".
2588 (all_deps_files): New and use it.
2589
2590 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2591
2592 * configure.srv (aarch64*-*-linux*): Don't include xml.
2593 (i[34567]86-*-cygwin*): Likewise.
2594 (i[34567]86-*-linux*): Likewise.
2595 (i[34567]86-*-lynxos*): Likewise.
2596 (i[34567]86-*-mingw32ce*): Likewise.
2597 (i[34567]86-*-mingw*): Likewise.
2598 (i[34567]86-*-nto*): Likewise.
2599 (tic6x-*-uclinux): Likewise.
2600 (x86_64-*-linux*): Likewise.
2601 (x86_64-*-mingw*): Likewise.
2602 (x86_64-*-cygwin*): Likewise.
2603
2604 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2605
2606 * tdesc.c: Remove xml parameter.
2607
2608 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2609
2610 * server.c (get_features_xml): Remove cast.
2611 * tdesc.c (void target_desc::accept): Fill in function.
2612 (tdesc_get_features_xml): Remove old xml creation.
2613 (print_xml_feature::visit_pre): Add xml vistor.
2614 * tdesc.h (struct target_desc): Make xmltarget mutable.
2615 (tdesc_get_features_xml): Remove declaration.
2616
2617 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2618
2619 * tdesc.c (tdesc_architecture_name): Add new function.
2620 (tdesc_osabi_name): Likewise.
2621 (tdesc_get_features_xml): Use new functions.
2622
2623 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2624
2625 * tdesc.c (tdesc_create_flags): Remove.
2626 (tdesc_add_flag): Likewise.
2627 (tdesc_named_type): Likewise.
2628 (tdesc_create_union): Likewise.
2629 (tdesc_create_struct): Likewise.
2630 (tdesc_create_vector): Likewise.
2631 (tdesc_add_bitfield): Likewise.
2632 (tdesc_add_field): Likewise.
2633 (tdesc_set_struct_size): Likewise.
2634
2635 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2636
2637 * tdesc.c (~target_desc): Remove implictly deleted items.
2638 (init_target_desc): Iterate all features.
2639 (tdesc_get_features_xml): Use vector.
2640 (tdesc_create_feature): Create feature.
2641 * tdesc.h (tdesc_feature) Remove
2642 (target_desc): Add features.
2643
2644 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2645
2646 * Makefile.in: Add common/tdesc.c
2647 * tdesc.c (init_target_desc): init all reg_defs from register
2648 vector.
2649 (tdesc_create_reg): Create tdesc_reg.
2650 * tdesc.h (tdesc_feature): Add register vector.
2651
2652 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2653
2654 * tdesc.h (struct target_desc) <features>: Change type to
2655 std::vector<std::string>.
2656 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2657 changes.
2658 (tdesc_get_features_xml): Likewise.
2659 (tdesc_create_feature): Likewise.
2660
2661 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2662
2663 * regcache.c (find_register_by_number): Return a ref.
2664 (find_regno): Use references.
2665 (register_size): Likewise.
2666 (register_data): Likewise.
2667 * tdesc.c (target_desc::~target_desc): Remove free calls.
2668 (target_desc::operator==): Use std::vector compare.
2669 (init_target_desc): Use reference.
2670 (tdesc_create_reg): Use reg constructors.
2671 * tdesc.h (struct target_desc): Replace pointer with object.
2672
2673 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2674
2675 * regcache.c (find_register_by_number): Make static.
2676 (find_regno): Use find_register_by_number
2677 * regcache.h (struct reg): Remove declaration.
2678
2679 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2680
2681 * tdesc.c (target_desc::~target_desc): Move to here.
2682 (target_desc::operator==): Likewise.
2683 * tdesc.h (target_desc::~target_desc): Move from here.
2684 (target_desc::operator==): Likewise.
2685
2686 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2687
2688 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2689
2690 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2691
2692 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2693 S390_TDESC_GS.
2694 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2695 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2696 and init_registers_s390_gs_linux64.
2697
2698 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2699
2700 * linux-s390-low.c (s390_fill_gs): Remove function.
2701 (s390_fill_gsbc): Remove function.
2702 (s390_regsets): Set fill functions for the guarded storage regsets
2703 to NULL.
2704
2705 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2706
2707 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2708 the word size. Add comment.
2709 (s390_get_wordsize): New function.
2710 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2711 pswm with it. Instead, use s390_get_wordsize to determine the
2712 word size first and derive the correct tdesc from that directly.
2713
2714 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2715
2716 * Makefile.in: Include silent-rules.mk.
2717 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2718 (COMPILE): Add ECHO_CXX.
2719 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2720 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2721 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2722 (version-generated.c): Add ECHO_GEN.
2723 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2724 (IPAGENT_COMPILE): Add ECHO_CXX.
2725 (%-generated.c): Add ECHO_REGDAT.
2726
2727 2018-03-14 Tom Tromey <tom@tromey.com>
2728
2729 PR cli/14977:
2730 * ax.c (ax_printf): Special case for NULL.
2731
2732 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2733
2734 * linux-low.c (linux_qxfer_libraries_svr4): Use
2735 xml_escape_text_append.
2736
2737 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2738
2739 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2740
2741 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2742
2743 * server.c (handle_general_set): Remove unnecessary xstrdup.
2744
2745 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2746
2747 * server.c (parse_debug_format_options): Adjust to
2748 delim_string_to_char_ptr_vec changes.
2749 * thread-db.c (thread_db_load_search): Adjust to
2750 dirnames_to_char_ptr_vec changes.
2751
2752 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2753
2754 * target.h (target_enable_btrace, target_disable_btrace)
2755 (target_read_btrace, target_read_btrace_conf): Turn macro into
2756 inline function. Throw error if target method is not defined.
2757 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2758 check for btrace target method. Be prepared to handle exceptions
2759 from btrace target methods.
2760
2761 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2762
2763 * server.c (captured_main): Change order of error message printed
2764 when the current working directory cannot be found.
2765
2766 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2767
2768 * server.c: Include "filenames.h" and "pathstuff.h".
2769 (program_name): Delete variable.
2770 (program_path): New anonymous class.
2771 (get_exec_wrapper): Use "program_path" instead of
2772 "program_name".
2773 (handle_v_run): Likewise.
2774 (captured_main): Likewise.
2775 (process_serial_event): Likewise.
2776
2777 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2778
2779 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2780 (OBJS): Add "pathstuff.o".
2781 * server.c (current_directory): New global variable.
2782 (captured_main): Initialize "current_directory".
2783
2784 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2785
2786 * tdesc.c: Use common/tdesc.h.
2787 * tdesc.h: Likewise.
2788
2789 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2790 Simon Marchi <simon.marchi@ericsson.com>
2791
2792 * Makefile.in: Switch order of make rules.
2793
2794 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2795
2796 * Makefile.in: Add common directory in build.
2797 * configure.ac: Add common reference.
2798 * configure: Regenerate.
2799
2800 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2801
2802 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2803 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2804 * spu-low.c (spu_target_ops): Likewise.
2805 * win32-low.c (win32_target_ops): Likewise.
2806 * server.c (supported_btrace_packets): Report packets unconditionally.
2807 * target.h (target_ops) <supports_btrace>: Remove.
2808 (target_supports_btrace): Remove.
2809
2810 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2811
2812 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2813 (handle_btrace_disable): Change return type to void. Use exceptions
2814 to report errors.
2815 (handle_btrace_general_set): Catch exception and copy message to
2816 return message.
2817
2818 2018-02-08 Tom Tromey <tom@tromey.com>
2819
2820 * linux-low.c (install_software_single_step_breakpoints): Use
2821 make_scoped_restore.
2822 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2823 (do_restore_current_thread_cleanup): Remove.
2824 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2825 declare.
2826
2827 2018-02-08 Tom Tromey <tom@tromey.com>
2828
2829 * mem-break.c (set_raw_breakpoint_at): Use
2830 gdb::unique_xmalloc_ptr.
2831
2832 2018-01-30 Pedro Alves <palves@redhat.com>
2833
2834 PR gdb/13211
2835 * target.c (target_terminal::terminal_state): Rename to ...
2836 (target_terminal::m_terminal_state): ... this.
2837
2838 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2839
2840 * linux-low.c (handle_extended_wait): Surround call to
2841 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2842
2843 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2844
2845 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2846 linux_ptrace_attach_fail_reason_string now returning an
2847 std::string.
2848 (linux_attach): Likewise.
2849 * thread-db.c (attach_thread): Likewise.
2850
2851 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2852
2853 PR gdb/21559
2854 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2855 checking for fs_base/gs_base fields in struct user_regs_struct.
2856 * configure: Regenerate.
2857
2858 2018-01-16 Yao Qi <yao.qi@linaro.org>
2859
2860 PR gdb/18749
2861 * linux-low.c (fetch_register): Call supply_register instead of
2862 error.
2863
2864 2018-01-08 Yao Qi <yao.qi@linaro.org>
2865 Simon Marchi <simon.marchi@ericsson.com>
2866
2867 * Makefile.in (OBS): Remove selftest.o.
2868 * configure.ac: Set srv_selftest_objs if $development is true.
2869 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2870 * configure: Re-generated.
2871 * server.c (captured_main): Wrap variable selftest_filter with
2872 GDB_SELF_TEST.
2873
2874 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2875
2876 * server.c (parse_debug_format_options): Return std::string.
2877 (handle_monitor_command, captured_main): Adjust.
2878
2879 2018-01-05 Pedro Alves <palves@redhat.com>
2880
2881 PR gdb/18653
2882 * server.c (captured_main): Pass quiet=false to
2883 save_original_signals_state.
2884
2885 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2886
2887 * gdbreplay.c (gdbreplay_version): Update copyright year in
2888 version message.
2889 * server.c (gdbserver_version): Likewise.
2890
2891 2017-12-08 Tom Tromey <tom@tromey.com>
2892
2893 * ax.c (ax_printf): Update.
2894
2895 2017-12-07 Yao Qi <yao.qi@linaro.org>
2896
2897 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2898 aarch64_linux_read_description.
2899 * linux-amd64-ipa.c (idx2mask): New array.
2900 (get_ipa_tdesc): Move idx2mask out.
2901 (initialize_low_tracepoint): Initialize target descriptions.
2902 * linux-i386-ipa.c (idx2mask): New array.
2903 (get_ipa_tdesc): Move idx2mask out.
2904 (initialize_low_tracepoint): Initialize target descriptions.
2905
2906 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2907
2908 * tdesc.c (struct tdesc_type): Change return type.
2909 (tdesc_add_flag): Change parameter type.
2910 (tdesc_add_bitfield): Likewise.
2911 (tdesc_add_field): Likewise.
2912 (tdesc_set_struct_size): Likewise.
2913
2914 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2915
2916 * regcache.c (registers_to_string): Remove unused variable.
2917
2918 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2919
2920 * inferiors.c (for_each_inferior_with_data): Remove.
2921 * inferiors.h (for_each_inferior_with_data): Remove.
2922 * server.c (handle_qxfer_threads_worker): Change parameter type.
2923 (handle_qxfer_threads_proper): Use for_each_thread.
2924
2925 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2926
2927 * inferiors.c (for_each_inferior): Remove.
2928 (clear_inferiors): Use for_each_thread.
2929 * inferiors.h (for_each_inferior): Remove.
2930 * linux-low.c (linux_wait_for_event_filtered): Use
2931 for_each_thread.
2932 (linux_stabilize_threads): Likewise.
2933 * regcache.c (regcache_release): Likewise.
2934 * server.c (gdb_wants_all_threads_stopped): Likewise.
2935 (clear_pending_status_callback): Remove.
2936 (handle_status): Use for_each_thread.
2937 (captured_main): Likewise.
2938 * win32-low.c (child_init_thread_list): Likewise.
2939 (win32_clear_inferiors): Likewise.
2940 (fake_breakpoint_event): Likewise.
2941
2942 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2943
2944 * inferiors.h (find_inferior): Remove.
2945 * inferiors.c (find_inferior): Remove.
2946
2947 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2948
2949 * linux-low.c (resume_status_pending_p): Update comment.
2950 (need_step_over_p): Update comment.
2951
2952 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2953
2954 * linux-low.c (proceed_one_lwp): Return void, change parameter
2955 type.
2956 (unsuspend_and_proceed_one_lwp): Likewise.
2957 (proceed_all_lwps): Use for_each_thread.
2958 (unstop_all_lwps): Likewise.
2959
2960 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2961
2962 * linux-low.c (linux_resume_one_thread): Return void, take
2963 parameter directly.
2964 (linux_resume): Use for_each_thread.
2965
2966 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2967
2968 * linux-low.c (send_sigstop_callback): Return void, change
2969 parameter type. Rename to...
2970 (send_sigstop): ... this.
2971 (suspend_and_send_sigstop_callback): Return void, change parameter
2972 type. Rename to...
2973 (suspend_and_send_sigstop): ... this.
2974 (stop_all_lwps): Use for_each_thread.
2975
2976 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2977
2978 * linux-low.c (lwp_running): Return bool, remove unused
2979 argument.
2980 (linux_stabilize_threads): Use find_thread.
2981
2982 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2983
2984 * linux-low.c (select_singlestep_lwp_callback): Remove.
2985 (count_events_callback): Remove.
2986 (select_event_lwp_callback): Remove.
2987 (select_event_lwp): Use find_thread/for_each_thread.
2988
2989 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2990
2991 * linux-low.c (not_stopped_callback): Return bool, take filter
2992 argument directly.
2993 (linux_wait_for_event_filtered): Use find_thread.
2994 (linux_wait_1): Likewise.
2995
2996 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2997
2998 * linux-low.c (same_lwp): Remove.
2999 (find_lwp_pid): Use find_thread.
3000
3001 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3002
3003 * linux-low.c (delete_lwp_callback): Remove.
3004 (linux_mourn): Use for_each_thread.
3005
3006 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3007
3008 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3009 args parameter, don't check for pid.
3010 (linux_detach): Use for_each_thread.
3011
3012 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3013
3014 * linux-low.c (struct counter): Remove.
3015 (second_thread_of_pid_p): Remove.
3016 (last_thread_of_process_p): Use find_thread.
3017
3018 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3019
3020 * inferiors.c (find_inferior_in_random): Remove.
3021 * inferiors.h (find_inferior_in_random): Remove.
3022 * linux-low.c (status_pending_p_callback): Return bool, accept
3023 parameter ptid directly.
3024 (linux_wait_for_event_filtered): Use find_thread_in_random.
3025 (linux_wait_1): Likewise.
3026
3027 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3028
3029 * inferiors.c (find_inferior_id): Remove.
3030 (find_thread_ptid): Move implemention from find_inferior_id to
3031 here.
3032 * inferiors.h (find_inferior_id): Remove.
3033 * server.c (handle_status): Use find_thread_ptid.
3034 (process_serial_event): Likewise.
3035 * thread-db.c (find_one_thread): Likewise.
3036 (thread_db_thread_handle): Likewise.
3037 * win32-low.c (thread_rec): Likewise.
3038 (child_delete_thread): Likewise.
3039 (win32_thread_alive): Likewise.
3040 (get_child_debug_event): Likewise.
3041
3042 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3043
3044 * linux-mips-low.c (update_watch_registers_callback): Return
3045 void, remove pid_p parameter, don't check for pid.
3046 (mips_insert_point, mips_remove_point): Use for_each_thread.
3047
3048 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3049
3050 * lynx.low (lynx_delete_thread_callback): Remove.
3051 (lynx_mourn): Use for_each_thread.
3052
3053 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * regcache.c (regcache_invalidate_one): Remove.
3056 (regcache_invalidate_pid): use for_each_thread.
3057
3058 2017-11-26 Tom Tromey <tom@tromey.com>
3059
3060 * linux-low.c (linux_create_inferior): Update.
3061
3062 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3063
3064 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3065
3066 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3067
3068 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3069 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3070 * linux-aarch64-tdesc-selftest.c: New file.
3071 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3072
3073 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3074
3075 * configure.srv: Add new file.
3076 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3077 * linux-aarch64-tdesc-selftest.c: New file.
3078 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3079
3080 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3081
3082 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3083 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3084 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3085
3086 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3087
3088 * configure.srv: Add new files.
3089 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3090 aarch64_linux_read_description.
3091 * linux-aarch64-low.c (aarch64_linux_read_description):
3092 Merge with aarch64_arch_setup.
3093 (aarch64_arch_setup): Call aarch64_linux_read_description.
3094 * linux-aarch64-tdesc.c: New file.
3095 * linux-aarch64-tdesc.h: New file.
3096
3097 2017-11-24 Yao Qi <yao.qi@linaro.org>
3098
3099 * configure.srv: Set $srv_regobj for tic6x-linux.
3100 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3101 (tic6x_read_description): Move some code to tic6x_arch_setup.
3102 (tic6x_tdesc_test): New function.
3103 (initialize_low_arch): Call selftests::register_test.
3104
3105 2017-11-22 Yao Qi <yao.qi@linaro.org>
3106
3107 * remote-utils.c (prepare_resume_reply): Use memcpy.
3108
3109 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3110
3111 * linux-low.c (kill_one_lwp_callback): Return void, take
3112 argument directly, don't filter on pid.
3113 (linux_kill): Use for_each_thread.
3114
3115 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3116
3117 * linux-low.c (need_step_over_p): Return bool, remove dummy
3118 argument.
3119 (linux_resume, proceed_all_lwps): Use find_thread.
3120
3121 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3122
3123 * linux-low.c (resume_status_pending_p): Return bool, remove
3124 flag_p argument.
3125 (linux_resume): Use find_thread.
3126
3127 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3128
3129 * linux-low.c (struct thread_resume_array): Remove.
3130 (linux_set_resume_request): Return void, take arguments
3131 directly.
3132 (linux_resume): Use for_each_thread.
3133
3134 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3135
3136 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3137 return bool, remove data argument.
3138 (linux_stabilize_threads): Use find_thread.
3139
3140 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3141
3142 * linux-low.c (unsuspend_one_lwp): Remove.
3143 (unsuspend_all_lwps): Use for_each_thread, inline code from
3144 unsuspend_one_lwp.
3145
3146 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3147
3148 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3149 * linux-low.c (struct iterate_over_lwps_args): Remove.
3150 (iterate_over_lwps_filter): Remove.
3151 (iterate_over_lwps): Use find_thread.
3152
3153 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3154
3155 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3156 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3157 code from reset_lwp_ptrace_options_callback.
3158
3159 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3160
3161 * linux-arm-low.c (struct update_registers_data): Remove.
3162 (update_registers_callback): Return void, take arguments
3163 directly, don't check thread's pid.
3164 (arm_insert_point, arm_remove_point): Use for_each_thread.
3165
3166 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3167
3168 * win32-low.c (continue_one_thread): Return void, take argument
3169 directly.
3170 (child_continue): Use for_each_thread.
3171
3172 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3173
3174 * win32-i386-low.c (update_debug_registers_callback): Rename
3175 to ...
3176 (update_debug_registers): ... this, return void, remove pid_p arg.
3177 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3178
3179 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3180
3181 * inferiors.h (struct process_info): Add constructor, initialize
3182 fields..
3183 <syscalls_to_catch>: Change type to std::vector<int>.
3184 * inferiors.c (add_process): Allocate process_info with new.
3185 (remove_process): Free process_info with delete.
3186 * linux-low.c (handle_extended_wait): Adjust.
3187 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3188 * server.c (handle_general_set): Adjust.
3189
3190 2017-11-16 Pedro Alves <palves@redhat.com>
3191
3192 * remote-utils.c (remote_close): Block SIGIO signals instead of
3193 uninstalling the SIGIO handler.
3194
3195 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3196
3197 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3198
3199 2017-11-16 Yao Qi <yao.qi@linaro.org>
3200
3201 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3202 (tic6x_store_gregset): Likewise.
3203 (tic6x_usrregs_info): Move it up.
3204
3205 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3206
3207 * Makefile.in: Update arch rules.
3208 * configure.srv: Explicitly mark arch/ files.
3209
3210 2017-11-13 Andreas Schwab <schwab@suse.de>
3211
3212 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3213 function.
3214 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3215
3216 2017-11-06 Pedro Alves <palves@redhat.com>
3217
3218 * config.in, configure: Regenerate.
3219
3220 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3221
3222 * target.c (struct thread_search): Remove.
3223 (thread_search_callback): Remove.
3224 (prepare_to_access_memory): Use for_each_thread instead of
3225 find_inferior. Inline code from thread_search_callback.
3226
3227 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3228
3229 * server.c (struct visit_actioned_threads_data): Remove.
3230 (visit_actioned_threads): Change prototype to take arguments
3231 directly.
3232 (resume): Use find_thread instead of find_inferior.
3233
3234 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3235
3236 * server.c (queue_stop_reply_callback): Change prototype, return
3237 void.
3238 (find_status_pending_thread_callback): Remove.
3239 (handle_status): Replace find_inferior with find_thread and
3240 for_each_thread.
3241
3242 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3243
3244 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3245 with REGNO.
3246 (aarch64_store_gregset): Likewise.
3247 (aarch64_fill_fpregset): Likewise.
3248 (aarch64_store_fpregset): Likewise.
3249
3250 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3251
3252 * gdbthread.h (find_thread, for_each_thread): New functions.
3253 * inferiors.c (thread_of_pid): Remove.
3254 (find_any_thread_of_pid): Use find_thread.
3255 * linux-low.c (num_lwps): Use for_each_thread.
3256
3257 2017-10-17 Yao Qi <yao.qi@linaro.org>
3258
3259 * Makefile.in: Remove one rule.
3260 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3261
3262 2017-10-17 Yao Qi <yao.qi@linaro.org>
3263
3264 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3265 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3266
3267 2017-10-17 Yao Qi <yao.qi@linaro.org>
3268
3269 * configure.srv: Rename arm.o with arch/arm.o.
3270
3271 2017-10-17 Yao Qi <yao.qi@linaro.org>
3272
3273 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3274 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3275 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3276 (arch-i386.o, arch-amd64.o): Remove rules.
3277 (arch/%.o): New rule.
3278 Update POSTCOMPILE and COMPILE.pre.
3279 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3280 * configure: Re-generated.
3281 * configure.srv: Replace arch-i386.o with arch/i386.o.
3282 Replace arch-amd64.o with arch/amd64.o.
3283
3284 2017-10-16 Yao Qi <yao.qi@linaro.org>
3285
3286 * configure: Regenerated.
3287
3288 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3289
3290 * inferiors.h: (struct inferior_list): Remove.
3291 (struct inferior_list_entry); Remove.
3292 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3293 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3294 get_first_inferior): Remove.
3295 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3296 find_inferior_id, find_inferior_in_random): Change signature.
3297 * inferiors.c (all_threads): Change type to
3298 std::list<thread_info *>.
3299 (get_thread): Remove macro.
3300 (find_inferior, find_inferior_id): Change signature, implement
3301 using find_thread.
3302 (find_inferior_in_random): Change signature, implement using
3303 find_thread_in_random.
3304 (for_each_inferior, for_each_inferior_with_data): Change
3305 signature, implement using for_each_thread.
3306 (add_inferior_to_list, remove_inferior): Remove.
3307 (add_thread, get_first_thread, thread_of_pid,
3308 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3309 (get_first_inferior, one_inferior_p, clear_inferior_list):
3310 Remove.
3311 (clear_inferiors, get_thread_process): Update.
3312 * gdbthread.h: Include <list>.
3313 (struct thread_info) <entry>: Remove field.
3314 <id>: New field.
3315 (all_threads): Change type to std::list<thread_info *>.
3316 (get_first_inferior): Add doc.
3317 (find_thread, for_each_thread, find_thread_in_random): New
3318 functions.
3319 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3320 * linux-arm-low.c (update_registers_callback): Update.
3321 * linux-low.c (second_thread_of_pid_p): Update.
3322 (kill_one_lwp_callback, linux_detach_lwp_callback,
3323 delete_lwp_callback, status_pending_p_callback, same_lwp,
3324 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3325 iterate_over_lwps, not_stopped_callback,
3326 resume_stopped_resumed_lwps, count_events_callback,
3327 select_singlestep_lwp_callback, select_event_lwp_callback,
3328 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3329 suspend_and_send_sigstop_callback, wait_for_sigstop,
3330 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3331 lwp_running, linux_set_resume_request, resume_status_pending_p,
3332 need_step_over_p, start_step_over, linux_resume_one_thread,
3333 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3334 reset_lwp_ptrace_options_callback): Update.
3335 * linux-mips-low.c (update_watch_registers_callback): Update.
3336 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3337 Update.
3338 (free_register_cache_thread_one): Remove.
3339 (regcache_release): Update.
3340 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3341 handle_qxfer_threads_worker): Update.
3342 (handle_query): Update, use list iterator.
3343 (visit_actioned_threads, handle_pending_status,
3344 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3345 clear_pending_status_callback, set_pending_status_callback,
3346 find_status_pending_thread_callback, handle_status,
3347 process_serial_event): Update.
3348 * target.c (thread_search_callback): Update.
3349 * thread-db.c (thread_db_get_tls_address): Update.
3350 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3351 Update.
3352 * win32-i386-low.c (update_debug_registers_callback): Update.
3353 * win32-low.c (delete_thread_info, child_delete_thread,
3354 continue_one_thread, suspend_one_thread,
3355 get_child_debug_event): Adjust.
3356
3357 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3358
3359 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3360 * inferiors.h: Include <list>.
3361 (struct process_info) <entry>: Remove field.
3362 <pid>: New field.
3363 (pid_of): Change macro to function.
3364 (ptid_of, lwpid_of): Remove macro.
3365 (all_processes): Change type to std::list<process_info *>.
3366 (ALL_PROCESSES): Remove macro.
3367 (for_each_process, find_process): New function.
3368 * inferiors.c (all_processes): Change type to
3369 std::list<process_info *>.
3370 (find_thread_process): Adjust.
3371 (add_process): Likewise.
3372 (remove_process): Likewise.
3373 (find_process_pid): Likewise.
3374 (get_first_process): Likewise.
3375 (started_inferior_callback): Remove.
3376 (have_started_inferiors_p): Adjust.
3377 (attached_inferior_callback): Remove.
3378 (have_attached_inferiors_p): Adjust.
3379 * linux-low.c (check_zombie_leaders): Likewise.
3380 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3381 (x86_linux_update_xmltarget): Adjust.
3382 * server.c (handle_query): Likewise.
3383 (gdb_reattached_process): Remove.
3384 (handle_status): Adjust.
3385 (kill_inferior_callback): Likewise.
3386 (detach_or_kill_inferior): Remove.
3387 (print_started_pid): Likewise.
3388 (print_attached_pid): Likewise.
3389 (detach_or_kill_for_exit): Update.
3390 (process_serial_event): Likewise.
3391 * linux-arm-low.c (arm_new_fork): Likewise.
3392
3393 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3394
3395 * dll.h: Include <list>.
3396 (struct dll_info): Add constructor.
3397 <entry>: Remove field.
3398 (all_dlls): Change type to std::list<dll_info>.
3399 * dll.c: Include <algorithm>.
3400 (get_dll): Remove macro.
3401 (all_dlls): Change type to std::list<dll_info *>.
3402 (free_one_dll): Remove.
3403 (match_dll): Likewise.
3404 (loaded_dll): Adjust.
3405 (unloaded_dll): Adjust to all_dlls type change, use
3406 std::find_if. Inline code from match_dll.
3407 (clear_dlls): Adjust to all_dlls type change.
3408 * server.c (emit_dll_description): Remove.
3409 (handle_qxfer_libraries): Adjust to all_dlls type change,
3410 integrate emit_dll_description's functionality.
3411
3412 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3413
3414 * linux-low.h (struct linux_target_ops) <delete_process>: New
3415 field.
3416 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3417 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3418 (struct linux_target_ops): Add delete_process callback.
3419 * linux-arm-low.c (arm_delete_process): New.
3420 (struct linux_target_ops): Add delete_process callback.
3421 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3422 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3423 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3424 * linux-mips-low.c (mips_linux_delete_process): New.
3425 (struct linux_target_ops): Add delete_process callback.
3426 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3427 * linux-s390-low.c (struct linux_target_ops): Likewise.
3428 * linux-sh-low.c (struct linux_target_ops): Likewise.
3429 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3430 * linux-tile-low.c (struct linux_target_ops): Likewise.
3431 * linux-x86-low.c (x86_linux_delete_process): New.
3432 (struct linux_target_ops): Add delete_process callback.
3433 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3434
3435 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3436
3437 * linux-aarch64-low.c (the_low_target): Add thread delete
3438 callback.
3439 * linux-arm-low.c (arm_delete_thread): New function.
3440 (the_low_target): Add thread delete callback.
3441 * linux-bfin-low.c (the_low_target): Likewise.
3442 * linux-crisv32-low.c (the_low_target): Likewise.
3443 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3444 set.
3445 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3446 field.
3447 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3448 * linux-mips-low.c (mips_linux_delete_thread): New function.
3449 (the_low_target): Add thread delete callback.
3450 * linux-ppc-low.c (the_low_target): Likewise.
3451 * linux-s390-low.c (the_low_target): Likewise.
3452 * linux-sh-low.c (the_low_target): Likewise.
3453 * linux-tic6x-low.c (the_low_target): Likewise.
3454 * linux-tile-low.c (the_low_target): Likewise.
3455 * linux-x86-low.c (the_low_target): Likewise.
3456 * linux-xtensa-low.c (the_low_target): Likewise.
3457
3458 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3459
3460 * win32-low.c: Include "common-inferior.h".
3461
3462 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3463
3464 * inferiors.c (set_inferior_cwd): New function.
3465 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3466 (handle_query): Inform that QSetWorkingDir is supported.
3467 * win32-low.c (create_process): Pass the inferior's cwd to
3468 CreateProcess.
3469
3470 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3471
3472 * inferiors.c (current_inferior_cwd): New global variable.
3473 (get_inferior_cwd): New function.
3474 * inferiors.h (struct process_info) <cwd>: New field.
3475
3476 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3477
3478 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3479 (OBS): Add gdb_tilde_expand.o.
3480
3481 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3482
3483 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3484 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3485
3486 2017-09-29 Pedro Alves <palves@redhat.com>
3487
3488 * ax.c (gdb_parse_agent_expr): Constify.
3489 * ax.h (gdb_parse_agent_expr): Constify.
3490 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3491 Constify.
3492 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3493 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3494 * remote-utils.h (read_ptid): Constify.
3495 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3496 (process_point_options, process_serial_event): Constify.
3497 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3498 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3499 (cmd_qtbuffer): Constify.
3500
3501 2017-09-29 Pedro Alves <palves@redhat.com>
3502
3503 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3504 fails.
3505
3506 2017-09-29 Pedro Alves <palves@redhat.com>
3507
3508 * linux-low.c (handle_extended_wait): Pass parent thread instead
3509 of process to thread_db_notice_clone.
3510 * linux-low.h (thread_db_notice_clone): Replace parent process
3511 parameter with parent thread parameter.
3512 * thread-db.c (find_one_thread): Add comment.
3513 (thread_db_notice_clone): Replace parent process parameter with
3514 parent thread parameter. Temporarily switch to the parent thread.
3515
3516 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3517
3518 * gdbthread.h: Include "common-gdbthread.h".
3519 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3520 "if" when validating the ptid.
3521 * remote-utils.c: Include "gdbthread.h".
3522 (prepare_resume_reply): Use "switch_to_thread".
3523 * target.c (done_accessing_memory): Likewise.
3524
3525 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3526
3527 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3528 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3529 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3530 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3531 s390x-gs-linux64-ipa.o to ipa_obj.
3532 * linux-s390-low.c (HWCAP_S390_GS): New define.
3533 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3534 New functions.
3535 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3536 (s390_arch_setup): Check for guarded-storage support and choose
3537 appropriate tdesc.
3538 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3539 init_registers_s390x_gs_linux64.
3540 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3541 enum value.
3542 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3543 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3544
3545 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3546
3547 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3548
3549 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3550
3551 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3552 (thread_db_thread_handle): Declare.
3553 * linux-low.c (linux_target_ops): Initialize thread_handle.
3554 * server.c (handle_qxfer_threads_worker): Add support for
3555 "handle" attribute.
3556 * target.h (struct target_ops): Add new function pointer,
3557 thread_handle.
3558 (target_thread_handle): Define.
3559 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3560 field in lwp.
3561 (thread_db_thread_handle): New function.
3562
3563 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3564
3565 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3566 * linux-low.h (thread_db_notice_clone): Declare.
3567 * thread-db.c (thread_db_notice_clone): New function.
3568
3569 2017-09-21 Pedro Alves <palves@redhat.com>
3570
3571 * server.c (gdb_read_memory, handle_status, process_serial_event)
3572 (handle_serial_event, handle_target_event): Adjust to
3573 set_desired_thread prototype change.
3574 * target.c (set_desired_thread): Remove 'use_general' parameter
3575 and adjust.
3576 * target.h (set_desired_thread): Remove 'use_general' parameter.
3577
3578 2017-09-20 Tom Tromey <tom@tromey.com>
3579
3580 * target.c (target_terminal::terminal_state): Define.
3581 (target_terminal::init): Rename from target_terminal_init.
3582 (target_terminal::inferior): Rename from
3583 target_terminal_inferior.
3584 (target_terminal::ours): Rename from target_terminal_ours.
3585 (target_terminal::ours_for_output, target_terminal::info): New.
3586
3587 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3588
3589 * server.c (accumulate_file_name_length): Remove.
3590 (emit_dll_description): Adjust to std::string change.
3591 (handle_qxfer_libraries): Use std::string to hold document.
3592
3593 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3594
3595 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3596 return type of xml_escape_text.
3597 * server.c (emit_dll_description): Likewise.
3598
3599 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3600
3601 * server.c (captured_main): Accept argument for --selftest.
3602 Update run_tests call.
3603 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3604 when registering selftests.
3605
3606 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3607
3608 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3609 instead of "VEC" for "target_desc.reg_defs".
3610 (regcache_cpy): Likewise.
3611 (registers_to_string): Likewise.
3612 (registers_from_string): Likewise.
3613 (find_regno): Likewise.
3614 (supply_regblock): Likewise.
3615 (regcache_raw_read_unsigned): Likewise.
3616 * tdesc.c (init_target_desc): Likewise.
3617 (tdesc_create_reg): Likewise.
3618 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3619 (struct target_desc) <reg_defs>: Convert to "std::vector".
3620 (target_desc): Do not initialize "reg_defs".
3621 (~target_desc): Update code to use "std::vector" instead of "VEC"
3622 for "target_desc.reg_defs".
3623 (operator==): Likewise.
3624
3625 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3626
3627 * inferiors.h (thread_to_gdb_id): Remove.
3628 * inferiors.c (thread_to_gdb_id): Remove.
3629 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3630 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3631 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3632 Likewise.
3633 * nto-low.c (nto_fetch_registers, nto_store_registers,
3634 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3635
3636 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3637
3638 * inferiors.h (gdb_id_to_thread_id): Remove.
3639 * inferiors.c (gdb_id_to_thread_id): Remove.
3640 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3641 removal. Move pid declaration closer to where it's used.
3642
3643 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3644
3645 * server.c (handle_detach): New function.
3646 (process_serial_event): Move code out, call handle_detach.
3647
3648 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3649
3650 * server.c (require_running): Rename to ...
3651 (require_running_or_return): ... this ...
3652 (require_running_or_break): ... and this.
3653 (handle_query, process_serial_event): Adjust.
3654
3655 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * linux-low.c (linux_set_resume_request): Remove unused
3658 variables.
3659
3660 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3661
3662 * server.c (first_thread_of): Remove.
3663 (process_serial_event): Replace usage of first_thread_of with
3664 find_any_thread_of_pid.
3665 * tracepoint.c (same_process_p): Remove.
3666 (gdb_agent_about_to_close): Replace usage of same_process_p with
3667 find_any_thread_of_pid.
3668 * linux-x86-low.c (same_process_callback): Remove.
3669 (x86_arch_setup_process_callback): Replace usage of
3670 same_process_callback with find_any_thread_of_pid.
3671 * thread-db.c (any_thread_of): Remove.
3672 (switch_to_process): Replace usage of any_thread_of with
3673 find_any_thread_of_pid.
3674 * inferiors.c (thread_pid_matches_callback): Remove.
3675 (find_thread_process): Adjust to use find_any_thread_of_pid.
3676
3677 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3678
3679 * regcache.c (get_thread_regcache): Guard calls to "memset"
3680 with "!VEC_empty".
3681
3682 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3683
3684 * linux-low.c (handle_extended_wait): Use
3685 "allocate_target_description" instead of "XNEW".
3686 * linux-x86-low.c (initialize_low_arch): Likewise.
3687
3688 2017-09-05 Yao Qi <yao.qi@linaro.org>
3689
3690 * configure.srv (srv_i386_regobj): Remove.
3691 (srv_amd64_regobj): Remove.
3692 (srv_regobj): Set it to "" for x86 non-linux targets.
3693 * linux-x86-tdesc.c (i386_linux_read_description):
3694 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3695 (init_registers_i386): Remove the declaration.
3696 (tdesc_i386): Remove the declaration.
3697 (lynx_i386_arch_setup): Call i386_create_target_description.
3698 * nto-x86-low.c: Likewise.
3699 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3700 [!__x86_64__]: include arch/i386.h.
3701 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3702
3703 2017-09-05 Yao Qi <yao.qi@linaro.org>
3704
3705 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3706 i386/amd64-XXX-linux from it.
3707
3708 2017-09-05 Yao Qi <yao.qi@linaro.org>
3709
3710 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3711 false.
3712 (ipa_amd64_linux_regobj): Remove.
3713 (ipa_x32_linux_regobj): Remove.
3714
3715 2017-09-05 Yao Qi <yao.qi@linaro.org>
3716
3717 * Makefile.in (arch-amd64.o): New rule.
3718 * configure.srv: Append arch-amd64.o.
3719 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3720 (get_ipa_tdesc): Call amd64_linux_read_description.
3721 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3722 and init_registers_amd64_XXX.
3723 * linux-x86-low.c (x86_linux_read_description): Call
3724 amd64_linux_read_description.
3725 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3726 (initialize_low_arch): Don't call init_registers_x32_XXX and
3727 init_registers_amd64_XXX.
3728 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3729 and tdesc_amd64_XXX.
3730 [__x86_64__] (amd64_tdesc_test): New function.
3731 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3732 and init_registers_amd64_XXX.
3733 * linux-x86-tdesc.c: Include arch/amd64.h.
3734 (xcr0_to_tdesc_idx): New function.
3735 (i386_linux_read_description): New function.
3736 (amd64_get_ipa_tdesc_idx): New function.
3737 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3738 (amd64_get_ipa_tdesc): Declare.
3739
3740 2017-09-05 Yao Qi <yao.qi@linaro.org>
3741
3742 * configure.srv (srv_i386_linux_xmlfiles): Remove
3743 i386/i386-XXX-linux.xml from it.
3744
3745 2017-09-05 Yao Qi <yao.qi@linaro.org>
3746
3747 * configure.srv: Set srv_i386_linux_regobj empty if $development
3748 is false.
3749 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3750 initialize_low_tdesc.
3751 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3752 with #if initialize_low_tdesc.
3753 * linux-x86-tdesc-selftest.c: New file.
3754 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3755
3756 2017-09-05 Yao Qi <yao.qi@linaro.org>
3757
3758 * Makefile.in (arch-i386.o): New rule.
3759 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3760 (x86_64-*-linux*): Likewise.
3761 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3762 include arch/i386.h.
3763 (i386_linux_read_description): Remove code and call
3764 i386_create_target_description.
3765 * tdesc.c (allocate_target_description): New function.
3766 * tdesc.h (set_tdesc_architecture): Remove declaration.
3767 (set_tdesc_osabi): Likewise.
3768
3769 2017-09-05 Yao Qi <yao.qi@linaro.org>
3770
3771 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3772 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3773 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3774 .xmltarget.
3775 * server.c (get_features_xml): Call tdesc_get_features_xml.
3776 * tdesc.c (set_tdesc_architecture): New function.
3777 (set_tdesc_osabi): New function.
3778 (tdesc_get_features_xml): New function.
3779 (tdesc_create_feature): Add an argument.
3780 * tdesc.h (struct target_desc) <features>: New field.
3781 <arch, osabi>: New field.
3782 (~target_desc): xfree features, arch, and osabi.
3783 (target_desc::oerator==): Don't compare .xmltarget.
3784 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3785 (set_tdesc_osabi): Likewise.
3786 (tdesc_get_features_xml): Likewise.
3787
3788 2017-09-05 Yao Qi <yao.qi@linaro.org>
3789
3790 * linux-x86-tdesc.c: Include selftest.h.
3791 (i386_tdesc_test): New function.
3792 (initialize_low_tdesc): Call selftests::register_test.
3793 * tdesc.h: Include regdef.h.
3794 (target_desc): Override operator == and !=.
3795
3796 2017-09-05 Yao Qi <yao.qi@linaro.org>
3797
3798 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3799 (ipa_obj): Likewise.
3800 * linux-i386-ipa.c: Include common/x86-xstate.h
3801 (get_ipa_tdesc): Call i386_linux_read_description.
3802 (initialize_low_tracepoint): Don't call init_registers_XXX
3803 functions, call initialize_low_tdesc instead.
3804 * linux-x86-low.c (x86_linux_read_description): Call
3805 i386_linux_read_description.
3806 (initialize_low_arch): Don't call init_registers_i386_XXX
3807 functions, call initialize_low_tdesc.
3808 * linux-x86-tdesc.c: New file.
3809 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3810 (i386_get_ipa_tdesc_idx): Declare.
3811 (i386_get_ipa_tdesc): Declare.
3812 (initialize_low_tdesc): Declare.
3813
3814 2017-09-05 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3817 instead of 0.
3818
3819 2017-09-05 Yao Qi <yao.qi@linaro.org>
3820
3821 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3822 * regcache.c (get_thread_regcache): Use VEC_length.
3823 (init_register_cache): Likewise.
3824 (regcache_cpy): Likewise.
3825 (registers_to_string): Iterate reg_defs via VEC_iterate.
3826 (find_regno): Likewise.
3827 (find_register_by_number): Use VEC_index.
3828 (register_size): Call find_register_by_number.
3829 (register_data): Call find_register_by_number.
3830 (supply_regblock): Use VEC_length.
3831 (regcache_raw_read_unsigned): Likewise.
3832 * tdesc.c (init_target_desc): Iterate reg_defs via
3833 VEC_iterate.
3834 (default_description): Update initializer.
3835 (copy_target_description): Don't update field num_registers.
3836 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3837 <num_registers>: Remove.
3838
3839 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3840
3841 * Makefile.in (.SECONDARY): Define target.
3842
3843 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3844
3845 * linux-low.c (linux_wait_1): Adjust.
3846 * server.c (queue_stop_reply_callback): Adjust.
3847
3848 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3849
3850 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3851 QEnvironmentUnset and QEnvironmentReset packets.
3852 (handle_query): Inform remote that QEnvironmentHexEncoded,
3853 QEnvironmentUnset and QEnvironmentReset are supported.
3854
3855 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3856
3857 * inferiors.h (inferior_target_data): Rename to ...
3858 (thread_target_data): ... this.
3859 (inferior_regcache_data): Rename to ...
3860 (thread_regcache_data): ... this.
3861 (set_inferior_regcache_data): Rename to ...
3862 (set_thread_regcache_data): ... this.
3863 * inferiors.c (inferior_target_data): Rename to ...
3864 (thread_target_data): ... this.
3865 (inferior_regcache_data): Rename to ...
3866 (thread_regcache_data): ... this.
3867 (set_inferior_regcache_data): Rename to ...
3868 (set_thread_regcache_data): ... this.
3869 (free_one_thread): Update.
3870 * linux-low.h (get_thread_lwp): Update.
3871 * regcache.c (get_thread_regcache): Update.
3872 (regcache_invalidate_thread): Update.
3873 (free_register_cache_thread): Update.
3874 * win32-i386-low.c (update_debug_registers_callback): Update.
3875 (win32_get_current_dr): Update.
3876 * win32-low.c (thread_rec): Update.
3877 (delete_thread_info): Update.
3878 (continue_one_thread): Update.
3879 (suspend_one_thread): Update.
3880
3881 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3882
3883 * inferiors.c (set_inferior_target_data): Remove.
3884 * inferiors.h (set_inferior_target_data): Remove.
3885
3886 2017-08-18 Yao Qi <yao.qi@linaro.org>
3887
3888 * Makefile.in (OBS): Add selftest.o.
3889 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3890 * configure, config.in: Re-generated.
3891 * server.c: Include common/sefltest.h.
3892 (captured_main): Handle option --selftest.
3893
3894 2017-08-09 Yao Qi <yao.qi@linaro.org>
3895
3896 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3897 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3898 i386-avx-mpx.o and i386-mmx.o.
3899 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3900 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3901 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3902 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3903 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3904 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3905 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3906 i386/amd64-avx-mpx.xml.
3907
3908 2017-08-09 Yao Qi <yao.qi@linaro.org>
3909
3910 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3911 and x32-avx-avx512.o.
3912 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3913 i386/x32-avx-avx512.xml.
3914
3915 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3916
3917 * tracepoint.h (enum class fast_tpoint_collect_result): New
3918 enumeration.
3919 (fast_tracepoint_collecting): Change return type to
3920 fast_tpoint_collect_result.
3921 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3922 * linux-low.h: Include tracepoint.h.
3923 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3924 fast_tpoint_collect_result.
3925 * linux-low.c (handle_tracepoints): Adjust.
3926 (linux_fast_tracepoint_collecting): Change return type to
3927 fast_tpoint_collect_result.
3928 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3929 linux_wait_1, stuck_in_jump_pad_callback,
3930 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3931 proceed_one_lwp): Adjust to type change.
3932
3933 2017-07-10 Yao Qi <yao.qi@linaro.org>
3934
3935 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3936
3937 2017-06-29 Yao Qi <yao.qi@linaro.org>
3938
3939 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3940 Remove.
3941 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3942
3943 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3944
3945 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3946
3947 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3948
3949 * linux-low.c (linux_create_inferior): Adjust code to access the
3950 environment information via 'gdb_environ' class.
3951 * lynx-low.c (lynx_create_inferior): Likewise.
3952 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3953 (get_environ): Return a pointer to 'our_environ'.
3954 (captured_main): Initialize 'our_environ'.
3955 * server.h (get_environ): Adjust prototype.
3956 * spu-low.c (spu_create_inferior): Adjust code to access the
3957 environment information via 'gdb_environ' class.
3958
3959 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3960
3961 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3962 usage of "register" keyword.
3963
3964 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3965
3966 * configure: Re-generate.
3967
3968 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3969
3970 * configure: Re-generate.
3971
3972 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3973
3974 * Makefile.in (COMPILE.pre): Add "-x c++".
3975
3976 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3977
3978 * fork-child.c: Conditionally include <signal.h>.
3979
3980 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3981
3982 * server.c (handle_general_set): Handle new packet
3983 "QStartupWithShell".
3984 (handle_query): Add "QStartupWithShell" to the list of supported
3985 packets.
3986 (gdbserver_usage): Add help text explaining the
3987 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3988 options.
3989 (captured_main): Recognize and act upon the presence of the new
3990 CLI options.
3991
3992 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3993 Pedro Alves <palves@redhat.com>
3994
3995 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3996 * configure: Regenerate.
3997 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3998 "fork-inferior.o".
3999 (i[34567]86-*-lynxos*): Likewise.
4000 (spu*-*-*): Likewise.
4001 * fork-child.c: New file.
4002 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4003 and "environ.h".
4004 (linux_ptrace_fun): New function.
4005 (linux_create_inferior): Adjust function prototype to reflect
4006 change on "target.h". Adjust function code to use
4007 "fork_inferior".
4008 (linux_request_interrupt): Delete "signal_pid".
4009 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4010 (lynx_ptrace_fun): New function.
4011 (lynx_create_inferior): Adjust function prototype to reflect
4012 change on "target.h". Adjust function code to use
4013 "fork_inferior".
4014 * nto-low.c (nto_create_inferior): Adjust function prototype and
4015 code to reflect change on "target.h". Update comments.
4016 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4017 "common-terminal.h" and "environ.h".
4018 (terminal_fd): Moved to fork-child.c.
4019 (old_foreground_pgrp): Likewise.
4020 (restore_old_foreground_pgrp): Likewise.
4021 (last_status): Make it global.
4022 (last_ptid): Likewise.
4023 (our_environ): New variable.
4024 (startup_with_shell): Likewise.
4025 (program_name): Likewise.
4026 (program_argv): Rename to...
4027 (program_args): ...this.
4028 (wrapper_argv): New variable.
4029 (start_inferior): Delete function.
4030 (get_exec_wrapper): New function.
4031 (get_exec_file): Likewise.
4032 (get_environ): Likewise.
4033 (prefork_hook): Likewise.
4034 (post_fork_inferior): Likewise.
4035 (postfork_hook): Likewise.
4036 (postfork_child_hook): Likewise.
4037 (handle_v_run): Update code to deal with arguments coming from the
4038 remote host. Update calls from "start_inferior" to
4039 "create_inferior".
4040 (captured_main): Likewise. Initialize environment variable. Call
4041 "have_job_control".
4042 * server.h (post_fork_inferior): New prototype.
4043 (get_environ): Likewise.
4044 (last_status): Declare.
4045 (last_ptid): Likewise.
4046 (signal_pid): Likewise.
4047 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4048 (spu_ptrace_fun): New function.
4049 (spu_create_inferior): Adjust function prototype to reflect change
4050 on "target.h". Adjust function code to use "fork_inferior".
4051 * target.c (target_terminal_init): New function.
4052 (target_terminal_inferior): Likewise.
4053 (target_terminal_ours): Likewise.
4054 * target.h: Include <vector>.
4055 (struct target_ops) <create_inferior>: Update prototype.
4056 (create_inferior): Update macro.
4057 * utils.c (gdb_flush_out_err): New function.
4058 * win32-low.c (win32_create_inferior): Adjust function prototype
4059 and code to reflect change on "target.h".
4060
4061 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4062
4063 * inferiors.c (switch_to_thread): New function.
4064
4065 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4066
4067 * Makefile.in (SFILE): Add "common/job-control.c".
4068 (OBS): Add "job-control.o".
4069
4070 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4071
4072 * Makefile: Remove "@host_makefile_frag@".
4073
4074 2017-05-05 Pedro Alves <palves@redhat.com>
4075
4076 * configure: Regenerate.
4077
4078 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4079
4080 * configure: Regenerate.
4081
4082 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4083
4084 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4085 software_single_step change of return type to
4086 std::vector<CORE_ADDR>.
4087 * linux-low.c (install_software_single_step_breakpoints):
4088 Likewise.
4089 * linux-low.h (install_software_single_step_breakpoints):
4090 Likewise.
4091
4092 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4093
4094 * remote-utils.c: Include "gdb_termios.h" instead of
4095 "terminal.h".
4096 * terminal.h: Delete file.
4097
4098 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4099
4100 * server.c: Include <vector>.
4101 <program_argv, wrapper_argv>: Convert to std::vector.
4102 (start_inferior): Rewrite function to use C++.
4103 (handle_v_run): Likewise. Update code that calculates the argv
4104 based on the vRun packet; use C++.
4105 (captured_main): Likewise.
4106
4107 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4108
4109 * server.c (handle_v_cont): Initialize thread_resume::thread
4110 with null_ptid.
4111
4112 2017-04-05 Pedro Alves <palves@redhat.com>
4113
4114 * configure: Regenerate.
4115
4116 2017-04-05 Pedro Alves <palves@redhat.com>
4117
4118 * gdbreplay.c (sync_error): Constify.
4119 * linux-x86-low.c (push_opcode): Constify.
4120
4121 2017-04-05 Pedro Alves <palves@redhat.com>
4122
4123 * win32-low.c (get_child_debug_event)
4124 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4125 Report TARGET_WAITKIND_SPURIOUS instead.
4126
4127 2017-04-05 Pedro Alves <palves@redhat.com>
4128
4129 * remote-utils.c (remote_prepare, remote_open): Constify.
4130 * remote-utils.h (remote_prepare, remote_open): Constify.
4131 * server.c (captured_main): Constify 'port' handling.
4132
4133 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4134
4135 * Makefile.in (clean): Clear .deps.
4136
4137 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4138
4139 * .gitignore: Remove generated files, replace with wildcard.
4140 * (clean): Replace removal of generated files with wildcard.
4141 (version.c): Replace with...
4142 (version-generated.c): ...this.
4143 (xml-builtin.c): Replace with...
4144 (xml-builtin-generated.c): ...this.
4145 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4146 (%.c: *regformats*): Replace with...
4147 (%-generated.c: *regformats*): ...this.
4148
4149 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4150
4151 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4152 (xtensa_fill_gregset): Call collect_register_by_name for
4153 threadptr register.
4154 (xtensa_store_gregset): Call supply_register_by_name for
4155 threadptr register.
4156
4157 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4158
4159 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4160 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4161 (xtensa_store_gregset): Call supply_register for all registers in
4162 a0_regnum..a0_regnum + C0_NREGS range.
4163
4164 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4165
4166 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4167 (ax-ipa.o: ax.c): Remove.
4168 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4169 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4170 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4171 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4172 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4173
4174 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4175
4176 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4177 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4178 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4179 (errors-ipa.o: ../common/errors.c): Remove.
4180 (format-ipa.o: ../common/format.c): Remove.
4181 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4182
4183 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4184
4185 * Makefile.in (%-ipa.o: %.c): New rule.
4186 (tracepoint-ipa.o: tracepoint.c): Remove.
4187 (utils-ipa.o: utils.c): Remove.
4188 (remote-utils-ipa.o: remote-utils.c): Remove.
4189 (regcache-ipa.o: regcache.c): Remove.
4190 (i386-linux-ipa.o: i386-linux.c): Remove.
4191 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4192 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4193 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4194 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4195 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4196 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4197 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4198 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4199 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4200 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4201 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4202 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4203 (aarch64-ipa.o: aarch64.c): Remove.
4204 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4205 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4206 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4207 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4208 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4209 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4210 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4211 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4212 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4213 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4214 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4215 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4216 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4217 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4218 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4219 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4220 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4221 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4222 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4223 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4224 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4225 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4226 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4227 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4228 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4229 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4230 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4231 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4232 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4233 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4234 (tdesc-ipa.o: tdesc.c): Remove.
4235 (x32-linux-ipa.o: x32-linux.c): Remove.
4236 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4237 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4238
4239 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4240
4241 * Makefile.in (%.o: ../arch/%.c): New rule.
4242 (arm.o: ../arch/arm.c): Remove.
4243 (arm-linux.o: ../arch/arm-linux.c): Remove.
4244 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4245 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4246
4247 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4248
4249 * Makefile.in (%.o: ../nat/%.c): New rule.
4250 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4251 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4252 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4253 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4254 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4255 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4256 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4257 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4258 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4259 (linux-personality.o: ../nat/linux-personality.c): Remove.
4260 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4261 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4262 (x86-linux.o: ../nat/x86-linux.c): Remove.
4263 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4264 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4265
4266 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4267
4268 * Makefile.in (%.o: ../common/%.c): New rule.
4269 (signals.o: ../common/signals.c): Remove.
4270 (print-utils.o: ../common/print-utils.c): Remove.
4271 (rsp-low.o: ../common/rsp-low.c): Remove.
4272 (common-utils.o: ../common/common-utils.c): Remove.
4273 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4274 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4275 (vec.o: ../common/vec.c): Remove.
4276 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4277 (xml-utils.o: ../common/xml-utils.c): Remove.
4278 (ptid.o: ../common/ptid.c): Remove.
4279 (buffer.o: ../common/buffer.c): Remove.
4280 (format.o: ../common/format.c): Remove.
4281 (filestuff.o: ../common/filestuff.c): Remove.
4282 (agent.o: ../common/agent.c): Remove.
4283 (errors.o: ../common/errors.c): Remove.
4284 (environ.o: ../common/environ.c): Remove.
4285 (common-debug.o: ../common/common-debug.c): Remove.
4286 (cleanups.o: ../common/cleanups.c): Remove.
4287 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4288 (fileio.o: ../common/fileio.c): Remove.
4289 (common-regcache.o: ../common/common-regcache.c): Remove.
4290 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4291 (new-op.o: ../common/new-op.c): Remove.
4292 (btrace-common.o: ../common/btrace-common.c): Remove.
4293
4294 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4295
4296 * Makefile.in (%.o: ../target/%.c): New rule.
4297 (waitstatus.o: ../target/waitstatus.c): Remove.
4298
4299 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4300
4301 * Makefile.in
4302 (%.c: ../regformats/%.dat,
4303 (%.c: ../regformats/arm/%.dat,
4304 (%.c: ../regformats/i386/%.dat,
4305 (%.c: ../regformats/rs6000/%.dat): New rules.
4306 (aarch64.c): Remove.
4307 (reg-arm.c): Remove.
4308 (arm-with-iwmmxt.c): Remove.
4309 (arm-with-vfpv2.c): Remove.
4310 (arm-with-vfpv3.c): Remove.
4311 (arm-with-neon.c): Remove.
4312 (reg-bfin.c): Remove.
4313 (reg-cris.c): Remove.
4314 (reg-crisv32.c): Remove.
4315 (i386.c): Remove.
4316 (i386-linux.c): Remove.
4317 (i386-avx.c): Remove.
4318 (i386-avx-linux.c): Remove.
4319 (i386-avx-avx512.c): Remove.
4320 (i386-avx-avx512-linux.c): Remove.
4321 (i386-mpx.c): Remove.
4322 (i386-mpx-linux.c): Remove.
4323 (i386-avx-mpx-avx512-pku.c): Remove.
4324 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4325 (i386-avx-mpx.c): Remove.
4326 (i386-avx-mpx-linux.c): Remove.
4327 (i386-mmx.c): Remove.
4328 (i386-mmx-linux.c): Remove.
4329 (reg-ia64.c): Remove.
4330 (reg-m32r.c): Remove.
4331 (reg-m68k.c): Remove.
4332 (reg-cf.c): Remove.
4333 (mips-linux.c): Remove.
4334 (mips-dsp-linux.c): Remove.
4335 (mips64-linux.c): Remove.
4336 (mips64-dsp-linux.c): Remove.
4337 (nios2-linux.c): Remove.
4338 (powerpc-32.c): Remove.
4339 (powerpc-32l.c): Remove.
4340 (powerpc-altivec32l.c): Remove.
4341 (powerpc-cell32l.c): Remove.
4342 (powerpc-vsx32l.c): Remove.
4343 (powerpc-isa205-32l.c): Remove.
4344 (powerpc-isa205-altivec32l.c): Remove.
4345 (powerpc-isa205-vsx32l.c): Remove.
4346 (powerpc-e500l.c): Remove.
4347 (powerpc-64l.c): Remove.
4348 (powerpc-altivec64l.c): Remove.
4349 (powerpc-cell64l.c): Remove.
4350 (powerpc-vsx64l.c): Remove.
4351 (powerpc-isa205-64l.c): Remove.
4352 (powerpc-isa205-altivec64l.c): Remove.
4353 (powerpc-isa205-vsx64l.c): Remove.
4354 (s390-linux32.c): Remove.
4355 (s390-linux32v1.c): Remove.
4356 (s390-linux32v2.c): Remove.
4357 (s390-linux64.c): Remove.
4358 (s390-linux64v1.c): Remove.
4359 (s390-linux64v2.c): Remove.
4360 (s390-te-linux64.c): Remove.
4361 (s390-vx-linux64.c): Remove.
4362 (s390-tevx-linux64.c): Remove.
4363 (s390x-linux64.c): Remove.
4364 (s390x-linux64v1.c): Remove.
4365 (s390x-linux64v2.c): Remove.
4366 (s390x-te-linux64.c): Remove.
4367 (s390x-vx-linux64.c): Remove.
4368 (s390x-tevx-linux64.c): Remove.
4369 (tic6x-c64xp-linux.c): Remove.
4370 (tic6x-c64x-linux.c): Remove.
4371 (tic6x-c62x-linux.c): Remove.
4372 (reg-sh.c): Remove.
4373 (reg-sparc64.c): Remove.
4374 (reg-spu.c): Remove.
4375 (amd64.c): Remove.
4376 (amd64-linux.c): Remove.
4377 (amd64-avx.c): Remove.
4378 (amd64-avx-linux.c): Remove.
4379 (amd64-avx-avx512.c): Remove.
4380 (amd64-avx-avx512-linux.c): Remove.
4381 (amd64-mpx.c): Remove.
4382 (amd64-mpx-linux.c): Remove.
4383 (amd64-avx-mpx-avx512-pku.c): Remove.
4384 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4385 (amd64-avx-mpx.c): Remove.
4386 (amd64-avx-mpx-linux.c): Remove.
4387 (x32.c): Remove.
4388 (x32-linux.c): Remove.
4389 (x32-avx.c): Remove.
4390 (x32-avx-linux.c): Remove.
4391 (x32-avx-avx512.c): Remove.
4392 (x32-avx-avx512-linux.c): Remove.
4393 (reg-xtensa.c): Remove.
4394 (reg-tilegx.c): Remove.
4395 (reg-tilegx32.c): Remove.
4396
4397 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4398
4399 * Makefile.in (SFILES): Add "common/environ.c".
4400 (OBJS): Add "common/environ.h".
4401
4402 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4403
4404 * configure.ac: Check if the fs_base and gs_base members of
4405 `struct user_regs_struct' exist.
4406 * config.in: Regenerated.
4407 * configure: Likewise.
4408
4409 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4410
4411 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4412 target_read_memory.
4413 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4414 (get_next_pcs_syscall_next_pc): Likewise.
4415
4416 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4417
4418 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4419 * nto-x86-low.c: Likewise.
4420
4421 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4422
4423 * Makefile.in: Include disable-implicit-rules.mk.
4424
4425 2016-11-23 Pedro Alves <palves@redhat.com>
4426
4427 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4428 (debug_vprintf): Use std::chrono::steady_clock instead of
4429 gettimeofday. Use '.' instead of ':'.
4430 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4431 (get_timestamp): Use std::chrono::steady_clock instead of
4432 gettimeofday.
4433
4434 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4435
4436 * Makefile.in: Fix whitespace formatting.
4437
4438 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4439
4440 * Makefile.in (SFILES, OBS): Flatten list and order
4441 alphabetically.
4442
4443 2016-11-23 Pedro Alves <palves@redhat.com>
4444
4445 * event-loop.c (handle_file_event): Use warning.
4446 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4447 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4448 Use warning.
4449
4450 2016-11-23 Pedro Alves <palves@redhat.com>
4451
4452 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4453 output.
4454 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4455 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4456 debug_printf and debug_flush for debug output.
4457 * server.c (handle_general_set): Likewise.
4458 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4459 output.
4460
4461 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4462
4463 * Makefile.in (.c.o): Replace rule with ...
4464 (%.o: %.c): ... this one.
4465
4466 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4467
4468 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4469 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4470 make.
4471 * configure.ac: Remove checks for the make program.
4472 * configure: Re-generate.
4473
4474 2016-10-28 Pedro Alves <palves@redhat.com>
4475
4476 * Makefile.in (CXX_DIALECT): Get from configure.
4477 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4478 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4479 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4480 * config.in: Regenerate.
4481 * configure: Regenerate.
4482
4483 2016-10-27 Yao Qi <yao.qi@linaro.org>
4484
4485 * linux-low.c (linux_supports_range_stepping): Return true if
4486 can_software_single_step return true.
4487
4488 2016-10-27 Yao Qi <yao.qi@linaro.org>
4489
4490 * inferiors.c (find_inferior_in_random): New function.
4491 * inferiors.h (find_inferior_in_random): Declare.
4492 * linux-low.c (linux_wait_for_event_filtered): Call
4493 find_inferior_in_random instead of find_inferior.
4494
4495 2016-10-27 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-low.c (linux_wait_1): If single-step breakpoints are
4498 inserted, remove them.
4499
4500 2016-10-26 Pedro Alves <palves@redhat.com>
4501
4502 * linux-low.c (handle_extended_wait): Link parent/child fork
4503 threads.
4504 (linux_wait_1): Unlink them.
4505 (linux_set_resume_request): Ignore resume requests for
4506 already-resumed and unhandled fork child threads.
4507 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4508 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4509 New functions.
4510 (handle_v_requests) <vCont>: Don't call require_running.
4511 * server.h (in_queued_stop_replies): New declaration.
4512
4513 2016-10-24 Yao Qi <yao.qi@linaro.org>
4514
4515 PR server/20733
4516 * linux-aarch64-low.c (append_insns): Cast the return value to
4517 'uint32_t *'.
4518
4519 2016-10-10 Yao Qi <yao.qi@linaro.org>
4520
4521 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4522
4523 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4524
4525 * target.c (target_supports_multi_process): New function, moved
4526 from...
4527 * target.h (target_supports_multi_process): ... here. Remove
4528 macro.
4529
4530 2016-10-05 Tom Tromey <tom@tromey.com>
4531
4532 PR remote/20655:
4533 * tracepoint.c (handle_tracepoint_bkpts): Check
4534 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4535
4536 2016-10-05 Yao Qi <yao.qi@linaro.org>
4537
4538 * configure.srv: Update the path of arm-*.xml files.
4539
4540 2016-10-05 Terry Guo <terry.guo@arm.com>
4541 Yao Qi <yao.qi@linaro.org>
4542
4543 * Makefile.in: Adjust the path of rules.
4544 * configure.srv: Update the path of xml files.
4545 * regformats/arm-with-iwmmxt.dat: Regenerated.
4546 * regformats/arm-with-neon.dat: Likewise.
4547 * regformats/arm-with-vfpv2.dat: Likewise.
4548 * regformats/arm-with-vfpv3.dat Likewise.
4549
4550 2016-09-30 Yao Qi <yao.qi@linaro.org>
4551
4552 PR gdbserver/20627
4553 * target.c (target_stop_and_wait): Don't call
4554 target_continue_no_signal, use resume_stop instead.
4555
4556 2016-09-26 Yao Qi <yao.qi@linaro.org>
4557
4558 * linux-low.c (linux_wait_1): Call debug_exit.
4559
4560 2016-09-23 Pedro Alves <palves@redhat.com>
4561
4562 * Makefile.in (SFILES): Add common/new-op.c.
4563 (OBS): Add common/new-op.o.
4564 (new-op.o): New rule.
4565
4566 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4567
4568 * .gitinore: Ignore more files.
4569
4570 2016-09-21 Yao Qi <yao.qi@linaro.org>
4571
4572 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4573 23.
4574
4575 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4576
4577 * server.c (start_inferior): Call target_mourn_inferior instead of
4578 mourn_inferior; pass ptid_t argument to it.
4579 (resume): Likewise.
4580 (handle_target_event): Likewise.
4581 * target.c (target_mourn_inferior): New function.
4582 * target.h (mourn_inferior): Delete macro.
4583
4584 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4585
4586 * linux-low.c (lwp_is_stepping): New function.
4587
4588 2016-09-06 Carl Love <cel@us.ibm.com>
4589
4590 * server.c (start_inferior): Fixed comment, requested comment change
4591 didn't get updated correctly. Removed reference to ptrace () call as
4592 it is only true on Linux systems.
4593
4594 2016-09-06 Carl Love <cel@us.ibm.com>
4595
4596 * server.c (start_inferior): Do not call
4597 function target_post_create_inferior () if the
4598 inferior process has already exited.
4599
4600 2016-09-05 Pedro Alves <palves@redhat.com>
4601
4602 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4603 (COMPILE.pre, CC_LD): Use CXX directly.
4604 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4605 * acinclude.m4: Don't include build-with-cxx.m4.
4606 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4607 * configure: Regenerate.
4608
4609 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4610
4611 PR gdb/19495
4612 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4613 call writing data to own_buf.
4614
4615 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4616
4617 * target.c (mywait): Call target_wait instead of
4618 the_target->wait.
4619 (target_wait): New function.
4620
4621 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4622
4623 * server.c (start_inferior): New variable 'ptid'. Replace calls
4624 to the_target->resume by target_continue{,_no_signal}, depending
4625 on the case.
4626 * target.c (target_stop_and_wait): Call target_continue_no_signal
4627 instead of the_target->resume.
4628 (target_continue): New function.
4629
4630 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4631
4632 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4633
4634 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4635
4636 PR server/20491
4637 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4638 ps_prochandle.
4639 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4640 * linux-arm-low.c (ps_get_thread_area): Likewise.
4641 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4642 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4643 * linux-mips-low.c (ps_get_thread_area): Likewise.
4644 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4645 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4646 * linux-x86-low.c (ps_get_thread_area): Likewise.
4647 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4648
4649 2016-08-19 Pedro Alves <palves@redhat.com>
4650
4651 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4652
4653 2016-08-19 Pedro Alves <palves@redhat.com>
4654
4655 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4656 comment. Use memcpy instead of casting through unsigned long.
4657
4658 2016-08-19 Pedro Alves <palves@redhat.com>
4659
4660 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4661 allocating around 0x80000000.
4662
4663 2016-08-19 Pedro Alves <palves@redhat.com>
4664
4665 PR gdb/20415
4666 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4667 (x32-avx512-linux-ipa.o): New rules.
4668 * configure.ac (x86_64-*-linux*): New x32 check.
4669 * configure.srv (ipa_x32_linux_regobj): New.
4670 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4671 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4672 descriptions.
4673 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4674 descriptions.
4675 * configure: Regenerate.
4676
4677 2016-08-09 Pedro Alves <palves@redhat.com>
4678
4679 PR gdb/18653
4680 * Makefile.in (OBS): Add signals-state-save-restore.o.
4681 (signals-state-save-restore.o): New rule.
4682 * config.in: Regenerate.
4683 * configure: Regenerate.
4684 * linux-low.c: Include "signals-state-save-restore.h".
4685 (linux_create_inferior): Call
4686 restore_original_signals_state.
4687 * server.c: Include "dispositions-save-restore.h".
4688 (captured_main): Call save_original_signals_state.
4689
4690 2016-08-05 Pedro Alves <palves@redhat.com>
4691
4692 * configure: Regenerate.
4693
4694 2016-08-04 Yao Qi <yao.qi@linaro.org>
4695
4696 * linux-low.c (regsets_fetch_inferior_registers): Check
4697 errno is ESRCH or not.
4698
4699 2016-08-02 Yao Qi <yao.qi@linaro.org>
4700
4701 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4702 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4703 (thread_db_load_search): Update.
4704 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4705 td_ta_set_event and td_ta_event_getmsg.
4706
4707 2016-07-26 Pedro Alves <palves@redhat.com>
4708
4709 PR server/20414
4710 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4711 of unsigned long for 64-bit registers and use uint32_t instead of
4712 unsigned int for 32-bit registers.
4713
4714 2016-07-26 Pedro Alves <palves@redhat.com>
4715
4716 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4717 to 'ptrace'.
4718
4719 2016-07-21 Tom Tromey <tom@tromey.com>
4720
4721 * configure: Rebuild.
4722
4723 2016-07-21 Yao Qi <yao.qi@linaro.org>
4724
4725 * mem-break.c (find_gdb_breakpoint): Cast bp to
4726 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4727
4728 2016-07-21 Yao Qi <yao.qi@linaro.org>
4729
4730 * server.c (handle_v_requests): Support s and S actions
4731 if target_supports_software_single_step return true.
4732
4733 2016-07-21 Yao Qi <yao.qi@linaro.org>
4734
4735 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4736 is resume_step, call maybe_hw_step.
4737 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4738 and unstop them.
4739 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4740 breakpoints or not.
4741 (proceed_one_lwp): If resume request is resume_step, install
4742 reinsert breakpoints and call maybe_hw_step.
4743
4744 2016-07-21 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-low.c (proceed_one_lwp): Declare.
4747 (linux_resume_one_thread): Remove local variable 'step'.
4748 Lift code enqueue signal. Call proceed_one_lwp instead of
4749 linux_resume_one_lwp.
4750
4751 2016-07-21 Yao Qi <yao.qi@linaro.org>
4752
4753 * linux-low.c (linux_resume_one_thread): Call
4754 enqueue_pending_signal.
4755
4756 2016-07-21 Yao Qi <yao.qi@linaro.org>
4757
4758 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4759 * inferiors.c (do_restore_current_thread_cleanup): New function.
4760 (make_cleanup_restore_current_thread): Likewise.
4761 * linux-low.c (install_software_single_step_breakpoints): Call
4762 make_cleanup_restore_current_thread. Switch current_thread to
4763 thread.
4764
4765 2016-07-21 Yao Qi <yao.qi@linaro.org>
4766
4767 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4768 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4769 (clone_one_breakpoint): Likewise.
4770 (delete_reinsert_breakpoints): Change parameter to thread.
4771 Callers updated.
4772 (has_reinsert_breakpoints): Likewise.
4773 (uninsert_reinsert_breakpoints): Likewise.
4774 (reinsert_reinsert_breakpoints): Likewise.
4775 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4776 (delete_reinsert_breakpoints): Likewise.
4777 (reinsert_reinsert_breakpoints): Likewise.
4778 (uninsert_reinsert_breakpoints): Likewise.
4779 (has_reinsert_breakpoints): Likewise.
4780
4781 2016-07-21 Yao Qi <yao.qi@linaro.org>
4782
4783 * inferiors.c (get_thread_process): Make parameter const.
4784 * inferiors.h (get_thread_process): Update declaration.
4785 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4786 Add new parameters child_thread and parent_thread. Callers
4787 updated.
4788 * mem-break.h (clone_all_breakpoints): Update declaration.
4789
4790 2016-07-21 Yao Qi <yao.qi@linaro.org>
4791
4792 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4793 <command_list, handler>: Remove.
4794 (struct gdb_breakpoint): New.
4795 (struct other_breakpoint): New.
4796 (struct reinsert_breakpoint): New.
4797 (is_gdb_breakpoint): New function.
4798 (any_persistent_commands): Update command_list if
4799 is_gdb_breakpoint returns true.
4800 (set_breakpoint): Create breakpoints according to their types.
4801 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4802 (set_gdb_breakpoint_1): Likewise.
4803 (set_gdb_breakpoint): Likewise.
4804 (clear_breakpoint_conditions): Change parameter type to
4805 'struct gdb_breakpoint *'.
4806 (clear_breakpoint_commands): Likewise.
4807 (clear_breakpoint_conditions_and_commands): Likewise.
4808 (add_condition_to_breakpoint): Likewise.
4809 (add_breakpoint_condition): Likewise.
4810 (add_commands_to_breakpoint): Likewise.
4811 (check_breakpoints): Check other_breakpoint.
4812 (clone_one_breakpoint): Clone breakpopint according to its type.
4813 * mem-break.h (struct gdb_breakpoint): Declare.
4814 (set_gdb_breakpoint): Update declaration.
4815 (clear_breakpoint_conditions_and_commands): Likewise.
4816 (add_breakpoint_condition): Likewise.
4817 (add_breakpoint_commands): Likewise.
4818 * server.c (process_point_options): Change parameter type to
4819 'struct gdb_breakpoint *'.
4820
4821 2016-07-21 Yao Qi <yao.qi@linaro.org>
4822
4823 * mem-break.c (set_breakpoint_at): Rename it to ...
4824 (set_breakpoint_type_at): ... it.
4825 (set_breakpoint_at): Call set_breakpoint_type_at.
4826 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4827 * mem-break.h (set_breakpoint_at): Update comments.
4828
4829 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4830
4831 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4832 to buf parameter.
4833 (nios2_store_gregset): Likewise.
4834
4835 2016-07-01 Pedro Alves <palves@redhat.com>
4836 Antoine Tremblay <antoine.tremblay@ericsson.com>
4837
4838 * linux-low.c: Change interface to take the target lwp_info
4839 pointer directly and return void. Handle detaching from a zombie
4840 thread.
4841 (linux_detach_lwp_callback): New function.
4842 (linux_detach): Detach from the leader thread after detaching from
4843 the clone threads.
4844
4845 2016-06-28 Yao Qi <yao.qi@linaro.org>
4846
4847 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4848 for variable new_offset.
4849 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4850 (aarch64_ftrace_insn_reloc_cb): Likewise.
4851 (aarch64_ftrace_insn_reloc_tb): Likewise.
4852 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4853 PRIx64 instead of PRIx32.
4854
4855 2016-06-28 Yao Qi <yao.qi@linaro.org>
4856
4857 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4858 (the_low_target): Install arm_get_syscall_trapinfo.
4859
4860 2016-06-28 Yao Qi <yao.qi@linaro.org>
4861
4862 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4863 function.
4864 (the_low_target): Install aarch64_get_syscall_trapinfo.
4865
4866 2016-06-28 Yao Qi <yao.qi@linaro.org>
4867
4868 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4869 Callers updated.
4870 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4871 Remove parameter sysno.
4872 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4873 sysret.
4874
4875 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4876
4877 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4878 (s390_emit_ne_goto): Likewise.
4879 (s390_emit_lt_goto): Likewise.
4880 (s390_emit_le_goto): Likewise.
4881 (s390_emit_gt_goto): Likewise.
4882 (s390_emit_ge_goto): Likewise.
4883 (s390x_emit_eq_goto): Likewise.
4884 (s390x_emit_ne_goto): Likewise.
4885 (s390x_emit_lt_goto): Likewise.
4886 (s390x_emit_le_goto): Likewise.
4887 (s390x_emit_gt_goto): Likewise.
4888 (s390x_emit_ge_goto): Likewise.
4889 (s390_emit_ops_impl): Mark variable static.
4890 (s390x_emit_ops): Likewise.
4891
4892 2016-06-17 Yao Qi <yao.qi@linaro.org>
4893
4894 * linux-low.c (handle_extended_wait): Call
4895 uninsert_reinsert_breakpoints for the parent process. Remove
4896 reinsert breakpoints from the child process. Reinsert them to
4897 the parent process when vfork is done.
4898 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4899 (reinsert_reinsert_breakpoints): New function.
4900 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4901 (reinsert_reinsert_breakpoints): Declare.
4902
4903 2016-06-17 Yao Qi <yao.qi@linaro.org>
4904
4905 * linux-low.c (handle_extended_wait): If the parent is doing
4906 step-over, remove the reinsert breakpoints from the forked child.
4907
4908 2016-06-17 Yao Qi <yao.qi@linaro.org>
4909
4910 * linux-low.c (unsuspend_all_lwps): Declare.
4911 (linux_low_filter_event): If thread exited, call finish_step_over.
4912 If step-over is finished, unsuspend other threads.
4913
4914 2016-06-17 Yao Qi <yao.qi@linaro.org>
4915
4916 * linux-low.c (linux_resume_one_lwp_throw): Assert
4917 has_reinsert_breakpoints returns false.
4918 * mem-break.c (delete_disabled_breakpoints): Assert
4919 bp type isn't reinsert_breakpoint.
4920
4921 2016-06-17 Yao Qi <yao.qi@linaro.org>
4922
4923 * linux-low.c (maybe_hw_step): New function.
4924 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4925 (finish_step_over): Switch current_thread to lwp temporarily,
4926 and assert has_reinsert_breakpoints returns true.
4927 (proceed_one_lwp): Call maybe_hw_step.
4928 * mem-break.c (has_reinsert_breakpoints): New function.
4929 * mem-break.h (has_reinsert_breakpoints): Declare.
4930
4931 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4932
4933 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4934
4935 2016-05-17 Yao Qi <yao.qi@linaro.org>
4936
4937 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4938 instead of find_inferior.
4939
4940 2016-05-05 Yao Qi <yao.qi@linaro.org>
4941
4942 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4943 Initialize res to zero.
4944
4945 2016-05-05 Yao Qi <yao.qi@linaro.org>
4946
4947 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4948 to uint32_t.
4949
4950 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4951
4952 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4953 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4954 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4955
4956 2016-04-28 Par Olsson <par.olsson@windriver.com>
4957 Simon Marchi <simon.marchi@ericsson.com>
4958
4959 * tracepoint.c (write_inferior_int8): New function.
4960 (cmd_qtenable_disable): Write enable flag using
4961 write_inferior_int8.
4962
4963 2016-04-25 Yao Qi <yao.qi@linaro.org>
4964
4965 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4966 (need_step_over_p): Return zero if the LWP has pending signals
4967 can be delivered on software single step target.
4968
4969 2016-04-25 Yao Qi <yao.qi@linaro.org>
4970
4971 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4972 return instead of error.
4973
4974 2016-04-22 Yao Qi <yao.qi@linaro.org>
4975
4976 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4977 to 23.
4978
4979 2016-04-22 Yao Qi <yao.qi@linaro.org>
4980
4981 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4982 signal when stepping over breakpoint with software single
4983 step.
4984
4985 2016-04-21 Pedro Alves <palves@redhat.com>
4986
4987 * linux-s390-low.c (s390_collect_ptrace_register)
4988 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4989 add casts.
4990 (s390_check_regset): Use void * instead of gdb_byte *.
4991
4992 2016-04-20 Pedro Alves <palves@redhat.com>
4993
4994 * configure: Renegerate.
4995
4996 2016-04-20 Yao Qi <yao.qi@linaro.org>
4997
4998 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4999 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5000 number 16.
5001 (arm_store_gregset): Likewise.
5002
5003 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5004
5005 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5006 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5007 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5008 (amd64-avx-mpx-linux.c): New rules.
5009 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5010 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5011 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5012 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5013 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5014 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5015 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5016 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5017 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5018 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5019 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5020 * linux-x86-low.c (x86_linux_read_description): Add case for
5021 X86_XSTATE_AVX_MPX_MASK.
5022 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5023 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5024 init_registers_i386_avx_mpx_linux.
5025 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5026 (initialize_low_tracepoint): Call
5027 init_registers_i386_avx_mpx_linux.
5028 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5029 (initialize_low_tracepoint): Call
5030 init_registers_amd64_avx_mpx_linux.
5031 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5032 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5033 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5034 declarations.
5035
5036 2016-04-18 Pedro Alves <palves@redhat.com>
5037
5038 * configure: Regenerate.
5039
5040 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5041
5042 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5043 (aarch64_emit_sub): Likewise.
5044
5045 2016-04-12 Pedro Alves <palves@redhat.com>
5046
5047 * utils.c (prepare_to_throw_exception): Delete.
5048
5049 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5050
5051 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5052
5053 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5054
5055 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5056
5057 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5058
5059 * linux-aarch64-ipa.c: Add <elf.h> include.
5060 * linux-ppc-ipa.c: Add <elf.h> include.
5061 * linux-s390-ipa.c: Add <elf.h> include.
5062
5063 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5064
5065 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5066 (get_raw_reg_ptr): Likewise.
5067 (get_trace_state_variable_value_ptr): Likewise.
5068 (set_trace_state_variable_value_ptr): Likewise.
5069 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5070 char *.
5071
5072 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5073 Marcin Kościelnicki <koriakin@0x04.net>
5074
5075 PR/17221
5076 * linux-ppc-low.c (emit_insns): New function.
5077 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5078 (ppc_emit_prologue): New function.
5079 (ppc_emit_epilogue): New function.
5080 (ppc_emit_add): New function.
5081 (ppc_emit_sub): New function.
5082 (ppc_emit_mul): New function.
5083 (ppc_emit_lsh): New function.
5084 (ppc_emit_rsh_signed): New function.
5085 (ppc_emit_rsh_unsigned): New function.
5086 (ppc_emit_ext): New function.
5087 (ppc_emit_zero_ext): New function.
5088 (ppc_emit_log_not): New function.
5089 (ppc_emit_bit_and): New function.
5090 (ppc_emit_bit_or): New function.
5091 (ppc_emit_bit_xor): New function.
5092 (ppc_emit_bit_not): New function.
5093 (ppc_emit_equal): New function.
5094 (ppc_emit_less_signed): New function.
5095 (ppc_emit_less_unsigned): New function.
5096 (ppc_emit_ref): New function.
5097 (ppc_emit_const): New function.
5098 (ppc_emit_reg): New function.
5099 (ppc_emit_pop): New function.
5100 (ppc_emit_stack_flush): New function.
5101 (ppc_emit_swap): New function.
5102 (ppc_emit_stack_adjust): New function.
5103 (ppc_emit_call): New function.
5104 (ppc_emit_int_call_1): New function.
5105 (ppc_emit_void_call_2): New function.
5106 (ppc_emit_if_goto): New function.
5107 (ppc_emit_goto): New function.
5108 (ppc_emit_eq_goto): New function.
5109 (ppc_emit_ne_goto): New function.
5110 (ppc_emit_lt_goto): New function.
5111 (ppc_emit_le_goto): New function.
5112 (ppc_emit_gt_goto): New function.
5113 (ppc_emit_ge_goto): New function.
5114 (ppc_write_goto_address): New function.
5115 (ppc_emit_ops_impl): New static variable.
5116 (ppc64v1_emit_prologue): New function.
5117 (ppc64v2_emit_prologue): New function.
5118 (ppc64_emit_epilogue): New function.
5119 (ppc64_emit_add): New function.
5120 (ppc64_emit_sub): New function.
5121 (ppc64_emit_mul): New function.
5122 (ppc64_emit_lsh): New function.
5123 (ppc64_emit_rsh_signed): New function.
5124 (ppc64_emit_rsh_unsigned): New function.
5125 (ppc64_emit_ext): New function.
5126 (ppc64_emit_zero_ext): New function.
5127 (ppc64_emit_log_not): New function.
5128 (ppc64_emit_bit_and): New function.
5129 (ppc64_emit_bit_or): New function.
5130 (ppc64_emit_bit_xor): New function.
5131 (ppc64_emit_bit_not): New function.
5132 (ppc64_emit_equal): New function.
5133 (ppc64_emit_less_signed): New function.
5134 (ppc64_emit_less_unsigned): New function.
5135 (ppc64_emit_ref): New function.
5136 (ppc64_emit_const): New function.
5137 (ppc64v1_emit_reg): New function.
5138 (ppc64v2_emit_reg): New function.
5139 (ppc64_emit_pop): New function.
5140 (ppc64_emit_stack_flush): New function.
5141 (ppc64_emit_swap): New function.
5142 (ppc64v1_emit_call): New function.
5143 (ppc64v2_emit_call): New function.
5144 (ppc64v1_emit_int_call_1): New function.
5145 (ppc64v2_emit_int_call_1): New function.
5146 (ppc64v1_emit_void_call_2): New function.
5147 (ppc64v2_emit_void_call_2): New function.
5148 (ppc64_emit_if_goto): New function.
5149 (ppc64_emit_eq_goto): New function.
5150 (ppc64_emit_ne_goto): New function.
5151 (ppc64_emit_lt_goto): New function.
5152 (ppc64_emit_le_goto): New function.
5153 (ppc64_emit_gt_goto): New function.
5154 (ppc64_emit_ge_goto): New function.
5155 (ppc64v1_emit_ops_impl): New static variable.
5156 (ppc64v2_emit_ops_impl): New static variable.
5157 (ppc_emit_ops): New function.
5158 (linux_low_target): Wire in ppc_emit_ops.
5159
5160 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5161 Marcin Kościelnicki <koriakin@0x04.net>
5162
5163 PR/17221
5164 * Makefile.in: Add powerpc-*-ipa.o
5165 * configure.srv: Add ipa_obj for powerpc*-linux.
5166 * linux-ppc-ipa.c: New file.
5167 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5168 includes.
5169 (PPC_FIELD): New macro.
5170 (PPC_SEXT): New macro.
5171 (PPC_OP6): New macro.
5172 (PPC_BO): New macro.
5173 (PPC_LI): New macro.
5174 (PPC_BD): New macro.
5175 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5176 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5177 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5178 (ppc_get_thread_area): New function.
5179 (is_elfv2_inferior): New function.
5180 (gen_ds_form): New function.
5181 (GEN_STD): New macro.
5182 (GEN_STDU): New macro.
5183 (GEN_LD): New macro.
5184 (GEN_LDU): New macro.
5185 (gen_d_form): New function.
5186 (GEN_ADDI): New macro.
5187 (GEN_ADDIS): New macro.
5188 (GEN_LI): New macro.
5189 (GEN_LIS): New macro.
5190 (GEN_ORI): New macro.
5191 (GEN_ORIS): New macro.
5192 (GEN_LWZ): New macro.
5193 (GEN_STW): New macro.
5194 (GEN_STWU): New macro.
5195 (gen_xfx_form): New function.
5196 (GEN_MFSPR): New macro.
5197 (GEN_MTSPR): New macro.
5198 (GEN_MFCR): New macro.
5199 (GEN_MTCR): New macro.
5200 (GEN_SYNC): New macro.
5201 (GEN_LWSYNC): New macro.
5202 (gen_x_form): New function.
5203 (GEN_OR): New macro.
5204 (GEN_MR): New macro.
5205 (GEN_LWARX): New macro.
5206 (GEN_STWCX): New macro.
5207 (GEN_CMPW): New macro.
5208 (gen_md_form): New function.
5209 (GEN_RLDICL): New macro.
5210 (GEN_RLDICR): New macro.
5211 (gen_i_form): New function.
5212 (GEN_B): New macro.
5213 (GEN_BL): New macro.
5214 (gen_b_form): New function.
5215 (GEN_BNE): New macro.
5216 (GEN_LOAD): New macro.
5217 (GEN_STORE): New macro.
5218 (gen_limm): New function.
5219 (gen_atomic_xchg): New function.
5220 (gen_call): New function.
5221 (ppc_relocate_instruction): New function.
5222 (ppc_install_fast_tracepoint_jump_pad): New function.
5223 (ppc_get_min_fast_tracepoint_insn_len): New function.
5224 (ppc_get_ipa_tdesc_idx): New function.
5225 (the_low_target): Wire in the new functions.
5226 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5227 tdescs.
5228 * linux-ppc-tdesc.h: New file.
5229
5230 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5231
5232 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5233 (alloc_jump_pad_buffer): New function.
5234 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5235 (alloc_jump_pad_buffer): New function.
5236 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5237 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5238 (alloc_jump_pad_buffer): New function.
5239 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5240 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5241 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5242 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5243
5244 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5245
5246 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5247 * linux-amd64-ipa.c: Likewise.
5248 * linux-i386-ipa.c: Likewise.
5249 * linux-s390-ipa.c: Likewise.
5250 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5251 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5252 set_trace_state_variable_value_ptr.
5253 (struct ipa_sym_addresses): Likewise.
5254 (symbol_list): Likewise.
5255 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5256 accessing gdb_collect directly.
5257 (gdb_collect_ptr_type): New typedef.
5258 (get_raw_reg_ptr_type): New typedef.
5259 (get_trace_state_variable_value_ptr_type): New typedef.
5260 (set_trace_state_variable_value_ptr_type): New typedef.
5261 (gdb_collect_ptr): New global.
5262 (get_raw_reg_ptr): New global.
5263 (get_trace_state_variable_value_ptr): New global.
5264 (set_trace_state_variable_value_ptr): New global.
5265 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5266 accessing get_raw_reg directly.
5267 (get_get_tsv_func_addr): Likewise for
5268 get_trace_state_variable_value_ptr.
5269 (get_set_tsv_func_addr): Likewise for
5270 set_trace_state_variable_value_ptr.
5271 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5272
5273 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5274
5275 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5276
5277 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5278
5279 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5280 packets.
5281 (relocate_instruction): Remove own_buf.
5282 * server.c (own_buf): Make global.
5283 (handle_v_requests): Make global.
5284 * server.h (own_buf): New declaration.
5285 (handle_v_requests): New prototype.
5286
5287 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5288
5289 PR 18377
5290 * linux-s390-low.c (add_insns): New function.
5291 (s390_emit_prologue): New function.
5292 (s390_emit_epilogue): New function.
5293 (s390_emit_add): New function.
5294 (s390_emit_sub): New function.
5295 (s390_emit_mul): New function.
5296 (s390_emit_lsh): New function.
5297 (s390_emit_rsh_signed): New function.
5298 (s390_emit_rsh_unsigned): New function.
5299 (s390_emit_ext): New function.
5300 (s390_emit_log_not): New function.
5301 (s390_emit_bit_and): New function.
5302 (s390_emit_bit_or): New function.
5303 (s390_emit_bit_xor): New function.
5304 (s390_emit_bit_not): New function.
5305 (s390_emit_equal): New function.
5306 (s390_emit_less_signed): New function.
5307 (s390_emit_less_unsigned): New function.
5308 (s390_emit_ref): New function.
5309 (s390_emit_if_goto): New function.
5310 (s390_emit_goto): New function.
5311 (s390_write_goto_address): New function.
5312 (s390_emit_litpool): New function.
5313 (s390_emit_const): New function.
5314 (s390_emit_call): New function.
5315 (s390_emit_reg): New function.
5316 (s390_emit_pop): New function.
5317 (s390_emit_stack_flush): New function.
5318 (s390_emit_zero_ext): New function.
5319 (s390_emit_swap): New function.
5320 (s390_emit_stack_adjust): New function.
5321 (s390_emit_set_r2): New function.
5322 (s390_emit_int_call_1): New function.
5323 (s390_emit_void_call_2): New function.
5324 (s390_emit_eq_goto): New function.
5325 (s390_emit_ne_goto): New function.
5326 (s390_emit_lt_goto): New function.
5327 (s390_emit_le_goto): New function.
5328 (s390_emit_gt_goto): New function.
5329 (s390_emit_ge_goto): New function.
5330 (s390x_emit_prologue): New function.
5331 (s390x_emit_epilogue): New function.
5332 (s390x_emit_add): New function.
5333 (s390x_emit_sub): New function.
5334 (s390x_emit_mul): New function.
5335 (s390x_emit_lsh): New function.
5336 (s390x_emit_rsh_signed): New function.
5337 (s390x_emit_rsh_unsigned): New function.
5338 (s390x_emit_ext): New function.
5339 (s390x_emit_log_not): New function.
5340 (s390x_emit_bit_and): New function.
5341 (s390x_emit_bit_or): New function.
5342 (s390x_emit_bit_xor): New function.
5343 (s390x_emit_bit_not): New function.
5344 (s390x_emit_equal): New function.
5345 (s390x_emit_less_signed): New function.
5346 (s390x_emit_less_unsigned): New function.
5347 (s390x_emit_ref): New function.
5348 (s390x_emit_if_goto): New function.
5349 (s390x_emit_const): New function.
5350 (s390x_emit_call): New function.
5351 (s390x_emit_reg): New function.
5352 (s390x_emit_pop): New function.
5353 (s390x_emit_stack_flush): New function.
5354 (s390x_emit_zero_ext): New function.
5355 (s390x_emit_swap): New function.
5356 (s390x_emit_stack_adjust): New function.
5357 (s390x_emit_int_call_1): New function.
5358 (s390x_emit_void_call_2): New function.
5359 (s390x_emit_eq_goto): New function.
5360 (s390x_emit_ne_goto): New function.
5361 (s390x_emit_lt_goto): New function.
5362 (s390x_emit_le_goto): New function.
5363 (s390x_emit_gt_goto): New function.
5364 (s390x_emit_ge_goto): New function.
5365 (s390_emit_ops): New function.
5366 (struct linux_target_ops): Fill in emit_ops hook.
5367
5368 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5369
5370 PR 18377
5371 * Makefile.in: Add s390 IPA files.
5372 * configure.srv: Build IPA for s390.
5373 * linux-s390-ipa.c: New file.
5374 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5375 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5376 (tdesc_s390_linux32): Likewise.
5377 (init_registers_s390_linux32v1): Likewise.
5378 (tdesc_s390_linux32v1): Likewise.
5379 (init_registers_s390_linux32v2): Likewise.
5380 (tdesc_s390_linux32v2): Likewise.
5381 (init_registers_s390_linux64): Likewise.
5382 (tdesc_s390_linux64): Likewise.
5383 (init_registers_s390_linux64v1): Likewise.
5384 (tdesc_s390_linux64v1): Likewise.
5385 (init_registers_s390_linux64v2): Likewise.
5386 (tdesc_s390_linux64v2): Likewise.
5387 (init_registers_s390_te_linux64): Likewise.
5388 (tdesc_s390_te_linux64): Likewise.
5389 (init_registers_s390_vx_linux64): Likewise.
5390 (tdesc_s390_vx_linux64): Likewise.
5391 (init_registers_s390_tevx_linux64): Likewise.
5392 (tdesc_s390_tevx_linux64): Likewise.
5393 (init_registers_s390x_linux64): Likewise.
5394 (tdesc_s390x_linux64): Likewise.
5395 (init_registers_s390x_linux64v1): Likewise.
5396 (tdesc_s390x_linux64v1): Likewise.
5397 (init_registers_s390x_linux64v2): Likewise.
5398 (tdesc_s390x_linux64v2): Likewise.
5399 (init_registers_s390x_te_linux64): Likewise.
5400 (tdesc_s390x_te_linux64): Likewise.
5401 (init_registers_s390x_vx_linux64): Likewise.
5402 (tdesc_s390x_vx_linux64): Likewise.
5403 (init_registers_s390x_tevx_linux64): Likewise.
5404 (tdesc_s390x_tevx_linux64): Likewise.
5405 (have_hwcap_s390_vx): New static variable.
5406 (s390_arch_setup): Fill have_hwcap_s390_vx.
5407 (s390_get_thread_area): New function.
5408 (s390_ft_entry_gpr_esa): New const.
5409 (s390_ft_entry_gpr_zarch): New const.
5410 (s390_ft_entry_misc): New const.
5411 (s390_ft_entry_fr): New const.
5412 (s390_ft_entry_vr): New const.
5413 (s390_ft_main_31): New const.
5414 (s390_ft_main_64): New const.
5415 (s390_ft_exit_fr): New const.
5416 (s390_ft_exit_vr): New const.
5417 (s390_ft_exit_misc): New const.
5418 (s390_ft_exit_gpr_esa): New const.
5419 (s390_ft_exit_gpr_zarch): New const.
5420 (append_insns): New function.
5421 (s390_relocate_instruction): New function.
5422 (s390_install_fast_tracepoint_jump_pad): New function.
5423 (s390_get_min_fast_tracepoint_insn_len): New function.
5424 (s390_get_ipa_tdesc_idx): New function.
5425 (struct linux_target_ops): Wire in the above functions.
5426 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5427 * linux-s390-tdesc.h: New file.
5428
5429 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5430
5431 * linux-s390-low.c (s390_supports_tracepoints): New function.
5432 (struct linux_target_ops): Fill supports_tracepoints hook.
5433
5434 2016-03-18 Yao Qi <yao.qi@linaro.org>
5435
5436 * linux-low.c (lwp_signal_can_be_delivered): New function.
5437 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5438
5439 2016-03-18 Yao Qi <yao.qi@linaro.org>
5440
5441 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5442 0 if signal is enqueued. Remove 'signal' from one debugging
5443 message. Move one debugging message to some lines below.
5444 Remove code setting 'signal' to 0.
5445
5446 2016-03-18 Yao Qi <yao.qi@linaro.org>
5447
5448 * linux-low.c (linux_low_filter_event): Remove redundant
5449 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5450
5451 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5452
5453 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5454 (struct linux_target_ops): Wire in the above.
5455
5456 2016-03-03 Yao Qi <yao.qi@linaro.org>
5457
5458 * linux-low.c: Update comments to start_step_over.
5459
5460 2016-03-03 Yao Qi <yao.qi@linaro.org>
5461
5462 PR server/19736
5463 * linux-low.c (handle_extended_wait): Set child suspended
5464 if event_lwp->bp_reinsert isn't zero.
5465
5466 2016-03-02 Yao Qi <yao.qi@linaro.org>
5467
5468 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5469 enqueue_pending_signal.
5470
5471 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5472
5473 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5474 is actually loaded.
5475
5476 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5477
5478 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5479 (s390_regmap_3264) [!__s390x__]: New global.
5480 (s390_collect_ptrace_register): Skip map entries containing -1.
5481 (s390_supply_ptrace_register): Ditto.
5482 (s390_fill_gprs_high): New function.
5483 (s390_store_gprs_high): New function.
5484 (s390_regsets): Add NT_S390_HIGH_GPRS.
5485 (s390_get_hwcap): Enable on 31-bit.
5486 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5487 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5488 Detect NT_S390_HIGH_GPRS.
5489 (s390_usrregs_info_3264): Enable on 31-bit.
5490 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5491 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5492
5493 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5494
5495 PR gdb/13808
5496 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5497 * configure.srv: Ditto.
5498 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5499 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5500 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5501 (init_registers_amd64_linux): Remove prototype.
5502 (tdesc_amd64_linux): Remove declaration.
5503 (get_ipa_tdesc): New function.
5504 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5505 initialize remaining tdescs.
5506 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5507 (init_registers_i386_linux): Remove prototype.
5508 (tdesc_i386_linux): Remove declaration.
5509 (get_ipa_tdesc): New function.
5510 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5511 initialize remaining tdescs.
5512 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5513 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5514 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5515 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5516 (x86_get_ipa_tdesc_idx): New function.
5517 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5518 * linux-x86-tdesc.h: New file.
5519 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5520 (target_get_ipa_tdesc_idx): New macro.
5521 * tracepoint.c (ipa_tdesc_idx): New macro.
5522 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5523 (symbol_list): Add ipa_tdesc_idx.
5524 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5525 (ipa_tdesc): Remove.
5526 (ipa_tdesc_idx): New variable.
5527 (get_context_regcache): Use get_ipa_tdesc.
5528 (gdb_collect): Ditto.
5529 (gdb_probe): Ditto.
5530 * tracepoint.h (get_ipa_tdesc): New prototype.
5531 (ipa_tdesc): Remove.
5532
5533 2016-02-24 Pedro Alves <palves@redhat.com>
5534
5535 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5536 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5537 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5538 Factor out common code between the USE_SIGTRAP_SIGINFO and
5539 !USE_SIGTRAP_SIGINFO blocks.
5540 (linux_low_filter_event): Call save_stop_reason instead of
5541 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5542 Update comments.
5543 (linux_wait_1): Update comments.
5544
5545 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5546
5547 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5548 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5549 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5550 ppc_insert_point, ppc_remove_point.
5551
5552 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5553
5554 * linux-s390-low.c (s390_supports_z_point_type): New function.
5555 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5556
5557 2016-02-16 Yao Qi <yao.qi@linaro.org>
5558
5559 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5560 PC. Get pc from regcache_read_pc.
5561
5562 2016-02-12 Yao Qi <yao.qi@linaro.org>
5563
5564 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5565 or linux_get_pc_32bit.
5566 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5567
5568 2016-02-12 Yao Qi <yao.qi@linaro.org>
5569
5570 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5571 arm_linux_get_next_pcs_fixup.
5572
5573 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5574
5575 * tracepoint.c (x_tracepoint_action_download): Change
5576 write_inferior_data_ptr to write_inferior_data_pointer.
5577 (cmd_qtstart): Likewise.
5578 (write_inferior_data_ptr): Remove.
5579 (download_agent_expr): Change write_inferior_data_ptr to
5580 write_inferior_data_pointer.
5581 (download_tracepoint_1): Likewise.
5582 (download_tracepoint): Likewise.
5583 (download_trace_state_variables): Likewise.
5584
5585 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5586 Marcin Kościelnicki <koriakin@0x04.net>
5587
5588 * tracepoint.c (struct tracepoint_action_ops): Remove.
5589 (struct tracepoint_action): Remove ops.
5590 (m_tracepoint_action_download, r_tracepoint_action_download)
5591 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5592 size and offset accordingly.
5593 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5594 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5595 (tracepoint_action_send, tracepoint_action_download): New functions.
5596 Helpers for trace action handlers.
5597 (add_tracepoint_action): Remove setup actions ops.
5598 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5599
5600 2016-02-10 Yao Qi <yao.qi@linaro.org>
5601
5602 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5603
5604 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5605
5606 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5607 to AC_OUTPUT.
5608 * configure: Regenerate.
5609
5610 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5611
5612 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5613 void * to gdb_byte *.
5614 * linux-low.c (siginfo_fixup): Likewise.
5615 (linux_xfer_siginfo): Likewise.
5616 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5617 Likewise.
5618 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5619
5620 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5621
5622 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5623 to srv_tgtobj.
5624 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5625 to srv_tgtobj.
5626 * linux-x86-low.c [__x86_64__]: Include
5627 "nat/amd64-linux-siginfo.h".
5628 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5629 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5630 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5631 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5632 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5633 (cpt_si_fd, si_timerid, si_overrun): Move from
5634 nat/amd64-linux-siginfo.c.
5635 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5636
5637 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5638
5639 * server.c (skip_to_semicolon): Remove.
5640 (process_point_options): Use strchrnul instead of
5641 skip_to_semicolon.
5642
5643 2016-01-26 Yao Qi <yao.qi@linaro.org>
5644
5645 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5646 * linux-low.c (install_software_single_step_breakpoints): Don't
5647 call regcache_read_pc.
5648 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5649 argument pc.
5650
5651 2016-01-26 Yao Qi <yao.qi@linaro.org>
5652
5653 * linux-low.c (install_software_single_step_breakpoints): Call
5654 regcache_read_pc instead of get_pc.
5655
5656 2016-01-26 Yao Qi <yao.qi@linaro.org>
5657
5658 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5659 (unblock_async_io): Rename to ...
5660 (block_unblock_async_io): ... it. New function.
5661 (enable_async_io): Don't install SIGIO handler. Unblock it
5662 instead.
5663 (disable_async_io): Don't ignore SIGIO. Block it instead.
5664 (initialize_async_io): Install SIGIO handler. Don't call
5665 unblock_async_io.
5666
5667 2016-01-26 Yao Qi <yao.qi@linaro.org>
5668
5669 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5670 first character is '\003', call *the_target->request_interrupt.
5671
5672 2016-01-25 Yao Qi <yao.qi@linaro.org>
5673
5674 * remote-utils.c (new_thread_notify): Remove.
5675 (dead_thread_notify): Likewise.
5676 * remote-utils.h (new_thread_notify): Remove declaration.
5677 (dead_thread_notify): Likewise.
5678
5679 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5680
5681 * gdb.trace/pending.exp: Fix expected message on continue.
5682
5683 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5684
5685 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5686 it works properly on big-endian machines where sizeof (CORE_ADDR)
5687 != sizeof (void *).
5688
5689 2016-01-21 Pedro Alves <palves@redhat.com>
5690
5691 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5692 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5693 * configure: Regenerate.
5694
5695 2016-01-21 Yao Qi <yao.qi@linaro.org>
5696
5697 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5698 is_thumb and set it according to CPSR saved on the stack.
5699 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5700 arm_sigreturn_next_pc.
5701
5702 2016-01-18 Yao Qi <yao.qi@linaro.org>
5703
5704 * linux-low.c (linux_set_pc_64bit): New function.
5705 (linux_get_pc_64bit): New function.
5706 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5707 Declare.
5708 * linux-sparc-low.c (debug_threads): Remove declaration.
5709 (sparc_get_pc): Remove.
5710 (the_low_target): Use linux_get_pc_64bit instead of
5711 sparc_get_pc.
5712 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5713 (the_low_target): Use linux_get_pc_64bit and
5714 linux_set_pc_64bit.
5715
5716 2016-01-18 Yao Qi <yao.qi@linaro.org>
5717
5718 * linux-arm-low.c (debug_threads): Remove declaration.
5719 (arm_get_pc, arm_set_pc): Remove.
5720 (the_low_target): Use linux_get_pc_32bit and
5721 linux_set_pc_32bit.
5722 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5723 (the_low_target): Use linux_get_pc_32bit and
5724 linux_set_pc_32bit.
5725 * linux-cris-low.c (debug_threads): Remove declaration.
5726 (cris_get_pc, cris_set_pc,): Remove.
5727 (the_low_target): Use linux_get_pc_32bit and
5728 linux_set_pc_32bit.
5729 * linux-crisv32-low.c (debug_threads): Remove declaration.
5730 (cris_get_pc, cris_set_pc): Remove.
5731 (the_low_target): Use linux_get_pc_32bit and
5732 linux_set_pc_32bit.
5733 * linux-low.c: Include inttypes.h.
5734 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5735 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5736 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5737 (the_low_target): Use linux_get_pc_32bit and
5738 linux_set_pc_32bit.
5739 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5740 (the_low_target): Use linux_get_pc_32bit and
5741 linux_set_pc_32bit.
5742 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5743 (the_low_target): Use linux_get_pc_32bit and
5744 linux_set_pc_32bit.
5745 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5746 (the_low_target): Use linux_get_pc_32bit and
5747 linux_set_pc_32bit.
5748 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5749 (the_low_target): Use linux_get_pc_32bit and
5750 linux_set_pc_32bit.
5751
5752 2016-01-18 Gary Benson <gbenson@redhat.com>
5753
5754 * configure.ac (AC_FUNC_FORK): New check.
5755 * config.in: Regenerate.
5756 * configure: Likewise.
5757
5758 2016-01-14 Yao Qi <yao.qi@linaro.org>
5759
5760 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5761 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5762 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5763 arm_get_next_pcs_ctor.
5764
5765 2016-01-12 Josh Stone <jistone@redhat.com>
5766 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5767
5768 * inferiors.h: Include "gdb_vecs.h".
5769 (struct process_info): Add syscalls_to_catch.
5770 * inferiors.c (remove_process): Free syscalls_to_catch.
5771 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5772 syscall_return stops.
5773 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5774 * server.c (handle_general_set): Handle QCatchSyscalls.
5775 (handle_query): Report support for QCatchSyscalls.
5776 * target.h (struct target_ops): Add supports_catch_syscall.
5777 (target_supports_catch_syscall): New macro.
5778 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5779 (struct lwp_info): Add syscall_state.
5780 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5781 Maintain syscall_state and syscalls_to_catch across exec.
5782 (get_syscall_trapinfo): New function, proxy to the_low_target.
5783 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5784 (linux_low_filter_event): Toggle syscall_state entry/return for
5785 syscall traps, and set it ignored for all others.
5786 (gdb_catching_syscalls_p): New function.
5787 (gdb_catch_this_syscall_p): New function.
5788 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5789 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5790 (linux_supports_catch_syscall): New function.
5791 (linux_target_ops): Install it.
5792 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5793 (the_low_target): Install it.
5794
5795 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5796
5797 * acinclude.m4: Include new ../warning.m4 file.
5798 * configure: Regenerated.
5799 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5800
5801 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5802
5803 * ax.c (is_goto_target): Mark static.
5804 * linux-low.c (register_addr): Likewise.
5805 (linux_fetch_registers, linux_store_registers): Likewise.
5806 * mem-break.c (any_persistent_commands): Fix old prototype.
5807 (add_commands_to_breakpoint): Mark static.
5808 * regcache.c (find_register_by_name): Delete unused func.
5809 * remote-utils.c (hex_or_minus_one): Mark static.
5810 * server.c (monitor_show_help): Mark static.
5811 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5812 handle_v_requests): Likewise.
5813
5814 2016-01-12 Pedro Alves <palves@redhat.com>
5815
5816 Remove use of the registered trademark symbol throughout.
5817
5818 2016-01-08 Yao Qi <yao.qi@linaro.org>
5819
5820 * remote-utils.c (getpkt): If c is '\003', call target hook
5821 request_interrupt.
5822
5823 2016-01-06 Yao Qi <yao.qi@linaro.org>
5824
5825 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5826 linux-aarch32-low.c.
5827 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5828 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5829 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5830 (thumb2_breakpoint): Declare.
5831 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5832 linux-aarch32-low.h.
5833 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5834 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5835 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5836
5837 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5838
5839 * gdbreplay.c (gdbreplay_version): Change copyright year in
5840 version message.
5841 * server.c (gdbserver_version): Likewise.
5842
5843 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5844
5845 * server.c (crc32_table): Delete.
5846 (crc32): Use libiberty's xcrc32 function.
5847
5848 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5849
5850 * lynx-low.c (lynx_delete_thread_callback): New function.
5851 (lynx_mourn): Properly delete our process and all of its
5852 threads. Remove call to clear_inferiors.
5853
5854 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5855
5856 * target.c (thread_search_callback): Add check that
5857 the thread_stopped target callback is not NULL before
5858 calling it.
5859
5860 2015-12-21 Yao Qi <yao.qi@linaro.org>
5861
5862 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5863 arm breakpoint.
5864
5865 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5866
5867 * server.c (handle_query): Call target_supports_software_single_step.
5868
5869 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5870
5871 * linux-low.c (single_step): New function.
5872 (linux_resume_one_lwp_throw): Call single_step.
5873 (start_step_over): Likewise.
5874
5875 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5876
5877 * Makefile.in (SFILES): Append arch/arm-linux.c,
5878 arch/arm-get-next-pcs.c.
5879 (arm-linux.o): New rule.
5880 (arm-get-next-pcs.o): New rule.
5881 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5882 arm-linux.o.
5883 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5884 to linux-aarch32-low.c.
5885 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5886 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5887 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5888 (thumb2_breakpoint_len): Likewise.
5889 (arm_is_thumb_mode): Make non-static.
5890 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5891 from linux-aarch32-low.c.
5892 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5893 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5894 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5895 (thumb2_breakpoint_len): Likewise.
5896 (arm_is_thumb_mode): New declaration.
5897 * linux-arm-low.c: Include arch/arm-linux.h
5898 aarch/arm-get-next-pcs.h, sys/syscall.h.
5899 (get_next_pcs_ops): New struct.
5900 (get_next_pcs_addr_bits_remove): New function.
5901 (get_next_pcs_is_thumb): New function.
5902 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5903 (arm_sigreturn_next_pc): Likewise.
5904 (get_next_pcs_syscall_next_pc): Likewise.
5905 (arm_gdbserver_get_next_pcs): Likewise.
5906 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5907 Initialize.
5908 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5909 * server.h: Include gdb_vecs.h.
5910
5911 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5912
5913 * Makefile.in (SFILES): Append common/common-regcache.c.
5914 (OBS): Append common-regcache.o.
5915 (common-regcache.o): New rule.
5916 * regcache.c (init_register_cache): Initialize cache to
5917 REG_UNAVAILABLE.
5918 (regcache_raw_read_unsigned): New function.
5919 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5920 register_status enum.
5921
5922 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5923
5924 * linux-aarch64-low.c (the_low_targets): Rename
5925 breakpoint_reinsert_addr to get_next_pcs.
5926 * linux-arm-low.c (the_low_targets): Likewise.
5927 * linux-bfin-low.c (the_low_targets): Likewise.
5928 * linux-cris-low.c (the_low_targets): Likewise.
5929 * linux-crisv32-low.c (the_low_targets): Likewise.
5930 * linux-low.c (can_software_single_step): Likewise.
5931 (install_software_single_step_breakpoints): New function.
5932 (start_step_over): Use install_software_single_step_breakpoints.
5933 * linux-low.h: New CORE_ADDR vector.
5934 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5935 get_next_pcs.
5936 * linux-mips-low.c (the_low_targets): Likewise.
5937 * linux-nios2-low.c (the_low_targets): Likewise.
5938 * linux-sparc-low.c (the_low_targets): Likewise.
5939
5940 2015-12-17 Pedro Alves <palves@redhat.com>
5941
5942 * linux-low.c (linux_kill_one_lwp): Remove references to
5943 LinuxThreads.
5944 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5945 to 'kill'.
5946 (linux_init_signals): Delete.
5947 (initialize_low): Adjust.
5948 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5949
5950 2015-12-16 Pedro Alves <palves@redhat.com>
5951
5952 * configure.ac (compiler warning flags): When testing a
5953 -Wno-foo option, check whether -Wfoo works instead.
5954 * configure: Regenerate.
5955
5956 2015-12-11 Don Breazeal <donb@codesourcery.com>
5957
5958 * server.c (process_serial_event): Don't exit from gdbserver
5959 in remote mode if there are still active inferiors.
5960
5961 2015-12-11 Yao Qi <yao.qi@linaro.org>
5962
5963 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5964 arm_breakpoint_at if the process is 32-bit.
5965
5966 2015-12-11 Yao Qi <yao.qi@linaro.org>
5967
5968 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5969 arm breakpoint.
5970
5971 2015-12-07 Yao Qi <yao.qi@linaro.org>
5972
5973 * configure.srv: Append arm.o to srv_tgtobj for
5974 aarch64*-*-linux* target.
5975 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5976 from linux-arm-low.c.
5977 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5978 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5979 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5980 (thumb2_breakpoint_len): Likewise.
5981 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5982 (arm_breakpoint_kinds): Likewise.
5983 (arm_breakpoint_kind_from_pc): Likewise.
5984 (arm_sw_breakpoint_from_kind): Likewise.
5985 (arm_breakpoint_kind_from_current_state): Likewise.
5986 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5987 (arm_sw_breakpoint_from_kind): Declare.
5988 (arm_breakpoint_kind_from_current_state): Declare.
5989 (arm_breakpoint_at): Declare.
5990 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5991 arm_sw_breakpoint_from_kind if process is 32-bit.
5992 (aarch64_breakpoint_kind_from_pc): New function.
5993 (aarch64_breakpoint_kind_from_current_state): New function.
5994 (the_low_target): Initialize fields breakpoint_kind_from_pc
5995 and breakpoint_kind_from_current_state.
5996 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5997 linux-aarch32-low.c.
5998 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5999 (arm_breakpoint, arm_breakpoint_len): Likewise.
6000 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6001 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6002 (arm_is_thumb_mode): Likewise.
6003 (arm_breakpoint_at): Likewise.
6004 (arm_breakpoint_kind_from_pc): Likewise.
6005 (arm_sw_breakpoint_from_kind): Likewise.
6006 (arm_breakpoint_kind_from_current_state): Likewise.
6007
6008 Revert:
6009 2015-08-04 Yao Qi <yao.qi@linaro.org>
6010
6011 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6012 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6013 * server.c (extended_protocol): Remove "static".
6014 * server.h (extended_protocol): Declare it.
6015
6016 2015-12-04 Josh Stone <jistone@redhat.com>
6017
6018 * target.h (struct target_ops) <arch_setup>: Rename to ...
6019 (struct target_ops) <post_create_inferior>: ... this.
6020 (target_arch_setup): Rename to ...
6021 (target_post_create_inferior): ... this, calling post_create_inferior.
6022 * server.c (start_inferior): Update target_arch_setup calls to
6023 target_post_create_inferior.
6024 * linux-low.c (linux_low_ptrace_options): Forward declare.
6025 (linux_arch_setup): Update its comment for general use.
6026 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6027 (struct linux_target_ops): Use linux_post_create_inferior.
6028 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6029 to post_create_inferior.
6030 * nto-low.c (struct nto_target_ops): Likewise.
6031 * spu-low.c (struct spu_target_ops): Likewise.
6032 * win32-low.c (struct win32_target_ops): Likewise.
6033
6034 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6035
6036 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6037
6038 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6039
6040 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6041 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6042 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6043 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6044 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6045 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6046 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6047 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6048 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6049 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6050 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6051 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6052
6053 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6054
6055 * linux-low.c (linux_look_up_symbols): Don't call
6056 linux_supports_traceclone.
6057 * linux-low.h (thread_db_init): Remove use_events argument.
6058 * thread-db.c (thread_db_use_event): Remove global variable.
6059 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6060 (struct thread_db) <td_create_bp>: Remove field.
6061 (thread_db_create_event): Remove function.
6062 (thread_db_enable_reporting): Likewise.
6063 (find_one_thread): Don't check for thread_db_use_events.
6064 (attach_thread): Likewise.
6065 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6066 (try_thread_db_load_1): Don't check for thread_db_use_events.
6067 (thread_db_init): Remove use_events argument and thread events
6068 handling.
6069 (remove_thread_event_breakpoints): Remove function.
6070 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6071
6072 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6073
6074 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6075 New function.
6076 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6077 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6078 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6079 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6080 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6081 Initialize.
6082 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6083 New function.
6084 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6085 * linux-low.c (can_hardware_single_step): Use
6086 supports_hardware_single_step.
6087 (can_software_single_step): New function.
6088 (start_step_over): Call can_software_single_step.
6089 (linux_supports_hardware_single_step): New function.
6090 (struct target_ops) <supports_software_single_step>: Initialize.
6091 * linux-low.h (struct linux_target_ops)
6092 <supports_hardware_single_step>: Initialize.
6093 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6094 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6095 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6096 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6097 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6098 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6099 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6100 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6101 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6102 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6103 Initialize.
6104 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6105 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6106 Initialize.
6107 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6108 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6109 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6110 New function.
6111 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6112 * target.h (struct target_ops): <supports_software_single_step>:
6113 New field.
6114 (target_supports_software_single_step): New macro.
6115
6116 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6117
6118 * linux-low.c (linux_wait_1): Fix pc advance condition.
6119 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6120 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6121
6122 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6123
6124 * linux-arm-low.c (arm_is_thumb_mode): New function.
6125 (arm_breakpoint_at): Use arm_is_thumb_mode.
6126 (arm_breakpoint_kind_from_current_state): New function.
6127 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6128 Initialize.
6129 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6130 (linux_breakpoint_kind_from_current_state): New function.
6131 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6132 * linux-low.h (struct linux_target_ops)
6133 <breakpoint_kind_from_current_state>: New field.
6134 * target.h (struct target_ops): Likewise.
6135 (target_breakpoint_kind_from_current_state): New macro.
6136
6137 2015-11-30 Pedro Alves <palves@redhat.com>
6138
6139 * linux-low.c (linux_resume): Wake up the event loop before
6140 returning.
6141
6142 2015-11-30 Pedro Alves <palves@redhat.com>
6143
6144 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6145 check.
6146 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6147 to -1.
6148 * target.c (struct thread_search): New structure.
6149 (thread_search_callback): New function.
6150 (prev_general_thread): New global.
6151 (prepare_to_access_memory, done_accessing_memory): New functions.
6152 * target.h (prepare_to_access_memory, done_accessing_memory):
6153 Replace macros with function declarations.
6154
6155 2015-11-30 Pedro Alves <palves@redhat.com>
6156
6157 PR 14618
6158 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6159 report TARGET_WAITKIND_NO_RESUMED.
6160 * remote-utils.c (prepare_resume_reply): Handle
6161 TARGET_WAITKIND_NO_RESUMED.
6162 * server.c (report_no_resumed): New global.
6163 (handle_query) <qSupported>: Handle "no-resumed+". Report
6164 "no-resumed+" support.
6165 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6166 return error if the client doesn't support no-resumed events.
6167 (push_stop_notification): New function.
6168 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6169 events if the client supports them.
6170
6171 2015-11-30 Pedro Alves <palves@redhat.com>
6172
6173 * linux-low.c (thread_still_has_status_pending_p): Don't check
6174 vCont;t here.
6175 (lwp_resumed): New function.
6176 (status_pending_p_callback): Return early if the LWP is not
6177 supposed to be resumed.
6178
6179 2015-11-30 Pedro Alves <palves@redhat.com>
6180
6181 * linux-low.c (handle_extended_wait): Assert that the LWP's
6182 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6183 thread create events, leave the new child's status pending.
6184 (linux_low_filter_event): If GDB wants to hear about thread exit
6185 events, leave the LWP marked dead and don't delete it.
6186 (linux_wait_for_event_filtered): Don't check for thread exit.
6187 (filter_exit_event): New function.
6188 (linux_wait_1): Use it, when returning an exit event.
6189 (linux_resume_one_lwp_throw): Assert that the LWP's
6190 waitstatus is TARGET_WAITKIND_IGNORE.
6191 * remote-utils.c (prepare_resume_reply): Handle
6192 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6193 * server.c (report_thread_events): New global.
6194 (handle_general_set): Handle QThreadEvents.
6195 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6196 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6197 TARGET_WAITKIND_THREAD_EXITED.
6198 * server.h (report_thread_events): Declare.
6199
6200 2015-11-30 Pedro Alves <palves@redhat.com>
6201
6202 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6203 the thread's last_resume_kind was resume_stop.
6204
6205 2015-11-30 Pedro Alves <palves@redhat.com>
6206
6207 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6208 before returning.
6209
6210 2015-11-30 Pedro Alves <palves@redhat.com>
6211
6212 * server.c (handle_v_requests): Handle vCtrlC.
6213
6214 2015-11-30 Pedro Alves <palves@redhat.com>
6215
6216 * gdbthread.h (find_any_thread_of_pid): Declare.
6217 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6218 functions.
6219 * server.c (handle_query): If current_thread is NULL, look for
6220 another thread of the selected process.
6221
6222 2015-11-26 Daniel Colascione <dancol@dancol.org>
6223 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6226 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6227 name in reply.
6228 * target.h (struct target_ops) <thread_name>: New field.
6229 (target_thread_name): New macro.
6230
6231 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6232
6233 * regcache.h (regcache_invalidate_pid): Add declaration.
6234 * regcache.c (regcache_invalidate_pid): New function, extracted
6235 from regcache_invalidate.
6236 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6237 Add trivial documentation comment.
6238 * lynx-low.c: Use regcache_invalidate_pid instead of
6239 regcache_invalidate.
6240
6241 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6242
6243 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6244 and Elf64_auxv_t if the target is Android.
6245
6246 2015-11-22 Doug Evans <xdje42@gmail.com>
6247
6248 * target.h: #include <sys/types.h>.
6249
6250 2015-11-19 Pedro Alves <palves@redhat.com>
6251
6252 * linux-low.c (linux_process_qsupported): Change prototype.
6253 Adjust.
6254 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6255 Change prototype.
6256 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6257 and adjust to loop over all features.
6258 * server.c (handle_query) <qSupported>: Adjust to call
6259 target_process_qsupported once, passing it a vector of unprocessed
6260 features.
6261 * target.h (struct target_ops) <process_qsupported>: Change
6262 prototype.
6263 (target_process_qsupported): Adjust.
6264
6265 2015-11-19 Pedro Alves <palves@redhat.com>
6266
6267 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6268 mode.
6269 * configure: Regenerate.
6270
6271 2015-11-19 Pedro Alves <palves@redhat.com>
6272
6273 * configure: Regenerate.
6274
6275 2015-11-19 Yao Qi <yao.qi@linaro.org>
6276
6277 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6278 type to uint32_t.
6279
6280 2015-11-19 Yao Qi <yao.qi@linaro.org>
6281
6282 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6283 (struct aarch64_operand): Move enum out.
6284
6285 2015-11-19 Yao Qi <yao.qi@linaro.org>
6286
6287 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6288 struct user_fpsimd_state *.
6289 (aarch64_store_fpregset): Likewise.
6290
6291 2015-11-19 Yao Qi <yao.qi@linaro.org>
6292
6293 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6294 struct user_pt_regs *.
6295 (aarch64_store_gregset): Likewise.
6296
6297 2015-11-18 Pedro Alves <palves@redhat.com>
6298
6299 * Makefile.in (all_object_files): Add $IPA_OBJS.
6300
6301 2015-11-17 Pedro Alves <palves@redhat.com>
6302
6303 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6304 GDB_SIGNAL_0 and gdb_signal_to_string.
6305
6306 2015-11-17 Pedro Alves <palves@redhat.com>
6307
6308 * win32-low.c (handle_output_debug_string): Remove parameter.
6309 (win32_kill): Remove our_status local and adjust call to
6310 handle_output_debug_string.
6311 (get_child_debug_event): Adjust call to
6312 handle_output_debug_string.
6313
6314 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6315
6316 * linux-mips-low.c (mips_fill_gregset): Add cast.
6317 (mips_store_gregset): Likewise.
6318 (mips_fill_fpregset): Likewise.
6319 (mips_store_fpregset): Likewise.
6320
6321 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6322
6323 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6324 priv.
6325
6326 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6327
6328 * linux-mips-low.c (mips_linux_new_thread): Change type of
6329 watch_type to enum target_hw_bp_type.
6330
6331 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6332
6333 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6334 Change return type to arm_hwbp_type.
6335
6336 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6337
6338 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6339 (arm_store_gregset): Likewise.
6340 * linux-arm-low.c (arm_get_hwcap): Likewise.
6341 (arm_read_description): Likewise.
6342
6343 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6344
6345 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6346
6347 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6348
6349 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6350 (ppc_fill_vsxregset): Likewise.
6351 (ppc_store_vsxregset): Likewise.
6352 (ppc_fill_vrregset): Likewise.
6353 (ppc_store_vrregset): Likewise.
6354 (ppc_fill_evrregset): Likewise.
6355 (ppc_store_evrregset): Likewise.
6356
6357 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6358
6359 * linux-ppc-low.c (ppc_usrregs_info): Remove
6360 forward-declaration.
6361 (ppc_arch_setup): Move lower in file.
6362
6363 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6364
6365 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6366 (ps_pdwrite): Likewise.
6367
6368 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6369
6370 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6371 to after assert checks.
6372
6373 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6374
6375 * proc-service.c (ps_pdread): Add/adjust casts.
6376 (ps_pdwrite): Add/adjust casts.
6377
6378 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6379
6380 * server.c (handle_search_memory_1): Cast return value of
6381 memmem.
6382
6383 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6384
6385 * server.c (write_qxfer_response): Change type of data to
6386 gdb_byte *.
6387
6388 2015-10-29 Pedro Alves <palves@redhat.com>
6389
6390 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6391
6392 2015-10-29 Pedro Alves <palves@redhat.com>
6393
6394 * tracepoint.c (clear_installed_tracepoints): Add casts.
6395
6396 2015-10-29 Pedro Alves <palves@redhat.com>
6397
6398 * server.c (handle_v_cont, process_serial_event): Add enum
6399 gdb_signal casts to signal parsing code.
6400
6401 2015-10-29 Pedro Alves <palves@redhat.com>
6402
6403 * linux-low.h (NULL_REGSET): Define.
6404 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6405 * linux-arm-low.c (arm_regsets): Likewise.
6406 * linux-crisv32-low.c (cris_regsets): Likewise.
6407 * linux-m68k-low.c (m68k_regsets): Likewise.
6408 * linux-mips-low.c (mips_regsets): Likewise.
6409 * linux-nios2-low.c (nios2_regsets): Likewise.
6410 * linux-ppc-low.c (ppc_regsets): Likewise.
6411 * linux-s390-low.c (s390_regsets): Likewise.
6412 * linux-sh-low.c (sh_regsets): Likewise.
6413 * linux-sparc-low.c (sparc_regsets): Likewise.
6414 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6415 * linux-tile-low.c (tile_regsets): Likewise.
6416 * linux-x86-low.c (x86_regsets): Likewise.
6417 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6418
6419 2015-10-29 Pedro Alves <palves@redhat.com>
6420
6421 * linux-low.h (NULL_REGSET): Define.
6422 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6423 * linux-arm-low.c (arm_regsets): Likewise.
6424 * linux-crisv32-low.c (cris_regsets): Likewise.
6425 * linux-m68k-low.c (m68k_regsets): Likewise.
6426 * linux-mips-low.c (mips_regsets): Likewise.
6427 * linux-nios2-low.c (nios2_regsets): Likewise.
6428 * linux-ppc-low.c (ppc_regsets): Likewise.
6429 * linux-s390-low.c (s390_regsets): Likewise.
6430 * linux-sh-low.c (sh_regsets): Likewise.
6431 * linux-sparc-low.c (sparc_regsets): Likewise.
6432 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6433 * linux-tile-low.c (tile_regsets): Likewise.
6434 * linux-x86-low.c (x86_regsets): Likewise.
6435 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6436
6437 2015-10-26 Doug Evans <dje@google.com>
6438
6439 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6440
6441 2015-10-26 Doug Evans <dje@google.com>
6442
6443 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6444
6445 2015-10-26 Doug Evans <dje@google.com>
6446
6447 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6448 for debug_printf.
6449 (attach_thread, find_new_threads_callback): Ditto.
6450
6451 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6452
6453 * mem-break.h (set_breakpoint_data): Remove.
6454
6455 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6456
6457 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6458 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6459 (initialize_low): Remove set_breakpoint_data call.
6460 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6461 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6462 (initialize_low): Remove set_breakpoint_data call.
6463 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6464 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6465 (initialize_low): Remove set_breakpoint_data call.
6466
6467 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6468
6469 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6470 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6471 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6472 * target.h (target_breakpoint_kind_from_pc): New macro.
6473
6474 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6475
6476 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6477 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6478 the default breakpoint kind.
6479
6480 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6481
6482 * linux-arm-low.c (arm_supports_z_point_type): Add software
6483 breakpoint support.
6484
6485 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6486
6487 * linux-arm-low.c: Refactor breakpoint definitions.
6488 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6489 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6490
6491 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6492
6493 * Makefile.in: Add arm.c/o.
6494 * configure.srv: Likewise.
6495 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6496 (arm_breakpoint_kind_from_pc): New function.
6497 (arm_sw_breakpoint_from_kind): Return proper kind.
6498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6499
6500 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6501
6502 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6503 removal.
6504 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6505 (struct raw_breakpoint) <size>: Remove.
6506 (struct raw_breakpoint) <kind>: Add.
6507 (bp_size): New function.
6508 (bp_opcode): Likewise.
6509 (find_raw_breakpoint_at): Adjust for kind.
6510 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6511 (remove_memory_breakpoint): Adjust for kind call bp_size.
6512 (set_raw_breakpoint_at): Adjust for kind.
6513 (set_breakpoint): Likewise.
6514 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6515 (delete_raw_breakpoint): Adjust for kind.
6516 (delete_breakpoint): Likewise.
6517 (find_gdb_breakpoint): Likewise.
6518 (set_gdb_breakpoint_1): Likewise.
6519 (set_gdb_breakpoint): Likewise.
6520 (delete_gdb_breakpoint_1): Likewise.
6521 (delete_gdb_breakpoint): Likewise.
6522 (uninsert_raw_breakpoint): Likewise.
6523 (reinsert_raw_breakpoint): Likewise.
6524 (set_breakpoint_data): Remove.
6525 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6526 (check_mem_read): Adjust for kind call bp_size.
6527 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6528 (clone_one_breakpoint): Adjust for kind.
6529 * mem-break.h (set_gdb_breakpoint): Likewise.
6530 (delete_gdb_breakpoint): Likewise.
6531 * server.c (process_serial_event): Likewise.
6532
6533 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6534
6535 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6536 (struct linux_target_ops) <breakpoint>: Remove.
6537 (struct linux_target_ops) <breakpoint_len>: Remove.
6538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6539 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6540 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6541 (arm_sw_breakpoint_from_kind): New function.
6542 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6543 (struct linux_target_ops) <breakpoint>: Remove.
6544 (struct linux_target_ops) <breakpoint_len>: Remove.
6545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6547 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6548 (struct linux_target_ops) <breakpoint>: Remove.
6549 (struct linux_target_ops) <breakpoint_len>: Remove.
6550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6552 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6553 (struct linux_target_ops) <breakpoint>: Remove.
6554 (struct linux_target_ops) <breakpoint_len>: Remove.
6555 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6556 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6557 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6558 and sw_breakpoint_from_kind to increment the pc.
6559 (linux_breakpoint_kind_from_pc): New function.
6560 (linux_sw_breakpoint_from_kind): New function.
6561 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6562 (initialize_low): Call breakpoint_kind_from_pc and
6563 sw_breakpoint_from_kind to replace breakpoint_data/len.
6564 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6565 New field.
6566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6567 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6568 (struct linux_target_ops) <breakpoint>: Remove.
6569 (struct linux_target_ops) <breakpoint_len>: Remove.
6570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6572 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6573 (struct linux_target_ops) <breakpoint>: Remove.
6574 (struct linux_target_ops) <breakpoint_len>: Remove.
6575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6577 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6578 (struct linux_target_ops) <breakpoint>: Remove.
6579 (struct linux_target_ops) <breakpoint_len>: Remove.
6580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6582 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6583 (struct linux_target_ops) <breakpoint>: Remove.
6584 (struct linux_target_ops) <breakpoint_len>: Remove.
6585 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6587 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6588 (struct linux_target_ops) <breakpoint>: Remove.
6589 (struct linux_target_ops) <breakpoint_len>: Remove.
6590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6592 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6593 (struct linux_target_ops) <breakpoint>: Remove.
6594 (struct linux_target_ops) <breakpoint_len>: Remove.
6595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6597 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6598 (struct linux_target_ops) <breakpoint>: Remove.
6599 (struct linux_target_ops) <breakpoint_len>: Remove.
6600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6602 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6603 (struct linux_target_ops) <breakpoint>: Remove.
6604 (struct linux_target_ops) <breakpoint_len>: Remove.
6605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6607 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6608 (struct linux_target_ops) <breakpoint>: Remove.
6609 (struct linux_target_ops) <breakpoint_len>: Remove.
6610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6612 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6613 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6614 (struct linux_target_ops) <breakpoint>: Remove.
6615 (struct linux_target_ops) <breakpoint_len>: Remove.
6616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6618 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6619 (struct linux_target_ops) <breakpoint>: Remove.
6620 (struct linux_target_ops) <breakpoint_len>: Remove.
6621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6623
6624 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6625
6626 * linux-cris-low.c (cris_get_pc): Remove void arg.
6627
6628 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6629
6630 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6631 variable name.
6632
6633 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6634
6635 * inferiors.c (thread_pid_matches_callback): New function.
6636 (find_thread_process): New function.
6637 (remove_thread): Reset current_thread.
6638 (remove_process): Assert threads have been removed first.
6639
6640 2015-10-15 Yao Qi <yao.qi@linaro.org>
6641
6642 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6643 if it is 3.
6644 (aarch64_remove_point): Likewise.
6645 * regcache.c (regcache_register_size): New function.
6646
6647 2015-10-12 Yao Qi <yao.qi@linaro.org>
6648
6649 * linux-aarch64-low.c: Update all callers as emit_load_store
6650 is renamed to aarch64_emit_load_store.
6651
6652 2015-10-12 Yao Qi <yao.qi@linaro.org>
6653
6654 * linux-aarch64-low.c: Update all callers of function renaming
6655 from emit_insn to aarch64_emit_insn.
6656
6657 2015-10-12 Yao Qi <yao.qi@linaro.org>
6658
6659 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6660 arch/aarch64-insn.h.
6661 (struct aarch64_memory_operand): Likewise.
6662 (ENCODE): Likewise.
6663 (emit_insn): Move to arch/aarch64-insn.c.
6664 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6665 (emit_load_store): Move to arch/aarch64-insn.c.
6666 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6667 (can_encode_int32): Remove.
6668
6669 2015-10-12 Yao Qi <yao.qi@linaro.org>
6670
6671 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6672 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6673 (aarch64_relocate_instruction): Likewise.
6674 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6675 (struct aarch64_insn_visitor): Likewise.
6676
6677 2015-10-12 Yao Qi <yao.qi@linaro.org>
6678
6679 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6680 (struct aarch64_insn_visitor): New.
6681 (struct aarch64_insn_relocation_data): New.
6682 (aarch64_ftrace_insn_reloc_b): New function.
6683 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6684 (aarch64_ftrace_insn_reloc_cb): Likewise.
6685 (aarch64_ftrace_insn_reloc_tb): Likewise.
6686 (aarch64_ftrace_insn_reloc_adr): Likewise.
6687 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6688 (aarch64_ftrace_insn_reloc_others): Likewise.
6689 (visitor): New.
6690 (aarch64_relocate_instruction): Use visitor.
6691
6692 2015-10-12 Yao Qi <yao.qi@linaro.org>
6693
6694 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6695 int. Add argument buf.
6696 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6697 aarch64_relocate_instruction.
6698
6699 2015-10-12 Yao Qi <yao.qi@linaro.org>
6700
6701 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6702 argument insn. Remove local variable insn. Don't call
6703 target_read_uint32.
6704 (aarch64_install_fast_tracepoint_jump_pad): Call
6705 target_read_uint32.
6706
6707 2015-09-30 Yao Qi <yao.qi@linaro.org>
6708
6709 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6710 (emit_load_store_pair): Likewise.
6711
6712 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6713
6714 * dll.c (match_dll): Add cast(s).
6715 (unloaded_dll): Likewise.
6716 * linux-low.c (second_thread_of_pid_p): Likewise.
6717 (delete_lwp_callback): Likewise.
6718 (count_events_callback): Likewise.
6719 (select_event_lwp_callback): Likewise.
6720 (linux_set_resume_request): Likewise.
6721 * server.c (accumulate_file_name_length): Likewise.
6722 (emit_dll_description): Likewise.
6723 (handle_qxfer_threads_worker): Likewise.
6724 (visit_actioned_threads): Likewise.
6725 * thread-db.c (any_thread_of): Likewise.
6726 * tracepoint.c (same_process_p): Likewise.
6727 (match_blocktype): Likewise.
6728 (build_traceframe_info_xml): Likewise.
6729
6730 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6731
6732 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6733 assignment.
6734 (gdb_unparse_agent_expr): Likewise.
6735 * hostio.c (require_data): Likewise.
6736 (handle_pread): Likewise.
6737 * linux-low.c (disable_regset): Likewise.
6738 (fetch_register): Likewise.
6739 (store_register): Likewise.
6740 (get_dynamic): Likewise.
6741 (linux_qxfer_libraries_svr4): Likewise.
6742 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6743 (set_fast_tracepoint_jump): Likewise.
6744 (uninsert_fast_tracepoint_jumps_at): Likewise.
6745 (reinsert_fast_tracepoint_jumps_at): Likewise.
6746 (validate_inserted_breakpoint): Likewise.
6747 (clone_agent_expr): Likewise.
6748 * regcache.c (init_register_cache): Likewise.
6749 * remote-utils.c (putpkt_binary_1): Likewise.
6750 (decode_M_packet): Likewise.
6751 (decode_X_packet): Likewise.
6752 (look_up_one_symbol): Likewise.
6753 (relocate_instruction): Likewise.
6754 (monitor_output): Likewise.
6755 * server.c (handle_search_memory): Likewise.
6756 (handle_qxfer_exec_file): Likewise.
6757 (handle_qxfer_libraries): Likewise.
6758 (handle_qxfer): Likewise.
6759 (handle_query): Likewise.
6760 (handle_v_cont): Likewise.
6761 (handle_v_run): Likewise.
6762 (captured_main): Likewise.
6763 * target.c (write_inferior_memory): Likewise.
6764 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6765 * tracepoint.c (init_trace_buffer): Likewise.
6766 (add_tracepoint_action): Likewise.
6767 (add_traceframe): Likewise.
6768 (add_traceframe_block): Likewise.
6769 (cmd_qtdpsrc): Likewise.
6770 (cmd_qtdv): Likewise.
6771 (cmd_qtstatus): Likewise.
6772 (response_source): Likewise.
6773 (response_tsv): Likewise.
6774 (cmd_qtnotes): Likewise.
6775 (gdb_collect): Likewise.
6776 (initialize_tracepoint): Likewise.
6777
6778 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6779
6780 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6781 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6782 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6783 <NOP>: New.
6784 (enum aarch64_condition_codes): New enum.
6785 (w0): New static global.
6786 (fp): Likewise.
6787 (lr): Likewise.
6788 (struct aarch64_memory_operand) <type>: New
6789 MEMORY_OPERAND_POSTINDEX type.
6790 (postindex_memory_operand): New helper function.
6791 (emit_ret): New function.
6792 (emit_load_store_pair): New function, factored out of emit_stp
6793 with support for MEMORY_OPERAND_POSTINDEX.
6794 (emit_stp): Rewrite using emit_load_store_pair.
6795 (emit_ldp): New function.
6796 (emit_load_store): Likewise.
6797 (emit_ldr): Mention post-index instruction in comment.
6798 (emit_ldrh): New function.
6799 (emit_ldrb): New function.
6800 (emit_ldrsw): Mention post-index instruction in comment.
6801 (emit_str): Likewise.
6802 (emit_subs): New function.
6803 (emit_cmp): Likewise.
6804 (emit_and): Likewise.
6805 (emit_orr): Likewise.
6806 (emit_orn): Likewise.
6807 (emit_eor): Likewise.
6808 (emit_mvn): Likewise.
6809 (emit_lslv): Likewise.
6810 (emit_lsrv): Likewise.
6811 (emit_asrv): Likewise.
6812 (emit_mul): Likewise.
6813 (emit_sbfm): Likewise.
6814 (emit_sbfx): Likewise.
6815 (emit_ubfm): Likewise.
6816 (emit_ubfx): Likewise.
6817 (emit_csinc): Likewise.
6818 (emit_cset): Likewise.
6819 (emit_nop): Likewise.
6820 (emit_ops_insns): New helper function.
6821 (emit_pop): Likewise.
6822 (emit_push): Likewise.
6823 (aarch64_emit_prologue): New function.
6824 (aarch64_emit_epilogue): Likewise.
6825 (aarch64_emit_add): Likewise.
6826 (aarch64_emit_sub): Likewise.
6827 (aarch64_emit_mul): Likewise.
6828 (aarch64_emit_lsh): Likewise.
6829 (aarch64_emit_rsh_signed): Likewise.
6830 (aarch64_emit_rsh_unsigned): Likewise.
6831 (aarch64_emit_ext): Likewise.
6832 (aarch64_emit_log_not): Likewise.
6833 (aarch64_emit_bit_and): Likewise.
6834 (aarch64_emit_bit_or): Likewise.
6835 (aarch64_emit_bit_xor): Likewise.
6836 (aarch64_emit_bit_not): Likewise.
6837 (aarch64_emit_equal): Likewise.
6838 (aarch64_emit_less_signed): Likewise.
6839 (aarch64_emit_less_unsigned): Likewise.
6840 (aarch64_emit_ref): Likewise.
6841 (aarch64_emit_if_goto): Likewise.
6842 (aarch64_emit_goto): Likewise.
6843 (aarch64_write_goto_address): Likewise.
6844 (aarch64_emit_const): Likewise.
6845 (aarch64_emit_call): Likewise.
6846 (aarch64_emit_reg): Likewise.
6847 (aarch64_emit_pop): Likewise.
6848 (aarch64_emit_stack_flush): Likewise.
6849 (aarch64_emit_zero_ext): Likewise.
6850 (aarch64_emit_swap): Likewise.
6851 (aarch64_emit_stack_adjust): Likewise.
6852 (aarch64_emit_int_call_1): Likewise.
6853 (aarch64_emit_void_call_2): Likewise.
6854 (aarch64_emit_eq_goto): Likewise.
6855 (aarch64_emit_ne_goto): Likewise.
6856 (aarch64_emit_lt_goto): Likewise.
6857 (aarch64_emit_le_goto): Likewise.
6858 (aarch64_emit_gt_goto): Likewise.
6859 (aarch64_emit_ge_got): Likewise.
6860 (aarch64_emit_ops_impl): New static global variable.
6861 (aarch64_emit_ops): New target function, return
6862 &aarch64_emit_ops_impl.
6863 (struct linux_target_ops): Install it.
6864
6865 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6866
6867 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6868 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6869 aarch64-ipa.o.
6870 * linux-aarch64-ipa.c: New file.
6871 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6872 and endian.h.
6873 (aarch64_get_thread_area): New target method.
6874 (extract_signed_bitfield): New helper function.
6875 (aarch64_decode_ldr_literal): New function.
6876 (enum aarch64_opcodes): New enum.
6877 (struct aarch64_register): New struct.
6878 (struct aarch64_operand): New struct.
6879 (x0): New static global.
6880 (x1): Likewise.
6881 (x2): Likewise.
6882 (x3): Likewise.
6883 (x4): Likewise.
6884 (w2): Likewise.
6885 (ip0): Likewise.
6886 (sp): Likewise.
6887 (xzr): Likewise.
6888 (aarch64_register): New helper function.
6889 (register_operand): Likewise.
6890 (immediate_operand): Likewise.
6891 (struct aarch64_memory_operand): New struct.
6892 (offset_memory_operand): New helper function.
6893 (preindex_memory_operand): Likewise.
6894 (enum aarch64_system_control_registers): New enum.
6895 (ENCODE): New macro.
6896 (emit_insn): New helper function.
6897 (emit_b): New function.
6898 (emit_bcond): Likewise.
6899 (emit_cb): Likewise.
6900 (emit_tb): Likewise.
6901 (emit_blr): Likewise.
6902 (emit_stp): Likewise.
6903 (emit_ldp_q_offset): Likewise.
6904 (emit_stp_q_offset): Likewise.
6905 (emit_load_store): Likewise.
6906 (emit_ldr): Likewise.
6907 (emit_ldrsw): Likewise.
6908 (emit_str): Likewise.
6909 (emit_ldaxr): Likewise.
6910 (emit_stxr): Likewise.
6911 (emit_stlr): Likewise.
6912 (emit_data_processing_reg): Likewise.
6913 (emit_data_processing): Likewise.
6914 (emit_add): Likewise.
6915 (emit_sub): Likewise.
6916 (emit_mov): Likewise.
6917 (emit_movk): Likewise.
6918 (emit_mov_addr): Likewise.
6919 (emit_mrs): Likewise.
6920 (emit_msr): Likewise.
6921 (emit_sevl): Likewise.
6922 (emit_wfe): Likewise.
6923 (append_insns): Likewise.
6924 (can_encode_int32_in): New helper function.
6925 (aarch64_relocate_instruction): New function.
6926 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6927 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6928 (struct linux_target_ops): Install aarch64_get_thread_area,
6929 aarch64_install_fast_tracepoint_jump_pad and
6930 aarch64_get_min_fast_tracepoint_insn_len.
6931
6932 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6933
6934 * Makefile.in (aarch64-insn.o): New rule.
6935 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6936
6937 2015-09-21 Yao Qi <yao.qi@linaro.org>
6938
6939 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6940
6941 2015-09-21 Yao Qi <yao.qi@linaro.org>
6942
6943 * tracepoint.c (max_jump_pad_size): Remove.
6944
6945 2015-09-18 Yao Qi <yao.qi@linaro.org>
6946
6947 * linux-aarch64-low.c: Don't include sys/uio.h.
6948 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6949
6950 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6951
6952 * tracepoint.c (eval_result_type): Change prototype.
6953 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6954
6955 2015-09-15 Pedro Alves <palves@redhat.com>
6956
6957 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6958 Check whether to report exec events instead of checking whether
6959 multiprocess is enabled.
6960
6961 2015-09-15 Pedro Alves <palves@redhat.com>
6962
6963 PR remote/18965
6964 * remote-utils.c (prepare_resume_reply): Merge
6965 TARGET_WAITKIND_VFORK_DONE switch case with the
6966 TARGET_WAITKIND_FORKED case.
6967
6968 2015-09-15 Yao Qi <yao.qi@linaro.org>
6969
6970 * server.c (handle_query): Check string comparison using
6971 "else if" instead of "if".
6972
6973 2015-09-15 Yao Qi <yao.qi@linaro.org>
6974
6975 * server.c (vCont_supported): New global variable.
6976 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6977 matches. Append ";vContSupported+" to own_buf.
6978 (handle_v_requests): Append ";s;S" to own_buf if target supports
6979 hardware single step or vCont_supported is false.
6980 (capture_main): Set vCont_supported to zero.
6981
6982 2015-09-15 Yao Qi <yao.qi@linaro.org>
6983
6984 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6985 it to ...
6986 (linux_supports_hardware_single_step): ... New function.
6987 (linux_target_ops): Update.
6988 * lynx-low.c (lynx_target_ops): Set field
6989 supports_hardware_single_step to target_can_do_hardware_single_step.
6990 * nto-low.c (nto_target_ops): Likewise.
6991 * spu-low.c (spu_target_ops): Likewise.
6992 * win32-low.c (win32_target_ops): Likewise.
6993 * target.c (target_can_do_hardware_single_step): New function.
6994 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6995 Remove. <supports_hardware_single_step>: New field.
6996 (target_supports_conditional_breakpoints): Remove.
6997 (target_supports_hardware_single_step): New macro.
6998 (target_can_do_hardware_single_step): Declare.
6999 * server.c (handle_query): Use target_supports_hardware_single_step
7000 instead of target_supports_conditional_breakpoints.
7001
7002 2015-09-15 Yao Qi <yao.qi@linaro.org>
7003
7004 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7005 function.
7006 (struct linux_target_ops the_low_target): Install
7007 aarch64_linux_siginfo_fixup.
7008
7009 2015-09-11 Don Breazeal <donb@codesourcery.com>
7010 Luis Machado <lgustavo@codesourcery.com>
7011
7012 * linux-low.c (linux_mourn): Static declaration.
7013 (linux_arch_setup): Move in front of
7014 handle_extended_wait.
7015 (linux_arch_setup_thread): New function.
7016 (handle_extended_wait): Handle exec events. Call
7017 linux_arch_setup_thread. Make event_lwp argument a
7018 pointer-to-a-pointer.
7019 (check_zombie_leaders): Do not check stopped threads.
7020 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7021 (linux_low_filter_event): Add lwp and thread for exec'ing
7022 non-leader thread if leader thread has been deleted.
7023 Refactor code into linux_arch_setup_thread and call it.
7024 Pass child lwp pointer by reference to handle_extended_wait.
7025 (linux_wait_for_event_filtered): Update comment.
7026 (linux_wait_1): Prevent clobbering exec event status.
7027 (linux_supports_exec_events): New function.
7028 (linux_target_ops) <supports_exec_events>: Initialize new member.
7029 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7030 new member.
7031 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7032 * server.c (report_exec_events): New global variable.
7033 (handle_query): Handle qSupported query for exec-events feature.
7034 (captured_main): Initialize report_exec_events.
7035 * server.h (report_exec_events): Declare new global variable.
7036 * target.h (struct target_ops) <supports_exec_events>: New
7037 member.
7038 (target_supports_exec_events): New macro.
7039 * win32-low.c (win32_target_ops) <supports_exec_events>:
7040 Initialize new member.
7041
7042 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7043
7044 * linux-low.c (linux_low_enable_btrace): Remove.
7045 (linux_target_ops): Replace linux_low_enable_btrace with
7046 linux_enable_btrace.
7047
7048 2015-09-03 Yao Qi <yao.qi@linaro.org>
7049
7050 * linux-aarch64-low.c (aarch64_insert_point): Call
7051 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7052 returns true.
7053
7054 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7055
7056 * linux-low.c (check_stopped_by_breakpoint): Use
7057 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7058
7059 2015-08-27 Pedro Alves <palves@redhat.com>
7060
7061 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7062
7063 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7064
7065 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7066 the XNEW-family equivalent.
7067 (compile_bytecodes): Likewise.
7068 * dll.c (loaded_dll): Likewise.
7069 * event-loop.c (append_callback_event): Likewise.
7070 (create_file_handler): Likewise.
7071 (create_file_event): Likewise.
7072 * hostio.c (handle_open): Likewise.
7073 * inferiors.c (add_thread): Likewise.
7074 (add_process): Likewise.
7075 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7076 * linux-arm-low.c (arm_new_process): Likewise.
7077 (arm_new_thread): Likewise.
7078 * linux-low.c (add_to_pid_list): Likewise.
7079 (linux_add_process): Likewise.
7080 (handle_extended_wait): Likewise.
7081 (add_lwp): Likewise.
7082 (enqueue_one_deferred_signal): Likewise.
7083 (enqueue_pending_signal): Likewise.
7084 (linux_resume_one_lwp_throw): Likewise.
7085 (linux_resume_one_thread): Likewise.
7086 (linux_read_memory): Likewise.
7087 (linux_write_memory): Likewise.
7088 * linux-mips-low.c (mips_linux_new_process): Likewise.
7089 (mips_linux_new_thread): Likewise.
7090 (mips_add_watchpoint): Likewise.
7091 * linux-x86-low.c (initialize_low_arch): Likewise.
7092 * lynx-low.c (lynx_add_process): Likewise.
7093 * mem-break.c (set_raw_breakpoint_at): Likewise.
7094 (set_breakpoint): Likewise.
7095 (add_condition_to_breakpoint): Likewise.
7096 (add_commands_to_breakpoint): Likewise.
7097 (clone_agent_expr): Likewise.
7098 (clone_one_breakpoint): Likewise.
7099 * regcache.c (new_register_cache): Likewise.
7100 * remote-utils.c (look_up_one_symbol): Likewise.
7101 * server.c (queue_stop_reply): Likewise.
7102 (start_inferior): Likewise.
7103 (queue_stop_reply_callback): Likewise.
7104 (handle_target_event): Likewise.
7105 * spu-low.c (fetch_ppc_memory): Likewise.
7106 (store_ppc_memory): Likewise.
7107 * target.c (set_target_ops): Likewise.
7108 * thread-db.c (thread_db_load_search): Likewise.
7109 (try_thread_db_load_1): Likewise.
7110 * tracepoint.c (add_tracepoint): Likewise.
7111 (add_tracepoint_action): Likewise.
7112 (create_trace_state_variable): Likewise.
7113 (cmd_qtdpsrc): Likewise.
7114 (cmd_qtro): Likewise.
7115 (add_while_stepping_state): Likewise.
7116 * win32-low.c (child_add_thread): Likewise.
7117 (get_image_name): Likewise.
7118
7119 2015-08-25 Yao Qi <yao.qi@linaro.org>
7120
7121 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7122
7123 2015-08-25 Yao Qi <yao.qi@linaro.org>
7124
7125 * Makefile.in (aarch64-linux.o): New rule.
7126 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7127 srv_tgtobj.
7128 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7129 (aarch64_init_debug_reg_state): Make it extern.
7130 (aarch64_linux_prepare_to_resume): Remove.
7131
7132 2015-08-25 Yao Qi <yao.qi@linaro.org>
7133
7134 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7135 lwp_arch_private_info and ptid_of_lwp.
7136
7137 2015-08-25 Yao Qi <yao.qi@linaro.org>
7138
7139 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7140 Find proc_info by find_process_pid. All callers updated.
7141
7142 2015-08-25 Yao Qi <yao.qi@linaro.org>
7143
7144 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7145 Remove.
7146 (debug_reg_change_callback): Remove.
7147 (aarch64_notify_debug_reg_change): Remove.
7148
7149 2015-08-25 Yao Qi <yao.qi@linaro.org>
7150
7151 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7152 Call current_lwp_ptid.
7153
7154 2015-08-25 Yao Qi <yao.qi@linaro.org>
7155
7156 * linux-aarch64-low.c (debug_reg_change_callback): Use
7157 debug_printf.
7158
7159 2015-08-25 Yao Qi <yao.qi@linaro.org>
7160
7161 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7162
7163 2015-08-25 Yao Qi <yao.qi@linaro.org>
7164
7165 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7166
7167 2015-08-25 Yao Qi <yao.qi@linaro.org>
7168
7169 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7170 the code.
7171
7172 2015-08-25 Yao Qi <yao.qi@linaro.org>
7173
7174 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7175 Remove.
7176 (debug_reg_change_callback): Remove argument entry and add argument
7177 lwp. Remove local variable thread. Don't print thread id in the
7178 debugging output. Don't check whether pid of thread equals to pid.
7179 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7180 iterate_over_lwps instead find_inferior.
7181
7182 2015-08-24 Pedro Alves <palves@redhat.com>
7183
7184 * inferiors.c (get_first_process): New function.
7185 * inferiors.h (get_first_process): New declaration.
7186 * remote-utils.c (read_ptid): Default to the first process in the
7187 list, instead of to the current thread's process.
7188
7189 2015-08-24 Pedro Alves <palves@redhat.com>
7190
7191 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7192 * event-loop.c: Likewise.
7193 * remote-utils.c: Likewise.
7194 * tracepoint.c: Likewise.
7195
7196 2015-08-24 Pedro Alves <palves@redhat.com>
7197
7198 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7199 ptid_get_lwp.
7200
7201 2015-08-21 Pedro Alves <palves@redhat.com>
7202
7203 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7204 instead of literal 1.
7205
7206 2015-08-21 Pedro Alves <palves@redhat.com>
7207
7208 * tdesc.c (default_description): Explicitly zero-initialize.
7209
7210 2015-08-21 Pedro Alves <palves@redhat.com>
7211
7212 PR gdb/18749
7213 * inferiors.c (remove_thread): Discard any pending stop reply for
7214 this thread.
7215 * server.c (remove_all_on_match_pid): Rename to ...
7216 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7217 instead of a pid.
7218 (discard_queued_stop_replies): Change parameter to a ptid. Now
7219 extern.
7220 (handle_v_kill, kill_inferior_callback, captured_main)
7221 (process_serial_event): Adjust.
7222 * server.h (discard_queued_stop_replies): Declare.
7223
7224 2015-08-21 Pedro Alves <palves@redhat.com>
7225
7226 * linux-low.c (wait_for_sigstop): Always switch to no thread
7227 selected if the previously current thread dies.
7228 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7229 process instead of the current thread's.
7230 * remote-utils.c (input_interrupt): Don't check if there's no
7231 current thread.
7232 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7233 current thread to the general thread fails, error out.
7234 (handle_qxfer_auxv, handle_qxfer_libraries)
7235 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7236 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7237 (handle_query): Check if there's a thread selected instead of
7238 checking whether there's any thread in the thread list.
7239 (handle_qxfer_threads, handle_qxfer_btrace)
7240 (handle_qxfer_btrace_conf): Don't error out early if there's no
7241 thread in the thread list.
7242 (handle_v_cont, myresume): Don't set the current thread to the
7243 continue thread.
7244 (process_serial_event) <Hg handling>: Also set thread_id if the
7245 previous general thread is still alive.
7246 (process_serial_event) <g/G handling>: If setting the current
7247 thread to the general thread fails, error out.
7248 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7249 thread's lwp instead of the current thread's.
7250 * target.c (set_desired_thread): If the desired thread was not
7251 found, leave the current thread pointing to NULL. Return an int
7252 (boolean) indicating success.
7253 * target.h (set_desired_thread): Change return type to int.
7254
7255 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7256
7257 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7258 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7259 #includes.
7260 (ps_get_thread_area): New function.
7261
7262 2015-08-19 Gary Benson <gbenson@redhat.com>
7263
7264 * hostio.c (handle_pread): Do not attempt to read more data
7265 than hostio_reply_with_data can fit in a packet.
7266
7267 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7268
7269 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7270
7271 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7272
7273 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7274
7275 2015-08-06 Pedro Alves <palves@redhat.com>
7276
7277 * tracepoint.c (expr_eval_result): Now an int.
7278
7279 2015-08-06 Pedro Alves <palves@redhat.com>
7280
7281 * gdbthread.h (struct regcache): Forward declare.
7282 (struct thread_info) <regcache_data>: Now a struct regcache
7283 pointer.
7284 * inferiors.c (inferior_regcache_data)
7285 (set_inferior_regcache_data): Now work with struct regcache
7286 pointers.
7287 * inferiors.h (struct regcache): Forward declare.
7288 (inferior_regcache_data, set_inferior_regcache_data): Now work
7289 with struct regcache pointers.
7290 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7291 (free_register_cache_thread): Remove struct regcache pointer
7292 casts.
7293
7294 2015-08-06 Pedro Alves <palves@redhat.com>
7295
7296 * server.c (captured_main): On error, print the exception message
7297 to stderr, and if run_once is set, throw a quit.
7298
7299 2015-08-06 Pedro Alves <palves@redhat.com>
7300
7301 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7302 the current thread.
7303
7304 2015-08-06 Pedro Alves <palves@redhat.com>
7305
7306 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7307 reading beyond the passed in buffer length.
7308
7309 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7310
7311 * tracepoint.c (symbol_list) <required>: Remove.
7312
7313 2015-08-06 Pedro Alves <palves@redhat.com>
7314
7315 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7316 count if stopping and suspending threads.
7317 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7318 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7319 (linux_detach): Complete an ongoing step-over.
7320 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7321 throughout.
7322 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7323 (linux_wait_1): If passing a signal to the inferior after
7324 finishing a step-over, unsuspend and re-resume all lwps. If we
7325 see a single-step event but the thread should be continuing, don't
7326 pass the trap to gdb.
7327 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7328 internal_error instead of gdb_assert.
7329 (enqueue_pending_signal): New function.
7330 (check_ptrace_stopped_lwp_gone): Add debug output.
7331 (start_step_over): Use internal_error instead of gdb_assert.
7332 (complete_ongoing_step_over): New function.
7333 (linux_resume_one_thread): Don't resume a suspended thread.
7334 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7335 it stepping.
7336
7337 2015-08-06 Pedro Alves <palves@redhat.com>
7338
7339 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7340 (linux_thread_alive): Use lwp_is_marked_dead.
7341 (extended_event_reported): Delete.
7342 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7343 instead of extended_event_reported.
7344 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7345 as well.
7346 (lwp_is_marked_dead): New function.
7347 (lwp_running): Use lwp_is_marked_dead.
7348 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7349 comment.
7350
7351 2015-08-06 Pedro Alves <palves@redhat.com>
7352
7353 * linux-low.c (linux_wait_1): Move fork event output out of the
7354 !report_to_gdb check. Pass event_child->waitstatus to
7355 target_waitstatus_to_string instead of ourstatus.
7356
7357 2015-08-04 Yao Qi <yao.qi@linaro.org>
7358
7359 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7360 if current_thread is 32 bit.
7361
7362 2015-08-04 Yao Qi <yao.qi@linaro.org>
7363
7364 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7365 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7366 * server.c (extended_protocol): Remove "static".
7367 * server.h (extended_protocol): Declare it.
7368
7369 2015-08-04 Yao Qi <yao.qi@linaro.org>
7370
7371 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7372 both aarch64 and aarch32.
7373 (aarch64_set_pc): Likewise.
7374
7375 2015-08-04 Yao Qi <yao.qi@linaro.org>
7376
7377 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7378 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7379 arm-with-neon.xml to srv_xmlfiles.
7380 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7381 (is_64bit_tdesc): New function.
7382 (aarch64_linux_read_description): New function.
7383 (aarch64_arch_setup): Call aarch64_linux_read_description.
7384 (regs_info): Rename to regs_info_aarch64.
7385 (aarch64_regs_info): Return right regs_info.
7386 (initialize_low_arch): Call initialize_low_arch_aarch32.
7387
7388 2015-08-04 Yao Qi <yao.qi@linaro.org>
7389
7390 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7391 * linux-aarch32-low.c: New file.
7392 * linux-aarch32-low.h: New file.
7393 * linux-arm-low.c (arm_fill_gregset): Move it to
7394 linux-aarch32-low.c.
7395 (arm_store_gregset): Likewise.
7396 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7397 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7398 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7399 (regs_info): Rename to regs_info_arm.
7400 (arm_regs_info): Return regs_info_aarch32 if
7401 have_ptrace_getregset is 1 and target description is
7402 arm_with_neon or arm_with_vfpv3.
7403 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7404 Call initialize_low_arch_aarch32 instead.
7405
7406 2015-08-04 Yao Qi <yao.qi@linaro.org>
7407
7408 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7409 * linux-low.c: ... here.
7410 * linux-low.h (have_ptrace_getregset): Declare it.
7411
7412 2015-08-04 Pedro Alves <palves@redhat.com>
7413
7414 * thread-db.c (struct thread_db): Use new typedefs.
7415 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7416 CHK calls.
7417 (disable_thread_event_reporting): Cast result of dlsym to
7418 destination function pointer type.
7419 (thread_db_mourn): Use td_ta_delete_ftype.
7420
7421 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7422
7423 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7424 arch variant.
7425 (CDX_BREAKPOINT): Define for R2.
7426 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7427 (the_low_target): Add comments.
7428
7429 2015-07-30 Yao Qi <yao.qi@linaro.org>
7430
7431 * linux-arm-low.c (arm_hwcap): Remove it.
7432 (arm_read_description): New local variable arm_hwcap. Don't
7433 set arm_hwcap to zero.
7434
7435 2015-07-30 Yao Qi <yao.qi@linaro.org>
7436
7437 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7438 Use regcache->tdesc instead.
7439 (arm_store_wmmxregset): Likewise.
7440 (arm_fill_vfpregset): Likewise.
7441 (arm_store_vfpregset): Likewise.
7442
7443 2015-07-30 Yao Qi <yao.qi@linaro.org>
7444
7445 * linux-arm-low.c: Include arch/arm.h.
7446 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7447 (arm_store_gregset): Likewise.
7448
7449 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7450
7451 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7452 ptrace's 4th parameter.
7453
7454 2015-07-27 Yao Qi <yao.qi@linaro.org>
7455
7456 * configure.srv (case aarch64*-*-linux*): Don't set
7457 srv_linux_usrregs.
7458
7459 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7460
7461 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7462 sys/ptrace.h.
7463 * linux-arm-low.c: Likewise.
7464 * linux-cris-low.c: Likewise.
7465 * linux-crisv32-low.c: Likewise.
7466 * linux-low.c: Likewise.
7467 * linux-m68k-low.c: Likewise.
7468 * linux-mips-low.c: Likewise.
7469 * linux-nios2-low.c: Likewise.
7470 * linux-s390-low.c: Likewise.
7471 * linux-sparc-low.c: Likewise.
7472 * linux-tic6x-low.c: Likewise.
7473 * linux-tile-low.c: Likewise.
7474 * linux-x86-low.c: Likewise.
7475
7476 2015-07-24 Pedro Alves <palves@redhat.com>
7477
7478 * config.in: Regenerate.
7479 * configure: Regenerate.
7480
7481 2015-07-24 Pedro Alves <palves@redhat.com>
7482
7483 * acinclude.m4: Include ../ptrace.m4.
7484 * configure.ac: Call GDB_AC_PTRACE.
7485 * config.in, configure: Regenerate.
7486
7487 2015-07-24 Yao Qi <yao.qi@linaro.org>
7488
7489 * linux-low.c (linux_create_inferior): Remove setting to
7490 proc->priv->new_inferior.
7491 (linux_attach): Likewise.
7492 (linux_low_filter_event): Likewise.
7493 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7494
7495 2015-07-24 Yao Qi <yao.qi@linaro.org>
7496
7497 * linux-low.c (linux_arch_setup): New function.
7498 (linux_low_filter_event): If proc->tdesc is NULL and
7499 proc->attached is true, call the_low_target.arch_setup.
7500 Otherwise, keep status pending, and return.
7501 (linux_resume_one_lwp_throw): Don't call get_pc if
7502 thread->while_stepping isn't NULL. Don't call
7503 get_thread_regcache if proc->tdesc is NULL.
7504 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7505 (linux_target_ops): Install arch_setup.
7506 * server.c (start_inferior): Call the_target->arch_setup.
7507 * target.h (struct target_ops) <arch_setup>: New field.
7508 (target_arch_setup): New marco.
7509 * lynx-low.c (lynx_target_ops): Update.
7510 * nto-low.c (nto_target_ops): Update.
7511 * spu-low.c (spu_target_ops): Update.
7512 * win32-low.c (win32_target_ops): Update.
7513
7514 2015-07-24 Yao Qi <yao.qi@linaro.org>
7515
7516 * linux-low.c (linux_add_process): Don't set
7517 proc->priv->new_inferior.
7518 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7519 (linux_attach): Likewise.
7520
7521 2015-07-24 Yao Qi <yao.qi@linaro.org>
7522
7523 * server.c (start_inferior): Code refactor.
7524
7525 2015-07-24 Yao Qi <yao.qi@linaro.org>
7526
7527 * server.c (process_serial_event): Set general_thread.
7528
7529 2015-07-21 Yao Qi <yao.qi@linaro.org>
7530
7531 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7532 aarch64_linux_get_debug_reg_capacity.
7533
7534 2015-07-17 Yao Qi <yao.qi@linaro.org>
7535
7536 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7537 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7538 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7539 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7540 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7541 (AARCH64_HWP_ALIGNMENT): Likewise.
7542 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7543 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7544 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7545 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7546 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7547 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7548 (struct aarch64_debug_reg_state): Likewise.
7549 (struct arch_lwp_info): Likewise.
7550 (aarch64_align_watchpoint): Likewise.
7551 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7552 (aarch64_watchpoint_length): Likewise.
7553 (aarch64_point_encode_ctrl_reg): Likewise
7554 (aarch64_point_is_aligned): Likewise.
7555 (aarch64_align_watchpoint): Likewise.
7556 (aarch64_linux_set_debug_regs):
7557 (aarch64_dr_state_insert_one_point): Likewise.
7558 (aarch64_dr_state_remove_one_point): Likewise.
7559 (aarch64_handle_breakpoint): Likewise.
7560 (aarch64_handle_aligned_watchpoint): Likewise.
7561 (aarch64_handle_unaligned_watchpoint): Likewise.
7562 (aarch64_handle_watchpoint): Likewise.
7563
7564 2015-07-17 Yao Qi <yao.qi@linaro.org>
7565
7566 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7567 and don't aarch64_get_debug_reg_state. All callers update.
7568 (aarch64_handle_aligned_watchpoint): Likewise.
7569 (aarch64_handle_unaligned_watchpoint): Likewise.
7570 (aarch64_handle_watchpoint): Likewise.
7571 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7572 (aarch64_remove_point): Likewise.
7573
7574 2015-07-17 Yao Qi <yao.qi@linaro.org>
7575
7576 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7577 debug_printf.
7578 (aarch64_handle_unaligned_watchpoint): Likewise.
7579
7580 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7581
7582 Revert the previous 3 commits:
7583 Move gdb_regex* to common/
7584 Move linux_find_memory_regions_full & co.
7585 gdbserver build-id attribute generator
7586
7587 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7588 Jan Kratochvil <jan.kratochvil@redhat.com>
7589
7590 gdbserver build-id attribute generator.
7591 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7592 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7593 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7594 (find_phdr): New.
7595 (get_dynamic): Use find_pdhr to traverse program headers.
7596 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7597 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7598 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7599 (get_hex_build_id): New.
7600 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7601 to reply XML document.
7602
7603 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7604 Jan Kratochvil <jan.kratochvil@redhat.com>
7605
7606 * target.c: Include target/target-utils.h and fcntl.h.
7607 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7608 (target_fileio_read_stralloc): New functions.
7609
7610 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7611
7612 * Makefile.in (OBS): Add gdb_regex.o.
7613 (gdb_regex.o): New.
7614 * config.in: Rebuilt.
7615 * configure: Rebuilt.
7616
7617 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7618 Jan Kratochvil <jan.kratochvil@redhat.com>
7619
7620 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7621 * Makefile.in (OBS): Add target-utils.o.
7622 (linux-maps.o, target-utils.o): New.
7623 * configure.srv (srv_linux_obj): Add linux-maps.o.
7624
7625 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7626
7627 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7628 function, return 1.
7629 (the_low_target): Install it.
7630
7631 2015-07-14 Pedro Alves <palves@redhat.com>
7632
7633 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7634 Instead, ignore ECHILD, and throw an error for other errnos.
7635
7636 2015-07-10 Pedro Alves <palves@redhat.com>
7637
7638 * event-loop.c (struct callback_event) <data>: Change type to
7639 gdb_client_data instance instead of gdb_client_data pointer.
7640 (append_callback_event): Adjust.
7641
7642 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7643
7644 * linux-aarch64-low.c: Add comments for each linux_target_ops
7645 method. Remove comments already covered in target_ops and
7646 linux_target_ops definitions.
7647 (the_low_target): Add comments for each unimplemented method.
7648
7649 2015-07-09 Yao Qi <yao.qi@linaro.org>
7650
7651 * linux-aarch64-low.c (aarch64_regmap): Remove.
7652 (aarch64_usrregs_info): Remove.
7653 (regs_info): Set field usrregs to NULL.
7654
7655 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7656
7657 * linux-low.c: Include "rsp-low.h"
7658 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7659 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7660 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7661 (handle_btrace_enable_pt): New.
7662 (handle_btrace_general_set): Support "pt".
7663 (handle_btrace_conf_general_set): Support "pt:size".
7664
7665 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7666
7667 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7668 Z_PACKET_SW_BP.
7669
7670 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7671
7672 * linux-aarch64-low.c: Remove comment about endianness.
7673 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7674 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7675 memcmp.
7676
7677 2015-06-24 Gary Benson <gbenson@redhat.com>
7678
7679 * linux-i386-ipa.c (stdint.h): Do not include.
7680 * lynx-i386-low.c (stdint.h): Likewise.
7681 * lynx-ppc-low.c (stdint.h): Likewise.
7682 * mem-break.c (stdint.h): Likewise.
7683 * thread-db.c (stdint.h): Likewise.
7684 * tracepoint.c (stdint.h): Likewise.
7685 * win32-low.c (stdint.h): Likewise.
7686
7687 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7688
7689 * server.c (write_qxfer_response): Update call to
7690 remote_escape_output.
7691
7692 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7693 Jan Kratochvil <jan.kratochvil@redhat.com>
7694
7695 Merge multiple hex conversions.
7696 * gdbreplay.c (tohex): Rename to 'fromhex'.
7697 (logchar): Use fromhex.
7698
7699 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7700
7701 * server.c (handle_qxfer_libraries): Set `version' attribute for
7702 <library-list>.
7703
7704 2015-06-10 Gary Benson <gbenson@redhat.com>
7705
7706 * target.h (struct target_ops) <multifs_open>: New field.
7707 <multifs_unlink>: Likewise.
7708 <multifs_readlink>: Likewise.
7709 * linux-low.c (nat/linux-namespaces.h): New include.
7710 (linux_target_ops): Initialize the_target->multifs_open,
7711 the_target->multifs_unlink and the_target->multifs_readlink.
7712 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7713 * hostio.c (hostio_fs_pid): New static variable.
7714 (hostio_handle_new_gdb_connection): New function.
7715 (handle_setfs): Likewise.
7716 (handle_open): Use the_target->multifs_open as appropriate.
7717 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7718 (handle_readlink): Use the_target->multifs_readlink as
7719 appropriate.
7720 (handle_vFile): Handle vFile:setfs packets.
7721 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7722 after target_handle_new_gdb_connection.
7723
7724 2015-06-10 Gary Benson <gbenson@redhat.com>
7725
7726 * configure.ac (AC_CHECK_FUNCS): Add setns.
7727 * config.in: Regenerate.
7728 * configure: Likewise.
7729 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7730 (linux-namespaces.o): New rule.
7731 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7732
7733 2015-06-09 Gary Benson <gbenson@redhat.com>
7734
7735 * hostio.c (handle_open): Process mode argument with
7736 fileio_to_host_mode.
7737
7738 2015-06-01 Yao Qi <yao.qi@linaro.org>
7739
7740 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7741 * linux-x86-low.c: Likewise.
7742
7743 2015-05-28 Don Breazeal <donb@codesourcery.com>
7744
7745 * linux-low.c (handle_extended_wait): Initialize
7746 thread_info.last_resume_kind for new fork children.
7747
7748 2015-05-15 Pedro Alves <palves@redhat.com>
7749
7750 * target.h (target_handle_new_gdb_connection): Rewrite using if
7751 wrapped in do/while.
7752
7753 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7754
7755 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7756 * configure, config.in: Regenerate.
7757 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7758 Declare typedef.
7759
7760 2015-05-12 Don Breazeal <donb@codesourcery.com>
7761
7762 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7763 PTRACE_EVENT_VFORK_DONE.
7764 (linux_low_ptrace_options, extended_event_reported): Add vfork
7765 events.
7766 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7767 and "vforkdone" for RSP 'T' Stop Reply Packet.
7768 * server.h (report_vfork_events): Declare
7769 global variable.
7770
7771 2015-05-12 Don Breazeal <donb@codesourcery.com>
7772
7773 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7774 (the_low_target) <new_fork>: Initialize new member.
7775 * linux-arm-low.c (arm_new_fork): New function.
7776 (the_low_target) <new_fork>: Initialize new member.
7777 * linux-low.c (handle_extended_wait): Call new target function
7778 new_fork.
7779 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7780 * linux-mips-low.c (mips_add_watchpoint): New function
7781 extracted from mips_insert_point.
7782 (the_low_target) <new_fork>: Initialize new member.
7783 (mips_linux_new_fork): New function.
7784 (mips_insert_point): Call mips_add_watchpoint.
7785 * linux-x86-low.c (x86_linux_new_fork): New function.
7786 (the_low_target) <new_fork>: Initialize new member.
7787
7788 2015-05-12 Don Breazeal <donb@codesourcery.com>
7789
7790 * linux-low.c (handle_extended_wait): Implement return value,
7791 rename argument 'event_child' to 'event_lwp', handle
7792 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7793 (linux_low_ptrace_options): New function.
7794 (linux_low_filter_event): Call linux_low_ptrace_options,
7795 use different argument fo linux_enable_event_reporting,
7796 use return value from handle_extended_wait.
7797 (extended_event_reported): New function.
7798 (linux_wait_1): Call extended_event_reported and set
7799 status to report fork events.
7800 (linux_write_memory): Add pid to debug message.
7801 (reset_lwp_ptrace_options_callback): New function.
7802 (linux_handle_new_gdb_connection): New function.
7803 (linux_target_ops): Initialize new structure member.
7804 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7805 * lynx-low.c: Initialize new structure member.
7806 * remote-utils.c (prepare_resume_reply): Implement stop reason
7807 "fork" for "T" stop message.
7808 * server.c (handle_query): Call handle_new_gdb_connection.
7809 * server.h (report_fork_events): Declare global flag.
7810 * target.h (struct target_ops) <handle_new_gdb_connection>:
7811 New member.
7812 (target_handle_new_gdb_connection): New macro.
7813 * win32-low.c: Initialize new structure member.
7814
7815 2015-05-12 Don Breazeal <donb@codesourcery.com>
7816
7817 * mem-break.c (APPEND_TO_LIST): Define macro.
7818 (clone_agent_expr): New function.
7819 (clone_one_breakpoint): New function.
7820 (clone_all_breakpoints): New function.
7821 * mem-break.h: Declare new functions.
7822
7823 2015-05-12 Don Breazeal <donb@codesourcery.com>
7824
7825 * linux-low.c (linux_supports_fork_events): New function.
7826 (linux_supports_vfork_events): New function.
7827 (linux_target_ops): Initialize new structure members.
7828 (initialize_low): Call linux_check_ptrace_features.
7829 * lynx-low.c (lynx_target_ops): Initialize new structure
7830 members.
7831 * server.c (report_fork_events, report_vfork_events):
7832 New global flags.
7833 (handle_query): Add new features to qSupported packet and
7834 response.
7835 (captured_main): Initialize new global variables.
7836 * target.h (struct target_ops) <supports_fork_events>:
7837 New member.
7838 <supports_vfork_events>: New member.
7839 (target_supports_fork_events): New macro.
7840 (target_supports_vfork_events): New macro.
7841 * win32-low.c (win32_target_ops): Initialize new structure
7842 members.
7843
7844 2015-05-12 Gary Benson <gbenson@redhat.com>
7845
7846 * server.c (handle_qxfer_exec_file): Use current process
7847 if annex is empty.
7848
7849 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7850
7851 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7852 Remove HAVE_PTRACE_GETREGS conditionals.
7853 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7854 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7855
7856 2015-05-08 Yao Qi <yao.qi@linaro.org>
7857
7858 * linux-low.c (linux_supports_conditional_breakpoints): New
7859 function.
7860 (linux_target_ops): Install new target method.
7861 * lynx-low.c (lynx_target_ops): Install NULL hook for
7862 supports_conditional_breakpoints.
7863 * nto-low.c (nto_target_ops): Likewise.
7864 * spu-low.c (spu_target_ops): Likewise.
7865 * win32-low.c (win32_target_ops): Likewise.
7866 * server.c (handle_query): Check
7867 target_supports_conditional_breakpoints.
7868 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7869 New field.
7870 (target_supports_conditional_breakpoints): New macro.
7871
7872 2015-05-06 Pedro Alves <palves@redhat.com>
7873
7874 PR server/18081
7875 * server.c (start_inferior): If the process exits, mourn it.
7876
7877 2015-04-21 Gary Benson <gbenson@redhat.com>
7878
7879 * hostio.c (fileio_open_flags_to_host): Factored out to
7880 fileio_to_host_openflags in common/fileio.c. Single use
7881 updated.
7882
7883 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7884
7885 * linux-xtensa-low.c (xtensa_fill_gregset)
7886 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7887 XCHAL_HAVE_LOOP.
7888
7889 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7890
7891 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7892 (regs_info): Replace usrregs pointer with NULL.
7893
7894 2015-04-17 Gary Benson <gbenson@redhat.com>
7895
7896 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7897 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7898 * server.c (handle_qxfer_exec_file): New function.
7899 (qxfer_packets): Add exec-file entry.
7900 (handle_query): Report qXfer:exec-file:read as supported packet.
7901
7902 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7903
7904 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7905
7906 2015-04-09 Gary Benson <gbenson@redhat.com>
7907
7908 * hostio-errno.c (errno_to_fileio_error): Remove function.
7909 Update caller to use remote_fileio_to_fio_error.
7910
7911 2015-04-09 Yao Qi <yao.qi@linaro.org>
7912
7913 * linux-low.c (linux_insert_point): Call
7914 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7915 (linux_remove_point): Call remove_memory_breakpoint if type is
7916 raw_bkpt_type_sw.
7917 * linux-x86-low.c (x86_insert_point): Don't call
7918 insert_memory_breakpoint.
7919 (x86_remove_point): Don't call remove_memory_breakpoint.
7920
7921 2015-04-01 Pedro Alves <palves@redhat.com>
7922 Cleber Rosa <crosa@redhat.com>
7923
7924 * server.c (gdbserver_usage): Reorganize and extend the usage
7925 message.
7926
7927 2015-03-24 Pedro Alves <palves@redhat.com>
7928
7929 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7930 output. Also dump TRAP_TRACE.
7931 (linux_low_filter_event): In debug output, distinguish a
7932 resume_stop SIGSTOP from a delayed SIGSTOP.
7933
7934 2015-03-24 Gary Benson <gbenson@redhat.com>
7935
7936 * linux-x86-low.c (x86_linux_new_thread): Moved to
7937 nat/x86-linux.c.
7938 (x86_linux_prepare_to_resume): Likewise.
7939
7940 2015-03-24 Gary Benson <gbenson@redhat.com>
7941
7942 * Makefile.in (x86-linux-dregs.o): New rule.
7943 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7944 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7945 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7946 (x86_linux_dr_get): Likewise.
7947 (x86_linux_dr_set): Likewise.
7948 (update_debug_registers_callback): Likewise.
7949 (x86_linux_dr_set_addr): Likewise.
7950 (x86_linux_dr_get_addr): Likewise.
7951 (x86_linux_dr_set_control): Likewise.
7952 (x86_linux_dr_get_control): Likewise.
7953 (x86_linux_dr_get_status): Likewise.
7954 (x86_linux_update_debug_registers): Likewise.
7955
7956 2015-03-24 Gary Benson <gbenson@redhat.com>
7957
7958 * linux-x86-low.c (x86_linux_update_debug_registers):
7959 New function, factored out from...
7960 (x86_linux_prepare_to_resume): ...this.
7961
7962 2015-03-24 Gary Benson <gbenson@redhat.com>
7963
7964 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7965 (x86_linux_dr_set): Likewise.
7966 (update_debug_registers_callback): Likewise.
7967 (x86_linux_dr_set_addr): Likewise.
7968 (x86_linux_dr_get_addr): Likewise.
7969 (x86_linux_dr_set_control): Likewise.
7970 (x86_linux_dr_get_control): Likewise.
7971 (x86_linux_dr_get_status): Likewise.
7972 (x86_linux_prepare_to_resume): Likewise.
7973
7974 2015-03-24 Gary Benson <gbenson@redhat.com>
7975
7976 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7977 Use perror_with_name. Pass string through gettext.
7978 (x86_linux_dr_set): Likewise.
7979
7980 2015-03-24 Gary Benson <gbenson@redhat.com>
7981
7982 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7983 (x86_linux_dr_set_addr): ...this.
7984 (x86_dr_low_get_addr): Rename to...
7985 (x86_linux_dr_get_addr): ...this.
7986 (x86_dr_low_set_control): Rename to...
7987 (x86_linux_dr_set_control): ...this.
7988 (x86_dr_low_get_control): Rename to...
7989 (x86_linux_dr_get_control): ...this.
7990 (x86_dr_low_get_status): Rename to...
7991 (x86_linux_dr_get_status): ...this.
7992 (x86_dr_low): Update with new function names.
7993
7994 2015-03-24 Gary Benson <gbenson@redhat.com>
7995
7996 * Makefile.in (x86-linux.o): New rule.
7997 * configure.srv: Add x86-linux.o to relevant targets.
7998 * linux-low.c (lwp_set_arch_private_info): New function.
7999 (lwp_arch_private_info): Likewise.
8000 * linux-x86-low.c: Include nat/x86-linux.h.
8001 (arch_lwp_info): Removed structure.
8002 (update_debug_registers_callback):
8003 Use lwp_set_debug_registers_changed.
8004 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8005 and lwp_set_debug_registers_changed.
8006 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8007
8008 2015-03-24 Gary Benson <gbenson@redhat.com>
8009
8010 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8011 * linux-arm-low.c (arm_new_thread): Likewise.
8012 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8013 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8014 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8015 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8016
8017 2015-03-24 Gary Benson <gbenson@redhat.com>
8018
8019 * linux-low.c (ptid_of_lwp): New function.
8020 (lwp_is_stopped): Likewise.
8021 (lwp_stop_reason): Likewise.
8022 * linux-x86-low.c (update_debug_registers_callback):
8023 Use lwp_is_stopped.
8024 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8025 lwp_stop_reason.
8026
8027 2015-03-24 Gary Benson <gbenson@redhat.com>
8028
8029 * linux-low.h (linux_stop_lwp): Remove declaration.
8030
8031 2015-03-24 Gary Benson <gbenson@redhat.com>
8032
8033 * linux-low.h: Include nat/linux-nat.h.
8034 * linux-low.c (iterate_over_lwps_args): New structure.
8035 (iterate_over_lwps_filter): New function.
8036 (iterate_over_lwps): Likewise.
8037 * linux-x86-low.c (update_debug_registers_callback):
8038 Update signature to what iterate_over_lwps expects.
8039 Remove PID check that iterate_over_lwps now performs.
8040 (x86_dr_low_set_addr): Use iterate_over_lwps.
8041 (x86_dr_low_set_control): Likewise.
8042
8043 2015-03-24 Gary Benson <gbenson@redhat.com>
8044
8045 * linux-x86-low.c (x86_debug_reg_state): New function.
8046 (x86_linux_prepare_to_resume): Use the above.
8047
8048 2015-03-24 Gary Benson <gbenson@redhat.com>
8049
8050 * linux-low.c (current_lwp_ptid): New function.
8051 * linux-x86-low.c: Include nat/linux-nat.h.
8052 (x86_dr_low_get_addr): Use current_lwp_ptid.
8053 (x86_dr_low_get_control): Likewise.
8054 (x86_dr_low_get_status): Likewise.
8055
8056 2015-03-20 Pedro Alves <palves@redhat.com>
8057
8058 * tracepoint.c (cmd_qtstatus): Make "str" const.
8059
8060 2015-03-20 Pedro Alves <palves@redhat.com>
8061
8062 * server.c (handle_general_set): Make "req_str" const.
8063
8064 2015-03-19 Pedro Alves <palves@redhat.com>
8065
8066 * linux-low.c (linux_resume_one_lwp): Rename to ...
8067 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8068 instead call perror_with_name.
8069 (check_ptrace_stopped_lwp_gone): New function.
8070 (linux_resume_one_lwp): Reimplement as wrapper around
8071 linux_resume_one_lwp_throw that swallows errors if the LWP is
8072 gone.
8073
8074 2015-03-19 Pedro Alves <palves@redhat.com>
8075
8076 * linux-low.c (count_events_callback, select_event_lwp_callback):
8077 No longer check whether the thread has resume_stop as last resume
8078 kind.
8079
8080 2015-03-19 Pedro Alves <palves@redhat.com>
8081
8082 * linux-low.c (count_events_callback, select_event_lwp_callback):
8083 Use the lwp's status_pending_p field, not the thread's.
8084
8085 2015-03-19 Pedro Alves <palves@redhat.com>
8086
8087 * linux-low.c (select_event_lwp_callback): Update comments to
8088 no longer mention SIGTRAP.
8089
8090 2015-03-18 Gary Benson <gbenson@redhat.com>
8091
8092 * server.c (handle_query): Do not report vFile:fstat as supported.
8093
8094 2015-03-11 Gary Benson <gbenson@redhat.com>
8095
8096 * hostio.c (sys/types.h): New include.
8097 (sys/stat.h): Likewise.
8098 (common-remote-fileio.h): Likewise.
8099 (handle_fstat): New function.
8100 (handle_vFile): Handle vFile:fstat packets.
8101
8102 2015-03-11 Gary Benson <gbenson@redhat.com>
8103
8104 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8105 struct stat.st_blocks and struct stat.st_blksize.
8106 * configure: Regenerate.
8107 * config.in: Likewise.
8108 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8109 (OBS): Add common-remote-fileio.o.
8110 (common-remote-fileio.o): New rule.
8111
8112 2015-03-09 Pedro Alves <palves@redhat.com>
8113
8114 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8115 'struct sockaddr' pointer in 'accept' call.
8116
8117 2015-03-09 Pedro Alves <palves@redhat.com>
8118
8119 Revert:
8120 2015-03-07 Pedro Alves <palves@redhat.com>
8121 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8122 or <winsock2.h> here. Instead include "gdb_socket.h".
8123 (remote_open): Use union gdb_sockaddr_u.
8124 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8125 or <winsock2.h> here. Instead include "gdb_socket.h".
8126 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8127 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8128 or <sys/un.h>.
8129 (init_named_socket, gdb_agent_helper_thread): Use union
8130 gdb_sockaddr_u.
8131
8132 2015-03-07 Pedro Alves <palves@redhat.com>
8133
8134 * configure.ac (build_warnings): Move
8135 -Wdeclaration-after-statement to the C-specific set.
8136 * configure: Regenerate.
8137
8138 2015-03-07 Pedro Alves <palves@redhat.com>
8139
8140 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8141 or <winsock2.h> here. Instead include "gdb_socket.h".
8142 (remote_open): Use union gdb_sockaddr_u.
8143 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8144 or <winsock2.h> here. Instead include "gdb_socket.h".
8145 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8146 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8147 or <sys/un.h>.
8148 (init_named_socket, gdb_agent_helper_thread): Use union
8149 gdb_sockaddr_u.
8150
8151 2015-03-07 Pedro Alves <palves@redhat.com>
8152
8153 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8154 instead.
8155
8156 2015-03-06 Yao Qi <yao.qi@linaro.org>
8157
8158 * linux-aarch64-low.c (aarch64_insert_point): Use
8159 show_debug_regs as a boolean.
8160 (aarch64_remove_point): Likewise.
8161
8162 2015-03-05 Pedro Alves <palves@redhat.com>
8163
8164 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8165 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8166 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8167 * nto-low.c (nto_target_ops): Likewise.
8168 * spu-low.c (spu_target_ops): Likewise.
8169 * win32-low.c (win32_target_ops): Likewise.
8170
8171 2015-03-04 Pedro Alves <palves@redhat.com>
8172
8173 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8174 Decide whether a breakpoint triggered based on the SIGTRAP's
8175 siginfo.si_code.
8176 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8177 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8178 (linux_low_filter_event): Check for breakpoints before checking
8179 watchpoints.
8180 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8181 siginfo.si_code.
8182 (linux_stopped_by_sw_breakpoint)
8183 (linux_supports_stopped_by_sw_breakpoint)
8184 (linux_stopped_by_hw_breakpoint)
8185 (linux_supports_stopped_by_hw_breakpoint): New functions.
8186 (linux_target_ops): Install new target methods.
8187
8188 2015-03-04 Pedro Alves <palves@redhat.com>
8189
8190 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8191 * server.c (swbreak_feature, hwbreak_feature): New globals.
8192 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8193 (captured_main): Clear swbreak_feature and hwbreak_feature.
8194 * server.h (swbreak_feature, hwbreak_feature): Declare.
8195 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8196 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8197 supports_stopped_by_hw_breakpoint>: New fields.
8198 (target_supports_stopped_by_sw_breakpoint)
8199 (target_stopped_by_sw_breakpoint)
8200 (target_supports_stopped_by_hw_breakpoint)
8201 (target_stopped_by_hw_breakpoint): Declare.
8202
8203 2015-03-04 Pedro Alves <palves@redhat.com>
8204
8205 enum lwp_stop_reason -> enum target_stop_reason
8206 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8207 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8208 (linux_wait_1, stuck_in_jump_pad_callback)
8209 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8210 (linux_stopped_by_watchpoint):
8211 * linux-low.h (enum lwp_stop_reason): Delete.
8212 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8213 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8214
8215 2015-03-04 Yao Qi <yao.qi@linaro.org>
8216
8217 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8218
8219 2015-03-03 Gary Benson <gbenson@redhat.com>
8220
8221 * hostio.c (handle_vFile): Fix prefix lengths.
8222
8223 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8224
8225 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8226 ptr_bits.
8227
8228 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8229
8230 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8231 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8232 (clean): Add "rm -f" for above C files.
8233 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8234 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8235 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8236 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8237 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8238 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8239 (init_registers_s390x_vx_linux64)
8240 (init_registers_s390x_tevx_linux64)
8241 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8242 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8243 declarations.
8244 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8245 (s390_store_vxrs_high): New functions.
8246 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8247 NT_S390_VXRS_HIGH.
8248 (s390_arch_setup): Add logic for selecting one of the new target
8249 descriptions. Activate the new vector regsets if applicable.
8250 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8251 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8252 and init_registers_s390x_tevx_linux64.
8253
8254 2015-03-01 Pedro Alves <palves@redhat.com>
8255
8256 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8257 parameter.
8258
8259 2015-02-27 Pedro Alves <palves@redhat.com>
8260
8261 * linux-x86-low.c (u_debugreg_offset): New function.
8262 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8263
8264 2015-02-27 Pedro Alves <palves@redhat.com>
8265
8266 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8267 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8268 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8269 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8270 (ps_lsetfpregs, ps_getpid)
8271 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8272 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8273 (ps_lsetxregs, ps_plog): Declare.
8274
8275 2015-02-27 Pedro Alves <palves@redhat.com>
8276
8277 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8278 IP_AGENT_EXPORT_FUNC.
8279 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8280 IP_AGENT_EXPORT_FUNC.
8281 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8282 (IP_AGENT_EXPORT): Delete.
8283 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8284 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8285 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8286 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8287 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8288 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8289 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8290 (traceframe_read_count, traceframe_write_count)
8291 (traceframes_created, trace_state_variables, get_raw_reg)
8292 (get_trace_state_variable_value, set_trace_state_variable_value)
8293 (ust_loaded, helper_thread_id, cmd_buf): Use
8294 IPA_SYM_EXPORTED_NAME.
8295 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8296 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8297 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8298 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8299 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8300 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8301 EXTERN_C_PUSH/EXTERN_C_POP.
8302 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8303 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8304 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8305 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8306 (traceframe_write_count, traceframe_read_count)
8307 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8308 (about_to_request_buffer_space, get_trace_state_variable_value)
8309 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8310 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8311 EXTERN_C_PUSH/EXTERN_C_POP.
8312 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8313 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8314 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8315 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8316 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8317 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8318 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8319 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8320 Define.
8321 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8322 (IP_AGENT_EXPORT_VAR_DECL): Define.
8323 (tracing): Declare.
8324 (gdb_agent_get_raw_reg): Declare.
8325
8326 2015-02-27 Tom Tromey <tromey@redhat.com>
8327 Pedro Alves <palves@redhat.com>
8328
8329 Rename symbols whose names are reserved C++ keywords throughout.
8330
8331 2015-02-27 Pedro Alves <palves@redhat.com>
8332
8333 * Makefile.in (COMPILER): New, get it from autoconf.
8334 (CXX): Get from autoconf instead.
8335 (COMPILE.pre): Use COMPILER.
8336 (CC-LD): Rename to ...
8337 (CC_LD): ... this. Use COMPILER.
8338 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8339 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8340 * acinclude.m4: Include build-with-cxx.m4.
8341 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8342 Disable -Werror by default if building in C++ mode.
8343 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8344 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8345 the C++ compiler. Save/restore CXXFLAGS too.
8346 * configure: Regenerate.
8347
8348 2015-02-27 Pedro Alves <palves@redhat.com>
8349
8350 * acinclude.m4: Include libiberty.m4.
8351 * configure.ac: Call libiberty_INIT.
8352 * config.in, configure: Regenerate.
8353
8354 2015-02-26 Pedro Alves <palves@redhat.com>
8355
8356 * linux-low.c (linux_wait_1): When incrementing the PC past a
8357 program breakpoint always use the_low_target.breakpoint_len as
8358 increment, rather than the maximum between that and
8359 the_low_target.decr_pc_after_break.
8360
8361 2015-02-23 Pedro Alves <palves@redhat.com>
8362
8363 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8364 thread was doing a step-over; always adjust the PC if
8365 we stepped over a permanent breakpoint.
8366 (linux_wait_1): If we stepped over breakpoint that was on top of a
8367 permanent breakpoint, manually advance the PC past it.
8368
8369 2015-02-23 Pedro Alves <palves@redhat.com>
8370
8371 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8372 modes.
8373 (x86_fill_gregset, x86_store_gregset): Use it when handling
8374 $orig_eax.
8375
8376 2015-02-20 Pedro Alves <palves@redhat.com>
8377
8378 * thread-db.c: Include "nat/linux-procfs.h".
8379 (thread_db_init): Skip listing new threads if the kernel supports
8380 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8381
8382 2015-02-20 Pedro Alves <palves@redhat.com>
8383
8384 * linux-low.c (status_pending_p_callback): Use ptid_match.
8385
8386 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8387
8388 PR breakpoints/16812
8389 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8390 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8391 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8392
8393 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8394
8395 PR breakpoints/15956
8396 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8397
8398 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8399
8400 * linux-low.c (linux_low_btrace_conf): Print size.
8401 * server.c (handle_btrace_conf_general_set): New.
8402 (hanle_general_set): Call handle_btrace_conf_general_set.
8403 (handle_query): Report Qbtrace-conf:bts:size as supported.
8404
8405 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8406
8407 * linux-low.c (linux_low_enable_btrace): Update parameters.
8408 (linux_low_btrace_conf): New.
8409 (linux_target_ops)<to_btrace_conf>: Initialize.
8410 * server.c (current_btrace_conf): New.
8411 (handle_btrace_enable): Rename to ...
8412 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8413 to target_enable_btrace. Update comment. Update users.
8414 (handle_qxfer_btrace_conf): New.
8415 (qxfer_packets): Add btrace-conf entry.
8416 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8417 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8418 (target_ops)<read_btrace_conf>: New.
8419 (target_enable_btrace): Update parameters.
8420 (target_read_btrace_conf): New.
8421
8422 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8423
8424 * server.c (handle_btrace_general_set): Remove call to
8425 target_supports_btrace.
8426 (supported_btrace_packets): New.
8427 (handle_query): Call supported_btrace_packets.
8428 * target.h: include btrace-common.h.
8429 (btrace_target_info): Removed.
8430 (supports_btrace, target_supports_btrace): Update parameters.
8431
8432 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8433
8434 * Makefile.in (SFILES): Add common/btrace-common.c.
8435 (OBS): Add common/btrace-common.o.
8436 (btrace-common.o): Add build rules.
8437 * linux-low: Include btrace-common.h.
8438 (linux_low_read_btrace): Use struct btrace_data. Call
8439 btrace_data_init and btrace_data_fini.
8440
8441 2015-02-06 Pedro Alves <palves@redhat.com>
8442
8443 * thread-db.c (find_new_threads_callback): Add debug output.
8444
8445 2015-02-04 Pedro Alves <palves@redhat.com>
8446
8447 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8448 (resume_stopped_resumed_lwps): New function.
8449 (linux_wait_for_event_filtered): Use it.
8450
8451 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8452
8453 * Makefile.in (SFILES): Add linux-personality.c.
8454 (linux-personality.o): New rule.
8455 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8456 list of objects to be built.
8457 * linux-low.c: Include nat/linux-personality.h.
8458 (linux_create_inferior): Remove code to disable address space
8459 randomization (moved to ../nat/linux-personality.c). Create
8460 cleanup to disable address space randomization.
8461
8462 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8463
8464 * Makefile.in (posix-strerror.o): New rule.
8465 (mingw-strerror.o): Likewise.
8466 * configure: Regenerated.
8467 * configure.ac: Source file ../common/common.host. Initialize new
8468 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8469
8470 2015-01-14 Yao Qi <yao@codesourcery.com>
8471
8472 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8473 (ppc-linux.o): New rule.
8474 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8475 * configure.ac: AC_CHECK_FUNCS(getauxval).
8476 * config.in: Re-generated.
8477 * configure: Re-generated.
8478 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8479 ppc64_64bit_inferior_p
8480
8481 2015-01-14 Yao Qi <yao@codesourcery.com>
8482
8483 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8484 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8485 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8486 (PT_ORIG_R3, PT_TRAP): Likewise.
8487 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8488 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8489 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8490
8491 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8492
8493 * i387-fp.c (i387_cache_to_xsave): In look over
8494 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8495 zmmh_low_space field by use of zmmh_high_space.
8496
8497 2015-01-09 Pedro Alves <palves@redhat.com>
8498
8499 * linux-low.c (step_over_bkpt): Move higher up in the file.
8500 (handle_extended_wait): Don't store the stop_pc here.
8501 (get_stop_pc): Adjust comments and rename to ...
8502 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8503 stopped for a software breakpoint or hardware breakpoint.
8504 (thread_still_has_status_pending_p): New function.
8505 (status_pending_p_callback): Use
8506 thread_still_has_status_pending_p. If the event is no longer
8507 interesting, resume the LWP.
8508 (handle_tracepoints): Add assert.
8509 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8510 (wstatus_maybe_breakpoint): New function.
8511 (cancel_breakpoint): Delete function.
8512 (check_stopped_by_watchpoint): New function, factored out from
8513 linux_low_filter_event.
8514 (lp_status_maybe_breakpoint): Delete function.
8515 (linux_low_filter_event): Remove filter_ptid argument.
8516 Leave thread group exits pending here. Store the LWP's stop PC.
8517 Always leave events pending.
8518 (linux_wait_for_event_filtered): Pull all events out of the
8519 kernel, and leave them all pending.
8520 (count_events_callback, select_event_lwp_callback): Consider all
8521 events.
8522 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8523 (select_event_lwp): Only give preference to the stepping LWP in
8524 all-stop mode. Adjust comments.
8525 (ignore_event): New function.
8526 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8527 references to cancel_breakpoints. Adjust to renames. Also give
8528 equal priority to all LWPs that have had events in non-stop mode.
8529 If reporting a software breakpoint event, unadjust the LWP's PC.
8530 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8531 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8532 Adjust.
8533 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8534 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8535 (linux_stopped_by_watchpoint): Adjust.
8536 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8537 * linux-low.h (enum lwp_stop_reason): New.
8538 (struct lwp_info) <stop_pc>: Adjust comment.
8539 <stopped_by_watchpoint>: Delete field.
8540 <stop_reason>: New field.
8541 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8542 * mem-break.c (software_breakpoint_inserted_here)
8543 (hardware_breakpoint_inserted_here): New function.
8544 * mem-break.h (software_breakpoint_inserted_here)
8545 (hardware_breakpoint_inserted_here): Declare.
8546 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8547 (cancel_breakpoints): Delete.
8548 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8549 (upload_fast_traceframes): Remove references to
8550 cancel_breakpoints.
8551
8552 2015-01-09 Pedro Alves <palves@redhat.com>
8553
8554 * thread-db.c (find_new_threads_callback): Ignore thread if the
8555 kernel thread ID is -1.
8556
8557 2015-01-09 Pedro Alves <palves@redhat.com>
8558
8559 * linux-low.c (linux_attach_fail_reason_string): Move to
8560 nat/linux-ptrace.c, and rename.
8561 (linux_attach_lwp): Update comment.
8562 (attach_proc_task_lwp_callback): New function.
8563 (linux_attach): Adjust to rename and use
8564 linux_proc_attach_tgid_threads.
8565 (linux_attach_fail_reason_string): Delete declaration.
8566
8567 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8568
8569 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8570 * server.c (gdbserver_version): Likewise.
8571
8572 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8573
8574 * remote-utils.c: Include ctype.h.
8575 (input_interrupt): Explicitly handle the case when the char
8576 received is the NUL byte. Improve the printing of non-ASCII
8577 characters.
8578
8579 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8580
8581 * linux-low.c (linux_low_filter_event): Update call to
8582 linux_enable_event_reporting following the addition of
8583 a new parameter to that function.
8584
8585 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8586
8587 PR server/17457
8588 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8589 (AARCH64_FPCR_REGNO): Likewise.
8590 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8591 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8592 (aarch64_store_fpregset): Likewise.
8593
8594 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8595
8596 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8597 Remove FIXME comment about assumption about N.
8598
8599 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8600
8601 * configure.ac: If large-file support is disabled in GDBserver,
8602 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8603 * configure: Regenerate.
8604
8605 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8606
8607 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8608 warning upon ENODATA from ptrace.
8609 * linux-s390-low.c (s390_store_tdb): New.
8610 (s390_regsets): Add regset for NT_S390_TDB.
8611
8612 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8613
8614 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8615 without a fill_function.
8616 * linux-s390-low.c (s390_fill_last_break): Remove.
8617 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8618 (s390_arch_setup): Use regset's size instead of fill_function for
8619 loop end condition.
8620
8621 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8622
8623 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8624 the regset's store function when ptrace returned an error.
8625 * regcache.c (get_thread_regcache): Invalidate register cache
8626 before fetching inferior's registers.
8627
8628 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8629
8630 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8631 while-loop as for-loop.
8632 (regsets_store_inferior_registers): Likewise.
8633
8634 2014-11-28 Yao Qi <yao@codesourcery.com>
8635
8636 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8637 * config.in, configure: Re-generate.
8638 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8639 is defined.
8640
8641 2014-11-21 Yao Qi <yao@codesourcery.com>
8642
8643 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8644 (AC_CHECK_HEADERS): Remove malloc.h.
8645 * configure: Re-generated.
8646 * config.in: Re-generated.
8647 * server.h: Don't include alloca.h and malloc.h.
8648 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8649 Don't include malloc.h.
8650
8651 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8652
8653 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8654 corresponding ERRNO check in same block.
8655
8656 2014-11-12 Pedro Alves <palves@redhat.com>
8657
8658 * server.c (cont_thread): Update comment.
8659 (start_inferior, attach_inferior): No longer clear cont_thread.
8660 (handle_v_cont): No longer set cont_thread.
8661 (captured_main): Clear cont_thread each time a GDB connects.
8662
8663 2014-11-12 Pedro Alves <palves@redhat.com>
8664
8665 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8666 thread, and don't resume all threads if the Hc thread has exited.
8667
8668 2014-11-12 Pedro Alves <palves@redhat.com>
8669
8670 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8671 the process group instead of to a specific LWP.
8672
8673 2014-10-15 Pedro Alves <palves@redhat.com>
8674
8675 PR server/17487
8676 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8677 parameter.
8678 (arm_set_thread_context): Delete.
8679 (the_low_target): Adjust.
8680 * win32-i386-low.c (debug_registers_changed)
8681 (debug_registers_used): Delete.
8682 (update_debug_registers_callback): New function.
8683 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8684 needing to update their debug registers.
8685 (win32_get_current_dr): New function.
8686 (x86_dr_low_get_addr, x86_dr_low_get_control)
8687 (x86_dr_low_get_status): Fetch the debug register from the thread
8688 record's context.
8689 (i386_initial_stuff): Adjust.
8690 (i386_get_thread_context): Remove current_event parameter. Don't
8691 clear debug_registers_changed nor copy DR values to
8692 debug_reg_state.
8693 (i386_set_thread_context): Delete.
8694 (i386_prepare_to_resume): New function.
8695 (i386_thread_added): Mark the thread as needing to update irs
8696 debug registers.
8697 (the_low_target): Remove i386_set_thread_context and install
8698 i386_prepare_to_resume.
8699 * win32-low.c (win32_get_thread_context): Adjust.
8700 (win32_set_thread_context): Use SetThreadContext
8701 directly.
8702 (win32_prepare_to_resume): New function.
8703 (win32_require_context): New function, factored out from ...
8704 (thread_rec): ... this.
8705 (continue_one_thread): Call win32_prepare_to_resume on each thread
8706 we're about to continue.
8707 (win32_resume): Call win32_prepare_to_resume on the event thread.
8708 * win32-low.h (struct win32_thread_info)
8709 <debug_registers_changed>: New field.
8710 (struct win32_target_ops): Change prototype of set_thread_context,
8711 delete set_thread_context and add prepare_to_resume.
8712 (win32_require_context): New declaration.
8713
8714 2014-10-08 Gary Benson <gbenson@redhat.com>
8715
8716 * server.h: Do not include common-exceptions.h.
8717
8718 2014-10-08 Gary Benson <gbenson@redhat.com>
8719
8720 * server.h: Do not include cleanups.h.
8721
8722 2014-09-30 James Hogan <james.hogan@imgtec.com>
8723
8724 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8725 mips64-dsp-linux.c.
8726
8727 2014-09-23 Yao Qi <yao@codesourcery.com>
8728
8729 * linux-low.c (lp_status_maybe_breakpoint): New function.
8730 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8731 (count_events_callback): Likewise.
8732 (select_event_lwp_callback): Likewise.
8733 (cancel_breakpoints_callback): Likewise.
8734
8735 2014-09-19 Don Breazeal <donb@codesourcery.com>
8736
8737 * linux-low.c (handle_extended_wait): Call
8738 linux_ptrace_get_extended_event.
8739 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8740 linux_is_extended_waitstatus.
8741
8742 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8743
8744 * Makefile.in (CPPFLAGS): Define.
8745 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8746 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8747
8748 2014-09-16 Gary Benson <gbenson@redhat.com>
8749
8750 * inferiors.h (current_inferior): Renamed as...
8751 (current_thread): New variable. All uses updated.
8752 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8753 (maybe_move_out_of_jump_pad): Likewise.
8754 (cancel_breakpoint): Likewise.
8755 (linux_low_filter_event): Likewise.
8756 (wait_for_sigstop): Likewise.
8757 (linux_resume_one_lwp): Likewise.
8758 (need_step_over_p): Likewise.
8759 (start_step_over): Likewise.
8760 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8761 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8762 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8763 and save_inferior as saved_thread.
8764 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8765 saved_thread.
8766 (regcache_invalidate_thread): Likewise.
8767 * remote-utils.c (prepare_resume_reply): Likewise.
8768 * thread-db.c (thread_db_get_tls_address): Likewise.
8769 (disable_thread_event_reporting): Likewise.
8770 (remove_thread_event_breakpoints): Likewise.
8771 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8772 as saved_thread.
8773 * target.h (set_desired_inferior): Renamed as...
8774 (set_desired_thread): New declaration. All uses updated.
8775 * server.c (myresume): Updated comment to reference thread instead
8776 of inferior.
8777 (handle_serial_event): Likewise.
8778 (handle_target_event): Likewise.
8779
8780 2014-09-12 Tom Tromey <tromey@redhat.com>
8781 Gary Benson <gbenson@redhat.com>
8782
8783 * regcache.h: Include common-regcache.h.
8784 (regcache_read_pc): Don't declare.
8785 * regcache.c (get_thread_regcache_for_ptid): New function.
8786
8787 2014-09-11 Tom Tromey <tromey@redhat.com>
8788 Gary Benson <gbenson@redhat.com>
8789
8790 * symbol.c: New file.
8791 * Makefile.in (SFILES): Add symbol.c.
8792 (OBS): Add symbol.o.
8793
8794 2014-09-11 Gary Benson <gbenson@redhat.com>
8795
8796 * target.c (target_stop_ptid, target_continue_ptid): New
8797 functions.
8798
8799 2014-09-11 Tom Tromey <tromey@redhat.com>
8800 Gary Benson <gbenson@redhat.com>
8801
8802 * target.h: Include target/target.h.
8803 * target.c (target_read_memory, target_read_uint32)
8804 (target_write_memory): New functions.
8805
8806 2014-09-11 Gary Benson <gbenson@redhat.com>
8807
8808 * server.h (debug_hw_points): Don't declare.
8809 * server.c (debug_hw_points): Don't define. Replace all uses
8810 with show_debug_regs.
8811 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8812 all uses with show_debug_regs.
8813
8814 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8815
8816 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8817 endianness into account.
8818 (ppc_supply_ptrace_register): Likewise.
8819
8820 2014-09-03 James Hogan <james.hogan@imgtec.com>
8821
8822 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8823 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8824
8825 2014-09-03 Gary Benson <gbenson@redhat.com>
8826
8827 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8828 ALL_DEBUG_ADDRESS_REGISTERS.
8829
8830 2014-09-02 Gary Benson <gbenson@redhat.com>
8831
8832 * i386-low.h: Renamed as...
8833 * x86-low.h: New file. All type, function and variable name
8834 prefixes changed from "i386_" to "x86_". All references updated.
8835 * i386-low.c: Renamed as...
8836 * x86-low.c: New file. All type, function and variable name
8837 prefixes changed from "i386_" to "x86_". All references updated.
8838
8839 2014-09-02 Gary Benson <gbenson@redhat.com>
8840
8841 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8842 (x86_linux_new_thread): Likewise.
8843
8844 2014-08-29 Gary Benson <gbenson@redhat.com>
8845
8846 * server.h (setjmp.h): Do not include.
8847 (toplevel): Do not declare.
8848 (common-exceptions.h): Include.
8849 (cleanups.h): Likewise.
8850 * server.c (toplevel): Do not define.
8851 (exit_code): New static global.
8852 (detach_or_kill_for_exit_cleanup): New function.
8853 (main): New function. Original main renamed to...
8854 (captured_main): New function.
8855 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8856
8857 2014-08-29 Gary Benson <gbenson@redhat.com>
8858
8859 * Makefile.in (SFILES): Add common/common-exceptions.c.
8860 (OBS): Add common-exceptions.o.
8861 (common-exceptions.o): New rule.
8862 * utils.c (prepare_to_throw_exception): New function.
8863
8864 2014-08-29 Gary Benson <gbenson@redhat.com>
8865
8866 * config.in: Regenerate.
8867 * configure: Likewise.
8868
8869 2014-08-29 Gary Benson <gbenson@redhat.com>
8870
8871 * Makefile.in (SFILES): Add common/cleanups.c.
8872 (OBS): cleanups.o.
8873 (cleanups.o): New rule.
8874
8875 2014-08-29 Gary Benson <gbenson@redhat.com>
8876
8877 * utils.c (internal_vwarning): New function.
8878
8879 2014-08-28 Gary Benson <gbenson@redhat.com>
8880
8881 * utils.h (fatal): Remove declaration.
8882 * utils.c (fatal): Remove function.
8883
8884 2014-08-28 Gary Benson <gbenson@redhat.com>
8885
8886 * tracepoint.c (gdb_agent_init): Replace fatal with
8887 perror_with_name.
8888 (initialize_tracepoint): Likewise.
8889
8890 2014-08-28 Gary Benson <gbenson@redhat.com>
8891
8892 * remote-utils.c (remote_prepare): Replace fatal with error.
8893
8894 2014-08-28 Gary Benson <gbenson@redhat.com>
8895
8896 * linux-low.c (linux_async): Replace fatal with warning.
8897 Tidy up and return.
8898 (linux_start_non_stop): Return -1 if linux_async failed.
8899
8900 2014-08-28 Gary Benson <gbenson@redhat.com>
8901
8902 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8903 gdb_assert.
8904 (i386_dr_low_get_addr): Remove vague comment.
8905 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8906 gdb_assert.
8907
8908 2014-08-28 Gary Benson <gbenson@redhat.com>
8909
8910 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8911 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8912 internal_error.
8913 (linux_resume_one_lwp): Likewise.
8914 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8915 gdb_assert.
8916 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8917 with internal_error.
8918 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8919 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8920 (find_register_by_name): Replace fatal with internal_error.
8921 (find_regno): Likewise.
8922 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8923 * thread-db.c (thread_db_create_event): Likewise.
8924 (thread_db_load_search): Likewise.
8925 (try_thread_db_load_1): Likewise.
8926 * tracepoint.c (get_jump_space_head): Replace fatal with
8927 internal_error.
8928 (claim_trampoline_space): Likewise.
8929 (have_fast_tracepoint_trampoline_buffer): Likewise.
8930 (cmd_qtstart): Likewise.
8931 (stop_tracing): Likewise.
8932 (fast_tracepoint_collecting): Likewise.
8933 (target_malloc): Likewise.
8934 (download_tracepoint): Likewise.
8935 (download_trace_state_variables): Replace check with gdb_assert.
8936 (upload_fast_traceframes): Replace fatal with internal_error.
8937
8938 2014-08-19 Tom Tromey <tromey@redhat.com>
8939 Gary Benson <gbenson@redhat.com>
8940
8941 * Makefile.in (SFILES): Add common/common-debug.c.
8942 (OBS): Add common-debug.o.
8943 (common-debug.o): New rule.
8944 * debug.h (debug_printf): Don't declare.
8945 * debug.c (debug_printf): Renamed and rewritten as...
8946 (debug_vprintf): New function.
8947
8948 2014-08-19 Gary Benson <gbenson@redhat.com>
8949
8950 * utils.h: Do not include print-utils.h.
8951
8952 2014-08-19 Tom Tromey <tromey@redhat.com>
8953 Gary Benson <gbenson@redhat.com>
8954
8955 * server.h: Add static assertion.
8956 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8957
8958 2014-08-19 Tom Tromey <tromey@redhat.com>
8959 Gary Benson <gbenson@redhat.com>
8960
8961 * Makefile.in (SFILES): Add common/errors.c.
8962 (OBS): Add errors.o.
8963 (IPA_OBS): Add errors-ipa.o.
8964 (errors.o): New rule.
8965 (errors-ipa.o): Likewise.
8966 * utils.h (perror_with_name, error, warning): Don't declare.
8967 * utils.c (warning): Renamed and rewritten as...
8968 (vwarning): New function.
8969 (error): Renamed and rewritten as...
8970 (verror): New function.
8971 (internal_error): Renamed and rewritten as...
8972 (internal_verror): New function.
8973
8974 2014-08-07 Gary Benson <gbenson@redhat.com>
8975
8976 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8977 * configure: Regenerate.
8978 * config.in: Likewise.
8979 * server.h: Do not include errno.h.
8980 * event-loop.c: Likewise.
8981 * hostio-errno.c: Likewise.
8982 * linux-low.c: Likewise.
8983 * remote-utils.c: Likewise.
8984 * spu-low.c: Likewise.
8985 * utils.c: Likewise.
8986 * gdbreplay.c: Unconditionally include errno.h.
8987
8988 2014-08-07 Gary Benson <gbenson@redhat.com>
8989
8990 * server.h: Do not include string.h.
8991 * event-loop.c: Likewise.
8992 * linux-low.c: Likewise.
8993 * regcache.c: Likewise.
8994 * remote-utils.c: Likewise.
8995 * spu-low.c: Likewise.
8996 * utils.c: Likewise.
8997
8998 2014-08-07 Gary Benson <gbenson@redhat.com>
8999
9000 * server.h: Do not include gdb_assert.h.
9001
9002 2014-08-07 Gary Benson <gbenson@redhat.com>
9003
9004 * server.h: Do not include common-utils.h.
9005
9006 2014-08-07 Gary Benson <gbenson@redhat.com>
9007
9008 * server.h: Do not include ptid.h.
9009 * notif.h: Likewise.
9010
9011 2014-08-07 Gary Benson <gbenson@redhat.com>
9012
9013 * server.h: Do not include gdb_locale.h.
9014
9015 2014-08-07 Gary Benson <gbenson@redhat.com>
9016
9017 * server.h: Do not include gdb/signals.h.
9018 * win32-low.c: Likewise.
9019
9020 2014-08-07 Gary Benson <gbenson@redhat.com>
9021
9022 * server.h: Do not include pathmax.h.
9023
9024 2014-08-07 Gary Benson <gbenson@redhat.com>
9025
9026 * server.h: Do not include libiberty.h.
9027 * linux-bfin-low.c: Likewise.
9028
9029 2014-08-07 Gary Benson <gbenson@redhat.com>
9030
9031 * server.h: Do not include ansidecl.h.
9032
9033 2014-08-07 Gary Benson <gbenson@redhat.com>
9034
9035 * linux-x86-low.c: Do not include stddef.h.
9036 * lynx-ppc-low.c: Likewise.
9037 * tracepoint.c: Likewise.
9038
9039 2014-08-07 Gary Benson <gbenson@redhat.com>
9040
9041 * server.h: Do not include stdarg.h.
9042 * nto-low.c: Likewise.
9043
9044 2014-08-07 Gary Benson <gbenson@redhat.com>
9045
9046 * server.h: Do not include stdlib.h.
9047 * inferiors.c: Likewise.
9048 * linux-low.c: Likewise.
9049 * regcache.c: Likewise.
9050 * spu-low.c: Likewise.
9051 * tracepoint.c: Likewise.
9052 * utils.c: Likewise.
9053
9054 2014-08-07 Gary Benson <gbenson@redhat.com>
9055
9056 * server.h: Do not include stdio.h.
9057 * linux-low.c: Likewise.
9058 * remote-utils.c: Likewise.
9059 * spu-low.c: Likewise.
9060 * utils.c: Likewise.
9061 * wincecompat.c: Likewise.
9062
9063 2014-08-06 Gary Benson <gbenson@redhat.com>
9064
9065 * regcache.c (init_register_cache): Move conditionals inside if.
9066
9067 2014-08-06 Gary Benson <gbenson@redhat.com>
9068
9069 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9070
9071 2014-07-31 Gary Benson <gbenson@redhat.com>
9072
9073 * ax.h: Do not include server.h.
9074 * gdbthread.h: Likewise.
9075 * lynx-low.h: Likewise.
9076 * notif.h: Likewise.
9077
9078 2014-07-30 Gary Benson <gbenson@redhat.com>
9079
9080 * server.h: Include common-defs.h.
9081 Do not include config.h or build-gnulib-gdbserver/config.h.
9082
9083 2014-07-30 Gary Benson <gbenson@redhat.com>
9084
9085 * hostio-errno.c: Move server.h to top of includes list.
9086 * inferiors.c: Likewise.
9087 * linux-x86-low.c: Likewise.
9088 * notif.c: Include server.h.
9089
9090 2014-07-24 Tom Tromey <tromey@redhat.com>
9091 Gary Benson <gbenson@redhat.com>
9092
9093 * server.h (CORE_ADDR): Now unsigned.
9094
9095 2014-07-16 Pedro Alves <palves@redhat.com>
9096
9097 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9098
9099 2014-07-15 Pedro Alves <palves@redhat.com>
9100
9101 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9102 copy.
9103
9104 2014-07-11 Pedro Alves <palves@redhat.com>
9105
9106 * linux-low.c (kill_wait_lwp): New function, based on
9107 kill_one_lwp_callback, but use my_waitpid directly.
9108 (kill_one_lwp_callback, linux_kill): Use it.
9109
9110 2014-06-23 Pedro Alves <palves@redhat.com>
9111
9112 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9113 before setting DR0..DR3.
9114
9115 2014-06-20 Gary Benson <gbenson@redhat.com>
9116
9117 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9118 * configure: Regenerated.
9119 * config.in: Likewise.
9120
9121 2014-06-20 Gary Benson <gbenson@redhat.com>
9122
9123 * Makefile.in (SFILES): Update locations for files moved
9124 from common to nat.
9125 (object file files): Reordered.
9126
9127 2014-06-20 Gary Benson <gbenson@redhat.com>
9128
9129 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9130 (i386_dr_low_set_addr): Likewise.
9131 (i386_dr_low_get_addr): Likewise.
9132 (i386_dr_low_can_set_control): Likewise.
9133 (i386_dr_low_set_control): Likewise.
9134 (i386_dr_low_get_control): Likewise.
9135 (i386_dr_low_get_status): Likewise.
9136 (i386_get_debug_register_length): Likewise.
9137 * linux-x86-low.c (i386_dr_low_set_addr):
9138 Changed signature. Made static.
9139 (i386_dr_low_get_addr): Likewise.
9140 (i386_dr_low_set_control): Likewise.
9141 (i386_dr_low_get_control): Likewise.
9142 (i386_dr_low_get_status): Likewise.
9143 (i386_dr_low): New global variable.
9144 * win32-i386-low.c (i386_dr_low_set_addr):
9145 Changed signature. Made static.
9146 (i386_dr_low_get_addr): Likewise.
9147 (i386_dr_low_set_control): Likewise.
9148 (i386_dr_low_get_control): Likewise.
9149 (i386_dr_low_get_status): Likewise.
9150 (i386_dr_low): New global variable.
9151
9152 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9153
9154 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9155 * Makefile.in (AR, AR_FLAGS): Define.
9156 * configure: Regenerate.
9157
9158 2014-06-19 Gary Benson <gbenson@redhat.com>
9159
9160 * Makefile.in (i386-dregs.o): New rule.
9161 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9162 * i386-low.c (target.h): Remove include.
9163 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9164 (DR_CONTROL_SHIFT): Likewise.
9165 (DR_CONTROL_SIZE): Likewise.
9166 (DR_RW_EXECUTE): Likewise.
9167 (DR_RW_WRITE): Likewise.
9168 (DR_RW_READ): Likewise.
9169 (DR_RW_IORW): Likewise.
9170 (DR_LEN_1): Likewise.
9171 (DR_LEN_2): Likewise.
9172 (DR_LEN_4): Likewise.
9173 (DR_LEN_8): Likewise.
9174 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9175 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9176 (DR_ENABLE_SIZE): Likewise.
9177 (DR_LOCAL_SLOWDOWN): Likewise.
9178 (DR_GLOBAL_SLOWDOWN): Likewise.
9179 (DR_CONTROL_RESERVED): Likewise.
9180 (I386_DR_CONTROL_MASK): Likewise.
9181 (I386_DR_VACANT): Likewise.
9182 (I386_DR_LOCAL_ENABLE): Likewise.
9183 (I386_DR_GLOBAL_ENABLE): Likewise.
9184 (I386_DR_DISABLE): Likewise.
9185 (I386_DR_SET_RW_LEN): Likewise.
9186 (I386_DR_GET_RW_LEN): Likewise.
9187 (I386_DR_WATCH_HIT): Likewise.
9188 (i386_wp_op_t): Likewise.
9189 (i386_show_dr): Likewise.
9190 (i386_length_and_rw_bits): Likewise.
9191 (i386_insert_aligned_watchpoint): Likewise.
9192 (i386_remove_aligned_watchpoint): Likewise.
9193 (i386_handle_nonaligned_watchpoint): Likewise.
9194 i386_update_inferior_debug_regs(): Likewise.
9195 (i386_dr_insert_watchpoint): Likewise.
9196 (i386_dr_remove_watchpoint): Likewise.
9197 (i386_dr_region_ok_for_watchpoint): Likewise.
9198 (i386_dr_stopped_data_address): Likewise.
9199 (i386_dr_stopped_by_watchpoint): Likewise.
9200
9201 2014-06-19 Gary Benson <gbenson@redhat.com>
9202
9203 * i386-low.c (i386_dr_show): Renamed to
9204 i386_show_dr and made static. All uses updated.
9205 (i386_dr_length_and_rw_bits): Renamed to
9206 i386_length_and_rw_bits and made static.
9207 All uses updated.
9208 (i386_dr_insert_aligned_watchpoint): Renamed to
9209 i386_insert_aligned_watchpoint and made static.
9210 All uses updated.
9211 (i386_dr_remove_aligned_watchpoint): Renamed to
9212 i386_remove_aligned_watchpoint and made static.
9213 All uses updated.
9214 (i386_dr_update_inferior_debug_regs): Renamed to
9215 i386_update_inferior_debug_regs and made static.
9216 All uses updated.
9217
9218 2014-06-18 Gary Benson <gbenson@redhat.com>
9219
9220 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9221 (i386_dr_low_can_set_control): Likewise.
9222 (i386_get_debug_register_length): Likewise.
9223 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9224 (i386_dr_low_can_set_control): Likewise.
9225 (i386_get_debug_register_length): Likewise.
9226
9227 2014-06-17 Gary Benson <gbenson@redhat.com>
9228
9229 * i386-low.h (i386-dregs.h): New include.
9230 (DR_FIRSTADDR): Now in i386-dregs.h.
9231 (DR_LASTADDR): Likewise.
9232 (DR_NADDR): Likewise.
9233 (DR_STATUS): Likewise.
9234 (DR_CONTROL): Likewise.
9235 (i386_debug_reg_state): Likewise.
9236 (i386_dr_insert_watchpoint): Likewise.
9237 (i386_dr_remove_watchpoint): Likewise.
9238 (i386_dr_region_ok_for_watchpoint): Likewise.
9239 (i386_dr_stopped_data_address): Likewise.
9240 (i386_dr_stopped_by_watchpoint): Likewise.
9241 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9242
9243 2014-06-18 Gary Benson <gbenson@redhat.com>
9244
9245 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9246 i386_dr_insert_watchpoint.
9247 (i386_low_remove_watchpoint): Renamed to
9248 i386_dr_remove_watchpoint.
9249 (i386_low_region_ok_for_watchpoint): Renamed to
9250 i386_dr_region_ok_for_watchpoint.
9251 (i386_low_stopped_data_address): Renamed to
9252 i386_dr_stopped_data_address.
9253 (i386_low_stopped_by_watchpoint): Renamed to
9254 i386_dr_stopped_by_watchpoint.
9255 * i386-low.c (i386_show_dr): Renamed to
9256 i386_dr_show and made nonstatic. All uses updated.
9257 (i386_length_and_rw_bits): Renamed to
9258 i386_dr_length_and_rw_bits and made nonstatic.
9259 All uses updated.
9260 (i386_insert_aligned_watchpoint): Renamed to
9261 i386_dr_insert_aligned_watchpoint and made nonstatic.
9262 All uses updated.
9263 (i386_remove_aligned_watchpoint): Renamed to
9264 i386_dr_remove_aligned_watchpoint and made nonstatic.
9265 All uses updated.
9266 (i386_update_inferior_debug_regs): Renamed to
9267 i386_dr_update_inferior_debug_regs and made nonstatic.
9268 All uses updated.
9269 (i386_low_insert_watchpoint): Renamed to
9270 i386_dr_insert_watchpoint. All uses updated.
9271 (i386_low_remove_watchpoint): Renamed to
9272 i386_dr_remove_watchpoint. All uses updated.
9273 (i386_low_region_ok_for_watchpoint): Renamed to
9274 i386_dr_region_ok_for_watchpoint. All uses updated.
9275 (i386_low_stopped_data_address): Renamed to
9276 i386_dr_stopped_data_address. All uses updated.
9277 (i386_low_stopped_by_watchpoint): Renamed to
9278 i386_dr_stopped_by_watchpoint. All uses updated.
9279
9280 2014-06-18 Gary Benson <gbenson@redhat.com>
9281
9282 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9283 (i386_dr_low_can_set_control): Likewise.
9284 (i386_insert_aligned_watchpoint): New check.
9285
9286 2014-06-18 Gary Benson <gbenson@redhat.com>
9287
9288 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9289 Renamed to state.
9290
9291 2014-06-18 Gary Benson <gbenson@redhat.com>
9292
9293 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9294 instead of fatal and error.
9295 (i386_handle_nonaligned_watchpoint): Likewise.
9296
9297 2014-06-18 Gary Benson <gbenson@redhat.com>
9298
9299 * i386-low.c (i386_get_debug_register_length): New macro.
9300 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9301 (i386_show_dr): Use debug_printf instead of fprintf. Use
9302 phex to format values.
9303
9304 2014-06-18 Gary Benson <gbenson@redhat.com>
9305
9306 * i386-low.h: Comment changes.
9307 * i386-low.c: Likewise.
9308
9309 2014-06-18 Gary Benson <gbenson@redhat.com>
9310
9311 * i386-low.c: Whitespace changes.
9312
9313 2014-06-12 Tom Tromey <tromey@redhat.com>
9314
9315 * utils.c (freeargv): Remove.
9316
9317 2014-06-12 Tom Tromey <tromey@redhat.com>
9318
9319 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9320 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9321 (parse_debug_format_options): Likewise.
9322 (gdbserver_usage): Likewise.
9323 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9324 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9325 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9326 against libiberty.
9327 ($(LIBGNU)): Depend on libiberty.
9328 (all-lib): Recurse into all subdirs.
9329 (install-only): Invoke "install" target in subdirs.
9330 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9331 targets.
9332 * configure: Rebuild.
9333 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9334 for vasprintf, vsnprintf, or gettimeofday.
9335 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9336 srv_tgtobj.
9337
9338 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9339
9340 * development.sh: Delete.
9341 * Makefile.in (config.status): Adjust dependency on development.sh.
9342 * configure.ac: Adjust development.sh source call.
9343 * configure: Regenerate.
9344
9345 2014-06-02 Pedro Alves <palves@redhat.com>
9346
9347 * ax.c (gdb_free_agent_expr): New function.
9348 * ax.h (gdb_free_agent_expr): New declaration.
9349 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9350 list.
9351 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9352 static.
9353 (clear_breakpoint_conditions_and_commands): New function.
9354 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9355 (clear_breakpoint_conditions_and_commands): New declaration.
9356
9357 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9358
9359 * linux-aarch64-low.c (asm/ptrace.h): Include.
9360
9361 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9362
9363 Fix TLS access for -static -pthread.
9364 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9365 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9366 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9367
9368 2014-05-20 Pedro Alves <palves@redhat.com>
9369
9370 * linux-aarch64-low.c (aarch64_insert_point)
9371 (aarch64_remove_point): No longer check whether the type is
9372 supported here. Adjust to new interface.
9373 (the_low_target): Install aarch64_supports_z_point_type as
9374 supports_z_point_type method.
9375 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9376 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9377 instead of a Z packet char. Adjust.
9378 (arm_supports_z_point_type): New function.
9379 (arm_insert_point, arm_remove_point): Adjust to new interface.
9380 (the_low_target): Install arm_supports_z_point_type.
9381 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9382 (cris_insert_point, cris_remove_point): Adjust to new interface.
9383 Don't check whether the type is supported here.
9384 (the_low_target): Install cris_supports_z_point_type.
9385 * linux-low.c (linux_supports_z_point_type): New function.
9386 (linux_insert_point, linux_remove_point): Adjust to new interface.
9387 * linux-low.h (struct linux_target_ops) <insert_point,
9388 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9389 raw_breakpoint pointer parameter.
9390 <supports_z_point_type>: New method.
9391 * linux-mips-low.c (mips_supports_z_point_type): New function.
9392 (mips_insert_point, mips_remove_point): Adjust to new interface.
9393 Use mips_supports_z_point_type.
9394 (the_low_target): Install mips_supports_z_point_type.
9395 * linux-ppc-low.c (the_low_target): Install NULL as
9396 supports_z_point_type method.
9397 * linux-s390-low.c (the_low_target): Install NULL as
9398 supports_z_point_type method.
9399 * linux-sparc-low.c (the_low_target): Install NULL as
9400 supports_z_point_type method.
9401 * linux-x86-low.c (x86_supports_z_point_type): New function.
9402 (x86_insert_point): Adjust to new insert_point interface. Use
9403 insert_memory_breakpoint. Adjust to new
9404 i386_low_insert_watchpoint interface.
9405 (x86_remove_point): Adjust to remove_point interface. Use
9406 remove_memory_breakpoint. Adjust to new
9407 i386_low_remove_watchpoint interface.
9408 (the_low_target): Install x86_supports_z_point_type.
9409 * lynx-low.c (lynx_target_ops): Install NULL as
9410 supports_z_point_type callback.
9411 * nto-low.c (nto_supports_z_point_type): New.
9412 (nto_insert_point, nto_remove_point): Adjust to new interface.
9413 (nto_target_ops): Install nto_supports_z_point_type.
9414 * mem-break.c: Adjust intro comment.
9415 (struct raw_breakpoint) <raw_type, size>: New fields.
9416 <inserted>: Update comment.
9417 <shlib_disabled>: Delete field.
9418 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9419 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9420 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9421 (raw_bkpt_type_to_target_hw_bp_type): New function.
9422 (find_enabled_raw_code_breakpoint_at): New function.
9423 (find_raw_breakpoint_at): New type and size parameters. Use them.
9424 (insert_memory_breakpoint): New function, based off
9425 set_raw_breakpoint_at.
9426 (remove_memory_breakpoint): New function.
9427 (set_raw_breakpoint_at): Reimplement.
9428 (set_breakpoint): New, based on set_breakpoint_at.
9429 (set_breakpoint_at): Reimplement.
9430 (delete_raw_breakpoint): Go through the_target->remove_point
9431 instead of assuming memory breakpoints.
9432 (find_gdb_breakpoint_at): Delete.
9433 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9434 (find_gdb_breakpoint): New function.
9435 (set_gdb_breakpoint_at): Delete.
9436 (z_type_supported): New function.
9437 (set_gdb_breakpoint_1): New function, loosely based off
9438 set_gdb_breakpoint_at.
9439 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9440 (delete_gdb_breakpoint_at): Delete.
9441 (delete_gdb_breakpoint_1): New function, loosely based off
9442 delete_gdb_breakpoint_at.
9443 (delete_gdb_breakpoint): New function.
9444 (clear_gdb_breakpoint_conditions): Rename to ...
9445 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9446 breakpoint.
9447 (add_condition_to_breakpoint): Make static.
9448 (add_breakpoint_condition): Take a struct breakpoint pointer
9449 instead of an address. Adjust.
9450 (gdb_condition_true_at_breakpoint): Rename to ...
9451 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9452 z_type parameter.
9453 (gdb_condition_true_at_breakpoint): Reimplement.
9454 (add_breakpoint_commands): Take a struct breakpoint pointer
9455 instead of an address. Adjust.
9456 (gdb_no_commands_at_breakpoint): Rename to ...
9457 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9458 parameter. Return true if no breakpoint was found. Change debug
9459 output.
9460 (gdb_no_commands_at_breakpoint): Reimplement.
9461 (run_breakpoint_commands): Rename to ...
9462 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9463 and change return type to boolean.
9464 (run_breakpoint_commands): New function.
9465 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9466 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9467 breakpoint. Go through the_target->remove_point instead of
9468 assuming memory breakpoint.
9469 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9470 software and hardware breakpoints.
9471 (reinsert_raw_breakpoint): Go through the_target->insert_point
9472 instead of assuming memory breakpoint.
9473 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9474 software and hardware breakpoints.
9475 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9476 Check both software and hardware breakpoints.
9477 (validate_inserted_breakpoint): Assert the breakpoint is a
9478 software breakpoint. Set the inserted flag to -1 instead of
9479 setting shlib_disabled.
9480 (delete_disabled_breakpoints): Adjust.
9481 (validate_breakpoints): Only validate software breakpoints.
9482 Adjust to inserted flag change.
9483 (check_mem_read, check_mem_write): Skip breakpoint types other
9484 than software breakpoints. Adjust to inserted flag change.
9485 * mem-break.h (enum raw_bkpt_type): New enum.
9486 (raw_breakpoint, struct process_info): Forward declare.
9487 (Z_packet_to_target_hw_bp_type): Delete declaration.
9488 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9489 (set_gdb_breakpoint, delete_gdb_breakpoint)
9490 (clear_breakpoint_conditions): New declarations.
9491 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9492 (breakpoint_inserted_here): Update comment.
9493 (add_breakpoint_condition, add_breakpoint_commands): Replace
9494 address parameter with a breakpoint pointer parameter.
9495 (gdb_breakpoint_here): Update comment.
9496 (delete_gdb_breakpoint_at): Delete.
9497 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9498 * server.c (process_point_options): Take a struct breakpoint
9499 pointer instead of an address. Adjust.
9500 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9501 delete_gdb_breakpoint.
9502 * spu-low.c (spu_target_ops): Install NULL as
9503 supports_z_point_type method.
9504 * target.h: Include mem-break.h.
9505 (struct target_ops) <prepare_to_access_memory>: Update comment.
9506 <supports_z_point_type>: New field.
9507 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9508 instead of a char. Also take a raw breakpoint pointer.
9509 * win32-arm-low.c (the_low_target): Install NULL as
9510 supports_z_point_type.
9511 * win32-i386-low.c (i386_supports_z_point_type): New function.
9512 (i386_insert_point, i386_remove_point): Adjust to new interface.
9513 (the_low_target): Install i386_supports_z_point_type.
9514 * win32-low.c (win32_supports_z_point_type): New function.
9515 (win32_insert_point, win32_remove_point): Adjust to new interface.
9516 (win32_target_ops): Install win32_supports_z_point_type.
9517 * win32-low.h (struct win32_target_ops):
9518 <supports_z_point_type>: New method.
9519 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9520 instead of a char. Also take a raw breakpoint pointer.
9521
9522 2014-05-20 Pedro Alves <palves@redhat.com>
9523
9524 * mem-break.h: Include break-common.h.
9525 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9526 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9527 (Z_packet_to_target_hw_bp_type): New declaration.
9528 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9529 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9530 (Z_PACKET_ACCESS_WP): Delete macros.
9531 (Z_packet_to_hw_type): Delete function.
9532 * i386-low.h: Don't include break-common.h here.
9533 (Z_packet_to_hw_type): Delete declaration.
9534 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9535 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9536 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9537 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9538 * linux-aarch64-low.c: Don't include break-common.h here.
9539 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9540 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9541 (Z_packet_to_target_hw_bp_type): Delete function.
9542 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9543 function.
9544 (mips_insert_point, mips_remove_point): Use
9545 Z_packet_to_target_hw_bp_type.
9546
9547 2014-05-20 Pedro Alves <palves@redhat.com>
9548
9549 * linux-aarch64-low.c: Include break-common.h.
9550 (enum target_point_type): Delete.
9551 (Z_packet_to_point_type): Rename to ...
9552 (Z_packet_to_target_hw_bp_type): ... this, and return a
9553 target_hw_bp_type instead.
9554 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9555 instead of an enum target_point_type.
9556 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9557 breakpoint type.
9558 (aarch64_dr_state_insert_one_point)
9559 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9560 (aarch64_handle_aligned_watchpoint)
9561 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9562 Take an enum target_hw_bp_type instead of an enum
9563 target_point_type.
9564 (aarch64_supports_z_point_type): New function.
9565 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9566 use Z_packet_to_target_hw_bp_type.
9567
9568 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9569
9570 * configure.ac: Only use -Werror by default when DEVELOPMENT
9571 is true.
9572 * configure: Regenerate.
9573
9574 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9575
9576 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9577 * linux-x86-low.c (X86_64_USER_REGS): New.
9578 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9579
9580 2014-04-28 Yao Qi <yao@codesourcery.com>
9581
9582 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9583 name.
9584
9585 2014-04-25 Pedro Alves <palves@redhat.com>
9586
9587 PR server/16255
9588 * linux-low.c (linux_attach_fail_reason_string): New function.
9589 (linux_attach_lwp): Delete.
9590 (linux_attach_lwp_1): Rename to ...
9591 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9592 argument. Remove "initial" parameter. Return int instead of
9593 void. Don't error or warn here.
9594 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9595 failure to attach to the tgid. Call warning when failing to
9596 attach to an lwp.
9597 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9598 argument. Remove "initial" parameter. Return int instead of
9599 void. Don't error or warn here.
9600 (linux_attach_fail_reason_string): New declaration.
9601 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9602 interface change. Use linux_attach_fail_reason_string.
9603
9604 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9605 Walfred Tedeschi <walfred.tedeschi@intel.com>
9606
9607 * Makefile.in: Added rules to handle new files
9608 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9609 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9610 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9611 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9612 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9613 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9614 x32-avx512-linux.o.
9615 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9616 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9617 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9618 i386/x32-avx512.xml.
9619 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9620 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9621 i386/x32-avx512-linux.xml.
9622 * i387-fp.c (num_avx512_k_registers): New constant for number
9623 of K registers.
9624 (num_avx512_zmmh_low_registers): New constant for number of
9625 lower ZMM registers (0-15).
9626 (num_avx512_zmmh_high_registers): New constant for number of
9627 higher ZMM registers (16-31).
9628 (num_avx512_ymmh_registers): New contant for number of higher
9629 YMM registers (ymm16-31 added by avx521 on x86_64).
9630 (num_avx512_xmm_registers): New constant for number of higher
9631 XMM registers (xmm16-31 added by AVX512 on x86_64).
9632 (struct i387_xsave): Add space for AVX512 registers.
9633 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9634 Add code to handle AVX512 registers.
9635 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9636 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9637 prototypei from generated file.
9638 (tdesc_amd64_avx512_linux): Likewise.
9639 (init_registers_x32_avx512_linux): Likewise.
9640 (tdesc_x32_avx512_linux): Likewise.
9641 (init_registers_i386_avx512_linux): Likewise.
9642 (tdesc_i386_avx512_linux): Likewise.
9643 (x86_64_regmap): Add AVX512 registers.
9644 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9645 mask.
9646 (initialize_low_arch): Add code to initialize AVX512 registers.
9647
9648 2014-04-23 Pedro Alves <palves@redhat.com>
9649
9650 * mem-break.c (find_gdb_breakpoint_at): Make static.
9651 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9652
9653 2014-04-23 Pedro Alves <palves@redhat.com>
9654
9655 * i386-low.c: Don't include break-common.h here.
9656 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9657 prototype to take target_hw_bp_type as argument instead of a Z
9658 packet char.
9659 * i386-low.h: Include break-common.h here.
9660 (Z_packet_to_hw_type): Declare.
9661 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9662 prototypes.
9663 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9664 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9665 (x86_remove_point): Convert the packet number to a
9666 target_hw_bp_type before calling i386_low_remove_watchpoint.
9667 * win32-i386-low.c (i386_insert_point): Convert the packet number
9668 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9669 (i386_remove_point): Convert the packet number to a
9670 target_hw_bp_type before calling i386_low_remove_watchpoint.
9671
9672 2014-04-23 Pedro Alves <palves@redhat.com>
9673
9674 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9675
9676 2014-04-10 Pedro Alves <palves@redhat.com>
9677
9678 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9679 Check if the condition or command is NULL before checking if the
9680 breakpoint is known. On success, return true.
9681 * mem-break.h (add_breakpoint_condition): Document return.
9682 (add_breakpoint_commands): Add describing comment.
9683 * server.c (skip_to_semicolon): New function.
9684 (process_point_options): Use it.
9685
9686 2014-04-09 Pedro Alves <palves@redhat.com>
9687
9688 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9689 to lwpid_of.
9690
9691 2014-02-27 Pedro Alves <palves@redhat.com>
9692
9693 PR 12702
9694 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9695 macros.
9696 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9697 output.
9698 (last_thread_of_process_p): Take a PID argument instead of a
9699 thread pointer.
9700 (linux_wait_for_lwp): Delete.
9701 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9702 functions.
9703 (linux_low_filter_event): New function, party factored out from
9704 linux_wait_for_event.
9705 (linux_wait_for_event): Rename to ...
9706 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9707 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9708 sigsuspend. Check for zombie leaders.
9709 (linux_wait_for_event): Reimplement as wrapper around
9710 linux_wait_for_event_filtered.
9711 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9712 a normal or signal exit is seen, it's the whole process exiting.
9713 (wait_for_sigstop): No longer a for_each_inferior callback.
9714 Rewrite on top of linux_wait_for_event_filtered.
9715 (stop_all_lwps): Call wait_for_sigstop directly.
9716 * server.c (resume, handle_target_event): Handle
9717 TARGET_WAITKIND_NO_RESUMED.
9718
9719 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9720
9721 * win32-low.c (psapi_get_dll_name,
9722 * win32_CreateToolhelp32Snapshot): Delete.
9723 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9724 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9725 Delete.
9726 (handle_load_dll): Add function description.
9727 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9728
9729 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9730
9731 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9732 Add comment.
9733 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9734 base address when calling win32_add_one_solib.
9735 (handle_load_dll): Delete local variable load_addr.
9736 Remove 0x1000 offset applied to DLL base address when calling
9737 win32_add_one_solib.
9738 (handle_unload_dll): Add comment.
9739
9740 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9741
9742 * win32-low.c (win32_add_all_dlls): Renames
9743 win32_ensure_ntdll_loaded. Rewrite function documentation.
9744 Adjust implementation to always load all DLLs.
9745 Add 0x1000 offset to DLL base address when calling
9746 win32_add_one_solib.
9747 (child_initialization_done): New static global.
9748 (do_initial_child_stuff): Set child_initialization_done to
9749 zero during child initialization, and 1 after. Replace call
9750 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9751 Add comment.
9752 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9753 (handle_unload_dll): Add function documentation.
9754 (get_child_debug_event): Ignore load and unload DLL events
9755 during child initialization.
9756
9757 2014-02-20 Doug Evans <dje@google.com>
9758
9759 Remove global all_lwps.
9760 * inferiors.h (ptid_of): Move here from linux-low.h.
9761 (pid_of, lwpid_of): Ditto.
9762 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9763 parameter is a struct thread_info * now.
9764 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9765 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9766 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9767 directly.
9768 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9769 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9770 * linux-arm-low.c (update_registers_callback): Update, "entry"
9771 parameter is a struct thread_info * now.
9772 Fetch lwpid from current_inferior directly.
9773 (arm_insert_point): Pass &all_threads to find_inferior instead of
9774 &all_lwps.
9775 (arm_remove_point): Ditto.
9776 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9777 (arm_prepare_to_resume): Fetch pid from thread.
9778 (arm_read_description): Fetch lwpid from current_inferior directly.
9779 * linux-low.c (all_lwps): Delete.
9780 (delete_lwp): Delete call to remove_inferior.
9781 (handle_extended_wait): Fetch lwpid from thread.
9782 (add_lwp): Don't set lwp->entry.id. Remove call to
9783 add_inferior_to_list.
9784 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9785 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9786 (kill_one_lwp_callback): Ditto.
9787 (linux_kill): Don't dereference NULL pointer.
9788 Fetch ptid,lwpid from thread.
9789 (get_detach_signal): Fetch ptid from thread.
9790 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9791 Simplify call to regcache_invalidate_thread.
9792 (delete_lwp_callback): Update, "entry" parameter is a
9793 struct thread_info * now. Fetch pid from thread.
9794 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9795 (status_pending_p_callback): Update, "entry" parameter is a
9796 struct thread_info * now. Fetch ptid from thread.
9797 (find_lwp_pid): Update, "entry" parameter is a
9798 struct thread_info * now.
9799 (linux_wait_for_lwp): Fetch pid from thread.
9800 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9801 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9802 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9803 (dequeue_one_deferred_signal): Ditto.
9804 (cancel_breakpoint): Fetch ptid from current_inferior.
9805 (linux_wait_for_event): Pass &all_threads to find_inferior,
9806 not &all_lwps. Fetch ptid, lwpid from thread.
9807 (count_events_callback): Update, "entry" parameter is a
9808 struct thread_info * now.
9809 (select_singlestep_lwp_callback): Ditto.
9810 (select_event_lwp_callback): Ditto.
9811 (cancel_breakpoints_callback): Ditto.
9812 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9813 not &all_lwps.
9814 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9815 (unsuspend_one_lwp): Update, "entry" parameter is a
9816 struct thread_info * now.
9817 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9818 not &all_lwps.
9819 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9820 Fetch lwpid from thread, not lwp.
9821 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9822 Pass &all_threads to find_inferior, not &all_lwps.
9823 (send_sigstop): Fetch lwpid from thread, not lwp.
9824 (send_sigstop_callback): Update, "entry" parameter is a
9825 struct thread_info * now.
9826 (suspend_and_send_sigstop_callback): Ditto.
9827 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9828 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9829 struct thread_info * now.
9830 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9831 from thread, lwp.
9832 (lwp_running): Update, "entry" parameter is a
9833 struct thread_info * now.
9834 (stop_all_lwps): Fetch ptid from thread.
9835 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9836 (linux_resume_one_lwp): Fetch lwpid from thread.
9837 (linux_set_resume_request): Update, "entry" parameter is a
9838 struct thread_info * now. Fetch pid, lwpid from thread.
9839 (resume_status_pending_p): Update, "entry" parameter is a
9840 struct thread_info * now.
9841 (need_step_over_p): Ditto. Fetch lwpid from thread.
9842 (start_step_over): Fetch lwpid from thread.
9843 (linux_resume_one_thread): Update, "entry" parameter is a
9844 struct thread_info * now. Fetch lwpid from thread.
9845 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9846 (proceed_one_lwp): Update, "entry" parameter is a
9847 struct thread_info * now. Fetch lwpid from thread.
9848 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9849 struct thread_info * now.
9850 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9851 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9852 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9853 directly.
9854 (regsets_store_inferior_registers): Ditto.
9855 (fetch_register, store_register): Ditto.
9856 (linux_read_memory, linux_write_memory): Ditto.
9857 (linux_request_interrupt): Ditto.
9858 (linux_read_auxv): Ditto.
9859 (linux_xfer_siginfo): Ditto.
9860 (linux_qxfer_spu): Ditto.
9861 (linux_qxfer_libraries_svr4): Ditto.
9862 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9863 moved to inferiors.h.
9864 (get_lwp): Delete.
9865 (get_thread_lwp): Update.
9866 (struct lwp_info): Delete member "entry". Simplify comment for
9867 member "thread".
9868 (all_lwps): Delete.
9869 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9870 current_inferior directly.
9871 (update_watch_registers_callback): Update, "entry" parameter is a
9872 struct thread_info * now. Fetch pid from thread.
9873 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9874 (mips_insert_point): Fetch lwpid from current_inferior.
9875 Pass &all_threads to find_inferior, not &all_lwps.
9876 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9877 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9878 directly.
9879 (mips_stopped_data_address): Ditto.
9880 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9881 directly.
9882 * linux-tile-low.c (tile_arch_setup): Ditto.
9883 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9884 (update_debug_registers_callback): Update, "entry" parameter is a
9885 struct thread_info * now. Fetch pid from thread.
9886 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9887 Pass &all_threads to find_inferior, not &all_lwps.
9888 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9889 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9890 Pass &all_threads to find_inferior, not &all_lwps.
9891 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9892 (i386_dr_low_get_status): Ditto.
9893 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9894 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9895 (x86_linux_read_description): Ditto.
9896 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9897
9898 2014-02-20 Doug Evans <dje@google.com>
9899
9900 * inferiors.c (get_first_inferior): Fix buglet.
9901
9902 2014-02-19 Doug Evans <dje@google.com>
9903
9904 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9905 * inferiors.c (add_thread): Change result type to struct thread_info *.
9906 All callers updated.
9907 (add_lwp): Call add_thread here instead of in callers.
9908 All callers updated.
9909 * linux-low.h (get_lwp_thread): Rewrite.
9910 (struct lwp_info): New member "thread".
9911
9912 2014-02-19 Doug Evans <dje@google.com>
9913
9914 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9915 All callers updated.
9916
9917 2014-02-19 Doug Evans <dje@google.com>
9918
9919 * inferiors.c (add_thread): Fix whitespace.
9920
9921 2014-02-19 Doug Evans <dje@google.com>
9922
9923 * dll.c (clear_dlls): Replace accessing list implemention details
9924 with API function.
9925 * gdbthread.h (get_first_thread): Declare.
9926 * inferiors.c (for_each_inferior_with_data): New function.
9927 (get_first_thread): New function.
9928 (find_thread_ptid): Simplify.
9929 (get_first_inferior): New function.
9930 (clear_list): Delete.
9931 (one_inferior_p): New function.
9932 (clear_inferior_list): New function.
9933 (clear_inferiors): Update.
9934 * inferiors.h (for_each_inferior_with_data): Declare.
9935 (clear_inferior_list): Declare.
9936 (one_inferior_p): Declare.
9937 (get_first_inferior): Declare.
9938 * linux-low.c (linux_wait_for_event): Replace accessing list
9939 implemention details with API function.
9940 * server.c (target_running): Ditto.
9941 (accumulate_file_name_length): New function.
9942 (emit_dll_description): New function.
9943 (handle_qxfer_libraries): Replace accessing list implemention
9944 details with API function.
9945 (handle_qxfer_threads_worker): New function.
9946 (handle_qxfer_threads_proper): Replace accessing list implemention
9947 details with API function.
9948 (handle_query): Ditto.
9949 (visit_actioned_threads_callback_ftype): New typedef.
9950 (visit_actioned_threads_data): New struct.
9951 (visit_actioned_threads): Rewrite to be find_inferior callback.
9952 (resume): Call find_inferior.
9953 (handle_status): Replace accessing list implemention
9954 details with API function.
9955 (process_serial_event): Replace accessing list implemention details
9956 with API function.
9957 * target.c (set_desired_inferior): Replace accessing list implemention
9958 details with API function.
9959 * tracepoint.c (same_process_p): New function.
9960 (gdb_agent_about_to_close): Replace accessing list implemention
9961 details with API function.
9962 * win32-low.c (child_delete_thread): Replace accessing list
9963 implemention details with API function.
9964 (match_dll_by_basename): New function.
9965 (dll_is_loaded_by_basename): New function.
9966 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9967 details call to dll_is_loaded_by_basename.
9968
9969 2014-02-19 Doug Evans <dje@google.com>
9970
9971 * dll.h (struct dll_info): Add comment.
9972 * gdbthread.h (struct thread_info): Add comment.
9973 (current_ptid): Simplify.
9974 * inferiors.c (add_process): Update.
9975 (remove_process): Update.
9976 * inferiors.h (struct process_info): Rename member "head" to "entry".
9977 * linux-low.c (delete_lwp): Update.
9978 (add_lwp): Update.
9979 (last_thread_of_process_p): Update.
9980 (kill_one_lwp_callback, linux_kill): Update.
9981 (status_pending_p_callback): Update.
9982 (wait_for_sigstop): Update. Simplify read of ptid.
9983 (start_step_over): Update.
9984 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9985 (get_lwp_thread): Update.
9986 (struct lwp_info): Rename member "head" to "entry".
9987 * regcache.h (inferior_list_entry): Delete.
9988 * server.c (kill_inferior_callback): Update.
9989 (detach_or_kill_inferior_callback): Update.
9990 (print_started_pid): Update.
9991 (print_attached_pid): Update.
9992 (process_serial_event): Simplify read of ptid.
9993 * thread-db.c (thread_db_create_event): Update.
9994 (thread_db_get_tls_address): Update.
9995 * win32-low.c (current_inferior_ptid): Simplify.
9996
9997 2014-02-19 Tom Tromey <tromey@redhat.com>
9998
9999 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10000 argument.
10001 (target_supports_btrace): Update.
10002
10003 2014-02-14 Yao Qi <yao@codesourcery.com>
10004
10005 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10006 (rsp-low-ipa.o): New target.
10007
10008 2014-02-12 Tom Tromey <tromey@redhat.com>
10009
10010 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10011 convert_ascii_to_int.
10012 * regcache.c (registers_to_string): Likewise.
10013 * remote-utils.c (decode_M_packet): Likewise.
10014 * server.c (process_serial_event): Likewise.
10015
10016 2014-02-12 Tom Tromey <tromey@redhat.com>
10017
10018 * server.c (handle_query, handle_v_run): Use hex2bin, not
10019 unhexify.
10020 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10021
10022 2014-02-12 Tom Tromey <tromey@redhat.com>
10023
10024 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10025 convert_int_to_ascii.
10026 * regcache.c (registers_to_string, collect_register_as_string):
10027 Likewise.
10028 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10029 Likewise.
10030 * server.c (process_serial_event): Likewise.
10031 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10032 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10033
10034 2014-02-12 Tom Tromey <tromey@redhat.com>
10035
10036 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10037 bin2hex, not hexify.
10038 * tracepoint.c (cmd_qtstatus): Likewise.
10039
10040 2014-02-12 Tom Tromey <tromey@redhat.com>
10041
10042 * remote-utils.c (monitor_output): Pass explicit length to
10043 hexify.
10044
10045 2014-02-12 Tom Tromey <tromey@redhat.com>
10046
10047 * tracepoint.c: Include rsp-low.h.
10048 * server.c: Include rsp-low.h.
10049 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10050 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10051 declare.
10052 * remote-utils.c: Include rsp-low.h.
10053 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10054 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10055 (convert_int_to_ascii, convert_ascii_to_int): Move to
10056 common/rsp-low.c.
10057 * regcache.c: Include rsp-low.h.
10058 * ax.c: Include rsp-low.h.
10059 * Makefile.in (SFILES): Add common/rsp-low.c.
10060 (OBS): Add rsp-low.o.
10061 (rsp-low.o): New target.
10062
10063 2014-02-12 Tom Tromey <tromey@redhat.com>
10064
10065 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10066 Include print-utils.h.
10067 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10068 (plongest, thirty_two, phex_nz): Remove.
10069 * Makefile.in (SFILES): Add common/print-utils.c.
10070 (OBS): Add print-utils.o.
10071 (print-utils-ipa.o): New target.
10072 (print-utils.o): New target.
10073 (IPA_OBJS): Add print-utils-ipa.o.
10074
10075 2014-02-06 Tom Tromey <tromey@redhat.com>
10076
10077 * Makefile.in (SFILES): Fix indentation.
10078
10079 2014-02-05 Doug Evans <dje@google.com>
10080
10081 * linux-low.c (linux_wait_for_event): Improve comment.
10082 (linux_wait_1): Keep current_inferior in sync with event_child.
10083
10084 2014-01-22 Doug Evans <dje@google.com>
10085
10086 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10087
10088 2014-01-22 Doug Evans <dje@google.com>
10089
10090 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10091 * configure: Regenerate.
10092 * config.in: Regenerate.
10093 * Makefile.in (SFILES): Add debug.c.
10094 (OBS): Add debug.o.
10095 * debug.c: New file.
10096 * debug.h: New file.
10097 * linux-aarch64-low.c (*): Update all debugging printfs to use
10098 debug_printf instead of fprintf.
10099 * linux-arm-low.c (*): Ditto.
10100 * linux-cris-low.c (*): Ditto.
10101 * linux-crisv32-low.c (*): Ditto.
10102 * linux-m32r-low.c (*): Ditto.
10103 * linux-sparc-low.c (*): Ditto.
10104 * linux-x86.c (*): Ditto.
10105 * linux-low.c (*): Ditto.
10106 (linux_wait_1): Add calls to debug_enter, debug_exit.
10107 (linux_wait): Remove redundant debugging printf.
10108 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10109 (linux_resume, unstop_all_lwps): Ditto.
10110 * mem-break.c (*): Update all debugging printfs to use
10111 debug_printf instead of fprintf.
10112 * remote-utils.c (*): Ditto.
10113 * thread-db.c (*): Ditto.
10114 * server.c #include <ctype.h>, "gdb_vecs.h".
10115 (debug_threads): Moved to debug.c.
10116 (*): Update all debugging printfs to use debug_printf instead of
10117 fprintf.
10118 (start_inferior): Replace call to fflush with call to debug_flush.
10119 (monitor_show_help): Mention set debug-format.
10120 (parse_debug_format_options): New function.
10121 (handle_monitor_command): Handle "monitor set debug-format".
10122 (gdbserver_usage): Mention --debug-format.
10123 (main): Parse --debug-format.
10124 * server.h (debug_threads): Declaration moved to debug.h.
10125 #include "debug.h".
10126 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10127 trace_debug_1 that uses debug_printf.
10128 (tracepoint_look_up_symbols): Update all debugging printfs to use
10129 debug_printf instead of fprintf.
10130
10131 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10132
10133 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10134 sys/ptrace.h.
10135
10136 2014-01-17 Pedro Alves <palves@redhat.com>
10137
10138 PR build/16445
10139 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10140 defined after including gdb_proc_service.h.
10141
10142 2014-01-16 Doug Evans <dje@google.com>
10143
10144 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10145 (match_dll): Use it.
10146
10147 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10148
10149 * target.h (target_ops) <read_btrace>: Change parameters and
10150 return type to allow error reporting.
10151 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10152 trace reading errors on.
10153 * linux-low.c (linux_low_read_btrace): Pass trace reading
10154 errors on.
10155 (linux_low_disable_btrace): New.
10156
10157 2014-01-15 Doug Evans <dje@google.com>
10158
10159 * inferiors.c (thread_id_to_gdb_id): Delete.
10160 * inferiors.h (thread_id_to_gdb_id): Delete.
10161
10162 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10163
10164 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10165 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10166 versions.
10167
10168 2014-01-08 Pedro Alves <palves@redhat.com>
10169
10170 * server.c (handle_status): Don't discard previous queued stop
10171 replies or thread's pending status here.
10172 (main) <disconnection>: Do it here instead.
10173
10174 2014-01-08 Pedro Alves <palves@redhat.com>
10175
10176 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10177 * server.c (visit_actioned_threads, handle_pending_status): New
10178 function.
10179 (handle_v_cont): Factor out parts to ...
10180 (resume): ... this new function. If in all-stop, and a thread
10181 being resumed has a pending status, report it without actually
10182 resuming.
10183 (myresume): Adjust to use the new 'resume' function.
10184 (clear_pending_status_callback, set_pending_status_callback)
10185 (find_status_pending_thread_callback): New functions.
10186 (handle_status): Handle the case of multiple threads having
10187 interesting statuses to report. Report threads' real last signal
10188 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10189 with an interesting thread to report the status for, instead of
10190 always reporting the status of the first thread.
10191
10192 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10193
10194 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10195 * gdbreplay.c (gdbreplay_version): Likewise.
10196
10197 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10198
10199 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10200 iov.iov_len with the real length in use.
10201
10202 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10203
10204 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10205 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10206 for all targets that use win32-low.c.
10207 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10208 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10209
10210 2013-12-13 Pedro Alves <palves@redhat.com>
10211
10212 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10213 if equal to TARGET_WAITKIND_LOADED.
10214 * win32-low.c (cached_status): New static global.
10215 (win32_wait): Add declaration.
10216 (do_initial_child_stuff): Flush all initial pending debug events
10217 up to the initial breakpoint.
10218 (win32_wait): If CACHED_STATUS was set, return that instead
10219 of doing a real wait. Remove the code resuming the execution
10220 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10221 during the initial phase. Also remove the code changing
10222 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10223 TARGET_WAITKIND_STOPPED.
10224
10225 2013-12-11 Yao Qi <yao@codesourcery.com>
10226
10227 * notif.c (handle_notif_ack): Return 0 if no notification
10228 matches.
10229
10230 2013-11-20 Doug Evans <dje@google.com>
10231
10232 * linux-low.c (linux_set_resume_request): Fix comment.
10233
10234 2013-11-20 Doug Evans <dje@google.com>
10235
10236 * linux-low.c (resume_status_pending_p): Tweak comment.
10237
10238 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10239
10240 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10241 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10242 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10243 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10244 (srv_amd64_regobj): Add amd64-mpx.o.
10245 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10246 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10247 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10248 * i387-fp.c (num_pl_bnd_register) Added constant.
10249 (num_pl_bnd_cfg_registers) Added constant.
10250 (struct i387_xsave) Added reserved area and MPX fields.
10251 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10252 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10253 function.
10254 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10255 (init_registers_amd64_mpx_linux): Declare new function.
10256 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10257 (x86_64_regmap): Add MPX registers.
10258 (x86_linux_read_description): Add MPX case.
10259 (initialize_low_arch): Initialize MPX targets.
10260
10261 2013-11-18 Tom Tromey <tromey@redhat.com>
10262
10263 * configure: Rebuild.
10264 * configure.ac: Don't check for stdlib.h.
10265 * gdbreplay.c: Unconditionally include stdlib.h.
10266
10267 2013-11-18 Tom Tromey <tromey@redhat.com>
10268
10269 * config.in: Rebuild.
10270 * configure: Rebuild.
10271 * configure.ac: Don't use AC_HEADER_DIRENT.
10272
10273 2013-11-18 Tom Tromey <tromey@redhat.com>
10274
10275 * server.h: Don't check HAVE_STRING_H.
10276 * gdbreplay.c: Don't check HAVE_STRING_H.
10277 * configure: Rebuild.
10278
10279 2013-11-18 Tom Tromey <tromey@redhat.com>
10280
10281 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10282 LIBGNU.
10283
10284 2013-11-08 Tom Tromey <tromey@redhat.com>
10285
10286 * configure, config.in: Rebuild.
10287 * configure.ac: Remove unused configury.
10288
10289 2013-11-08 Tom Tromey <tromey@redhat.com>
10290
10291 * acinclude.m4: Include common.m4, codeset.m4.
10292 * configure, config.in: Rebuild.
10293 * configure.ac: Use GDB_AC_COMMON.
10294
10295 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10296
10297 * linux-s390-low.c (HWCAP_S390_TE): New define.
10298 (s390_arch_setup): Consider the TE field in the HWCAP for
10299 determining 'have_regset_tdb'.
10300
10301 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10302
10303 PR gdb/16014
10304 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10305 call to sizeof.
10306
10307 2013-10-02 Pedro Alves <palves@redhat.com>
10308
10309 * server.c (process_serial_event): Don't output "GDBserver
10310 exiting" if GDB is connected through stdio.
10311 * target.c (mywait): Likewise, be silent if GDB is connected
10312 through stdio.
10313
10314 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10315
10316 * lynx-low.c (lynx_add_threads_after_attach): New function.
10317 (lynx_attach): Remove call to add_thread. Add call to
10318 lynx_add_threads_after_attach instead.
10319
10320 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10321
10322 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10323 * config.in, configure: Regenerated.
10324
10325 2013-09-18 Yao Qi <yao@codesourcery.com>
10326
10327 PR server/15959
10328 * server.c (start_inferior): Clear 'resume_info'.
10329
10330 2013-09-16 Jiong Wang <jiwang@tilera.com>
10331
10332 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10333 for each register.
10334
10335 2013-09-16 Jiong Wang <jiwang@tilera.com>
10336
10337 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10338 linux-tile-low.o to srv_tgtobj.
10339
10340 2013-09-16 Will Newton <will.newton@linaro.org>
10341
10342 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10343 out regs.
10344
10345 2013-09-06 Pedro Alves <palves@redhat.com>
10346
10347 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10348 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10349 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10350 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10351 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10352 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10353
10354 2013-09-06 Pedro Alves <palves@redhat.com>
10355
10356 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10357 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10358
10359 2013-09-06 Pedro Alves <palves@redhat.com>
10360
10361 * linux-amd64-ipa.c: Include tracepoint.h.
10362 * linux-i386-ipa.c: Include tracepoint.h.
10363
10364 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10365
10366 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10367 (ps_get_thread_area): New function.
10368
10369 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10370
10371 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10372 (initialize_low_arch): Call init_registers_crisv32 rather than
10373 init_register_crisv32.
10374
10375 2013-09-05 Pedro Alves <palves@redhat.com>
10376
10377 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10378 to ...
10379 * hostio.h: ... this new file.
10380 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10381 win32-low.c: Include hostio.h.
10382
10383 2013-09-05 Pedro Alves <palves@redhat.com>
10384
10385 * server.h (gdb_client_data, handler_func, callback_handler_func)
10386 (delete_file_handler, add_file_handler, append_callback_event)
10387 (delete_callback_event, start_event_loop, initialize_event_loop):
10388 Move to event-loop.h and include it.
10389 * event-loop.h: New file.
10390
10391 2013-09-05 Pedro Alves <palves@redhat.com>
10392
10393 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10394 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10395 (loaded_dll, unloaded_dll): Move to ...
10396 * dll.h: ... this new file.
10397 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10398
10399 2013-09-05 Pedro Alves <palves@redhat.com>
10400
10401 * server.h (current_process, get_thread_process, all_processes)
10402 (add_inferior_to_list, for_each_inferior, current_inferior)
10403 (remove_inferior, add_process, remove_process, find_process_pid)
10404 (have_started_inferiors_p, have_attached_inferiors_p)
10405 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10406 (clear_inferiors, find_inferior, find_inferior_id)
10407 (inferior_target_data, set_inferior_target_data)
10408 (inferior_regcache_data, set_inferior_regcache_data): Move to
10409 inferiors.h, and include it.
10410 * inferiors.h: New file.
10411
10412 2013-09-05 Pedro Alves <palves@redhat.com>
10413
10414 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10415 Move ...
10416 * ax.h: ... here.
10417
10418 2013-09-05 Pedro Alves <palves@redhat.com>
10419
10420 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10421 tracepoint.h.
10422 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10423 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10424 (handle_tracepoint_general_set, handle_tracepoint_query)
10425 (tracepoint_finished_step, tracepoint_was_hit)
10426 (release_while_stepping_state_list, current_traceframe)
10427 (in_readonly_region, traceframe_read_mem)
10428 (fetch_traceframe_registers, traceframe_read_sdata)
10429 (traceframe_read_info, struct fast_tpoint_collect_status)
10430 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10431 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10432 (supply_fast_tracepoint_registers)
10433 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10434 (ipa_tdesc, claim_trampoline_space)
10435 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10436 (agent_mem_read, agent_get_trace_state_variable_value)
10437 (agent_set_trace_state_variable_value, agent_tsv_read)
10438 (agent_mem_read_string, get_raw_reg_func_addr)
10439 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10440 * tracepoint.h: ... this new file.
10441
10442 2013-09-05 Pedro Alves <palves@redhat.com>
10443
10444 * server.h (perror_with_name, error, fatal, warning, paddress)
10445 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10446 include it.
10447 * utils.h: New file.
10448
10449 2013-09-05 Pedro Alves <palves@redhat.com>
10450
10451 * server.h (remote_debug, noack_mode, transport_is_reliable)
10452 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10453 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10454 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10455 (write_enn, initialize_async_io, enable_async_io)
10456 (disable_async_io, check_remote_input_interrupt_request)
10457 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10458 (dead_thread_notify, prepare_resume_reply)
10459 (decode_address_to_semicolon, decode_address, decode_m_packet)
10460 (decode_M_packet, decode_X_packet, decode_xfer_write)
10461 (decode_search_memory_packet, unhexify, hexify)
10462 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10463 (look_up_one_symbol, relocate_instruction)
10464 (monitor_output): Move to remote-utils.h, and include it.
10465 * remote-utils.h: New file.
10466
10467 2013-09-05 Pedro Alves <palves@redhat.com>
10468
10469 * server.h (_): Delete.
10470
10471 2013-09-02 Pedro Alves <palves@redhat.com>
10472
10473 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10474 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10475 allocated.
10476 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10477
10478 2013-09-02 Pierre Muller <muller@sourceware.org>
10479
10480 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10481 or WriteProcessMemory complete successfully and handle
10482 ERROR_PARTIAL_COPY error.
10483
10484 2013-09-02 Pedro Alves <palves@redhat.com>
10485
10486 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10487 error instead of EIO.
10488
10489 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10490
10491 PR server/15604
10492 * linux-low.c: Include filestuff.h.
10493 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10494 * lynx-low.c: Include filestuff.h.
10495 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10496 * server.c: Include filestuff.h.
10497 (main): Call notice_open_fds.
10498 * spu-low.c: Include filestuff.h.
10499 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10500
10501 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10502
10503 * Makefile.in: Explain why ../target and ../nat are not
10504 listed as include file search paths.
10505 (linux-waitpid.o): New object file rule.
10506 * configure.srv (srv_native_linux_obj): New variable.
10507 Replace all occurrences of linux native object files with
10508 $srv_native_linux_obj.
10509 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10510 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10511 (linux_enable_event_reporting): Remove declaration.
10512 (my_waitpid): Moved to common/linux-waitpid.c.
10513 (linux_wait_for_event): Pass ptid when calling
10514 linux_enable_event_reporting.
10515 (linux_supports_tracefork_flag): Remove.
10516 (linux_enable_event_reporting): Likewise.
10517 (linux_tracefork_grandchild): Remove.
10518 (STACK_SIZE): Moved to common/linux-ptrace.c.
10519 (linux_tracefork_child): Remove.
10520 (linux_test_for_tracefork): Remove.
10521 (linux_look_up_symbols): Call linux_supports_traceclone.
10522 (initialize_low): Remove call to linux_test_for_tracefork.
10523 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10524 common/linux-ptrace.h.
10525 (PTRACE_TYPE_ARG4): Likewise.
10526 Include linux-ptrace.h.
10527
10528 2013-08-21 Pedro Alves <palves@redhat.com>
10529
10530 * config.in: Renegerate.
10531
10532 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10533
10534 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10535 (SFILES): Remove $(srcdir)/common/target-common.c and
10536 add $(srcdir)/target/waitstatus.c.
10537 (OBS): Remove target-common.o and add waitstatus.o.
10538 (server_h): Remove $(srcdir)/../common/target-common.h and
10539 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10540 and $(srcdir)/../target/waitstatus.h.
10541 (target-common.o): Remove.
10542 (waitstatus.o): New target object file.
10543 * target.h: Do not include target-common.h and
10544 include target/resume.h, target/wait.h and
10545 target/waitstatus.h.
10546
10547 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10548
10549 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10550 to PTRACE_TYPE_ARG3.
10551 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10552 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10553 PTRACE_TYPE_ARG4.
10554 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10555 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10556
10557 2013-07-27 Jie Zhang <jie@codesourcery.com>
10558 Daniel Jacobowitz <dan@codesourcery.com>
10559 Yao Qi <yao@codesourcery.com>
10560
10561 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10562 (mips-linux-watch.o): New rule.
10563 (mips_linux_watch_h): New variable.
10564 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10565 srv_tgtobj.
10566 * linux-mips-low.c: Include mips-linux-watch.h.
10567 (struct arch_process_info, struct arch_lwp_info): New.
10568 (update_watch_registers_callback): New function.
10569 (mips_linux_new_process, mips_linux_new_thread) New functions.
10570 (mips_linux_prepare_to_resume, mips_insert_point): New
10571 functions.
10572 (mips_remove_point, mips_stopped_by_watchpoint): New
10573 functions.
10574 (rsp_bp_type_to_target_hw_bp_type): New function.
10575 (mips_stopped_data_address): New function.
10576 (the_low_target): Add watchpoint support functions.
10577
10578 2013-07-27 Yao Qi <yao@codesourcery.com>
10579
10580 * i386-low.c: Include break-common.h.
10581 (enum target_hw_bp_type): Remove.
10582
10583 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10584
10585 * Makefile.in (SFILES): /common/target-common.c.
10586 (OBS): Add target-common.o.
10587 (server_h): Add $(srcdir)/../common/target-common.h.
10588 (target-common.o): New target.
10589 * server.c (queue_stop_reply_callback): Free
10590 status string after use.
10591 * target.c (target_waitstatus_to_string): Remove.
10592 * target.h: Include target-common.h.
10593 (resume_kind): Likewise.
10594 (target_waitkind): Likewise.
10595 (target_waitstatus): Likewise.
10596 (TARGET_WNOHANG): Likewise.
10597
10598 2013-07-04 Yao Qi <yao@codesourcery.com>
10599
10600 * Makefile.in (host_alias): Use @host_noncanonical@.
10601 (target_alias): Use @target_noncanonical@.
10602 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10603 ACX_NONCANONICAL_HOST.
10604 * configure: Regenerated.
10605
10606 Revert:
10607 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10608
10609 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10610 * configure: Rebuild.
10611 * Makefile.in (version_host, version_target): Get from configure.
10612 (version.c): Use $(version_host) and $(version_target).
10613
10614 2013-07-03 Pedro Alves <palves@redhat.com>
10615
10616 * Makefile.in (config.status): Depend on development.sh.
10617 * acinclude.m4: Include libmcheck.m4.
10618 * configure: Regenerate.
10619
10620 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10621
10622 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10623 attribute inside the parentheses.
10624 (winapi_DebugSetProcessKillOnExit): Ditto.
10625 (winapi_DebugBreakProcess): Ditto.
10626 (winapi_GenerateConsoleCtrlEvent): Ditto.
10627
10628 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10629
10630 * notif.h (notif_event): Add a dummy member to avoid compiler
10631 errors.
10632
10633 2013-07-01 Pedro Alves <palves@redhat.com>
10634
10635 * hostio.c (HOSTIO_PATH_MAX): Define.
10636 (require_filename, handle_open, handle_unlink, handle_readlink):
10637 Use it.
10638
10639 2013-07-01 Pedro Alves <palves@redhat.com>
10640
10641 * server.h: Include "pathmax.h".
10642 * linux-low.c: Don't include sys/param.h.
10643 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10644 MAXPATHLEN.
10645 * win32-low.c: Don't include sys/param.h.
10646 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10647
10648 2013-07-01 Pedro Alves <palves@redhat.com>
10649
10650 * event-loop.c: Don't check HAVE_UNISTD_H before including
10651 <unistd.h>.
10652 * gdbreplay.c: Likewise.
10653 * remote-utils.c: Likewise.
10654 * server.c: Likewise.
10655 * configure.ac: Don't check for unistd.h.
10656 * configure: Regenerate.
10657
10658 2013-06-28 Tom Tromey <tromey@redhat.com>
10659
10660 * Makefile.in (version.c): Use version.in, not
10661 common/version.in.
10662
10663 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10664
10665 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10666 * configure: Rebuild.
10667 * Makefile.in (version_host, version_target): Get from configure.
10668 (version.c): Use $(version_host) and $(version_target).
10669
10670 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10671
10672 Fix trace-status to output user name without trailing colon.
10673 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10674
10675 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10676
10677 Fix trace-status to output proper start-time and stop-time.
10678 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10679 output start time and stop time in hex as gdb expects.
10680
10681 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10682
10683 * tracepoint.c (build_traceframe_info_xml): Output trace state
10684 variables present in the trace buffer.
10685
10686 2013-06-24 Tom Tromey <tromey@redhat.com>
10687
10688 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10689 create-version.sh.
10690 (version.o): Remove.
10691 * gdbreplay.c: Include version.h.
10692 (version, host_name): Don't declare.
10693 * server.h: Include version.h.
10694 (version, host_name): Don't declare.
10695
10696 2013-06-12 Pedro Alves <palves@redhat.com>
10697
10698 * linux-x86-low.c (linux_is_elf64): Delete global.
10699 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10700 with local linux_pid_exe_is_elf_64_file use.
10701
10702 2013-06-11 Pedro Alves <palves@redhat.com>
10703
10704 * linux-low.c (regset_disabled, disable_regset): New functions.
10705 (regsets_fetch_inferior_registers)
10706 (regsets_store_inferior_registers): Use them.
10707 (initialize_regsets_info); Don't allocate the disabled_regsets
10708 array here.
10709 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10710 comment.
10711
10712 2013-06-11 Pedro Alves <palves@redhat.com>
10713
10714 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10715 xmalloc.
10716
10717 2013-06-11 Pedro Alves <palves@redhat.com>
10718
10719 * linux-x86-low.c (initialize_low_arch): Call
10720 init_registers_x32_avx_linux.
10721
10722 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10723
10724 Fix compatibility with Android Bionic.
10725 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10726 it is not empty.
10727
10728 2013-06-07 Pedro Alves <palves@redhat.com>
10729
10730 PR server/14823
10731 * Makefile.in (OBS): Add tdesc.o.
10732 (IPA_OBJS): Add tdesc-ipa.o.
10733 (tdesc-ipa.o): New rule.
10734 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10735 interface.
10736 * linux-low.c (new_inferior): Delete.
10737 (disabled_regsets, num_regsets): Delete.
10738 (linux_add_process): Adjust to set the new per-process
10739 new_inferior flag.
10740 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10741 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10742 was a stop. When calling arch_setup, switch the current inferior
10743 to the thread that got an event.
10744 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10745 (regsets_fetch_inferior_registers)
10746 (regsets_store_inferior_registers): New regsets_info parameter.
10747 Adjust to use it.
10748 (linux_register_in_regsets): New regs_info parameter. Adjust to
10749 use it.
10750 (register_addr, fetch_register, store_register): New usrregs_info
10751 parameter. Adjust to use it.
10752 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10753 parameter regs_info. Adjust to use it.
10754 (linux_fetch_registers): Get the current inferior's regs_info, and
10755 adjust to use it.
10756 (linux_store_registers): Ditto.
10757 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10758 (initialize_low): Don't initialize the target_regsets here. Call
10759 initialize_low_arch.
10760 * linux-low.h (target_regsets): Delete declaration.
10761 (struct regsets_info): New.
10762 (struct usrregs_info): New.
10763 (struct regs_info): New.
10764 (struct process_info_private) <new_inferior>: New field.
10765 (struct linux_target_ops): Delete the num_regs, regmap, and
10766 regset_bitmap fields. New field regs_info.
10767 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10768 * i387-fp.c (num_xmm_registers): Delete.
10769 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10770 calls to new interface.
10771 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10772 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10773 Infer the number of xmm registers from the regcache's target
10774 description.
10775 * i387-fp.h (num_xmm_registers): Delete.
10776 * inferiors.c (add_thread): Don't install the thread's regcache
10777 here.
10778 * proc-service.c (gregset_info): Fetch the current inferior's
10779 regs_info. Adjust to use it.
10780 * regcache.c: Include tdesc.h.
10781 (register_bytes, reg_defs, num_registers)
10782 (gdbserver_expedite_regs): Delete.
10783 (get_thread_regcache): If the thread doesn't have a regcache yet,
10784 create one, instead of aborting gdbserver.
10785 (regcache_invalidate_one): Rename to ...
10786 (regcache_invalidate_thread): ... this.
10787 (regcache_invalidate_one): New.
10788 (regcache_invalidate): Only invalidate registers of the current
10789 process.
10790 (init_register_cache): Add target_desc parameter, and use it.
10791 (new_register_cache): Ditto. Assert the target description has a
10792 non zero registers_size.
10793 (regcache_cpy): Add assertions. Adjust.
10794 (realloc_register_cache, set_register_cache): Delete.
10795 (registers_to_string, registers_from_string): Adjust.
10796 (find_register_by_name, find_regno, find_register_by_number)
10797 (register_cache_size): Add target_desc parameter, and use it.
10798 (free_register_cache_thread, free_register_cache_thread_one)
10799 (regcache_release, register_cache_size): New.
10800 (register_size): Add target_desc parameter, and use it.
10801 (register_data, supply_register, supply_register_zeroed)
10802 (supply_regblock, supply_register_by_name, collect_register)
10803 (collect_register_as_string, collect_register_by_name): Adjust.
10804 * regcache.h (struct target_desc): Forward declare.
10805 (struct regcache) <tdesc>: New field.
10806 (init_register_cache, new_register_cache): Add target_desc
10807 parameter.
10808 (regcache_invalidate_thread): Declare.
10809 (regcache_invalidate_one): Delete declaration.
10810 (regcache_release): Declare.
10811 (find_register_by_number, register_cache_size, register_size)
10812 (find_regno): Add target_desc parameter.
10813 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10814 declarations.
10815 * remote-utils.c: Include tdesc.h.
10816 (outreg, prepare_resume_reply): Adjust.
10817 * server.c: Include tdesc.h.
10818 (gdbserver_xmltarget): Delete declaration.
10819 (get_features_xml, process_serial_event): Adjust.
10820 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10821 declare.
10822 (struct process_info) <tdesc>: New field.
10823 (ipa_tdesc): Declare.
10824 * tdesc.c: New file.
10825 * tdesc.h: New file.
10826 * tracepoint.c: Include tdesc.h.
10827 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10828 (get_context_regcache): Adjust to pass ipa_tdesc down.
10829 (do_action_at_tracepoint): Adjust to get the register cache size
10830 from the context regcache's description.
10831 (traceframe_walk_blocks): Adjust to get the register cache size
10832 from the current trace frame's description.
10833 (traceframe_get_pc): Adjust to get current trace frame's
10834 description and pass it down.
10835 (gdb_collect): Adjust to get the register cache size from the
10836 IPA's description.
10837 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10838 (gdbserver_xmltarget): Delete.
10839 (initialize_low_tracepoint): Set the ipa's target description.
10840 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10841 (initialize_low_tracepoint): Set the ipa's target description.
10842 * linux-x86-low.c: Include tdesc.h.
10843 [__x86_64__] (is_64bit_tdesc): New.
10844 (ps_get_thread_area, x86_get_thread_area): Use it.
10845 (i386_cannot_store_register): Rename to ...
10846 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10847 (i386_cannot_fetch_register): Rename to ...
10848 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10849 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10850 to new interface.
10851 (target_regsets): Rename to ...
10852 (x86_regsets): ... this.
10853 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10854 interface.
10855 (x86_siginfo_fixup): Use is_64bit_tdesc.
10856 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10857 (tdesc_x32_avx_linux, tdesc_x32_linux)
10858 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10859 Declare.
10860 (x86_linux_update_xmltarget): Delete.
10861 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10862 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10863 (AMD64_LINUX_USER64_CS): New.
10864 (x86_linux_read_description): New, based on
10865 x86_linux_update_xmltarget.
10866 (same_process_callback): New.
10867 (x86_arch_setup_process_callback): New.
10868 (x86_linux_update_xmltarget): New.
10869 (x86_regsets_info): New.
10870 (amd64_linux_regs_info): New.
10871 (i386_linux_usrregs_info): New.
10872 (i386_linux_regs_info): New.
10873 (x86_linux_regs_info): New.
10874 (x86_arch_setup): Reimplement.
10875 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10876 (x86_emit_ops): Ditto.
10877 (the_low_target): Adjust. Install x86_linux_regs_info,
10878 x86_cannot_fetch_register, and x86_cannot_store_register.
10879 (initialize_low_arch): New.
10880 * linux-ia64-low.c (tdesc_ia64): Declare.
10881 (ia64_fetch_register): Adjust.
10882 (ia64_usrregs_info, regs_info): New globals.
10883 (ia64_regs_info): New function.
10884 (the_low_target): Adjust.
10885 (initialize_low_arch): New function.
10886 * linux-sparc-low.c (tdesc_sparc64): Declare.
10887 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10888 Adjust.
10889 (sparc_arch_setup): New function.
10890 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10891 (the_low_target): Adjust.
10892 (initialize_low_arch): New function.
10893 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10894 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10895 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10896 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10897 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10898 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10899 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10900 (tdesc_powerpc_isa205_vsx64l): Declare.
10901 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10902 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10903 (ppc_set_pc, ppc_get_hwcap): Adjust.
10904 (ppc_usrregs_info): Forward declare.
10905 (!__powerpc64__) ppc_regmap_adjusted: New global.
10906 (ppc_arch_setup): Adjust to the current process'es target
10907 description.
10908 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10909 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10910 (ppc_store_evrregset): Adjust.
10911 (target_regsets): Rename to ...
10912 (ppc_regsets): ... this, and make static.
10913 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10914 (ppc_regs_info): New function.
10915 (the_low_target): Adjust.
10916 (initialize_low_arch): New function.
10917 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10918 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10919 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10920 (tdesc_s390x_linux64v2): Declare.
10921 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10922 (s390_fill_gregset, s390_store_last_break): Adjust.
10923 (target_regsets): Rename to ...
10924 (s390_regsets): ... this, and make static.
10925 (s390_get_pc, s390_set_pc): Adjust.
10926 (s390_get_hwcap): New target_desc parameter, and use it.
10927 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10928 (s390_arch_setup): Adjust to set the current process'es target
10929 description. Don't adjust the regmap.
10930 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10931 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10932 (regs_info_3264): New globals.
10933 (s390_regs_info): New function.
10934 (the_low_target): Adjust.
10935 (initialize_low_arch): New function.
10936 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10937 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10938 [__mips64] (init_registers_mips_linux)
10939 (init_registers_mips_dsp_linux): Delete defines.
10940 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10941 (have_dsp): New global.
10942 (mips_read_description): New, based on mips_arch_setup.
10943 (mips_arch_setup): Reimplement.
10944 (get_usrregs_info): New function.
10945 (mips_cannot_fetch_register, mips_cannot_store_register)
10946 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10947 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10948 (target_regsets): Rename to ...
10949 (mips_regsets): ... this, and make static.
10950 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10951 (dsp_regs_info, regs_info): New globals.
10952 (mips_regs_info): New function.
10953 (the_low_target): Adjust.
10954 (initialize_low_arch): New function.
10955 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10956 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10957 Declare.
10958 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10959 (arm_read_description): New, with bits factored from
10960 arm_arch_setup.
10961 (arm_arch_setup): Reimplement.
10962 (target_regsets): Rename to ...
10963 (arm_regsets): ... this, and make static.
10964 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10965 (arm_regs_info): New function.
10966 (the_low_target): Adjust.
10967 (initialize_low_arch): New function.
10968 * linux-m68k-low.c (tdesc_m68k): Declare.
10969 (target_regsets): Rename to ...
10970 (m68k_regsets): ... this, and make static.
10971 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10972 (m68k_regs_info): New function.
10973 (m68k_arch_setup): New function.
10974 (the_low_target): Adjust.
10975 (initialize_low_arch): New function.
10976 * linux-sh-low.c (tdesc_sharch): Declare.
10977 (target_regsets): Rename to ...
10978 (sh_regsets): ... this, and make static.
10979 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10980 (sh_regs_info, sh_arch_setup): New functions.
10981 (the_low_target): Adjust.
10982 (initialize_low_arch): New function.
10983 * linux-bfin-low.c (tdesc_bfin): Declare.
10984 (bfin_arch_setup): New function.
10985 (bfin_usrregs_info, regs_info): New globals.
10986 (bfin_regs_info): New function.
10987 (the_low_target): Adjust.
10988 (initialize_low_arch): New function.
10989 * linux-cris-low.c (tdesc_cris): Declare.
10990 (cris_arch_setup): New function.
10991 (cris_usrregs_info, regs_info): New globals.
10992 (cris_regs_info): New function.
10993 (the_low_target): Adjust.
10994 (initialize_low_arch): New function.
10995 * linux-cris-low.c (tdesc_crisv32): Declare.
10996 (cris_arch_setup): New function.
10997 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10998 (cris_regs_info): New function.
10999 (the_low_target): Adjust.
11000 (initialize_low_arch): New function.
11001 * linux-m32r-low.c (tdesc_m32r): Declare.
11002 (m32r_arch_setup): New function.
11003 (m32r_usrregs_info, regs_info): New globals.
11004 (m32r_regs_info): Adjust.
11005 (initialize_low_arch): New function.
11006 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11007 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11008 (tic6x_usrregs_info): Forward declare.
11009 (tic6x_read_description): New function, based on ...
11010 (tic6x_arch_setup): ... this. Reimplement.
11011 (target_regsets): Rename to ...
11012 (tic6x_regsets): ... this, and make static.
11013 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11014 (tic6x_regs_info): New function.
11015 (the_low_target): Adjust.
11016 (initialize_low_arch): New function.
11017 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11018 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11019 (target_regsets): Rename to ...
11020 (xtensa_regsets): ... this, and make static.
11021 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11022 globals.
11023 (xtensa_arch_setup, xtensa_regs_info): New functions.
11024 (the_low_target): Adjust.
11025 (initialize_low_arch): New function.
11026 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11027 (nios2_arch_setup): Set the current process'es tdesc.
11028 (target_regsets): Rename to ...
11029 (nios2_regsets): ... this.
11030 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11031 (nios2_regs_info): New function.
11032 (the_low_target): Adjust.
11033 (initialize_low_arch): New function.
11034 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11035 (aarch64_arch_setup): Set the current process'es tdesc.
11036 (target_regsets): Rename to ...
11037 (aarch64_regsets): ... this.
11038 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11039 (aarch64_regs_info): New function.
11040 (the_low_target): Adjust.
11041 (initialize_low_arch): New function.
11042 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11043 globals.
11044 (target_regsets): Rename to ...
11045 (tile_regsets): ... this.
11046 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11047 (tile_regs_info): New function.
11048 (tile_arch_setup): Set the current process'es tdesc.
11049 (the_low_target): Adjust.
11050 (initialize_low_arch): New function.
11051 * spu-low.c (tdesc_spu): Declare.
11052 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11053 * win32-arm-low.c (tdesc_arm): Declare.
11054 (arm_arch_setup): New function.
11055 (the_low_target): Install arm_arch_setup instead of
11056 init_registers_arm.
11057 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11058 (init_windows_x86): Rename to ...
11059 (i386_arch_setup): ... this. Set `win32_tdesc'.
11060 (the_low_target): Adjust.
11061 * win32-low.c (win32_tdesc): New global.
11062 (child_add_thread): Don't create the thread cache here.
11063 (do_initial_child_stuff): Set the new process'es tdesc.
11064 * win32-low.h (struct target_desc): Forward declare.
11065 (win32_tdesc): Declare.
11066 * lynx-i386-low.c (tdesc_i386): Declare global.
11067 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11068 * lynx-low.c (lynx_tdesc): New global.
11069 (lynx_add_process): Set the new process'es tdesc.
11070 * lynx-low.h (struct target_desc): Forward declare.
11071 (lynx_tdesc): Declare global.
11072 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11073 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11074 * nto-low.c (nto_tdesc): New global.
11075 (do_attach): Set the new process'es tdesc.
11076 * nto-low.h (struct target_desc): Forward declare.
11077 (nto_tdesc): Declare.
11078 * nto-x86-low.c (tdesc_i386): Declare.
11079 (nto_x86_arch_setup): Set `nto_tdesc'.
11080
11081 2013-06-04 Gary Benson <gbenson@redhat.com>
11082
11083 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11084 to qSupported response when appropriate.
11085 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11086 with nonzero-length annex.
11087 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11088 arguments supplied in annex.
11089
11090 2013-05-31 Doug Evans <dje@google.com>
11091
11092 PR server/15594
11093 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11094 64 bits in 64-cross-32 environment.
11095
11096 2013-05-28 Pedro Alves <palves@redhat.com>
11097
11098 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11099 (aarch64-without-fpu.c): Delete rule.
11100 * configure.srv (aarch64*-*-linux*): Remove references to
11101 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11102 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11103 declaration.
11104
11105 2013-05-24 Pedro Alves <palves@redhat.com>
11106
11107 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11108 instead of strchr/decode_address. Error if the range isn't split
11109 with a ','. Don't assume there's be a ':' in the action.
11110
11111 2013-05-23 Yao Qi <yao@codesourcery.com>
11112 Pedro Alves <palves@redhat.com>
11113
11114 * linux-low.c (lwp_in_step_range): New function.
11115 (linux_wait_1): If the thread was range stepping and stopped
11116 outside the stepping range, report the stop to GDB. Otherwise,
11117 continue stepping. Add range stepping debug output.
11118 (linux_set_resume_request): Copy the step range from the resume
11119 request to the lwp.
11120 (linux_supports_range_stepping): New.
11121 (linux_target_ops) <supports_range_stepping>: Set to
11122 linux_supports_range_stepping.
11123 * linux-low.h (struct linux_target_ops)
11124 <supports_range_stepping>: New field.
11125 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11126 * linux-x86-low.c (x86_supports_range_stepping): New.
11127 (the_low_target) <supports_range_stepping>: Set to
11128 x86_supports_range_stepping.
11129 * server.c (handle_v_cont): Handle 'r' action.
11130 (handle_v_requests): Append ";r" if the target supports range
11131 stepping.
11132 * target.h (struct thread_resume) <step_range_start,
11133 step_range_end>: New fields.
11134 (struct target_ops) <supports_range_stepping>:
11135 New field.
11136 (target_supports_range_stepping): New macro.
11137
11138 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11139
11140 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11141 confusion in comment.
11142
11143 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11144
11145 * lynx-low.c (struct process_info_private): New type.
11146 (lynx_add_process): New function.
11147 (lynx_create_inferior, lynx_attach): Replace calls to
11148 add_process by calls to lynx_add_process.
11149 (lynx_resume): If PTID is null, then try using
11150 current_process()->private->last_wait_event_ptid.
11151 Add comments.
11152 (lynx_clear_inferiors): Delete. The contents of that function
11153 has been inlined in lynx_mourn;
11154 (lynx_wait_1): Save the ptid in the process's private data.
11155 (lynx_mourn): Free the process' private data. Replace call
11156 to lynx_clear_inferiors by call to clear_inferiors.
11157
11158 2013-05-17 Yao Qi <yao@codesourcery.com>
11159
11160 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11161 the right place.
11162
11163 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11164
11165 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11166 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11167 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11168 PT_TEXT_END_ADDR guards. Update comments.
11169 (linux_target_op) <read_offsets>: Conditionally define to
11170 linux_read_offsets if the target is UCLIBC and if it defines
11171 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11172
11173 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11174 Andrew Jenner <andrew@codesourcery.com>
11175
11176 * Makefile.in (SFILES): Add linux-nios2-low.c.
11177 (clean): Add action to delete nios2-linux.c.
11178 (nios2-linux.c): New rule.
11179 * configure.srv: Add nios2*-*-linux*.
11180 * linux-nios2-low.c: New.
11181
11182 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11183
11184 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11185
11186 2013-04-25 Hui Zhu <hui@codesourcery.com>
11187
11188 PR gdb/15186
11189 * ax.c (ax_printf): Add fflush.
11190
11191 2013-04-22 Tom Tromey <tromey@redhat.com>
11192
11193 * Makefile.in (SFILES): Add filestuff.c.
11194 (OBS): Add filestuff.o.
11195 (filestuff.o): New target.
11196 * config.in, configure: Rebuild.
11197 * configure.ac: Check for fdwalk, pipe2.
11198
11199 2013-04-17 Pedro Alves <palves@redhat.com>
11200
11201 * configure.ac (USE_THREAD_DB): Delete variable.
11202 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11203 Don't AC_SUBST USE_THREAD_DB.
11204 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11205 * config.in, configure: Regenerate.
11206
11207 2013-04-16 Pedro Alves <palves@redhat.com>
11208
11209 * linux-low.h (struct lwp_info) <thread_known>: Move under
11210 the USE_THREAD_DB #ifdef.
11211
11212 2013-04-16 Pedro Alves <palves@redhat.com>
11213
11214 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11215 (linux-low.o): Delete rule.
11216 * linux-low.h: Always include "gdb_thread_db.h" instead of
11217 conditionally including thread_db.h.
11218 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11219 HAVE_THREAD_DB_H.
11220
11221 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11222
11223 * Makefile.in (install-only): Fix make install regression.
11224
11225 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11226
11227 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11228 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11229 installation.
11230 * gdbserver.1: Remove.
11231
11232 2013-03-22 Pedro Alves <palves@redhat.com>
11233
11234 * linux-low.c (handle_extended_wait): Don't call
11235 linux_enable_event_reporting.
11236
11237 2013-03-15 Tony Theodore <tonyt@logyst.com>
11238
11239 PR build/9098:
11240 * Makefile.in (SHELL): Use @SHELL@.
11241
11242 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11243
11244 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11245 compiler warning.
11246
11247 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11248
11249 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11250 Remove extraneous NULL element.
11251
11252 2013-03-13 Yao Qi <yao@codesourcery.com>
11253
11254 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11255 'V' block in trace frame.
11256
11257 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11258
11259 * target.h (struct target_ops): Add btrace ops.
11260 (target_supports_btrace): New macro.
11261 (target_enable_btrace): New macro.
11262 (target_disable_btrace): New macro.
11263 (target_read_btrace): New macro.
11264 * gdbthread.h (struct thread_info): Add btrace field.
11265 * server.c: Include btrace-common.h.
11266 (handle_btrace_general_set): New function.
11267 (handle_btrace_enable): New function.
11268 (handle_btrace_disable): New function.
11269 (handle_general_set): Call handle_btrace_general_set.
11270 (handle_qxfer_btrace): New function.
11271 (struct qxfer qxfer_packets[]): Add btrace entry.
11272 * inferiors.c (remove_thread): Disable btrace.
11273 * linux-low: Include linux-btrace.h.
11274 (linux_low_enable_btrace): New function.
11275 (linux_low_read_btrace): New function.
11276 (linux_target_ops): Add btrace ops.
11277 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11278 Add srv_linux_btrace=yes.
11279 (x86_64-*-linux*): Add linux-btrace.o.
11280 Add srv_linux_btrace=yes.
11281 * configure.ac: Define HAVE_LINUX_BTRACE.
11282 * config.in: Regenerated.
11283 * configure: Regenerated.
11284
11285 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11286
11287 * server.c (handle_qxfer): Preserve error message if -3 is
11288 returned.
11289 (qxfer): Document the -3 return value.
11290
11291 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11292
11293 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11294 (linux_btrace_h): New variable.
11295 (linux-btrace.o): New rule.
11296
11297 2013-03-08 Stan Shebs <stan@codesourcery.com>
11298 Hafiz Abid Qadeer <abidh@codesourcery.com>
11299
11300 * tracepoint.c (trace_buffer_size): New global.
11301 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11302 (init_trace_buffer): Change to one-argument function. Allocate
11303 trace buffer memory.
11304 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11305 handle QTBuffer:size packet.
11306 (cmd_bigqtbuffer_size): New function.
11307 (initialize_tracepoint): Call init_trace_buffer with
11308 DEFAULT_TRACE_BUFFER_SIZE.
11309 * server.c (handle_query): Add QTBuffer:size in the
11310 supported packets.
11311
11312 2013-03-07 Yao Qi <yao@codesourcery.com>
11313
11314 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11315 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11316 of -1.
11317 (cmd_qtsp): Adjust condition. Do post increment.
11318 Set cur_action and cur_step_action back to 0.
11319
11320 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11321
11322 PR server/15236
11323 * linux-low.c (linux_write_memory): Return early success if LEN is
11324 zero.
11325
11326 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11327
11328 * configure.srv: Add x86_64-*-cygwin* as target.
11329
11330 2013-02-28 Tom Tromey <tromey@redhat.com>
11331
11332 * configure.ac: Invoke AC_SYS_LARGEFILE.
11333 * configure, config.in: Rebuild.
11334
11335 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11336
11337 * win32-low.c: Throughout, fix format strings and casts of
11338 printf-like functions to avoid type related warnings on all
11339 platforms.
11340 (get_child_debug_event): Print dwDebugEventCode as hex since
11341 that's how it's usually documented.
11342
11343 2013-02-28 Yao Qi <yao@codesourcery.com>
11344
11345 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11346 pulongest.
11347
11348 2013-02-27 Jiong Wang <jiwang@tilera.com>
11349
11350 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11351 (reg-tilegx32.c): New rule.
11352 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11353 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11354 different register info initializer according to elf class.
11355 (init_registers_tilgx32): New function. The tilegx32 register info
11356 initializer.
11357 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11358 (tile_store_gregset): Likewise.
11359
11360 2013-02-27 Yao Qi <yao@codesourcery.com>
11361
11362 * server.c (process_point_options): Print debug message when
11363 debug_threads is true.
11364
11365 2013-02-26 Yao Qi <yao@codesourcery.com>
11366
11367 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11368
11369 2013-02-19 Pedro Alves <palves@redhat.com>
11370 Kai Tietz <ktietz@redhat.com>
11371
11372 PR gdb/15161
11373
11374 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11375 instead of strtoul to extract address from packet.
11376 (process_serial_event) <'z'>: Likewise.
11377
11378 2013-02-18 Yao Qi <yao@codesourcery.com>
11379
11380 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11381
11382 2013-02-14 Pedro Alves <palves@redhat.com>
11383
11384 Plug memory leak.
11385
11386 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11387 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11388
11389 2013-02-14 Pedro Alves <palves@redhat.com>
11390
11391 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11392
11393 2013-02-14 Pedro Alves <palves@redhat.com>
11394
11395 * tracepoint.c (save_string): Delete.
11396 (add_tracepoint_action): Use savestring instead of save_string.
11397
11398 2013-02-12 Pedro Alves <palves@redhat.com>
11399
11400 * linux-xtensa-low.c: Ditto.
11401 * xtensa-xtregs.c: Ditto.
11402
11403 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11404
11405 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11406 thread_db.
11407
11408 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11409
11410 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11411 aarch64_num_wp_regs and aarch64_num_bp_regs to
11412 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11413
11414 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11415
11416 * linux-aarch64-low.c (ps_get_thread_area): Replace
11417 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11418
11419 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11420 Marcus Shawcroft <marcus.shawcroft@arm.com>
11421 Nigel Stephens <nigel.stephens@arm.com>
11422 Yufeng Zhang <yufeng.zhang@arm.com>
11423
11424 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11425 (aarch64.c, aarch64-without-fpu.c): New targets.
11426 * configure.srv (aarch64*-*-linux*): New.
11427 * linux-aarch64-low.c: New file.
11428
11429 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11430
11431 * linux-low.c (handle_extended_wait, linux_create_inferior)
11432 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11433 (dequeue_one_deferred_signal, linux_resume_one_thread)
11434 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11435 (linux_tracefork_grandchild, linux_test_for_tracefork)
11436 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11437 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11438 where the argument is 0.
11439
11440 2013-01-25 Yao Qi <yao@codesourcery.com>
11441
11442 * event-loop.c: Include "queue.h".
11443 (gdb_event_p): New typedef.
11444 (struct gdb_event) <next_event>: Remove.
11445 (event_queue): Change to QUEUE(gdb_event_p).
11446 (async_queue_event): Remove.
11447 (gdb_event_xfree): New.
11448 (initialize_event_loop): New.
11449 (process_event): Use API from QUEUE.
11450 (wait_for_event): Likewise.
11451 * server.c (main): Call initialize_event_loop.
11452 * server.h (initialize_event_loop): Declare.
11453
11454 2013-01-18 Yao Qi <yao@codesourcery.com>
11455
11456 * ax.h (struct eval_agent_expr_context): New.
11457 (gdb_eval_agent_expr): Update declaration.
11458 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11459 TFRAME. Add new argument CTX.
11460 * server.h (struct eval_agent_expr_context): Declare.
11461 (agent_mem_read, agent_tsv_read): Update declaration.
11462 (agent_mem_read_string): Likewise.
11463 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11464 (add_traceframe_block): Add new argument TPOINT.
11465 Increase TPOINT->traceframe_usage.
11466 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11467 eval_tracepoint_agent_expr.
11468 (condition_true_at_tracepoint): Likewise.
11469 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11470 (agent_mem_read_string, agent_tsv_read): Likewise.
11471
11472 2013-01-16 Yao Qi <yao@codesourcery.com>
11473
11474 * linux-low.c (linux_resume_one_lwp): Don't check
11475 'lwp->bp_reinsert != 0'.
11476
11477 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11478 Pedro Alves <palves@redhat.com>
11479
11480 * lynx-low.c (ptrace_request_to_str): Define a temporary
11481 macro and use it to simplify this function's implementation.
11482
11483 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11484
11485 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11486 sets errno.
11487
11488 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11489
11490 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11491
11492 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11493
11494 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11495
11496 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11497
11498 * lynx-low.c (lynx_resume): Use the resume_info parameter
11499 to determine the ptid for the lynx_ptrace call, unless
11500 it is equal to minus_one_ptid, in which case we use the
11501 ptid of the current_inferior.
11502 (lynx_wait_1): After having received a thread create/exit
11503 event, resume the inferior's execution using the signaling
11504 thread's ptid, rather than the old ptid.
11505
11506 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11507
11508 * lynx-low.c (lynx_resume): Delete variable ret.
11509
11510 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11511
11512 * gdbreplay.c (gdbreplay_version): Update copyright year.
11513 * server.c (gdbserver_version): Likewise.
11514
11515 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11516
11517 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11518 new thread.
11519
11520 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11521
11522 * lynx-low.c (ptrace_request_to_str): Add handling for
11523 PTRACE_GETTRACESIG.
11524
11525 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11526
11527 * lynx-low.c (lynx_attach): Delete variable new_process.
11528
11529 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11530
11531 * lynx-low.c (lynx_create_inferior): Delete variable
11532 new_process.
11533
11534 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11535
11536 * lynx-low.c (ptrace_request_to_str): Do not handle
11537 PTRACE_GETTHREADLIST if this macro does not exist.
11538
11539 2012-12-15 Yao Qi <yao@codesourcery.com>
11540
11541 * Makefile.in (OBS): Add notif.o.
11542 * notif.c, notif.h: New.
11543 * server.c: Include "notif.h".
11544 (struct vstop_notif) <next>: Remove.
11545 <base>: New field.
11546 (queue_stop_reply): Update.
11547 (push_event, send_next_stop_reply): Remove.
11548 (discard_queued_stop_replies): Update.
11549 (notif_stop): New variable.
11550 (handle_v_stopped): Remove.
11551 (handle_v_requests): Don't call handle_v_stopped. Call
11552 handle_ack_notif instead.
11553 (queue_stop_reply_callback): Call notif_event_enque instead
11554 of queue_stop_reply.
11555 (handle_status): Don't call send_next_stop_reply, call
11556 notif_write_event instead.
11557 (kill_inferior_callback): Likewise.
11558 (detach_or_kill_inferior_callback): Likewise.
11559 (main): Call initialize_notif.
11560 (process_serial_event): Call QUEUE_is_empty.
11561 (handle_target_event): Call notif_push instead of push event.
11562 * server.h (push_event): Remove declaration.
11563
11564 2012-12-10 Tom Tromey <tromey@redhat.com>
11565
11566 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11567 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11568 macros.
11569 (.c.o): Rewrite.
11570 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11571 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11572 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11573 (amd64-linux-ipa.o, ax.o): Rewrite.
11574 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11575 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11576 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11577 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11578 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11579 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11580 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11581 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11582 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11583 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11584 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11585 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11586 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11587 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11588 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11589 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11590 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11591 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11592 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11593 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11594 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11595 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11596 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11597 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11598 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11599 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11600 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11601 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11602 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11603 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11604 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11605 (reg-tilegx.o): Remove.
11606 (all_object_files): New macro.
11607 Include .deps files.
11608 * aclocal.m4, configure: Rebuild.
11609 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11610 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11611 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11612
11613 2012-12-05 Tom Tromey <tromey@redhat.com>
11614
11615 PR gdb/14917:
11616 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11617
11618 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11619
11620 * configure.ac: Check for linux/perf_event.h.
11621 * config.in: Regenerated.
11622 * configure: Regenerated.
11623
11624 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11625
11626 * hostio.c (handle_readlink): Decrease buffer size
11627 parameter passed to readlink by one byte.
11628
11629 2012-11-26 Yao Qi <yao@codesourcery.com>
11630
11631 * configure.ac (build_warnings): Append '-Wempty-body'.
11632 * configure: Regenerated.
11633 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11634 body.
11635
11636 2012-11-15 Pierre Muller <muller@sourceware.org>
11637
11638 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11639 * config.in: Regenerate.
11640 * configure: Regenerate.
11641 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11642 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11643 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11644 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11645 header.
11646 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11647 instead of <sys/wait.h> header.
11648 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11649
11650 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11651
11652 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11653 (various make rules): Remove -DGDBSERVER
11654
11655 2012-11-09 Yao Qi <yao@codesourcery.com>
11656
11657 * spu-low.c (current_ptid): Move it to ..
11658 * gdbthread.h: ... here. New.
11659 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11660 * server.c (myresume, process_serial_event): Likewise.
11661 * thread-db.c (thread_db_find_new_threads): Likewise.
11662 * tracepoint.c (run_inferior_command): Likewise.
11663
11664 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11665
11666 * server.c (handle_search_memory_1): Include access length in
11667 warning message.
11668
11669 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11670
11671 * linux-crisv32-low.c: Fix compile errors.
11672
11673 2012-09-04 Yao Qi <yao@codesourcery.com>
11674
11675 * tracepoint.c (cmd_qtsv): Adjust debug message.
11676 Don't check CUR_TPOINT.
11677
11678 2012-08-28 Yao Qi <yao@codesourcery.com>
11679
11680 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11681 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11682 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11683 Remove declarations of xmalloc, xreallloc, xstrdup and
11684 freeargv.
11685 * Makefile.in (libiberty_h): New.
11686 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11687 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11688
11689 2012-08-23 Yao Qi <yao@codesourcery.com>
11690
11691 * server.h: Remove declaration of 'xsnprintf'.
11692
11693 2012-08-22 Keith Seitz <keiths@redhat.com>
11694
11695 * server.h: Include build-gnulib-gbserver/config.h.
11696 * gdbreplay.c: Likewise.
11697
11698 2012-08-08 Doug Evans <dje@google.com>
11699
11700 * Makefile.in (SFILES): Add gdb_vecs.c.
11701 (OBS): Add gdb_vecs.o.
11702 (gdb_vecs_h, host_defs_h): New variables.
11703 (thread-db.o): Add $(gdb_vecs_h) dependency.
11704 (gdb_vecs.o): New rule.
11705 * thread-db.c: #include "gdb_vecs.h".
11706 (thread_db_load_search): Use a vector to iterate over path elements.
11707 Handle text appearing after "$pdir".
11708
11709 * configure.ac: Add check for strstr.
11710 * config.in: Regenerate.
11711 * configure: Regenerate.
11712
11713 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11714
11715 * hostio.c (handle_pread): If pread fails, fall back to attempting
11716 lseek/read.
11717 (handle_pwrite): Likewise for pwrite.
11718
11719 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11720
11721 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11722 between unsupported TYPE and unimplementable ADDR/LEN combination.
11723 (arm_insert_point): Act on new return value.
11724
11725 2012-07-31 Pedro Alves <palves@redhat.com>
11726
11727 * server.c (process_point_options): Only skip tokens if we find
11728 one that is unrecognized. Don't treat 'X' specially while
11729 skipping unrecognized tokens.
11730
11731 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11732
11733 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11734 to 4-byte-align HW breakpoint addresses for Thumb.
11735
11736 2012-07-27 Yao Qi <yao@codesourcery.com>
11737
11738 PR remote/14161.
11739
11740 * server.h: Declare gdb_agent_about_to_close.
11741 * target.c (kill_inferior): Include "agent.h".
11742 New. Send command 'kill'.
11743 * target.h (kill_inferior): Removed macro.
11744 * tracepoint.c (gdb_agent_about_to_close): New.
11745 (gdb_agent_helper_thread): Handle command 'close'.
11746 Wait endlessly until the inferior stops.
11747 Install gdb_agent_remove_socket to atexit hook.
11748 (agent_socket_name): New static variable.
11749 (gdb_agent_socket_init): Replace local variable 'name' with
11750 'agent_socket_name'.
11751 (gdb_agent_remove_socket): New.
11752
11753 2012-07-27 Yao Qi <yao@codesourcery.com>
11754
11755 * server.c (process_point_options): Stop at 'X' when parsing.
11756
11757 2012-07-19 Michael Eager <eager@eagercon.com>
11758
11759 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11760 to hw_execute.
11761 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11762 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11763 hardware breakpoint.
11764
11765 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11766
11767 * gdbserver/linux-low.c (initialize_low): Call
11768 linux_ptrace_init_warnings.
11769
11770 2012-07-02 Doug Evans <dje@google.com>
11771
11772 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11773 pointer to int.
11774
11775 2012-07-02 Stan Shebs <stan@codesourcery.com>
11776
11777 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11778 (ax.o): Add it to build rule.
11779 (ax-ipa.o): Ditto.
11780 (OBS): Add format.o.
11781 (IPA_OBS): Add format.o.
11782 * server.c (handle_query): Claim support for breakpoint commands.
11783 (process_point_options): Add command case.
11784 (process_serial_event): Leave running if there are printfs in
11785 effect.
11786 * mem-break.h (any_persistent_commands): Declare.
11787 (add_breakpoint_commands): Declare.
11788 (gdb_no_commands_at_breakpoint): Declare.
11789 (run_breakpoint_commands): Declare.
11790 * mem-break.c (struct point_command_list): New struct.
11791 (struct breakpoint): New field command_list.
11792 (any_persistent_commands): New function.
11793 (add_commands_to_breakpoint): New function.
11794 (add_breakpoint_commands): New function.
11795 (gdb_no_commands_at_breakpoint): New function.
11796 (run_breakpoint_commands): New function.
11797 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11798 locally.
11799 * ax.c: Include format.h.
11800 (ax_printf): New function.
11801 (gdb_eval_agent_expr): Add printf opcode.
11802
11803 2012-06-13 Yao Qi <yao@codesourcery.com>
11804
11805 * server.c (start_inferior): Remove duplicated writes to fields
11806 'last_resume_kind' and 'last_status' of 'current_inferior'.
11807
11808 2012-06-12 Yao Qi <yao@codesourcery.com>
11809 Pedro Alves <palves@redhat.com>
11810
11811 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11812 comment.
11813 * server.c (handle_v_cont): Extend comment.
11814
11815 2012-06-11 Yao Qi <yao@codesourcery.com>
11816
11817 * linux-low.c (linux_attach): Add 'static'.
11818
11819 2012-06-06 Yao Qi <yao@codesourcery.com>
11820
11821 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11822
11823 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11824
11825 Fix gcc -flto compilation warning.
11826 * server.c (main): Make variable multi_mode and attach volatile.
11827
11828 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11829
11830 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11831 if the platform doesn't know about it.
11832
11833 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11834
11835 * Makefile.in (SFILES): Add linux-tile-low.c.
11836 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11837 * configure.srv: Handle tilegx-*-linux*.
11838 * linux-tile-low.c: New file.
11839
11840 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11841
11842 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11843
11844 2012-05-24 Pedro Alves <palves@redhat.com>
11845
11846 PR gdb/7205
11847
11848 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11849
11850 2012-05-24 Pedro Alves <palves@redhat.com>
11851
11852 PR gdb/7205
11853
11854 Replace target_signal with gdb_signal throughout.
11855
11856 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11857
11858 * linux-low.c (linux_store_registers): Avoid the copying sequence
11859 when no data has been retrieved by ptrace.
11860
11861 2012-05-22 Will Deacon <will.deacon@arm.com>
11862
11863 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11864 Include asm/ptrace.h.
11865 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11866 already defined.
11867
11868 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11869
11870 * linux-low.c (linux_store_registers): Don't re-retrieve data
11871 with ptrace that has already been obtained from /proc. Always
11872 copy any data retrieved with ptrace to the buffer supplied.
11873
11874 2012-05-11 Yao Qi <yao@codesourcery.com>
11875 Pedro Alves <palves@redhat.com>
11876
11877 * linux-low.c (enum stopping_threads_kind): New.
11878 (stopping_threads): Change type to `enum stopping_threads_kind'.
11879 (handle_extended_wait): If stopping and suspending threads, leave
11880 the new_lwp suspended too.
11881 (linux_wait_for_event): Adjust.
11882 (stop_all_lwps): Set `stopping_threads' to
11883 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11884 whether we're suspending threads or just stopping them. Assert no
11885 recursion happens.
11886
11887 2012-04-29 Yao Qi <yao@codesourcery.com>
11888
11889 * server.h: Move some code to ...
11890 * gdbthread.h: ... here. New.
11891 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11892 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11893 (nto-low.o, win32-low.o): Likewise.
11894 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11895 * regcache.c, remote-utils.c, server.c: Likewise.
11896 * target.c, tracepoint.c, win32-low.c: Likewise.
11897
11898 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11899
11900 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11901 (PTRACE_ARG4_TYPE): Likewise.
11902 (PTRACE_XFER_TYPE): Likewise.
11903 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11904 ptrace to PTRACE_ARG3_TYPE.
11905 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11906 (PTRACE_ARG4_TYPE): Likewise.
11907 (PTRACE_XFER_TYPE): Likewise.
11908 (linux_detach_one_lwp): Cast fourth argument of
11909 ptrace to long then PTRACE_ARG4_TYPE.
11910 (regsets_fetch_inferior_registers): Cast third argument of
11911 ptrace to long then PTRACE_ARG3_TYPE.
11912 (regsets_store_inferior_registers): Likewise.
11913
11914 2012-04-20 Pedro Alves <palves@redhat.com>
11915
11916 * configure: Regenerate.
11917
11918 2012-04-19 Pedro Alves <palves@redhat.com>
11919
11920 * Makefile.in (GNULIB_BUILDDIR): New.
11921 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11922 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11923 (all, install-only, uninstall, clean-info, all-lib, clean): No
11924 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11925 (maintainer-clean realclean distclean): Use subdir_do.
11926 (subdir_do): New.
11927 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11928 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11929 * acinclude.m4: Include acx_configure_dir.m4.
11930 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11931 calls. Call AC_PROG_RANLIB. Configure gnulib using
11932 ACX_CONFIGURE_DIR.
11933 (GNULIB): New.
11934 (GNULIB_STDINT_H): Adjust.
11935 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11936 * gdbreplay.c: Include build-gnulib/config.h.
11937 * server.h: Likewise.
11938 * aclocal.m4: Regenerate.
11939 * config.in: Regenerate.
11940 * configure: Regenerate.
11941
11942 2012-04-19 Pedro Alves <palves@redhat.com>
11943
11944 * Makefile.in (LIBGNU, INCGNU): Adjust.
11945 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11946 (all, install-only, uninstall, clean-info, all-lib, clean)
11947 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11948 * configure.ac: Adjust AC_OUTPUT output.
11949 * aclocal.m4: Regenerate.
11950 * configure: Regenerate.
11951
11952 2012-04-19 Pedro Alves <palves@redhat.com>
11953
11954 * Makefile.in (generated_files): New.
11955 (server_h): Remove the explicit dependency on config.h, and depend
11956 on $generated_files.
11957
11958 2012-04-19 Pedro Alves <palves@redhat.com>
11959
11960 * Makefile.in (INCGNU): Add -Ignulib.
11961
11962 2012-04-19 Pedro Alves <palves@redhat.com>
11963
11964 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11965 (INCGNU): ... this, and spell out -I here.
11966 (GNULIB_LIB): Rename to ...
11967 (LIBGNU): ... this.
11968 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11969
11970 2012-04-19 Pedro Alves <palves@redhat.com>
11971
11972 * config.in: Regenerate.
11973
11974 2012-04-19 Pedro Alves <palves@redhat.com>
11975
11976 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11977 * server.h (memmem): Remove declaration.
11978 * config.in: Regenerate.
11979 * configure: Regenerate.
11980
11981 2012-04-19 Yao Qi <yao@codesourcery.com>
11982
11983 * Makefile.in (SFILES): Add common/vec.c.
11984 (OBS): Add vec.o.
11985 (vec.o): New rule.
11986
11987 2012-04-19 Yao Qi <yao@codesourcery.com>
11988
11989 * remote-utils.c (prepare_resume_reply): Replace with macro
11990 target_core_of_thread.
11991 * server.c (handle_qxfer_threads_proper): Likewise.
11992 * target.h (traget_core_of_thread): New macro.
11993
11994 2012-04-18 Pedro Alves <palves@redhat.com>
11995
11996 * aclocal.m4: Regenerate.
11997 * configure: Regenerate.
11998
11999 2012-04-16 Yao Qi <yao@codesourcery.com>
12000
12001 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12002 duplicated on address.
12003
12004 2012-04-16 Yao Qi <yao@codesourcery.com>
12005
12006 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12007 (struct tracepoint_action_ops) <send>: New field.
12008 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12009 (agent_expr_send, x_tracepoint_action_send): New.
12010 (l_tracepoint_action_send): New.
12011 (cmd_qtdp): Download and install tracepoint
12012 according to `use_agent'.
12013 (run_inferior_command): Add one more parameter `len'.
12014 Update callers.
12015 (tracepoint_send_agent): New.
12016 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12017
12018 2012-04-16 Yao Qi <yao@codesourcery.com>
12019
12020 * tracepoint.c (download_tracepoints): Moved to ...
12021 (cmd_qtstart): ... here.
12022
12023 2012-04-14 Yao Qi <yao@codesourcery.com>
12024
12025 * tracepoint.c: Include inttypes.h.
12026 (struct collect_memory_action): Use sized types.
12027 (struct tracepoint): Likewise.
12028 (cmd_qtdp, stop_tracing): Update print specifiers.
12029 (cmd_qtp, response_tracepoint): Likewise.
12030 (collect_data_at_tracepoint): Likewise.
12031 (collect_data_at_step): Likewise.
12032
12033 2012-04-14 Yao Qi <yao@codesourcery.com>
12034
12035 Import gnulib module inttypes.
12036 * aclocal.m4, config.in, configure: Regenerated.
12037
12038 2012-04-14 Yao Qi <yao@codesourcery.com>
12039
12040 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12041 Makefile and config.status at last.
12042
12043 2012-04-13 Yao Qi <yao@codesourcery.com>
12044
12045 * tracepoint.c: Include stdint.h unconditionally.
12046
12047 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12048
12049 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12050 on BFD_HAVE_SYS_PROCFS_TYPE.
12051 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12052 * configure: Regenerate.
12053 * config.in: Likewise.
12054
12055 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12056
12057 * Makefile.in (clean): Also remove x32.c x32-linux.c
12058 x32-avx.c x32-avx-linux.c.
12059 (x32.o): New target.
12060 (x32.c): Likewise.
12061 (x32-linux.o): Likewise.
12062 (x32-linux.c): Likewise.
12063 (x32-avx.o): Likewise.
12064 (x32-avx.c): Likewise.
12065 (x32-avx-linux.o): Likewise.
12066 (x32-avx-linux.c): Likewise.
12067
12068 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12069 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12070 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12071 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12072 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12073 i386/x32-avx-linux.xml.
12074
12075 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12076 (init_registers_x32_avx_linux): Likwise.
12077 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12078 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12079
12080 2012-04-13 Pedro Alves <palves@redhat.com>
12081
12082 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12083 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12084 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12085 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12086 the sub-make.
12087
12088 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12089
12090 * linux-x86-low.c (compat_x32_clock_t): New.
12091 (compat_x32_siginfo_t): Likewise.
12092 (compat_x32_siginfo_from_siginfo): Likewise.
12093 (siginfo_from_compat_x32_siginfo): Likewise.
12094 (linux_is_elf64): Likewise.
12095 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12096 and siginfo_from_compat_x32_siginfo for x32.
12097 (x86_arch_setup): Set linux_is_elf64.
12098
12099 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12100
12101 PR gdb/13969
12102 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12103 e_machine field.
12104 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12105 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12106 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12107 compatible with process.
12108
12109 2012-04-12 Yao Qi <yao@codesourcery.com>
12110
12111 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12112 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12113 (install-only, install-info, clean): Handle sub dir gnulib.
12114 (all-lib, am--refresh): New targets.
12115 (memmem.o): Remove target.
12116 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12117 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12118 (AC_REPLACE_FUNCS): Remove memmem.
12119 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12120 (AC_OUTPUT): Generate Makefile in gnulib/.
12121 * aclocal.m4, config.in, configure: Regenerated.
12122
12123 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12124
12125 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12126
12127 2012-04-05 Pedro Alves <palves@redhat.com>
12128
12129 -Werror=strict-aliasing
12130
12131 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12132 pointer.
12133
12134 2012-04-04 Pedro Alves <palves@redhat.com>
12135
12136 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12137 (sparc_store_gregset_from_stack, sparc_store_gregset)
12138 (sparc_breakpoint_at): Fix formatting.
12139
12140 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12141
12142 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12143 are available.
12144 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12145 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12146 * config.in: Regenerate.
12147 * configure: Likewise.
12148
12149 2012-03-29 Pedro Alves <palves@redhat.com>
12150
12151 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12152 Correct ptrace arguments.
12153
12154 2012-03-28 Pedro Alves <palves@redhat.com>
12155
12156 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12157 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12158 (IA64_FR1_REGNUM): New defines.
12159 (ia64_fetch_register): New.
12160 (the_low_target): Install it.
12161 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12162 field.
12163 * linux-low.c (linux_fetch_registers): Try the
12164 the_low_target.fetch_register hook first.
12165
12166 * linux-arm-low.c (the_low_target): Adjust.
12167 * linux-bfin-low.c (the_low_target): Adjust.
12168 * linux-cris-low.c (the_low_target): Adjust.
12169 * linux-crisv32-low.c (the_low_target): Adjust.
12170 * linux-m32r-low.c (the_low_target): Adjust.
12171 * linux-m68k-low.c (the_low_target): Adjust.
12172 * linux-mips-low.c (the_low_target): Adjust.
12173 * linux-ppc-low.c (the_low_target): Adjust.
12174 * linux-s390-low.c (the_low_target): Adjust.
12175 * linux-sh-low.c (the_low_target): Adjust.
12176 * linux-sparc-low.c (the_low_target): Adjust.
12177 * linux-tic6x-low.c (the_low_target): Adjust.
12178 * linux-x86-low.c (the_low_target): Adjust.
12179 * linux-xtensa-low.c (the_low_target): Adjust.
12180
12181 2012-03-26 Pedro Alves <palves@redhat.com>
12182
12183 * server.c (handle_qxfer_libraries): Don't bail early if
12184 the_target->qxfer_libraries_svr4 is not NULL.
12185
12186 2012-03-26 Pedro Alves <palves@redhat.com>
12187
12188 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12189
12190 2012-03-23 Pedro Alves <palves@redhat.com>
12191
12192 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12193 "library-list-svr4" element's start tag when the the DSO list is
12194 empty.
12195
12196 2012-03-23 Pedro Alves <palves@redhat.com>
12197
12198 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12199 a variable whose type size is the same as the inferior's pointer
12200 size.
12201
12202 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12203
12204 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12205 struct siginfo.
12206 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12207 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12208 * linux-low.h: Include <signal.h>.
12209 (struct siginfo): Remove forward declaration.
12210 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12211 struct siginfo.
12212
12213 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12214
12215 * .gitignore: Ignore more files.
12216
12217 2012-03-19 Pedro Alves <palves@redhat.com>
12218 Jan Kratochvil <jan.kratochvil@redhat.com>
12219
12220 * server.c (cont_thread, general_thread): Add describing comments.
12221 (start_inferior): Clear `cont_thread'.
12222 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12223 of a process.
12224
12225 2012-03-15 Yao Qi <yao@codesourcery.com>
12226
12227 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12228 handling to ...
12229 (cmd_qtdp): ... here.
12230
12231 2012-03-15 Yao Qi <yao@codesourcery.com>
12232
12233 * tracepoint.c (struct tracepoint_action_ops): New.
12234 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12235 (m_tracepoint_action_download): New.
12236 (r_tracepoint_action_download): New.
12237 (x_tracepoint_action_download): New.
12238 (l_tracepoint_action_download): New.
12239 (add_tracepoint_action): Install `action->ops' according type.
12240 (download_tracepoint_1): Move code `download' function pointer
12241 of various tracepoint_action_ops.
12242
12243 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12244
12245 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12246 linux_ptrace_attach_warnings.
12247
12248 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12249
12250 * Makefile.in (linux-ptrace.o): New.
12251 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12252 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12253 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12254 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12255 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12256 of these targets.
12257 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12258
12259 2012-03-08 Yao Qi <yao@codesourcery.com>
12260 Pedro Alves <palves@redhat.com>
12261
12262 Fix PR server/13392.
12263 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12264 offset of JMP insn.
12265 * tracepoint.c (remove_tracepoint): New.
12266 (cmd_qtdp): Call remove_tracepoint when failed to install.
12267
12268 2012-03-07 Pedro Alves <palves@redhat.com>
12269
12270 * linux-low.c (get_detach_signal): New.
12271 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12272 Pass on pending signals to PTRACE_DETACH. Check the result of the
12273 ptrace call.
12274 * server.c (program_signals, program_signals_p): New.
12275 (handle_general_set): Handle QProgramSignals.
12276 * server.h (program_signals, program_signals_p): Declare.
12277
12278 2012-03-05 Pedro Alves <palves@redhat.com>
12279 Jan Kratochvil <jan.kratochvil@redhat.com>
12280
12281 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12282 New comment why.
12283
12284 2012-03-03 Yao Qi <yao@codesourcery.com>
12285
12286 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12287 agent_look_up_symbols.
12288
12289 2012-03-03 Yao Qi <yao@codesourcery.com>
12290
12291 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12292 (linux-x86-low.o): Likewise.
12293 * server.h: Remove in_process_agent_loaded.
12294 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12295 common/agent.c.
12296 Update callers.
12297
12298 2012-03-03 Yao Qi <yao@codesourcery.com>
12299
12300 * tracepoint.c (gdb_agent_capability): New global.
12301 (in_process_agent_loaded_ust): Renamed to
12302 `in_process_agent_supports_ust'.
12303 Update callers.
12304 (in_process_agent_supports_ust): Call agent_capability_check.
12305 (clear_installed_tracepoints): Assert that agent supports
12306 agent.
12307
12308 2012-03-03 Yao Qi <yao@codesourcery.com>
12309
12310 * linux-low.c (linux_supports_agent): New.
12311 (linux_target_ops): Initialize field `supports_agent' with
12312 linux_supports_agent.
12313 * target.h (struct target_ops) <supports_agent>: New.
12314 (target_supports_agent): New macro.
12315 * server.c (handle_general_set): Handle packet 'QAgent'.
12316 (handle_query): Send `QAgent+'.
12317 * Makefile.in (server.o): Depends on agent.h.
12318
12319 2012-03-03 Yao Qi <yao@codesourcery.com>
12320
12321 * Makefile.in (OBS): Add agent.o.
12322 Add new rule for agent.o.
12323 Track dependence of tracepoint.c on agent.h.
12324 * tracepoint.c (run_inferior_command_1):
12325 (run_inferior_command): Call agent_run_command.
12326 (gdb_ust_connect_sync_socket): Deleted. Move it to
12327 common/agent.c.
12328 (resume_thread, stop_thread): Likewise.
12329 (gdb_ust_socket_init): Renamed to ...
12330 (gdb_agent_socket_init): ... New.
12331 (gdb_ust_thread): Renamed to ...
12332 (gdb_agent_helper_thread): ... New.
12333 (gdb_ust_init): Move some code to ...
12334 (gdb_agent_init): ... here. New.
12335 [HAVE_UST]: Call gdb_ust_init.
12336 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12337 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12338 * config.in, configure: Regenerated.
12339
12340 2012-03-02 Pedro Alves <palves@redhat.com>
12341
12342 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12343 * linux-low.c (struct simple_pid_list): New.
12344 (stopped_pids): New a struct simple_pid_list pointer.
12345 (add_to_pid_list, pull_pid_from_list): New.
12346 (handle_extended_wait): Don't assume the first signal new children
12347 report is SIGSTOP. Adjust call to pull_pid_from_list.
12348 (linux_wait_for_lwp): Adjust.
12349
12350 2012-03-02 Yao Qi <yao@codesourcery.com>
12351
12352 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12353 debug log.
12354
12355 2012-03-02 Yao Qi <yao@codesourcery.com>
12356
12357 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12358 `stop_pc' and `tpoint'. Update caller.
12359
12360 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12361
12362 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12363 * linux-low.c (use_linux_regsets): New macro.
12364 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12365 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12366 (linux_register_in_regsets): New function.
12367 (usr_fetch_inferior_registers): Skip registers covered by
12368 regsets.
12369 (usr_store_inferior_registers): Likewise.
12370 (usr_fetch_inferior_registers): New macro.
12371 (usr_store_inferior_registers): Likewise.
12372 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12373 (linux_store_registers): Likewise.
12374 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12375 prototype.
12376 (init_registers_mips64_dsp_linux): Likewise.
12377 (init_registers_mips_linux): New macro.
12378 (init_registers_mips_dsp_linux): Likewise.
12379 (mips_dsp_num_regs): Likewise.
12380 (DSP_BASE, DSP_CONTROL): New fallback macros.
12381 (mips_base_regs): New macro.
12382 (mips_regmap): Use it. Fix the size.
12383 (mips_dsp_regmap): New variable.
12384 (mips_dsp_regset_bitmap): Likewise.
12385 (mips_arch_setup): New function.
12386 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12387 than mips_regmap.
12388 (mips_cannot_store_register): Likewise.
12389 (the_low_target): Update .arch_setup, .num_regs and .regmap
12390 initializers. Add .regset_bitmap initializer.
12391 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12392 initializer.
12393 * linux-bfin-low.c (the_low_target): Likewise.
12394 * linux-cris-low.c (the_low_target): Likewise.
12395 * linux-crisv32-low.c (the_low_target): Likewise.
12396 * linux-ia64-low.c (the_low_target): Likewise.
12397 * linux-m32r-low.c (the_low_target): Likewise.
12398 * linux-m68k-low.c (the_low_target): Likewise.
12399 * linux-ppc-low.c (the_low_target): Likewise.
12400 * linux-s390-low.c (the_low_target): Likewise.
12401 * linux-sh-low.c (the_low_target): Likewise.
12402 * linux-sparc-low.c (the_low_target): Likewise.
12403 * linux-tic6x-low.c (the_low_target): Likewise.
12404 * linux-x86-low.c (the_low_target): Likewise.
12405 * linux-xtensa-low.c (the_low_target): Likewise.
12406 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12407 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12408 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12409 srv_xmlfiles.
12410 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12411 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12412
12413 2012-02-29 Yao Qi <yao@codesourcery.com>
12414 Pedro Alves <palves@redhat.com>
12415
12416 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12417 `step_over_finished' is true.
12418
12419 2012-02-27 Pedro Alves <palves@redhat.com>
12420
12421 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12422 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12423
12424 2012-02-27 Pedro Alves <palves@redhat.com>
12425
12426 PR server/9684
12427 * linux-low.c (pid_is_stopped): New.
12428 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12429
12430 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12431
12432 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12433 of conditions.
12434
12435 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12436
12437 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12438
12439 2012-02-24 Luis Machado <lgustavo@codesourcery>
12440
12441 * server.c (handle_query): Advertise support for target-side
12442 breakpoint condition evaluation.
12443 (process_point_options): New function.
12444 (process_serial_event): When inserting a breakpoint, check for
12445 a target-side condition that should be evaluated.
12446
12447 * mem-break.c: Include regcache.h and ax.h.
12448 (point_cond_list_t): New data structure.
12449 (breakpoint) <cond_list>: New field.
12450 (find_gdb_breakpoint_at): Make non-static.
12451 (delete_gdb_breakpoint_at): Clear any target-side
12452 conditions.
12453 (clear_gdb_breakpoint_conditions): New function.
12454 (add_condition_to_breakpoint): Likewise.
12455 (add_breakpoint_condition): Likewise.
12456 (gdb_condition_true_at_breakpoint): Likewise.
12457 (gdb_breakpoint_here): Return result directly instead
12458 of going through a local variable.
12459
12460 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12461 (clear_gdb_breakpoint_conditions): Likewise.
12462 (add_breakpoint_condition): Likewise.
12463 (gdb_condition_true_at_breakpoint): Likewise.
12464
12465 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12466 (need_step_over_p): Take target-side breakpoint condition into
12467 consideration.
12468
12469 2012-02-24 Luis Machado <lgustavo@codesourcery>
12470
12471 * server.h: Include tracepoint.h.
12472 (agent_mem_read, agent_get_trace_state_variable_value,
12473 agent_set_trace_state_variable_value,
12474 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12475 get_set_tsv_func_addr): New prototypes.
12476
12477 * ax.h: New include file.
12478 * ax.c: New source file.
12479
12480 * tracepoint.c: Include ax.h.
12481 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12482 agent_expr, eval_result_type): Move to ax.h.
12483 (parse_agent_expr): Rename to ...
12484 (gdb_parse_agent_expr): ... this, make it non-static and move
12485 to ax.h.
12486 (unparse_agent_expr) Rename to ...
12487 (gdb_unparse_agent_expr): ... this, make it non-static and move
12488 to ax.h.
12489 (eval_agent_expr): Rename to ...
12490 (eval_tracepoint_agent_expr): ... this.
12491 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12492 forward declarations.
12493 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12494 (agent_get_trace_state_variable_value): New function.
12495 (agent_set_trace_state_variable_value): New function.
12496 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12497 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12498 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12499 (condition_true_at_tracepoint): Likewise.
12500 (parse_agent_expr): Rename to ...
12501 (gdb_parse_agent_expr): ... this and move to ax.c.
12502 (unparse_agent_expr): Rename to ...
12503 (gdb_unparse_agent_expr): ... this and move to ax.c.
12504 (gdb_agent_op_name): Move to ax.c.
12505 (eval_agent_expr): Rename to ...
12506 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12507 and move to ax.c.
12508 (eval_tracepoint_agent_expr): New function.
12509 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12510 non-static.
12511 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12512 ax.c.
12513 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12514 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12515 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12516 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12517 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12518 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12519 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12520 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12521 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12522 (compile_bytecodes): Remove forward declaration.
12523 (is_goto_target): Move to ax.c.
12524 (compile_bytecodes): Move to ax.c and call
12525 agent_get_trace_state_variable_value (...) and
12526 agent_set_trace_state_variable_value (...).
12527
12528 * Makefile.in: Update ax.c and IPA dependencies.
12529
12530 2012-02-24 Pedro Alves <palves@redhat.com>
12531
12532 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12533 (cmd_bigqtbuffer_circular): ... this. Only handle
12534 'QTBuffer:circular:'.
12535 (handle_tracepoint_general_set): Adjust.
12536
12537 2012-02-16 Yao Qi <yao@codesourcery.com>
12538
12539 * inferiors.c: Move code to ...
12540 * dll.c: .... here. New.
12541 * server.h: Declare clear_dlls.
12542 * Makefile.in (SFILES): Add dll.c.
12543 (OBS): Add dll.o
12544 (dll.o): New rule.
12545
12546 2012-02-11 Yao Qi <yao@codesourcery.com>
12547
12548 * server.c: (handle_monitor_command): Add a new parameter
12549 `own_buf'.
12550 (handle_query): Update caller.
12551
12552 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12553
12554 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12555 * configure, config.in: Regenerate.
12556 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12557 is not defined.
12558
12559 2012-02-02 Pedro Alves <palves@redhat.com>
12560
12561 Try SIGKILL first, then PTRACE_KILL.
12562 * linux-low.c (linux_kill_one_lwp): New.
12563 (linux_kill_one_lwp): Rename to ...
12564 (kill_one_lwp_callback): ... this. Use the new
12565 linux_kill_one_lwp.
12566
12567 2012-02-02 Pedro Alves <palves@redhat.com>
12568
12569 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12570 inferior.
12571
12572 2012-01-27 Pedro Alves <palves@redhat.com>
12573
12574 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12575 (elf_64_file_p): Make static.
12576 (linux_pid_exe_is_elf_64_file): New.
12577 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12578 Delete declarations.
12579 (linux_pid_exe_is_elf_64_file): Declare.
12580 * linux-x86-low.c (x86_arch_setup): Use
12581 linux_pid_exe_is_elf_64_file.
12582
12583 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12584
12585 * linux-low.c (linux_wait_for_event_1): Rename to ...
12586 (linux_wait_for_event): ... here and merge it with former
12587 linux_wait_for_event - new variable wait_ptid, use it.
12588 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12589
12590 2012-01-23 Pedro Alves <palves@redhat.com>
12591
12592 * server.c (main): Avoid yet another case of infinite loop while
12593 detaching/killing after a longjmp.
12594
12595 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12596
12597 Code cleanup.
12598 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12599
12600 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12601
12602 * hostio.c (handle_readlink): New function.
12603 (handle_vFile): Call it to handle "vFile:readlink" packets.
12604
12605 2012-01-20 Pedro Alves <palves@redhat.com>
12606 Ulrich Weigand <ulrich.weigand@linaro.org>
12607
12608 * server.c (handle_v_requests): Only support vAttach and vRun to
12609 start multiple processes when in extended protocol mode.
12610
12611 2012-01-17 Pedro Alves <palves@redhat.com>
12612
12613 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12614 memalign plus mprotect to allocate the scratch buffer.
12615
12616 2012-01-13 Pedro Alves <palves@redhat.com>
12617
12618 * server.c (attach_inferior): Clear `cont_thread'.
12619
12620 2012-01-13 Pedro Alves <palves@redhat.com>
12621
12622 * server.c (main): Avoid infinite loop while detaching/killing
12623 after a longjmp.
12624
12625 2012-01-09 Doug Evans <dje@google.com>
12626
12627 * server.c (start_inferior): Set last_ptid in --wrapper case.
12628
12629 2012-01-06 Yao Qi <yao@codesourcery.com>
12630
12631 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12632 defined.
12633 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12634
12635 2012-01-04 Yao Qi <yao@codesourcery.com>
12636
12637 * tracepoint.c (cmd_qtdp): Print debug message
12638 for static tracepoint.
12639
12640 2012-01-04 Yao Qi <yao@codesourcery.com>
12641
12642 * tracepoint.c (trace_vdebug): Differentiate debug message
12643 between gdbserver and IPA.
12644
12645 2012-01-03 Yao Qi <yao@codesourcery.com>
12646
12647 * tracepoint.c (tracepoint_was_hit): Don't collect for
12648 static tracepoint.
12649
12650 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12651
12652 * terminal.h: Reformat copyright header.
12653
12654 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12655
12656 * server.c (gdbserver_version): Update copyright year.
12657 * gdbreplay.c (gdbreplay_version): Likewise.
12658
12659 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12660
12661 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12662
12663 Revert:
12664 2011-12-18 Hui Zhu <teawater@gmail.com>
12665 * linux-low.c (linux_create_inferior): Save return value to ret.
12666
12667 2011-12-18 Hui Zhu <teawater@gmail.com>
12668
12669 * linux-low.c (linux_create_inferior): Save return value to ret.
12670
12671 2011-12-16 Doug Evans <dje@google.com>
12672
12673 * linux-low.c (linux_create_inferior): If stdio connection,
12674 redirect stdin from /dev/null, stdout to stderr.
12675 * remote-utils.c (remote_is_stdio): New static global.
12676 (remote_connection_is_stdio): New function.
12677 (remote_prepare): Handle stdio connection.
12678 (remote_open): Ditto.
12679 (remote_close): Don't close stdin for stdio connections.
12680 (read_prim,write_prim): New functions. Replace all calls to
12681 read/write to these.
12682 * server.c (main): Watch for "-" argument. Move call to
12683 remote_prepare before start_inferior.
12684 * server.h (STDIO_CONNECTION_NAME): New macro.
12685 (remote_connection_is_stdio): Declare.
12686
12687 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12688 in debugging output.
12689
12690 2011-12-15 Yao Qi <yao@codesourcery.com>
12691
12692 * tracepoint.c: Include sys/syscall.h.
12693 (gdb_ust_thread): Remove preprocessor conditional.
12694
12695 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12696
12697 * linux-low.c (linux_detach_one_lwp): Call
12698 the_low_target.prepare_to_resume before detaching.
12699
12700 2011-12-14 Yao Qi <yao@codesourcery.com>
12701
12702 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12703 of write.
12704
12705 2011-12-14 Yao Qi <yao@codesourcery.com>
12706
12707 * i386-low.c (i386_low_stopped_data_address): Initialize local
12708 variable `control'.
12709
12710 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12711
12712 PR remote/13492
12713
12714 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12715 DR_CONTROL unless necessary. Extend comments.
12716 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12717 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12718
12719 2011-12-13 Yao Qi <yao@codesourcery.com>
12720
12721 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12722 macros.
12723 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12724
12725 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12726
12727 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12728 Print new debug message for such case.
12729
12730 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12731
12732 Fix overlapping memcpy.
12733 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12734 the read_inferior_memory transfer.
12735 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12736 write_inferior_memory transfer.
12737 (set_fast_tracepoint_jump): New variable buf. Use it for the
12738 read_inferior_memory and write_inferior_memory transfers.
12739 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12740 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12741 Use it for the write_inferior_memory transfer.
12742 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12743 buffers.
12744
12745 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12746
12747 * linux-low.c (fetch_register, store_register): Make code
12748 consistent, fix formatting.
12749
12750 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12751
12752 * linux-low.c (usr_store_inferior_registers): Factor out code
12753 to handle individual registers into...
12754 (store_register): ... this new function.
12755
12756 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12757
12758 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12759 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12760 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12761 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12762 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12763 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12764 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12765 (srv_xmlfiles): Add new XML files.
12766
12767 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12768 and <sys/uio.h>.
12769 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12770 (init_registers_s390_linux32v1): Add prototype.
12771 (init_registers_s390_linux32v2): Likewise.
12772 (init_registers_s390_linux64v1): Likewise.
12773 (init_registers_s390_linux64v2): Likewise.
12774 (init_registers_s390x_linux64v1): Likewise.
12775 (init_registers_s390x_linux64v2): Likewise.
12776 (s390_num_regs): Increment to 52.
12777 (s390_regmap): Add orig_r2 register.
12778 (s390_num_regs_3264): Increment to 68.
12779 (s390_regmap_3264): Add orig_r2 register.
12780 (s390_collect_ptrace_register): Handle orig_r2 register.
12781 (s390_supply_ptrace_register): Likewise.
12782 (s390_fill_last_break): New function.
12783 (s390_store_last_break): Likewise.
12784 (s390_fill_system_call): New function.
12785 (s390_store_system_call): Likewise.
12786 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12787 register sets.
12788 (s390_check_regset): New function.
12789 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12790 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12791 Update target_regsets for available register sets.
12792
12793 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12794 Jan Kratochvil <jan.kratochvil@redhat.com>
12795
12796 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12797 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12798 New.
12799 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12800 * linux-low.h (struct process_info_private): New member r_debug.
12801 * server.c (handle_qxfer_libraries): Call
12802 the_target->qxfer_libraries_svr4.
12803 (handle_qxfer_libraries_svr4): New function.
12804 (qxfer_packets): New entry "libraries-svr4".
12805 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12806 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12807 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12808 PACKET_qXfer_libraries_svr4.
12809
12810 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12811
12812 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12813 PSW address/mask between 8-byte and 16-byte formats.
12814 (s390_supply_ptrace_register): Likewise.
12815 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12816 basic addressing mode bit.
12817
12818 2011-11-24 Stan Shebs <stan@codesourcery.com>
12819
12820 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12821
12822 2011-11-17 Stan Shebs <stan@codesourcery.com>
12823
12824 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12825 (tracing_start_time): New global.
12826 (tracing_stop_time): New global.
12827 (tracing_user_name): New global.
12828 (tracing_notes): New global.
12829 (tracing_stop_note): New global.
12830 (cmd_qtstart): Set traceframe_usage, start_time.
12831 (stop_tracing): Set stop_time.
12832 (cmd_qtstatus): Report additional status.
12833 (cmd_qtp): New function.
12834 (handle_tracepoint_query): Call it.
12835 (cmd_qtnotes): New function.
12836 (handle_tracepoint_general_set): Call it.
12837 (get_timestamp): Rename from tsv_get_timestamp.
12838
12839 2011-11-14 Stan Shebs <stan@codesourcery.com>
12840 Kwok Cheung Yeung <kcy@codesourcery.com>
12841
12842 * linux-x86-low.c (small_jump_insn): New.
12843 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12844 trampoline and error message, build a trampoline and issue a small
12845 jump instruction to it.
12846 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12847 trampoline and error message.
12848 (x86_get_min_fast_tracepoint_insn_len): New.
12849 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12850 * linux-low.h (struct linux_target_ops): Add arguments to
12851 install_fast_tracepoint_jump_pad operation, add new operation.
12852 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12853 arguments.
12854 (linux_get_min_fast_tracepoint_insn_len): New function.
12855 (linux_target_op): Add new operation.
12856 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12857 (gdb_trampoline_buffer_end): Ditto.
12858 (gdb_trampoline_buffer_error): Ditto.
12859 (struct ipa_sym_addresses): Add fields for new IPA variables.
12860 (symbol_list): Add entries for new IPA variables.
12861 (struct tracepoint): Add fields to hold the address range of the
12862 trampoline used by the tracepoint.
12863 (trampoline_buffer_head): New static variable.
12864 (trampoline_buffer_tail): Ditto.
12865 (claim_trampoline_space): New function.
12866 (have_fast_tracepoint_trampoline_buffer): New function.
12867 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12868 structure.
12869 (install_fast_tracepoint): Ditto, also add error buffer argument.
12870 (cmd_qtminftpilen): New function.
12871 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12872 (fast_tracepoint_from_trampoline_address): New function.
12873 (fast_tracepoint_collecting): Handle trampoline as part of jump
12874 pad space.
12875 (set_trampoline_buffer_space): New function.
12876 (initialize_tracepoint): Initialize new IPA variables.
12877 * target.h (struct target_ops): Add arguments to
12878 install_fast_tracepoint_jump_pad operation, add new
12879 get_min_fast_tracepoint_insn_len operation.
12880 (target_get_min_fast_tracepoint_insn_len): New.
12881 (install_fast_tracepoint_jump_pad): Add arguments.
12882 * server.h (IPA_BUFSIZ): Define.
12883 * linux-i386-ipa.c: Include extra header files.
12884 (initialize_fast_tracepoint_trampoline_buffer): New function.
12885 (initialize_low_tracepoint): Call it.
12886 * server.h (set_trampoline_buffer_space): Declare.
12887 (claim_trampoline_space): Ditto.
12888 (have_fast_tracepoint_trampoline_buffer): Ditto.
12889
12890 2011-11-14 Yao Qi <yao@codesourcery.com>
12891
12892 * server.c (handle_query): Handle InstallInTrace for qSupported.
12893 * tracepoint.c (add_tracepoint): Sort list.
12894 (install_tracepoint, download_tracepoint): New.
12895 (cmd_qtdp): Call them to install and download tracepoints.
12896 (sort_tracepoints): Removed.
12897 (cmd_qtstart): Update.
12898
12899 2011-11-14 Yao Qi <yao@codesourcery.com>
12900
12901 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12902 * mem-break.h: Declare.
12903 * tracepoint.c (cmd_qtstart): Move some code to ...
12904 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12905 New.
12906 (download_tracepoints): Move some code to ...
12907 (download_tracepoint_1): ... here. New.
12908
12909 2011-11-08 Yao Qi <yao@codesourcery.com>
12910
12911 * remote-utils.c (relocate_instruction): A comment fix.
12912
12913 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12914
12915 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12916 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12917 dr_status_mirror and dr_control_mirror from debug_reg_state.
12918 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12919 (i386_initial_stuff): Remove use of deleted globals.
12920 (i386_get_thread_context, i386_set_thread_context,
12921 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12922 from debug_reg_state.
12923
12924 2011-11-05 Yao Qi <yao@codesourcery.com>
12925
12926 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12927 address as TPOINT's.
12928
12929 2011-11-02 Stan Shebs <stan@codesourcery.com>
12930
12931 * tracepoint.c (agent_mem_read_string): New function.
12932 (eval_agent_expr): Call it for tracenz.
12933 * server.c (handle_query): Report support for tracenz.
12934
12935 2011-11-02 Yao Qi <yao@codesourcery.com>
12936
12937 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12938
12939 2011-11-02 Yao Qi <yao@codesourcery.com>
12940
12941 * target.h: Fix a typo in comment.
12942
12943 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12944
12945 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12946 clobber the breakpoints' shadows with fast tracepoint jumps.
12947 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12948 * target.c (write_inferior_memory): Also pass MYADDR down to
12949 check_mem_write.
12950
12951 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12952
12953 * configure.ac: Check support for personality routine.
12954 * configure: Regenerate.
12955 * config.in: Likewise.
12956 * linux-low.c: Include <sys/personality.h>.
12957 Define ADDR_NO_RANDOMIZE if necessary.
12958 (linux_create_inferior): Disable address space randomization when
12959 forking inferior, if requested.
12960 (linux_supports_disable_randomization): New function.
12961 (linux_target_ops): Install it.
12962 * server.h (disable_randomization): Declare.
12963 * server.c (disable_randomization): New global variable.
12964 (handle_general_set): Handle QDisableRandomization.
12965 (handle_query): Likewise for qSupported.
12966 (main): Support --disable-randomization and --no-disable-randomization
12967 command line arguments.
12968 * target.h (struct target_ops): Add supports_disable_randomization.
12969 (target_supports_disable_randomization): New macro.
12970
12971 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12972
12973 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12974 ifdef check.
12975 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12976 [!PT_GETDSBT] (target_loadmap): New definition.
12977 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12978 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12979 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12980 and PT_GETDSBT to LINUX_LOADMAP.
12981 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12982 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12983
12984 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12985
12986 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12987 (arm_linux_hwbp_cap): New static variable.
12988 (arm_linux_get_hwbp_cap): Replace by ...
12989 (arm_linux_init_hwbp_cap): ... this new function.
12990 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12991 (arm_linux_get_hw_watchpoint_count): Likewise.
12992 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12993 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12994 (arm_prepare_to_resume): Use perror_with_name instead of error.
12995
12996 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12997
12998 * linux-arm-low.c: Include <signal.h>.
12999 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13000 (struct arm_linux_hwbp_cap): New data type.
13001 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13002 (struct arm_linux_hw_breakpoint): New data type.
13003 (MAX_BPTS, MAX_WPTS): Define.
13004 (struct arch_process_info, struct arch_lwp_info): New data types.
13005 (arm_linux_get_hwbp_cap): New function.
13006 (arm_linux_get_hw_breakpoint_count): Likewise.
13007 (arm_linux_get_hw_watchpoint_count): Likewise.
13008 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13009 (arm_hwbp_control_initialize): Likewise.
13010 (arm_hwbp_control_is_enabled): Likewise.
13011 (arm_hwbp_control_is_initialized): Likewise.
13012 (arm_hwbp_control_disable): Likewise.
13013 (arm_linux_hw_breakpoint_equal): Likewise.
13014 (arm_linux_hw_point_initialize): Likewise.
13015 (struct update_registers_data): New data structure.
13016 (update_registers_callback: New function.
13017 (arm_insert_point): Likewise.
13018 (arm_remove_point): Likewise.
13019 (arm_stopped_by_watchpoint): Likewise.
13020 (arm_stopped_data_address): Likewise.
13021 (arm_new_process): Likewise.
13022 (arm_new_thread): Likewise.
13023 (arm_prepare_to_resume): Likewise.
13024 (the_low_target): Register arm_insert_point, arm_remove_point,
13025 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13026 arm_new_thread, and arm_prepare_to_resume.
13027
13028 2011-09-15 Stan Shebs <stan@codesourcery.com>
13029
13030 * server.h (struct emit_ops): Add compare-goto fields.
13031 * tracepoint.c (gdb_agent_op_sizes): New table.
13032 (emit_eq_goto): New function.
13033 (emit_ne_goto): New function.
13034 (emit_lt_goto): New function.
13035 (emit_le_goto): New function.
13036 (emit_gt_goto): New function.
13037 (emit_ge_goto): New function.
13038 (is_goto_target): New function.
13039 (compile_bytecodes): Recognize special cases of compare-goto
13040 combinations and call specialized emitters for them.
13041 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13042 (amd64_emit_ne_goto): New function.
13043 (amd64_emit_lt_goto): New function.
13044 (amd64_emit_le_goto): New function.
13045 (amd64_emit_gt_goto): New function.
13046 (amd64_emit_ge_goto): New function.
13047 (amd64_emit_ops): Add the new functions.
13048 (i386_emit_eq_goto): New function.
13049 (i386_emit_ne_goto): New function.
13050 (i386_emit_lt_goto): New function.
13051 (i386_emit_le_goto): New function.
13052 (i386_emit_gt_goto): New function.
13053 (i386_emit_ge_goto): New function.
13054 (i386_emit_ops): Add the new functions.
13055
13056 2011-09-08 Stan Shebs <stan@codesourcery.com>
13057
13058 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13059 (i386_emit_epilogue): Restore %ebx.
13060
13061 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13062
13063 * server.c (step_thread): Remove definition.
13064 (process_serial_event): Don't handle Hs.
13065 * server.h (step_thread): Remove declaration.
13066 * target.c (set_desired_inferior): Remove use of step_thread.
13067
13068 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13069
13070 * linux-low.c: Include linux-procfs.h.
13071 (linux_attach_lwp_1): Update comments.
13072 (linux_attach): Scan for existing threads when attaching to a
13073 process that is the tgid.
13074 * Makefile.in: Update dependencies.
13075
13076 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13077
13078 * configure.srv: Add linux-procfs.o dependencies.
13079
13080 2011-08-14 Yao Qi <yao@codesourcery.com>
13081
13082 * target.h (struct target_ops): Fix indent.
13083 * win32-low.c (win32_target_ops): Fix comment.
13084
13085 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13086 Yao Qi <yao@codesourcery.com>
13087
13088 * Makefile.in (clean): Remove tic6x-*.c files.
13089 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13090 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13091 (tic6x-c64xp-linux.c): Likewise.
13092 * configure.srv: Add support for tic6x-*-uclinux.
13093 * linux-tic6x-low.c: New.
13094 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13095
13096 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13097 Yao Qi <yao@codesourcery.com>
13098
13099 * target.h (struct target_ops): Add read_loadmap.
13100 * linux-low.c (struct target_loadseg): New type.
13101 (struct target_loadmap): New type.
13102 (linux_read_loadmap): New function.
13103 (linux_target_ops): Add linux_read_loadmap.
13104 * server.c (handle_query): Support qXfer:fdpic:read packet.
13105 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13106 to NULL.
13107
13108 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13109
13110 * win32-low.c: Include <stdint.h>.
13111
13112 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13113
13114 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13115 to the inferior here.
13116 (i386_remove_aligned_watchpoint): Ditto.
13117 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13118 fit part of the watchpoint in the debug registers.
13119 (i386_update_inferior_debug_regs): New.
13120 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13121 registers, and only update the inferior on success.
13122 (i386_low_remove_watchpoint): Ditto.
13123
13124 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13125
13126 * linux-low.c (compare_ints, unique, list_threads, show_process,
13127 linux_core_of_thread): Delete.
13128 (linux_target_ops): Change linux_core_of_thread to
13129 linux_common_core_of_thread.
13130 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13131 * utils.c (malloc_failure): Change type of argument.
13132 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13133 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13134 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13135 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13136 (IPA_OBJS): Add common-utils-ipa.o.
13137 (ptid_h, linux_osdata_h): New macros.
13138 (server_h): Add common/common-utils.h, common/xml-utils.h,
13139 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13140 common/ptid.h.
13141 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13142 ptid.o, buffer.o): New rules.
13143 (linux-low.o): Add common/linux-osdata.h as a dependency.
13144 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13145 * configure.ac: Add AC_HEADER_DIRENT check.
13146 * config.in: Regenerate.
13147 * configure: Regenerate.
13148 * remote-utils.c (xml_escape_text): Delete.
13149 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13150 buffer_xml_printf): Move to common/buffer.c.
13151 * server.c (main): Remove call to initialize_inferiors.
13152 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13153 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13154 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13155 internal_error, gdb_assert, gdb_assert_fail): Delete.
13156 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13157 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13158 common/buffer.h.
13159 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13160 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13161 initialize_inferiors): Delete.
13162
13163 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13164
13165 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13166 symbol error.
13167
13168 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13169
13170 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13171 assertion.
13172 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13173
13174 2011-05-26 Yao Qi <yao@codesourcery.com>
13175
13176 * Makefile.in (thread-db.o): Track dependence to
13177 common/gdb_thread_db.h.
13178 * thread-db.c: include gdb_thread_db.h from right place.
13179
13180 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13181
13182 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13183 __FILE__ and __LINE__ to internal_error.
13184
13185 2011-05-13 Doug Evans <dje@google.com>
13186
13187 * thread-db.c (try_thread_db_load_from_sdir): New function.
13188 (try_thread_db_load_from_dir): New function.
13189 (thread_db_load_search): Handle $sdir, ignore $pdir.
13190 Remove trying of system directories if search of
13191 libthread-db-search-path fails, that is now done via $sdir.
13192
13193 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13194
13195 * server.c (handle_query): Add EnableDisableTracepoints to the list
13196 of supported features.
13197 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13198 tracepoints.
13199 (cmd_qtenable_disable): New.
13200 (cmd_qtstart): Install tracepoints even if disabled.
13201 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13202 receiving a QTEnable or QTDisable packet.
13203 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13204 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13205 tracepoints.
13206 (gdb_probe): Skip data collection if static tracepoint is disabled.
13207
13208 2011-05-10 Doug Evans <dje@google.com>
13209
13210 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13211
13212 2011-05-04 Doug Evans <dje@google.com>
13213
13214 * linux-low.c (linux_join): Skip process lookup.
13215 * spu-low.c (spu_join): Ditto.
13216 * server.c (join_inferiors_callback): Delete.
13217 (process_serial_event): For 'D' packet (detach) call join_inferior
13218 directly.
13219
13220 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13221
13222 * README: Don't mention xscale*-*-linux*.
13223 * configure.srv (xscale*-*-linux*): Don't handle target.
13224
13225 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13226
13227 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13228 casting pointers.
13229 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13230 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13231 (i386_emit_void_call_2): Likewise.
13232
13233 2011-04-26 Yao Qi <yao@codesourcery.com>
13234
13235 * linux-low.c: Move common macros to linux-ptrace.h.
13236 Include linux-ptrace.h.
13237 * Makefile.in (linux_ptrace_h): New.
13238 (linux-low.o): Depends on linux-ptrace.h.
13239
13240 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13241
13242 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13243 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13244 (remote_prepare): New function with most of the TCP code from ...
13245 (remote_open): ... here. Detect PORT here unconditionally. Move also
13246 setting transport_is_reliable.
13247 * server.c (run_once): New variable.
13248 (gdbserver_usage): Document it.
13249 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13250 the first run if RUN_ONCE.
13251 * server.h (run_once, remote_prepare): New declarations.
13252
13253 2011-04-19 Tom Tromey <tromey@redhat.com>
13254
13255 * win32-low.c (handle_load_dll): Remove duplicate "the".
13256
13257 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13258
13259 Remove support for old Cygwin 1.5 versions.
13260 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13261 function to avoid warning.
13262 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13263 warning.
13264
13265 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13266
13267 * gdbserver/server.h (Macro _): Define it if not available.
13268
13269 2011-03-14 Michael Snyder <msnyder@vmware.com>
13270
13271 * hostio.c (handle_close): Remove unnecessary null test.
13272
13273 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13274
13275 * Makefile.in (maintainer-clean realclean distclean): Remove
13276 "make ... subdir_do" command.
13277
13278 2011-03-10 Michael Snyder <msnyder@vmware.com>
13279
13280 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13281
13282 * server.c (handle_v_run): Free alloced buffer on early return.
13283
13284 2011-03-09 Yao Qi <yao@codesourcery.com>
13285
13286 Revert:
13287 2011-03-04 Yao Qi <yao@codesourcery.com>
13288
13289 * Makefile.in: Remove GNU make feature --directory.
13290
13291 2011-03-05 Yao Qi <yao@codesourcery.com>
13292
13293 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13294 (subdir_do): New make target. Copied from gdb/Makefile.
13295 (maintainer-clean, realclean, distclean, clean): Call corresponding
13296 make targets in common/Makefile.
13297
13298 2011-02-11 Yao Qi <yao@codesourcery.com>
13299
13300 * configure.ac: Call AC_PROG_RANLIB.
13301 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13302 * configure: Regenerate.
13303
13304 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13305
13306 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13307
13308 2011-03-06 Yao Qi <yao@codesourcery.com>
13309
13310 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13311
13312 2011-03-05 Yao Qi <yao@codesourcery.com>
13313
13314 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13315 (subdir_do): New make target. Copied from gdb/Makefile.
13316 (maintainer-clean, realclean, distclean, clean): Call corresponding
13317 make targets in common/Makefile.
13318
13319 2011-03-04 Yao Qi <yao@codesourcery.com>
13320
13321 * Makefile.in: Remove GNU make feature --directory.
13322
13323 2011-03-04 Michael Snyder <msnyder@vmware.com>
13324
13325 * server.c (queue_stop_reply): Call xmalloc not malloc.
13326
13327 2011-03-02 Michael Snyder <msnyder@vmware.com>
13328
13329 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13330
13331 2011-02-28 Michael Snyder <msnyder@vmware.com>
13332
13333 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13334 (cmd_qtframe): Ditto.
13335 (cmd_qtbuffer): Ditto.
13336 (cmd_bigqtbuffer): Ditto.
13337
13338 * utils.c (decimal2str): Initialize 'width' to nine, then
13339 don't mess with it.
13340
13341 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13342
13343 * hostio.c (require_data): Free *data, not data.
13344
13345 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13346
13347 * hostio.c (require_data): Use free, not xfree.
13348
13349 2011-02-27 Michael Snyder <msnyder@vmware.com>
13350
13351 * server.c (handle_query): Discard unused value.
13352
13353 * hostio.c (require_data): Free malloc memory before returning
13354 error.
13355
13356 2011-02-26 Michael Snyder <msnyder@vmware.com>
13357
13358 * linux-low.c (list_threads): Call closedir for dirent.
13359
13360 2011-02-27 Michael Snyder <msnyder@vmware.com>
13361
13362 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13363 a case statement falls through.
13364
13365 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13366
13367 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13368 in comparison.
13369
13370 2011-02-26 Michael Snyder <msnyder@vmware.com>
13371
13372 * utils.c (decimal2str): Eliminate dead code and dead param.
13373 (pulongest): Drop dead param from call to decimal2str.
13374 (plongest): Ditto.
13375
13376 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13377
13378 Revert the following patch (not approved yet):
13379 2011-02-21 Hui Zhu <teawater@gmail.com>
13380 * tracepoint.c (tp_printf): New function.
13381 (eval_agent_expr): Handle gdb_agent_op_printf.
13382
13383 2011-02-21 Hui Zhu <teawater@gmail.com>
13384
13385 * tracepoint.c (tp_printf): New function.
13386 (eval_agent_expr): Handle gdb_agent_op_printf.
13387
13388 2011-02-18 Tom Tromey <tromey@redhat.com>
13389
13390 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13391 (tracepoint.o): Likewise.
13392 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13393 (gdb_agent_op_names): Likewise.
13394
13395 2011-02-18 Tom Tromey <tromey@redhat.com>
13396
13397 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13398 gdb_agent_op_rot>: New constants.
13399 (gdb_agent_op_names): Add pick and roll.
13400 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13401 cases.
13402
13403 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13404
13405 * aclocal.m4: Regenerated with aclocal-1.11.1.
13406
13407 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13408
13409 * server.c (handle_qxfer_traceframe_info): New.
13410 (qxfer_packets): Register "traceframe-info".
13411 (handle_query): Report support for qXfer:traceframe-info:read+.
13412 * tracepoint.c (match_blocktype): New.
13413 (traceframe_find_block_type): Rename to ...
13414 (traceframe_walk_blocks): ... this. Add callback filter argument,
13415 and use it.
13416 (traceframe_find_block_type): New, reimplemented on top of
13417 traceframe_walk_blocks.
13418 (build_traceframe_info_xml): New.
13419 (traceframe_read_info): New.
13420 * server.h (traceframe_read_info): Declare.
13421
13422 2011-02-11 Yao Qi <yao@codesourcery.com>
13423
13424 * configure.ac: Call AC_PROG_RANLIB.
13425 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13426 * configure: Regenerate.
13427
13428 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13429
13430 * server.c (gdb_read_memory): Change return semantics to allow
13431 partial transfers.
13432 (handle_search_memory_1): Adjust.
13433 (process_serial_event) <'m' packet>: Handle partial transfers.
13434 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13435
13436 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13437
13438 * regcache.c (init_register_cache): Initialize
13439 regcache->register_status.
13440 (free_register_cache): Release regcache->register_status.
13441 (regcache_cpy): Copy register_status.
13442 (registers_to_string): Print 'x's for unavailable registers.
13443 (supply_register): Mark the register's status valid or
13444 unavailable, depending on whether a buffer was passed in or not.
13445 (supply_register_zeroed): New.
13446 (supply_regblock): Mark the registers' status valid or
13447 unavailable, depending on whether a buffer was passed in or not.
13448 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13449 (struct regcache): New `register_status' field.
13450 (supply_register_zeroed): Declare.
13451 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13452 supply_register_zeroed, rather than passing a NULL buffer to
13453 supply_register.
13454 * tracepoint.c (fetch_traceframe_registers): Update comment.
13455
13456 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13457
13458 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13459 buffer explicit.
13460
13461 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13462
13463 * server.h (decode_xfer_write): Change prototype.
13464 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13465 and don't extract the annex here.
13466 * server.c (decode_xfer_read): Remove `annex' parameter,
13467 and don't extract the annex here.
13468 (decode_xfer): New.
13469 (struct qxfer): New.
13470 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13471 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13472 (handle_qxfer_statictrace): New functions, abstracted out from
13473 handle_query, and made to use the struct qxfer interface.
13474 (handle_threads_qxfer_proper): Rename to ...
13475 (handle_qxfer_threads_proper): ... this.
13476 (handle_threads_qxfer): Rename to ...
13477 (handle_qxfer_threads): ... this. Adjust.
13478 (qxfer_packets): New array.
13479 (handle_qxfer): New function.
13480 (handle_query): Use handle_qxfer.
13481
13482 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13483
13484 * gdbreplay.c: Shorten lines of >= 80 columns.
13485 * linux-low.c: Ditto.
13486 * linux-ppc-low.c: Ditto.
13487 * linux-s390-low.c: Ditto.
13488 * linux-sparc-low.c: Ditto.
13489 * linux-x86-low.c: Ditto.
13490 * linux-xtensa-low.c: Ditto.
13491 * mem-break.c: Ditto.
13492 * nto-low.c: Ditto.
13493 * regcache.h: Ditto.
13494 * remote-utils.c: Ditto.
13495 * server.c: Ditto.
13496 * server.h: Ditto.
13497 * thread-db.c: Ditto.
13498 * tracepoint.c: Ditto.
13499 * utils.c: Ditto.
13500 * win32-low.h: Ditto.
13501
13502 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13503
13504 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13505 update.
13506
13507 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13508
13509 * server.c (gdbserver_version): Update copyright year in version
13510 output.
13511 * gdbreplay.c (gdbreplay_version): Ditto.
13512
13513 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13514
13515 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13516 * linux-bfin-low.c: New file.
13517 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13518 PT_DATA_ADDR for BFIN targets.
13519 * Makefile.in (SFILES): Add linux-bfin-low.c.
13520 (clean): Remove reg-bfin.c.
13521 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13522 * README: Mention supported Blackfin targets.
13523
13524 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13525
13526 * .gitignore: New file.
13527
13528 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13529
13530 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13531
13532 2010-10-22 Jie Zhang <jie@codesourcery.com>
13533
13534 * Makefile.in: Add FLAGS_TO_PASS variable.
13535 (install): Remove dependency of install-only and recursively
13536 invoke make for install-only.
13537
13538 2010-10-04 Doug Evans <dje@google.com>
13539
13540 * Makefile.in (uninstall): Use $(DESTDIR).
13541
13542 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13543
13544 PR gdb/11842
13545
13546 * linux-x86-low.c (compat_siginfo_from_siginfo)
13547 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13548 si_code is < 0. Check for si_code == SI_TIMER before checking for
13549 si_code < 0.
13550
13551 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13552
13553 * lynx-i386-low.c: New file.
13554 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13555
13556 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13557
13558 * lynx-low.c (ptrace_request_to_str): Remove handling for
13559 request values that have been removed in LynxOS 5.x.
13560
13561 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13562
13563 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13564 <ptrace.h>
13565
13566 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13567
13568 * configure.ac: Add --enable-inprocess-agent option.
13569 * configure: Rebuilt.
13570
13571 2010-09-06 Yao Qi <yao@codesourcery.com>
13572
13573 * linux-low.c (linux_kill): Remove unused variable.
13574 (linux_stabilize_threads): Likewise.
13575 * server.c (start_inferior): Likewise.
13576 (queue_stop_reply_callback): Likewise.
13577 * tracepoint.c (do_action_at_tracepoint): Likewise.
13578
13579 2010-09-06 Yao Qi <yao@codesourcery.com>
13580
13581 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13582 on return.
13583
13584 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13585
13586 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13587
13588 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13589
13590 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13591 "$(IPA_DEPFILES)".
13592
13593 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13594
13595 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13596 gdbserver/lynx-ppc-low.c: New files.
13597 * Makefile.in (lynx_low_h): New variable.
13598 (lynx-low.o, lynx-ppc-low.o): New rules.
13599 * configure.ac: On LynxOS, link with -lnetinet.
13600 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13601 * configure: regenerate.
13602
13603 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13604
13605 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13606 * configure.ac: Add check for vasprintf and vsnprintf.
13607 * configure, config.in: Regenerate.
13608 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13609
13610 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13611
13612 * gdbreplay.c: Move include of alloca.h up, next to include of
13613 malloc.h.
13614 * server.h: Add include of malloc.h.
13615 * mem-break.c: Remove include of malloc.h.
13616 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13617
13618 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13619
13620 * Makefile.in (memmem.o): Build with -Wno-error.
13621
13622 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13623
13624 * utils.c (xsnprintf): Make non-static.
13625 * server.h: Add xsnprintf declaration.
13626 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13627 replace calls to snprintf by calls to xsnprintf throughout.
13628
13629 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13630
13631 * configure.ac: Add configure check for alloca.
13632 * configure, config.in: Regenerate.
13633 * server.h: Include alloca.h if it exists.
13634 * gdbreplay.c: Include alloca.h if it exists.
13635
13636 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13637
13638 * linux-low.c (__SIGRTMIN): Define if not already defined.
13639 (linux_create_inferior): Check for __ANDROID__ rather than
13640 __SIGRTMIN.
13641 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13642 are already deferred.
13643 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13644 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13645 stopped and already has a pending signal to report.
13646 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13647 a pending signal to report or is moving out of a jump pad.
13648 (linux_init_signals): Check for __ANDROID__ rather than
13649 __SIGRTMIN.
13650
13651 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13652
13653 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13654 debug_threads check. Avoid a linear search when not doing debug
13655 output.
13656
13657 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13658
13659 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13660 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13661 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13662 (process_event): Change local fd's type to gdb_fildes_t.
13663 (create_file_handler): Adjust prototype.
13664 (delete_file_handler): Adjust prototype.
13665 (handle_file_event): Adjust prototype. Use pfildes.
13666 (create_file_event): Adjsut prototype.
13667 * remote-utils.c (remote_desc, listen_desc): Change type to
13668 gdb_fildes_t.
13669 * server.h: New gdb_fildes_t typedef.
13670 [USE_WIN32API]: Include winsock2.h.
13671 (delete_file_handler, add_file_handler): Adjust prototypes.
13672 (pfildes): Declare.
13673 * utils.c (pfildes): New.
13674
13675 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13676
13677 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13678 * configure: Regenerate.
13679
13680 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13681
13682 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13683 (linux_done_accessing_memory): ... this.
13684 (linux_target_ops): Adjust.
13685 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13686 * nto-low.c (nto_target_ops): Adjust comment.
13687 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13688 * spu-low.c (spu_target_ops): Adjust comment.
13689 * target.h (target_ops): Rename unprepare_to_access_memory field
13690 to done_accessing_memory.
13691 (unprepare_to_access_memory): Rename to ...
13692 (done_accessing_memory): ... this.
13693
13694 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13695
13696 * linux-low.c (linux_prepare_to_access_memory): New.
13697 (linux_unprepare_to_access_memory): New.
13698 (linux_target_ops): Install them.
13699 * server.c (read_memory): Rename to ...
13700 (gdb_read_memory): ... this. Use
13701 prepare_to_access_memory/prepare_to_access_memory.
13702 (write_memory): Rename to ...
13703 (gdb_write_memory): ... this. Use
13704 prepare_to_access_memory/prepare_to_access_memory.
13705 (handle_search_memory_1): Adjust.
13706 (process_serial_event): Adjust.
13707 * target.h (struct target_ops): New fields
13708 prepare_to_access_memory and unprepare_to_access_memory.
13709 (prepare_to_access_memory, unprepare_to_access_memory): New.
13710 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13711 prepare_to_access_memory/prepare_to_access_memory.
13712 * nto-low.c (nto_target_ops): Adjust.
13713 * spu-low.c (spu_target_ops): Adjust.
13714 * win32-low.c (win32_target_ops): Adjust.
13715
13716 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13717
13718 * Makefile.in (WARN_CFLAGS): Get it from configure.
13719 (WERROR_CFLAGS): New.
13720 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13721 * configure.ac: Introduce --enable-werror, which adds -Werror to
13722 the compiler command line. Enabled by default. Disable with
13723 --disable-werror. Add -Wdeclaration-after-statement
13724 Wpointer-arith and -Wformat-nonliteral to warning flags.
13725 * configure: Regenerate.
13726
13727 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13728
13729 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13730
13731 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13732
13733 * gdbreplay.c (remote_error): New.
13734 (gdbchar): New.
13735 (expect): Use gdbchar. Check for error reading from GDB.
13736 Clarify sync error output.
13737 (play): Check for errors writing to GDB.
13738 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13739 * remote-utils.c (getpkt): Check for errors writing to the remote
13740 descriptor.
13741
13742 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13743
13744 * linux-low.c (linux_wait_1): Move non-debugging code out of
13745 `debug_threads' control.
13746
13747 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13748
13749 * linux-low.c (linux_wait_1): Don't set last_status here.
13750 * server.c (push_event, queue_stop_reply_callback): Assert we're
13751 not pushing a TARGET_WAITKIND_IGNORE event.
13752 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13753 (myresume, handle_target_event): Set the thread's last_resume_kind
13754 and last_status from the target returned status.
13755
13756 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13757
13758 PR threads/10729
13759
13760 * linux-x86-low.c (update_debug_registers_callback): New.
13761 (i386_dr_low_set_addr): Use it.
13762 (i386_dr_low_get_addr): New.
13763 (i386_dr_low_set_control): Use update_debug_registers_callback.
13764 (i386_dr_low_get_control): New.
13765 (i386_dr_low_get_status): Adjust.
13766 * linux-low.c (linux_stop_lwp): New.
13767 * linux-low.h (linux_stop_lwp): Declare.
13768
13769 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13770 argument instead of a i386_debug_reg_state.
13771 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13772 a i386_debug_reg_state.
13773 (i386_insert_aligned_watchpoint): Adjust.
13774 (i386_remove_aligned_watchpoint): Adjust.
13775 (i386_low_stopped_data_address): Read the debug registers from the
13776 inferior instead of from the mirrors.
13777 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13778 (i386_dr_low_get_addr): Declare.
13779 (i386_dr_low_get_control): Declare.
13780 (i386_dr_low_get_status): Change prototype.
13781
13782 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13783 (i386_dr_low_get_addr): New.
13784 (i386_dr_low_get_control): New.
13785 (i386_dr_low_get_status): Adjust prototype. Return
13786 dr_status_mirror.
13787 (i386_initial_stuff): Clear dr_status_mirror and
13788 dr_control_mirror.
13789 (i386_get_thread_context): Adjust.
13790 (i386_set_thread_context): Adjust.
13791 (i386_thread_added): Adjust.
13792
13793 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13794
13795 * linux-low.h (linux_thread_area): Delete declaration.
13796
13797 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13798
13799 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13800 after its termination.
13801
13802 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13803
13804 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13805 (gdb_wants_all_stopped): Delete.
13806 (linux_wait_1): Don't call them.
13807 * server.c (handle_v_cont): Tag all threads as want-stopped.
13808 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13809 stopped as "client-wants-stopped".
13810
13811 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13812
13813 * Makefile.in (signals_h): New.
13814 (server_h): Depend on it.
13815 (server.o): Don't depend on $(signals_def).
13816 (signals.o): Depend on $(signals_def).
13817
13818 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13819
13820 * Makefile.in (signals_def): New.
13821 (server_h): Append include/gdb/signals.h and signals_def.
13822 (server.o): Append signals_def.
13823
13824 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13825
13826 * server.c (handle_target_event): Use target_signal_to_host for
13827 resume_info.sig initialization.
13828 * target.h (struct thread_resume) <sig>: New comment.
13829
13830 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13831
13832 * server.c (handle_query): strcpy() the returned string from paddress()
13833 instead of sprintf().
13834 * utils.c (paddress): Return phex_nz().
13835
13836 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13837
13838 * server.c (handle_v_cont): Call mourn_inferior if process
13839 just exited.
13840 (myresume): Likewise.
13841
13842 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13843
13844 Static tracepoints, and integration with UST.
13845
13846 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13847 * mem-break.c (uninsert_all_breakpoints)
13848 (reinsert_all_breakpoints): New.
13849 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13850 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13851 (gdb_agent_ust_loaded, helper_thread_id)
13852 (gdb_agent_helper_thread_id): New macros.
13853 (struct ipa_sym_addresses): Add addr_ust_loaded,
13854 addr_helper_thread_id, addr_cmd_buf.
13855 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13856 (in_process_agent_loaded_ust): New.
13857 (write_e_ust_not_loaded): New.
13858 (maybe_write_ipa_ust_not_loaded): New.
13859 (struct collect_static_trace_data_action): New.
13860 (enum tracepoint_type) <static_tracepoint>: New.
13861 (struct tracepoint) <handle>: Mention static tracepoints.
13862 (struct static_tracepoint_ctx): New.
13863 (CMD_BUF_SIZE): New.
13864 (add_tracepoint_action): Handle static tracepoint actions.
13865 (unprobe_marker_at): New.
13866 (clear_installed_tracepoints): Handle static tracepoints.
13867 (cmd_qtdp): Handle static tracepoints.
13868 (probe_marker_at): New.
13869 (cmd_qtstart): Handle static tracepoints.
13870 (response_tracepoint): Handle static tracepoints.
13871 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13872 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13873 (get_context_regcache): Handle static tracepoints.
13874 (do_action_at_tracepoint): Handle static tracepoint actions.
13875 (traceframe_find_block_type): Handle static trace data blocks.
13876 (traceframe_read_sdata): New.
13877 (download_tracepoints): Download static tracepoint actions.
13878 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13879 (GDB_PROBE_NAME): New.
13880 (ust_ops): New.
13881 (GET_UST_SYM): New.
13882 (USTF): New.
13883 (dlsym_ust): New.
13884 (ust_marker_to_static_tracepoint): New.
13885 (gdb_probe): New.
13886 (collect_ust_data_at_tracepoint): New.
13887 (gdb_ust_probe): New.
13888 (UNIX_PATH_MAX, SOCK_DIR): New.
13889 (gdb_ust_connect_sync_socket): New.
13890 (resume_thread, stop_thread): New.
13891 (run_inferior_command): New.
13892 (init_named_socket): New.
13893 (gdb_ust_socket_init): New.
13894 (cstr_to_hexstr): New.
13895 (next_st): New.
13896 (first_marker, next_marker): New.
13897 (response_ust_marker): New.
13898 (cmd_qtfstm, cmd_qtsstm): New.
13899 (unprobe_marker_at, probe_marker_at): New.
13900 (cmd_qtstmat, gdb_ust_thread): New.
13901 (gdb_ust_init): New.
13902 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13903 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13904 (ST_REGENTRY): New.
13905 (x86_64_st_collect_regmap): New.
13906 (X86_64_NUM_ST_COLLECT_GREGS): New.
13907 (AMD64_RIP_REGNUM): New.
13908 (supply_static_tracepoint_registers): New.
13909 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13910 (ST_REGENTRY): New.
13911 (i386_st_collect_regmap): New.
13912 (i386_NUM_ST_COLLECT_GREGS): New.
13913 (supply_static_tracepoint_registers): New.
13914 * server.c (handle_query): Handle qXfer:statictrace:read.
13915 <qSupported>: Report support for StaticTracepoints, and
13916 qXfer:statictrace:read features.
13917 * server.h (traceframe_read_sdata)
13918 (supply_static_tracepoint_registers): Declare.
13919 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13920 (unpack_varlen_hex): Include in IPA build.
13921 * Makefile.in (ustlibs, ustinc): New.
13922 (IPA_OBJS): Add remote-utils-ipa.o.
13923 ($(IPA_LIB)): Link -ldl and -lpthread.
13924 (UST_CFLAGS): New.
13925 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13926 * config.in, configure: Regenerate.
13927
13928 2010-06-20 Ian Lance Taylor <iant@google.com>
13929 Pedro Alves <pedro@codesourcery.com>
13930
13931 * linux-x86-low.c (always_true): Delete.
13932 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13933 trying to fool the compiler with always_true.
13934
13935 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13936
13937 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13938 conditions in gdbserver.
13939
13940 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13941
13942 * spu-low.c (spu_read_memory): Wrap around local store limit.
13943 (spu_write_memory): Likewise.
13944
13945 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13946
13947 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13948 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13949 LONGEST uses.
13950 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13951 uses.
13952 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13953 uses with LONGEST uses.
13954
13955 2010-06-14 Stan Shebs <stan@codesourcery.com>
13956 Pedro Alves <pedro@codesourcery.com>
13957
13958 Bytecode compiler.
13959
13960 * linux-x86-low.c: Include limits.h.
13961 (add_insns): New.
13962 (always_true): New.
13963 (EMIT_ASM): New.
13964 (EMIT_ASM32): New.
13965 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13966 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13967 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13968 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13969 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13970 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13971 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13972 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13973 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13974 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13975 (amd64_emit_void_call_2): New.
13976 (amd64_emit_ops): New.
13977 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13978 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13979 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13980 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13981 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13982 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13983 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13984 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13985 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13986 (i386_emit_stack_adjust, i386_emit_int_call_1)
13987 (i386_emit_void_call_2): New.
13988 (i386_emit_ops): New.
13989 (x86_emit_ops): New.
13990 (the_low_target): Install x86_emit_ops.
13991 * server.h (struct emit_ops): New.
13992 (get_raw_reg_func_addr): Declare.
13993 (current_insn_ptr, emit_error): Declare.
13994 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13995 (set_trace_state_variable_value): New defines.
13996 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13997 addr_get_trace_state_variable_value and
13998 addr_set_trace_state_variable_value.
13999 (symbol_list): New fields for get_raw_reg,
14000 get_trace_state_variable_value and set_trace_state_variable_value.
14001 (condfn): New typedef.
14002 (struct tracepoint): New field `compiled_cond'.
14003 (do_action_at_tracepoint): Clear compiled_cond.
14004 (get_trace_state_variable_value, set_trace_state_variable_value):
14005 Export in the IPA.
14006 (condition_true_at_tracepoint): If there's a compiled condition,
14007 run that.
14008 (current_insn_ptr, emit_error): New globals.
14009 (struct bytecode_address): New.
14010 (get_raw_reg_func_addr): New.
14011 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14012 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14013 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14014 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14015 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14016 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14017 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14018 (compile_tracepoint_condition, compile_bytecodes): New.
14019 * target.h (emit_ops): Forward declare.
14020 (struct target_ops): New field emit_ops.
14021 (target_emit_ops): New.
14022 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14023 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14024 * linux-low.c (linux_emit_ops): New.
14025 (linux_target_ops): Install it.
14026 * linux-low.h (struct linux_target_ops): New field emit_ops.
14027
14028 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14029
14030 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14031 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14032
14033 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14034 Stan Shebs <stan@codesourcery.com>
14035
14036 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14037 (all): Depend on $(extra_libraries).
14038 (install-only): Install the IPA.
14039 (IPA_OBJS, IPA_LIB): New.
14040 (clean): Remove the IPA lib.
14041 (IPAGENT_CFLAGS): New.
14042 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14043 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14044 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14045 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14046 * configure.ac: Check for atomic builtins support in the compiler.
14047 (IPA_DEPFILES, extra_libraries): Define.
14048 * configure.srv (ipa_obj): Add description.
14049 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14050 (i[34567]86-*-linux*): Set ipa_obj.
14051 (x86_64-*-linux*): Set ipa_obj.
14052 * linux-low.c (stabilizing_threads): New.
14053 (supports_fast_tracepoints): New.
14054 (linux_detach): Stabilize threads before detaching.
14055 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14056 the lwp is either not stabilizing, or is moving out of a jump pad.
14057 (linux_fast_tracepoint_collecting): New.
14058 (maybe_move_out_of_jump_pad): New.
14059 (enqueue_one_deferred_signal): New.
14060 (dequeue_one_deferred_signal): New.
14061 (linux_wait_for_event_1): If moving out of a jump pad, defer
14062 pending signals to later.
14063 (linux_stabilize_threads): New.
14064 (linux_wait_1): Check if threads need moving out of jump pads, and
14065 do it if so.
14066 (stuck_in_jump_pad_callback): New.
14067 (move_out_of_jump_pad_callback): New.
14068 (lwp_running): New.
14069 (linux_resume_one_lwp): Handle moving out of jump pads.
14070 (linux_set_resume_request): Dequeue deferred signals.
14071 (need_step_over_p): Also step over fast tracepoint jumps.
14072 (start_step_over): Also uninsert fast tracepoint jumps.
14073 (finish_step_over): Also reinsert fast tracepoint jumps.
14074 (linux_install_fast_tracepoint_jump): New.
14075 (linux_target_ops): Install linux_stabilize_threads and
14076 linux_install_fast_tracepoint_jump_pad.
14077 * linux-low.h (linux_target_ops) <get_thread_area,
14078 install_fast_tracepoint_jump_pad>: New fields.
14079 (struct lwp_info) <collecting_fast_tracepoint,
14080 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14081 (linux_get_thread_area): Declare.
14082 * linux-x86-low.c (jump_insn): New.
14083 (x86_get_thread_area): New.
14084 (append_insns): New.
14085 (push_opcode): New.
14086 (amd64_install_fast_tracepoint_jump_pad): New.
14087 (i386_install_fast_tracepoint_jump_pad): New.
14088 (x86_install_fast_tracepoint_jump_pad): New.
14089 (the_low_target): Install x86_get_thread_area and
14090 x86_install_fast_tracepoint_jump_pad.
14091 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14092 (struct fast_tracepoint_jump): New.
14093 (fast_tracepoint_jump_insn): New.
14094 (fast_tracepoint_jump_shadow): New.
14095 (find_fast_tracepoint_jump_at): New.
14096 (fast_tracepoint_jump_here): New.
14097 (delete_fast_tracepoint_jump): New.
14098 (set_fast_tracepoint_jump): New.
14099 (uninsert_fast_tracepoint_jumps_at): New.
14100 (reinsert_fast_tracepoint_jumps_at): New.
14101 (set_breakpoint_at): Use write_inferior_memory.
14102 (uninsert_raw_breakpoint): Use write_inferior_memory.
14103 (check_mem_read): Mask out fast tracepoint jumps.
14104 (check_mem_write): Mask out fast tracepoint jumps.
14105 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14106 (set_fast_tracepoint_jump): Declare.
14107 (delete_fast_tracepoint_jump)
14108 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14109 (reinsert_fast_tracepoint_jumps_at): Declare.
14110 * regcache.c: Don't compile many functions when building the
14111 in-process agent library.
14112 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14113 the register buffer in the heap.
14114 (free_register_cache): If the register buffer isn't owned by the
14115 regcache, don't free it.
14116 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14117 pre-existing register caches.
14118 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14119 type.
14120 (convert_ascii_to_int): : Constify `from' parameter type.
14121 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14122 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14123 the needed buffer in-place.
14124 (relocate_instruction): New.
14125 * server.c (handle_query) <qSymbols>: If the target supports
14126 tracepoints, give it a chance of looking up symbols. Report
14127 support for fast tracepoints.
14128 (handle_status): Stabilize threads.
14129 (process_serial_event): Adjust.
14130 * server.h (struct fast_tracepoint_jump): Forward declare.
14131 (struct process_info) <fast_tracepoint_jumps>: New field.
14132 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14133 (decode_X_packet, decode_M_packet): Adjust.
14134 (relocate_instruction): Declare.
14135 (in_process_agent_loaded): Declare.
14136 (tracepoint_look_up_symbols): Declare.
14137 (struct fast_tpoint_collect_status): Declare.
14138 (fast_tracepoint_collecting): Declare.
14139 (force_unlock_trace_buffer): Declare.
14140 (handle_tracepoint_bkpts): Declare.
14141 (initialize_low_tracepoint)
14142 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14143 * target.h (struct target_ops) <stabilize_threads,
14144 install_fast_tracepoint_jump_pad>: New fields.
14145 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14146 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14147 [HAVE_STDINT_H]: Include stdint.h.
14148 (trace_debug_1): Rename to ...
14149 (trace_vdebug): ... this.
14150 (trace_debug): Rename to ...
14151 (trace_debug_1): ... this. Add `level' parameter.
14152 (trace_debug): New.
14153 (ATTR_USED, ATTR_NOINLINE): New.
14154 (IP_AGENT_EXPORT): New.
14155 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14156 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14157 (about_to_request_buffer_space, trace_buffer_is_full)
14158 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14159 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14160 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14161 (traceframe_write_count, traceframes_created)
14162 (trace_state_variables)
14163 New renaming defines.
14164 (struct ipa_sym_addresses): New.
14165 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14166 (symbol_list): New.
14167 (ipa_sym_addrs): New.
14168 (all_tracepoint_symbols_looked_up): New.
14169 (in_process_agent_loaded): New.
14170 (write_e_ipa_not_loaded): New.
14171 (maybe_write_ipa_not_loaded): New.
14172 (tracepoint_look_up_symbols): New.
14173 (debug_threads) [IN_PROCESS_AGENT]: New.
14174 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14175 (UNKNOWN_SIDE_EFFECTS): New.
14176 (stop_tracing): New.
14177 (flush_trace_buffer): New.
14178 (stop_tracing_bkpt): New.
14179 (flush_trace_buffer_bkpt): New.
14180 (read_inferior_integer): New.
14181 (read_inferior_uinteger): New.
14182 (read_inferior_data_pointer): New.
14183 (write_inferior_data_pointer): New.
14184 (write_inferior_integer): New.
14185 (write_inferior_uinteger): New.
14186 (struct collect_static_trace_data_action): Delete.
14187 (enum tracepoint_type): New.
14188 (struct tracepoint) <type>: New field `type'.
14189 <actions_str, step_actions, step_actions_str>: Only include in
14190 GDBserver.
14191 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14192 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14193 (tracepoints): Use IP_AGENT_EXPORT.
14194 (last_tracepoint): Don't include in the IPA.
14195 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14196 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14197 (alloced_trace_state_variables): New.
14198 (trace_state_variables): Use IP_AGENT_EXPORT.
14199 (traceframe_t): Delete unused variable.
14200 (circular_trace_buffer): Don't include in the IPA.
14201 (trace_buffer_start): Delete.
14202 (struct trace_buffer_control): New.
14203 (trace_buffer_free): Delete.
14204 (struct ipa_trace_buffer_control): New.
14205 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14206 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14207 New.
14208 (trace_buffer_ctrl): New.
14209 (TRACE_BUFFER_CTRL_CURR): New.
14210 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14211 Reimplement as macros.
14212 (trace_buffer_wrap): Delete.
14213 (traceframe_write_count, traceframe_read_count)
14214 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14215 (struct tracepoint_hit_ctx) <type>: New field.
14216 (struct fast_tracepoint_ctx): New.
14217 (memory_barrier): New.
14218 (cmpxchg): New.
14219 (record_tracepoint_error): Update atomically in the IPA.
14220 (clear_inferior_trace_buffer): New.
14221 (about_to_request_buffer_space): New.
14222 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14223 updating the same buffer.
14224 (add_tracepoint): Default the tracepoint's type to trap
14225 tracepoint, and orig_size to -1.
14226 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14227 internal variables.
14228 (create_trace_state_variable): New parameter `gdb'. Handle it.
14229 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14230 (cmd_qtdp): Handle fast tracepoints.
14231 (cmd_qtdv): Adjust.
14232 (max_jump_pad_size): New.
14233 (gdb_jump_pad_head): New.
14234 (get_jump_space_head): New.
14235 (claim_jump_space): New.
14236 (sort_tracepoints): New.
14237 (MAX_JUMP_SIZE): New.
14238 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14239 IPA.
14240 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14241 support. Upload fast traceframes, and delete internal IPA
14242 breakpoints.
14243 (stop_tracing_handler): New.
14244 (flush_trace_buffer_handler): New.
14245 (cmd_qtstop): Upload fast tracepoints.
14246 (response_tracepoint): Handle fast tracepoints.
14247 (tracepoint_finished_step): Upload fast traceframes. Set the
14248 tracepoint hit context's tracepoint type.
14249 (handle_tracepoint_bkpts): New.
14250 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14251 type. Add comment about fast tracepoints.
14252 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14253 non-existing action_str field.
14254 (get_context_regcache): Handle fast tracepoints.
14255 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14256 to the regcache.
14257 (fast_tracepoint_from_jump_pad_address): New.
14258 (fast_tracepoint_from_ipa_tpoint_address): New.
14259 (collecting_t): New.
14260 (force_unlock_trace_buffer): New.
14261 (fast_tracepoint_collecting): New.
14262 (collecting): New.
14263 (gdb_collect): New.
14264 (write_inferior_data_ptr): New.
14265 (target_tp_heap): New.
14266 (target_malloc): New.
14267 (download_agent_expr): New.
14268 (UALIGN): New.
14269 (download_tracepoints): New.
14270 (download_trace_state_variables): New.
14271 (upload_fast_traceframes): New.
14272 (IPA_FIRST_TRACEFRAME): New.
14273 (IPA_NEXT_TRACEFRAME_1): New.
14274 (IPA_NEXT_TRACEFRAME): New.
14275 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14276 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14277 (gdb_jump_pad_buffer_end): New.
14278 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14279 (initialize_tracepoint): Adjust.
14280 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14281 buffer. Initialize the low module.
14282 * utils.c (PREFIX, TOOLNAME): New.
14283 (malloc_failure): Use PREFIX.
14284 (error): In the IPA, an error causes an exit.
14285 (fatal, warning): Use PREFIX.
14286 (internal_error): Use TOOLNAME.
14287 (NUMCELLS): Increase to 10.
14288 * configure, config.in: Regenerate.
14289
14290 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14291
14292 * server.c (handle_query) <qSupported>: Do two passes over the
14293 qSupported string to avoid nesting strtok.
14294
14295 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14296
14297 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14298 (CDEPS): New.
14299 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14300 -Wl,--dynamic-list.
14301 * configure: Regenerate.
14302 * proc-service.list: New.
14303
14304 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14305
14306 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14307 New comment.
14308
14309 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14310
14311 * gdbreplay.c (remote_open): Check error return from socket() call by
14312 its equality to -1 not by it being negative.
14313 * remote-utils.c (remote_open): Likewise.
14314
14315 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14316
14317 * config.h: Regenerate.
14318
14319 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14320
14321 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14322 doesn't provide PTRACE_GET_THREAD_AREA.
14323
14324 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14325
14326 * linux-m68k-low.c: Include <asm/ptrace.h>
14327 (ps_get_thread_area): Implement.
14328
14329 2010-05-03 Doug Evans <dje@google.com>
14330
14331 * event-loop.c (struct callback_event): New struct.
14332 (callback_list): New global.
14333 (append_callback_event, delete_callback_event): New functions.
14334 (process_callback): New function.
14335 (start_event_loop): Call it.
14336 * remote-utils.c (NOT_SCHEDULED): Define.
14337 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14338 moved out of readchar.
14339 (readchar): Rewrite. Call reschedule before returning.
14340 (reset_readchar): New function.
14341 (remote_close): Call it.
14342 (process_remaining, reschedule): New functions.
14343 * server.h (callback_handler_func): New typedef.
14344 (append_callback_event, delete_callback_event): Declare.
14345
14346 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14347
14348 * proc-service.c (ps_pglobal_lookup): Use
14349 thread_db_look_up_one_symbol.
14350 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14351 parameter. Use it instead of all_symbols_looked_up.
14352 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14353 field.
14354 (all_symbols_looked_up): Don't declare.
14355 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14356 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14357 field.
14358 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14359 Set all_symbols_looked_up here.
14360 (thread_db_look_up_one_symbol): New.
14361 (thread_db_get_tls_address): Adjust.
14362 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14363 thread_db object on the heap, and tentatively set it in the
14364 process structure.
14365 (thread_db_init): Don't set all_symbols_looked_up here.
14366 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14367
14368 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14369
14370 * linux-low.c (linux_kill, linux_detach): Adjust.
14371 (status_pending_p_callback): Remove redundant statement. Check
14372 for !TARGET_WAITIKIND_IGNORE, instead of
14373 TARGET_WAITKIND_STOPPED.
14374 (handle_tracepoints): Make sure LWP is locked. Adjust.
14375 (linux_wait_for_event_1): Adjust.
14376 (linux_cancel_breakpoints): New.
14377 (unsuspend_one_lwp): New.
14378 (unsuspend_all_lwps): New.
14379 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14380 (send_sigstop_callback): Change return type to int, add new
14381 `except' parameter and handle it.
14382 (suspend_and_send_sigstop_callback): New.
14383 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14384 pass them down. If SUSPEND, also increment the lwp's suspend
14385 count.
14386 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14387 (need_step_over_p): Don't consider suspended LWPs.
14388 (start_step_over): Adjust.
14389 (proceed_one_lwp): Change return type to int, add new `except'
14390 parameter and handle it.
14391 (unsuspend_and_proceed_one_lwp): New.
14392 (proceed_all_lwps): Use find_inferior instead of
14393 for_each_inferior.
14394 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14395 also decrement the suspend count of LWPs. Pass `except' down,
14396 instead of hacking its suspend count.
14397 (linux_pause_all): Add `freeze' parameter. Adjust.
14398 (linux_unpause_all): New.
14399 (linux_target_ops): Install linux_unpause_all.
14400 * server.c (handle_status): Adjust.
14401 * target.h (struct target_ops): New fields `unpause_all' and
14402 `cancel_breakpoints'. Add new parameter to `pause_all'.
14403 (pause_all): Add new `freeze' parameter.
14404 (unpause_all): New.
14405 (cancel_breakpoints): New.
14406 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14407 cancel breakpoints.
14408 (cmd_qtstart): Pause threads.
14409 (stop_tracing): Pause threads, and cancel breakpoints.
14410 * win32-low.c (win32_target_ops): Adjust.
14411
14412 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14413
14414 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14415 the inferior right away from here...
14416 (linux_wait_1): ... to here, and adjust to check the thread's
14417 last_resume_kind instead of the lwp's step or stop_expected flags.
14418
14419 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14420
14421 * README: Use consistent `GDB' and `GDBserver' spellings.
14422
14423 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14424
14425 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14426 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14427 (linux_detach_one_lwp): Assume the lwp is stopped.
14428 (any_thread_of): Delete.
14429 (linux_detach): Stop all lwps here. Don't blindly delete all
14430 breakpoints.
14431 (delete_lwp_callback): New.
14432 (linux_mourn): Delete all lwps of the process that is gone.
14433 (linux_wait_1): Don't delete the last lwp of the process here.
14434 * mem-break.h (mark_breakpoints_out): Declare.
14435 * mem-break.c (mark_breakpoints_out): New.
14436 (free_all_breakpoints): Use it.
14437 * server.c (handle_target_event): If the process is gone, mark
14438 breakpoints out.
14439 * thread-db.c (struct thread_db) <create_bp>: New field.
14440 (thread_db_enable_reporting): Fix prototype. Store a thread event
14441 breakpoint reference in the thread_db struct.
14442 (thread_db_load_search): Clear the thread_db object.
14443 (try_thread_db_load_1): Ditto.
14444 (switch_to_process): New.
14445 (disable_thread_event_reporting): Use it.
14446 (remove_thread_event_breakpoints): New.
14447 (thread_db_detach, thread_db_mourn): Use it.
14448
14449 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14450
14451 * linux-low.c (linux_enable_event_reporting): New.
14452 (linux_wait_for_event_1, handle_extended_wait): Use it.
14453
14454 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14455
14456 * linux-low.c (linux_kill_one_lwp, linux_kill)
14457 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14458 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14459 SIGSTOP even if the LWP is stopped.
14460 (send_sigstop_callback): New.
14461 (stop_all_lwps): Use send_sigstop_callback instead.
14462 (linux_resume_one_thread): Adjust.
14463 (proceed_one_lwp): Still proceed an LWP that the client has
14464 requested to stop, if we haven't reported it as stopped yet. Make
14465 sure that LWPs the client want stopped, have a pending SIGSTOP.
14466
14467 2010-04-26 Doug Evans <dje@google.com>
14468
14469 * server.c (handle_general_set): Make static.
14470
14471 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14472 Print received char after testing for error/eof instead of before.
14473 (input_interrupt): Tweak comment.
14474
14475 2010-04-23 Doug Evans <dje@google.com>
14476
14477 * server.c (start_inferior): Print inferior argv if --debug.
14478
14479 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14480
14481 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14482 * nto-x86-low.c: Include server.h
14483
14484 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14485
14486 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14487 be consistent with other sources of this directory.
14488 (init_registers_amd64): Correct name of source file of this function
14489 in the comment.
14490
14491 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14492
14493 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14494 64-bit executables.
14495
14496 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14497
14498 * win32-i386-low.c: Add 64-bit support.
14499 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14500 (init_registers_amd64): Declare.
14501 (mappings): Add 64-bit version of array.
14502 (init_windows_x86): New function.
14503 (the_low_target): Change init_arch field to init_windows_x86.
14504
14505 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14506
14507 * win32-low.c: Adapt to support also 64-bit architecture.
14508 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14509 (get_image_name): Use SIZE_T type for local variable `done'.
14510 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14511 (toolhelp_get_dll_name): Idem.
14512 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14513 Use uintptr_t typecast to avoid warning.
14514 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14515 (handle_exception): Use phex_nz to avoid warning.
14516 (win32_wait): Remove unused local variable `process'.
14517
14518 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14519
14520 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14521 `amd64-avx.o'.
14522
14523 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14524
14525 * configure.ac: Use `ws2_32' library for srv_mingw.
14526 * configure: Regenerate.
14527 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14528 * remote-utils.c: Likewise.
14529
14530 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14531
14532 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14533 if __x86_64__ is defined.
14534
14535 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14536
14537 * configure: Regenerate.
14538
14539 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14540
14541 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14542 * target.h (target_ops): New get_tib_address field.
14543 * win32-low.h (win32_thread_info): Add thread_local_base field.
14544 * win32-low.c (child_add_thread): Add tlb argument.
14545 Set thread_local_base field to TLB.
14546 (get_child_debug_event): Adapt to child_add_thread change.
14547 (win32_get_tib_address): New function.
14548 (win32_target_ops): Set get_tib_address field to
14549 win32_get_tib_address.
14550 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14551
14552 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14553
14554 * linux-low.c (linux_mourn): Also remove the process.
14555 * server.c (handle_target_event): Don't remove the process here.
14556 * nto-low.c (nto_mourn): New.
14557 (nto_target_ops): Install it.
14558 * spu-low.c (spu_mourn): New.
14559 (spu_target_ops): Install it.
14560 * win32-low.c (win32_mourn): New.
14561 (win32_target_ops): Install it.
14562
14563 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14564
14565 * server.h (buffer_xml_printf): Remove redundant `;'.
14566
14567 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14568
14569 * regcache.c (set_register_cache): Invalidate regcaches before
14570 changing the register cache layout.
14571 (regcache_invalidate_one): Allow a NULL regcache.
14572 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14573 regcaches before changing the register cache layout or the target
14574 regsets.
14575
14576 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14577
14578 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14579 variable warning on Linux/x86-64.
14580
14581 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14582
14583 GDBserver disconnected tracing support.
14584
14585 * linux-low.c (linux_remove_process): Delete.
14586 (add_lwp): Don't set last_resume_kind here.
14587 (linux_kill): Use `mourn'.
14588 (linux_detach): Use `thread_db_detach', and `mourn'.
14589 (linux_mourn): New.
14590 (linux_attach_lwp_1): Adjust comment.
14591 (linux_attach): last_resume_kind moved the thread_info; adjust.
14592 (status_pending_p_callback): Adjust.
14593 (linux_wait_for_event_1): Adjust.
14594 (count_events_callback, select_singlestep_lwp_callback)
14595 (select_event_lwp_callback, cancel_breakpoints_callback)
14596 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14597 (proceed_one_lwp): Adjust.
14598 (linux_async): Add debug output.
14599 (linux_thread_stopped): New.
14600 (linux_pause_all): New.
14601 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14602 linux_pause_all.
14603 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14604 (thread_db_free): Delete declaration.
14605 (thread_db_detach, thread_db_mourn): Declare.
14606 * thread-db.c (thread_db_init): Use thread_db_mourn.
14607 (thread_db_free): Delete, split in two.
14608 (disable_thread_event_reporting): New.
14609 (thread_db_detach): New.
14610 (thread_db_mourn): New.
14611
14612 * server.h (struct thread_info) <last_resume_kind>: New field.
14613 <attached>: Add comment.
14614 <gdb_detached>: New field.
14615 (handler_func): Change return type to int.
14616 (handle_serial_event, handle_target_event): Ditto.
14617 (gdb_connected): Declare.
14618 (tracing): Delete.
14619 (disconnected_tracing): Declare.
14620 (stop_tracing): Declare.
14621
14622 * server.c (handle_query) <qSupported>: Report support for
14623 disconnected tracing.
14624 (queue_stop_reply_callback): Account for running threads.
14625 (gdb_wants_thread_stopped): New.
14626 (gdb_wants_all_threads_stopped): New.
14627 (gdb_reattached_process): New.
14628 (handle_status): Clear the `gdb_detached' flag of all processes.
14629 In all-stop, stop all threads.
14630 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14631 (process_serial_event): If the remote connection breaks, or if an
14632 exit was forced with "monitor exit", force an event loop exit.
14633 Handle disconnected tracing on detach.
14634 (handle_serial_event): Adjust.
14635 (handle_target_event): If GDB isn't connected, forward events back
14636 to the inferior, unless the last process exited, in which case,
14637 exit gdbserver. Adjust interface.
14638
14639 * remote-utils.c (remote_open): Don't block in accept. Instead
14640 register an event loop source on the listen socket file
14641 descriptor. Refactor bits into ...
14642 (listen_desc): ... this new global.
14643 (gdb_connected): ... this new function.
14644 (enable_async_notification): ... this new function.
14645 (handle_accept_event): ... this new function.
14646 (remote_close): Clear remote_desc.
14647
14648 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14649
14650 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14651 New fields.
14652 (mourn_inferior): Define.
14653 (target_process_qsupported): Avoid the dangling else problem.
14654 (thread_stopped): Define.
14655 (pause_all): Define.
14656 (target_waitstatus_to_string): Declare.
14657 * target.c (target_waitstatus_to_string): New.
14658
14659 * tracepoint.c (tracing): Make extern.
14660 (disconnected_tracing): New.
14661 (stop_tracing): Make extern. Handle tracing stops due to GDB
14662 disconnecting.
14663 (cmd_qtdisconnected): New.
14664 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14665 (handle_tracepoint_general_set): Handle QTDisconnected.
14666
14667 * event-loop.c (event_handler_func): Change return type to int.
14668 (process_event): Bail out if the event handler wants the event
14669 loop to stop.
14670 (handle_file_event): Ditto.
14671 (start_event_loop): Bail out if the event handler wants the event
14672 loop to stop.
14673
14674 * nto-low.c (nto_target_ops): Adjust.
14675 * spu-low.c (spu_wait): Don't remove the process here.
14676 (spu_target_ops): Adjust.
14677 * win32-low.c (win32_wait): Don't remove the process here.
14678 (win32_target_ops): Adjust.
14679
14680 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14681
14682 * regcache.c (realloc_register_cache): Invalidate inferior's
14683 regcache before recreating it.
14684
14685 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14686
14687 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14688
14689 2010-04-09 Stan Shebs <stan@codesourcery.com>
14690 Pedro Alves <pedro@codesourcery.com>
14691
14692 * server.h (LONGEST): New.
14693 (struct thread_info) <while_stepping>: New field.
14694 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14695 Declare.
14696 (initialize_tracepoint, handle_tracepoint_general_set)
14697 (handle_tracepoint_query, tracepoint_finished_step)
14698 (tracepoint_was_hit, release_while_stepping_state_list):
14699 (current_traceframe): Declare.
14700 * server.c (handle_general_set): Handle tracepoint packets.
14701 (read_memory): New.
14702 (write_memory): New.
14703 (handle_search_memory_1): Use read_memory.
14704 (handle_query): Report support for conditional tracepoints, trace
14705 state variables, and tracepoint sources. Handle tracepoint
14706 queries.
14707 (main): Initialize the tracepoints module.
14708 (process_serial_event): Handle traceframe reads/writes.
14709
14710 * linux-low.c (handle_tracepoints): New.
14711 (linux_wait_1): Call it.
14712 (linux_resume_one_lwp): Handle while-stepping.
14713 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14714 (linux_target_ops): Install them.
14715 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14716 New field.
14717 * linux-x86-low.c (x86_supports_tracepoints): New.
14718 (the_low_target). Install it.
14719
14720 * mem-break.h (delete_breakpoint): Declare.
14721 * mem-break.c (delete_breakpoint): Make external.
14722
14723 * target.h (struct target_ops): Add `supports_tracepoints',
14724 `read_pc', and `write_pc' fields.
14725 (target_supports_tracepoints): Define.
14726 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14727 (phex_nz): New.
14728
14729 * regcache.h (struct regcache) <registers_owned>: New field.
14730 (init_register_cache, regcache_cpy): Declare.
14731 (regcache_read_pc, regcache_write_pc): Declare.
14732 (register_cache_size): Declare.
14733 (supply_regblock): Declare.
14734 * regcache.c (init_register_cache): New.
14735 (new_register_cache): Use it.
14736 (regcache_cpy): New.
14737 (register_cache_size): New.
14738 (supply_regblock): New.
14739 (regcache_read_pc, regcache_write_pc): New.
14740
14741 * tracepoint.c: New.
14742
14743 * Makefile.in (OBS): Add tracepoint.o.
14744 (tracepoint.o): New rule.
14745
14746 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14747
14748 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14749 (i386-mmx.o): New.
14750 (i386-mmx.c): Likewise.
14751 (i386-mmx-linux.o): Likewise.
14752 (i386-mmx-linux.c): Likewise.
14753
14754 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14755 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14756 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14757 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14758
14759 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14760 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14761 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14762
14763 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14764
14765 * Makefile.in (clean): Updated.
14766 (i386-avx.o): New.
14767 (i386-avx.c): Likewise.
14768 (i386-avx-linux.o): Likewise.
14769 (i386-avx-linux.c): Likewise.
14770 (amd64-avx.o): Likewise.
14771 (amd64-avx.c): Likewise.
14772 (amd64-avx-linux.o): Likewise.
14773 (amd64-avx-linux.c): Likewise.
14774
14775 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14776 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14777 (srv_amd64_regobj): Add amd64-avx.o.
14778 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14779 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14780 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14781 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14782 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14783 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14784 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14785
14786 * i387-fp.c: Include "i386-xstate.h".
14787 (i387_xsave): New.
14788 (i387_cache_to_xsave): Likewise.
14789 (i387_xsave_to_cache): Likewise.
14790 (x86_xcr0): Likewise.
14791
14792 * i387-fp.h (i387_cache_to_xsave): Likewise.
14793 (i387_xsave_to_cache): Likewise.
14794 (x86_xcr0): Likewise.
14795
14796 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14797 * linux-crisv32-low.c (target_regsets): Likewise.
14798 * linux-m68k-low.c (target_regsets): Likewise.
14799 * linux-mips-low.c (target_regsets): Likewise.
14800 * linux-ppc-low.c (target_regsets): Likewise.
14801 * linux-s390-low.c (target_regsets): Likewise.
14802 * linux-sh-low.c (target_regsets): Likewise.
14803 * linux-sparc-low.c (target_regsets): Likewise.
14804 * linux-xtensa-low.c (target_regsets): Likewise.
14805
14806 * linux-low.c: Include <sys/uio.h>.
14807 (regsets_fetch_inferior_registers): Support nt_type.
14808 (regsets_store_inferior_registers): Likewise.
14809 (linux_process_qsupported): New.
14810 (linux_target_ops): Add linux_process_qsupported.
14811
14812 * linux-low.h (regset_info): Add nt_type.
14813 (linux_target_ops): Add process_qsupported.
14814
14815 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14816 and <sys/uio.h>.
14817 (init_registers_i386_avx_linux): New.
14818 (init_registers_amd64_avx_linux): Likewise.
14819 (xmltarget_i386_linux_no_xml): Likewise.
14820 (xmltarget_amd64_linux_no_xml): Likewise.
14821 (PTRACE_GETREGSET): Likewise.
14822 (PTRACE_SETREGSET): Likewise.
14823 (x86_fill_xstateregset): Likewise.
14824 (x86_store_xstateregset): Likewise.
14825 (use_xml): Likewise.
14826 (x86_linux_update_xmltarget): Likewise.
14827 (x86_linux_process_qsupported): Likewise.
14828 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14829 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14830 init_registers_i386_linux here. Call
14831 x86_linux_update_xmltarget.
14832 (the_low_target): Add x86_linux_process_qsupported.
14833
14834 * server.c (handle_query): Call target_process_qsupported.
14835
14836 * target.h (target_ops): Add process_qsupported.
14837 (target_process_qsupported): New.
14838
14839 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14840
14841 * inferiors.c (add_thread): Set last_status kind to
14842 TARGET_WAITKIND_IGNORE.
14843 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14844 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14845 (linux_wait_1): Move `thread' local definition to block that uses
14846 it. Don't NULL initialize `event_child'.
14847 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14848 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14849 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14850
14851 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14852
14853 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14854 an extended waitstatus, or by a watchpoint.
14855 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14856 thread was stepping or has been stopped by a watchpoint.
14857
14858 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14859
14860 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14861 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14862 of another, then delete the previous, and validate all
14863 breakpoints.
14864 (validate_inserted_breakpoint): New.
14865 (delete_disabled_breakpoints): New.
14866 (validate_breakpoints): New.
14867 (check_mem_read): Validate breakpoints before trusting their
14868 shadow. Delete disabled breakpoints.
14869 (check_mem_write): Validate breakpoints before trusting they
14870 should be inserted. Delete disabled breakpoints.
14871 * mem-break.h (validate_breakpoints):
14872 * server.c (handle_query): Validate breakpoints when we see a
14873 qSymbol query.
14874
14875 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14876
14877 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14878 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14879 if we could tell there's a GDB breakpoint at stop_pc.
14880 (need_step_over_p): Don't do a step over if we find a GDB
14881 breakpoint at the resume PC.
14882
14883 * mem-break.c (struct raw_breakpoint): New.
14884 (enum bkpt_type): New type `gdb_breakpoint'.
14885 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14886 fields. New field `raw'.
14887 (find_raw_breakpoint_at): New.
14888 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14889 breakpoint instead.
14890 (set_breakpoint_at): Adjust.
14891 (delete_raw_breakpoint): New.
14892 (release_breakpoint): New.
14893 (delete_breakpoint): Rename to...
14894 (delete_breakpoint_1): ... this. Add proc parameter. Use
14895 release_breakpoint. Return ENOENT.
14896 (delete_breakpoint): Reimplement.
14897 (find_breakpoint_at): Delete.
14898 (find_gdb_breakpoint_at): New.
14899 (delete_breakpoint_at): Delete.
14900 (set_gdb_breakpoint_at): New.
14901 (delete_gdb_breakpoint_at): New.
14902 (gdb_breakpoint_here): New.
14903 (set_reinsert_breakpoint): Use release_breakpoint.
14904 (uninsert_breakpoint): Rename to ...
14905 (uninsert_raw_breakpoint): ... this.
14906 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14907 (reinsert_raw_breakpoint): Change parameter type to
14908 raw_breakpoint.
14909 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14910 instead.
14911 (check_breakpoints): Adjust. Use release_breakpoint.
14912 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14913 (breakpoint_inserted_here): Ditto.
14914 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14915 Don't trust the breakpoint's shadow if it is not inserted.
14916 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14917 (delete_all_breakpoints): Adjust.
14918 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14919 use delete_breakpoint_1.
14920
14921 * mem-break.h (breakpoints_supported): Delete declaration.
14922 (set_gdb_breakpoint_at): Declare.
14923 (gdb_breakpoint_here): Declare.
14924 (delete_breakpoint_at): Delete.
14925 (delete_gdb_breakpoint_at): Declare.
14926
14927 * server.h (struct raw_breakpoint): Forward declare.
14928 (struct process_info): New field `raw_breakpoints'.
14929
14930 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14931 breakpoints.
14932
14933 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14934
14935 * linux-low.c (status_pending_p_callback): Fix comment.
14936 (linux_wait_for_event_1): Move most of the internal breakpoint
14937 handling from here...
14938 (linux_wait_1): ... to here.
14939 (count_events_callback): New.
14940 (select_singlestep_lwp_callback): New.
14941 (select_event_lwp_callback): New.
14942 (cancel_breakpoints_callback): New.
14943 (select_event_lwp): New.
14944 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14945 priority to all LWPs that have had events that should be reported
14946 to the client. Cancel breakpoints when about to reporting the
14947 event to the client, not while stopping lwps. No longer cancel
14948 finished single-steps here.
14949 (cancel_finished_single_step): Delete.
14950 (cancel_finished_single_steps): Delete.
14951
14952 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14953
14954 * mem-break.c (enum bkpt_type): New.
14955 (struct breakpoint): New field `type'.
14956 (set_breakpoint_at): Change return type to struct breakpoint
14957 pointer. Set type to `other_breakpoint' by default.
14958 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14959 in the breakpoint list.
14960 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14961 (reinsert_breakpoint): Rename to ...
14962 (reinsert_raw_breakpoint): ... this.
14963 (reinsert_breakpoints_at): Adjust.
14964 * mem-break.h (struct breakpoint): Declare.
14965 (set_breakpoint_at): Change return type to struct breakpoint
14966 pointer.
14967
14968 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14969
14970 * server.c (handle_query): Assign, not compare.
14971
14972 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14973
14974 Teach linux gdbserver to step-over-breakpoints.
14975
14976 * linux-low.c (can_hardware_single_step): New.
14977 (supports_breakpoints): New.
14978 (handle_extended_wait): If stopping threads, read the stop pc of
14979 the new cloned LWP.
14980 (get_pc): New.
14981 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14982 low target doesn't support retrieving the PC.
14983 (add_lwp): Set last_resume_kind to resume_continue.
14984 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14985 (linux_attach): Don't clear stop_expected. Set the lwp's
14986 last_resume_kind to resume_stop.
14987 (linux_detach_one_lwp): Don't check for removed breakpoints.
14988 (check_removed_breakpoint): Delete.
14989 (status_pending_p): Rename to ...
14990 (status_pending_p_callback): ... this. Don't check for removed
14991 breakpoints. Don't consider threads that are stopped from GDB's
14992 perspective.
14993 (linux_wait_for_lwp): Always read the stop_pc here.
14994 (cancel_breakpoint): New.
14995 (step_over_bkpt): New global.
14996 (linux_wait_for_event_1): Implement stepping over breakpoints.
14997 (gdb_wants_lwp_stopped): New.
14998 (gdb_wants_all_stopped): New.
14999 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15000 single-step traps here. Store the thread's last reported target
15001 wait status.
15002 (send_sigstop): Don't clear stop_expected. Always set it,
15003 instead.
15004 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15005 (cancel_finished_single_step): New.
15006 (cancel_finished_single_steps): New.
15007 (wait_for_sigstop): Don't cancel finished single-step traps here.
15008 (linux_resume_one_lwp): Don't check for removed breakpoints.
15009 Don't set `step' on non-hardware step archs.
15010 (linux_set_resume_request): Ignore resume_stop requests if already
15011 stopping or stopped. Set the lwp's last_resume_kind.
15012 (resume_status_pending_p): Don't check for removed breakpoints.
15013 (need_step_over_p): New.
15014 (start_step_over): New.
15015 (finish_step_over): New.
15016 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15017 requests. Clear the thread's last reported target waitstatus.
15018 Don't use the `suspended' flag. Don't consider pending breakpoints.
15019 (linux_resume): Start a step-over if necessary.
15020 (proceed_one_lwp): New.
15021 (proceed_all_lwps): New.
15022 (unstop_all_lwps): New.
15023 * linux-low.h (struct lwp_info): Rewrite comment for the
15024 `suspended' flag. Add the `stop_pc' field. Delete the
15025 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15026 Add `'last_resume_kind' and `need_step_over' fields.
15027 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15028 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15029 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15030 (set_raw_breakpoint_at): New.
15031 (set_breakpoint_at): Rewrite to use it.
15032 (reinsert_breakpoint_handler): Delete.
15033 (set_reinsert_breakpoint): New.
15034 (reinsert_breakpoint_by_bp): Delete.
15035 (delete_reinsert_breakpoints): New.
15036 (uninsert_breakpoint): Rewrite.
15037 (uninsert_breakpoints_at): New.
15038 (reinsert_breakpoint): Rewrite.
15039 (reinsert_breakpoints_at): New.
15040 (check_breakpoints): Rewrite.
15041 (breakpoint_here): New.
15042 (breakpoint_inserted_here): New.
15043 (check_mem_read): Adjust.
15044 * mem-break.h (breakpoints_supported, breakpoint_here)
15045 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15046 (reinsert_breakpoint_by_bp): Delete declaration.
15047 (delete_reinsert_breakpoints): Declare.
15048 (reinsert_breakpoint): Delete declaration.
15049 (reinsert_breakpoints_at): Declare.
15050 (uninsert_breakpoint): Delete declaration.
15051 (uninsert_breakpoints_at): Declare.
15052 (check_breakpoints): Adjust prototype.
15053 * server.h: Adjust include order.
15054 (struct thread_info): Declare here. Add a `last_status' field.
15055
15056 2010-03-23 Michael Snyder <msnyder@vmware.com>
15057
15058 * server.c (crc32): New function.
15059 (handle_query): Add handling for 'qCRC:' request.
15060
15061 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15062
15063 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15064 lwp had been stopped by a watchpoint.
15065
15066 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15067
15068 * server.h (internal_error): Declare.
15069 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15070 * utils.c (internal_error): New function.
15071
15072 2010-03-15 Andreas Schwab <schwab@redhat.com>
15073
15074 * configure.srv: Fix typo setting srv_regobj.
15075
15076 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15077
15078 * linux-low.c (fetch_register): Avoid passing a non string literal
15079 format to `error'.
15080 (usr_store_inferior_registers): Ditto.
15081
15082 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15083
15084 * linux-low.c (linux_write_memory): Bail out early if peeking
15085 memory failed.
15086
15087 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15088
15089 * linux-low.h (struct lwp_info): New fields
15090 `stopped_by_watchpoint' and `stopped_data_address'.
15091 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15092 here, and cache them in the lwp object.
15093 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15094 directly.
15095 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15096 field.
15097 (linux_stopped_by_watchpoint): Rewrite.
15098 (linux_stopped_data_address): Rewrite.
15099
15100 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15101
15102 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15103 switching the current inferior, not before.
15104
15105 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15106
15107 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15108 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15109 i386-linux.c and amd64-linux.c.
15110 (reg-i386.o): Removed.
15111 (reg-i386.c): Likewise.
15112 (reg-i386-linux.o): Likewise.
15113 (reg-i386-linux.c): Likewise.
15114 (reg-x86-64.o): Likewise.
15115 (reg-x86-64.c): Likewise.
15116 (reg-x86-64-linux.o): Likewise.
15117 (reg-x86-64-linux.c): Likewise.
15118 (i386.o): New.
15119 (i386.c): Likewise.
15120 (i386-linux.o): Likewise.
15121 (i386-linux.c): Likewise.
15122 (amd64.o): Likewise.
15123 (amd64.c): Likewise.
15124 (amd64-linux.o): Likewise.
15125 (amd64-linux.c): Likewise.
15126
15127 * configure.srv (srv_i386_regobj): New.
15128 (srv_i386_linux_regobj): Likewise.
15129 (srv_amd64_regobj): Likewise.
15130 (srv_amd64_linux_regobj): Likewise.
15131 (srv_i386_32bit_xmlfiles): Likewise.
15132 (srv_i386_64bit_xmlfiles): Likewise.
15133 (srv_i386_xmlfiles): Likewise.
15134 (srv_amd64_xmlfiles): Likewise.
15135 (srv_i386_linux_xmlfiles): Likewise.
15136 (srv_amd64_linux_xmlfiles): Likewise.
15137 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15138 srv_xmlfiles to $srv_i386_xmlfiles.
15139 (i[34567]86-*-mingw32ce*): Likewise.
15140 (i[34567]86-*-mingw*): Likewise.
15141 (i[34567]86-*-nto*): Likewise.
15142 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15143 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15144 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15145 (x86_64-*-linux*): Likewise.
15146
15147 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15148 (init_registers_amd64_linux): New.
15149 (x86_arch_setup): Replace init_registers_x86_64_linux with
15150 init_registers_amd64_linux.
15151
15152 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15153
15154 * configure.ac: Check for libdl. If it is not available link against
15155 static libthread_db.
15156 * configure: Regenerate.
15157
15158 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15159
15160 PR9605
15161
15162 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15163 handing a read watchpoint.
15164 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15165
15166 2010-02-12 Doug Evans <dje@google.com>
15167
15168 * linux-low.c (linux_supports_tracefork_flag): Document.
15169 (linux_look_up_symbols): Add comment.
15170
15171 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15172
15173 * regcache.c (supply_register): Clear regcache if buf is NULL.
15174
15175 2010-02-02 Nicolas Roche <roche@sourceware.org>
15176 Joel Brobecker <brobecker@adacore.com>
15177
15178 * inferiors.c (find_inferior): Add function documentation.
15179 (unloaded_dll): Handle the case where the unloaded dll has not
15180 been previously registered in the dll list.
15181
15182 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15185 (thumb2_breakpoint): New.
15186 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15187
15188 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15189
15190 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15191 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15192 breakpoints.
15193
15194 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15195
15196 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15197
15198 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15199
15200 * linux-s390-low.c (s390_collect_ptrace_register)
15201 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15202
15203 2010-01-21 Doug Evans <dje@google.com>
15204
15205 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15206 (PTRACE_ARG4_TYPE): New macro.
15207 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15208 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15209 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15210 (usr_store_inferior_registers): Ditto.
15211 (linux_read_memory, linux_write_memory): Ditto.
15212 (linux_test_for_tracefork): Ditto.
15213
15214 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15215 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15216
15217 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15218
15219 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15220 target.
15221
15222 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15223
15224 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15225 prototype to take a regcache. Adjust.
15226
15227 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15228
15229 * regcache.h (struct thread_info): Forward declare.
15230 (struct regcache): New.
15231 (new_register_cache): Adjust prototype.
15232 (get_thread_regcache): Declare.
15233 (free_register_cache): Adjust prototype.
15234 (registers_to_string, registers_from_string): Ditto.
15235 (supply_register, supply_register_by_name, collect_register)
15236 (collect_register_as_string, collect_register_by_name): Ditto.
15237 * regcache.c (struct inferior_regcache_data): Delete.
15238 (get_regcache): Rename to ...
15239 (get_thread_regcache): ... this. Adjust. Switch inferior before
15240 fetching registers.
15241 (regcache_invalidate_one): Adjust.
15242 (regcache_invalidate): Fix prototype.
15243 (new_register_cache): Return the new register cache.
15244 (free_register_cache): Change prototype.
15245 (realloc_register_cache): Adjust.
15246 (registers_to_string): Change prototype to take a regcache. Adjust.
15247 (registers_from_string): Ditto.
15248 (register_data): Ditto.
15249 (supply_register): Ditto.
15250 (supply_register_by_name): Ditto.
15251 (collect_register): Ditto.
15252 (collect_register_as_string): Ditto.
15253 (collect_register_by_name): Ditto.
15254 * server.c (process_serial_event): Adjust.
15255 * linux-low.h (regset_fill_func, regset_store_func): Change
15256 prototype.
15257 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15258 Change prototype.
15259 * linux-low.c (get_stop_pc): Adjust.
15260 (check_removed_breakpoint): Adjust.
15261 (linux_wait_for_event): Adjust.
15262 (linux_resume_one_lwp): Adjust.
15263 (fetch_register): Add regcache parameter. Adjust.
15264 (usr_store_inferior_registers): Ditto.
15265 (regsets_fetch_inferior_registers): Ditto.
15266 (regsets_store_inferior_registers): Ditto.
15267 (linux_fetch_registers, linux_store_registers): Ditto.
15268 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15269 regcache. Adjust.
15270 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15271 Ditto.
15272 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15273 prototype to take a regcache.
15274 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15275 * remote-utils.c (convert_ascii_to_int, outreg)
15276 (prepare_resume_reply): Change prototype to take a regcache.
15277 Adjust.
15278 * target.h (struct target_ops) <fetch_registers, store_registers>:
15279 Change prototype to take a regcache.
15280 (fetch_inferior_registers, store_inferior_registers): Change
15281 prototype to take a regcache. Adjust.
15282 * proc-service.c (ps_lgetregs): Adjust.
15283 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15284 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15285 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15286 take a regcache. Adjust.
15287 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15288 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15289 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15290 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15291 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15292 (cris_cannot_fetch_register):
15293 (cris_breakpoint_at): Change prototype to take a regcache.
15294 Adjust.
15295 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15296 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15297 to take a regcache. Adjust.
15298 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15299 Adjust.
15300 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15301 take a regcache. Adjust.
15302 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15303 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15304 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15305 * linux-mips-low.c (mips_get_pc):
15306 (mips_set_pc): Change prototype to take a regcache. Adjust.
15307 (mips_reinsert_addr): Adjust.
15308 (mips_collect_register): Change prototype to take a regcache.
15309 Adjust.
15310 (mips_supply_register):
15311 (mips_collect_register_32bit, mips_supply_register_32bit)
15312 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15313 (mips_store_fpregset): Ditto.
15314 * linux-ppc-low.c (ppc_supply_ptrace_register)
15315 (ppc_supply_ptrace_register): Ditto.
15316 (parse_spufs_run): Adjust.
15317 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15318 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15319 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15320 take a regcache. Adjust.
15321 * linux-s390-low.c (s390_collect_ptrace_register)
15322 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15323 (s390_set_pc): Change prototype to take a regcache. Adjust.
15324 (s390_arch_setup): Adjust.
15325 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15326 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15327 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15328 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15329 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15330 regcache. Adjust.
15331 (sparc_breakpoint_at): Adjust.
15332 * linux-xtensa-low.c (xtensa_fill_gregset):
15333 (xtensa_store_gregset):
15334 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15335 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15336 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15337 prototype to take a regcache. Adjust.
15338 * win32-arm-low.c (arm_fetch_inferior_register)
15339 (arm_store_inferior_register): Change prototype to take a
15340 regcache. Adjust.
15341 * win32-i386-low.c (i386_fetch_inferior_register)
15342 (i386_store_inferior_register): Change prototype to take a
15343 regcache. Adjust.
15344 * win32-low.c (child_fetch_inferior_registers)
15345 (child_store_inferior_registers): Change prototype to take a
15346 regcache. Adjust.
15347 (win32_wait): Adjust.
15348 (win32_fetch_inferior_registers): Change prototype to take a
15349 regcache. Adjust.
15350 (win32_store_inferior_registers): Adjust.
15351 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15352 store_inferior_register>: Change prototype to take a regcache.
15353
15354 2010-01-20 Doug Evans <dje@google.com>
15355
15356 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15357 #ifdef.
15358 (linux_wait_for_event1, linux_init_signals): Ditto.
15359 (W_STOPCODE): Provide definition if missing.
15360
15361 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15362
15363 * linux-low.c (linux_core_of_thread): New.
15364 (compare_ints, show_process, list_threads): New.
15365 (linux_qxfer_osdata): Report threads and cores.
15366 (linux_target_op): Register linux_core_of_thread.
15367 * remote-utils.c (prepare_resume_reply): Report the core.
15368 (buffer_xml_printf): Support %d specifier.
15369 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15370 New.
15371 (handle_query): Handle qXfer:threads. Announce availability
15372 thereof.
15373 * target.h (struct target_ops): New field core_of_thread.
15374
15375 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15376
15377 * Makefile.in (clean): Remove new generated files.
15378 (reg-s390.o, reg-s390.c): Remove rules.
15379 (reg-s390x.o, reg-s390x.c): Likewise.
15380 (s390-linux32.o, s390-linux32.c): Add rules.
15381 (s390-linux64.o, s390-linux64.c): Likewise.
15382 (s390x-linux64.o, s390x-linux64.c): Likewise.
15383 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15384 * linux-s390-low.c: Include <elf.h>.
15385 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15386 (init_registers_s390): Remove prototype.
15387 (init_registers_s390x): Likewise.
15388 (init_registers_s390_linux32): Add prototype.
15389 (init_registers_s390_linux64): Likewise.
15390 (init_registers_s390x_linux64): Likewise.
15391 (s390_num_regs_3264): New define.
15392 (s390_regmap_3264): New global variable.
15393 (s390_cannot_fetch_register): Remove obsolete check.
15394 (s390_cannot_store_register): Likewise.
15395 (s390_collect_ptrace_register): Handle upper/lower register halves.
15396 (s390_supply_ptrace_register): Likewise.
15397 (s390_fill_gregset): Update to register number changes.
15398 (s390_get_hwcap): New routine.
15399 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15400 Install appropriate regmap and register set.
15401
15402 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15403
15404 * server.c (gdbserver_version): Update copyright year to 2010.
15405 * gdbreplay.c (gdbreplay_version): Likewise.
15406
15407 2009-12-28 Doug Evans <dje@google.com>
15408
15409 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15410 elf/external.h. Include <elf.h> instead but only if necessary.
15411
15412 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15413
15414 * linux-low.c (linux_remove_process): Remove `detaching'
15415 parameter. Don't release/detach from thread_db here.
15416 (linux_kill): Release/detach from thread_db here, ...
15417 (linux_detach): ... and here, before actually detaching.
15418 (linux_wait_1): ... and here, when a process exits.
15419 * thread-db.c (any_thread_of): New.
15420 (thread_db_free): Switch the current inferior to a thread of the
15421 passed in process.
15422
15423 2009-12-21 Doug Evans <dje@google.com>
15424
15425 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15426
15427 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15428 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15429 warning ifndef __NR_tkill. Move setting of errno there too.
15430 Delete unnecessary resetting of errno after syscall.
15431 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15432
15433 * configure.ac: Check for dladdr.
15434 * config.in: Regenerate.
15435 * configure: Regenerate.
15436 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15437 (try_thread_db_load): Update.
15438
15439 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15440
15441 2009-12-18 Doug Evans <dje@google.com>
15442
15443 * event-loop.c: Include unistd.h if it exists.
15444
15445 * linux-low.c (my_waitpid): Move definition away from being in
15446 between linux_tracefork_child/linux_test_for_tracefork.
15447
15448 * gdb_proc_service.h (psaddr_t): Fix type.
15449 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15450 signature to match glibc.
15451
15452 2009-12-16 Doug Evans <dje@google.com>
15453
15454 * linux-low.c (linux_read_memory): Fix argument to read.
15455
15456 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15457
15458 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15459 events, don't leave current_inferior pointing at null.
15460
15461 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15462
15463 * win32-low.c (LOG): Delete.
15464 (OUTMSG): Output to stderr.
15465 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15466 on compile time LOG macro.
15467 (win32_wait): Fix debug output.
15468
15469 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15470
15471 * win32-low.c (win32_add_one_solib): If the dll name is
15472 "ntdll.dll", prepend the system directory to the dll path.
15473
15474 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15475
15476 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15477
15478 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15479 Vladimir Prus <vladimir@codesourcery.com>
15480
15481 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15482 * configure.ac: Check for __mcoldfire__ and set
15483 gdb_cv_m68k_is_coldfire.
15484 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15485 reg-cf.o and reg-m68k.o.
15486 * configure: Regenerated.
15487
15488 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15489
15490 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15491 Pass it to thread_db_free.
15492 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15493 proper `detaching' argument to linux_remove_process.
15494 * linux-low.h (thread_db_free): Add `detaching' parameter.
15495 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15496 to thread_db_free.
15497 (thread_db_free): Add `detaching' parameter. Only
15498 call td_ta_clear_event if detaching from process.
15499
15500 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15501
15502 * thread-db.c (thread_db_free): Fix typo.
15503
15504 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15505
15506 PR gdb/10838
15507 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15508
15509 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15510
15511 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15512 with an i686 compiler.
15513 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15514 needed.
15515 * configure: Rebuilt.
15516
15517 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15518
15519 PR gdb/10783
15520
15521 * server.c (handle_search_memory_1): Correct read_addr initialization
15522 in loop for searching subsequent chunks.
15523
15524 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15525
15526 * configure.ac: New --with-libthread-db option.
15527 * thread-db.c: Allow direct dependence on libthread_db.
15528 (thread_db_free): Adjust.
15529 * config.in: Regenerate.
15530 * configure: Likewise.
15531
15532 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15533
15534 PR gdb/10757
15535 * thread-db.c (attach_thread): New function.
15536 (maybe_attach_thread): Return success/failure.
15537 (find_new_threads_callback): Adjust.
15538 (thread_db_find_new_threads): Loop until no new threads.
15539
15540 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15541
15542 * proc-service.c (ps_lgetregs): Formatting.
15543
15544 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15545
15546 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15547 * configure.ac: Adjust.
15548 * linux-low.h (struct process_info_private): Move members to struct
15549 thread_db.
15550 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15551 * linux-low.c (linux_remove_process): Adjust.
15552 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15553 * server.c (handle_query): Move code ...
15554 (handle_monitor_command): ... here. New function.
15555 * target.h (struct target_ops): New member.
15556 * thread-db.c (struct thread_db): New.
15557 (libthread_db_search_path): New variable.
15558 (thread_db_create_event, thread_db_enable_reporting)
15559 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15560 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15561 (try_thread_db_load_1, dladdr_to_soname): New functions.
15562 (try_thread_db_load, thread_db_load_search): New functions.
15563 (thread_db_init): Search for libthread_db.
15564 (thread_db_free): New function.
15565 (thread_db_handle_monitor_command): Likewise.
15566 * config.in: Regenerate.
15567 * configure: Regenerate.
15568
15569 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15570
15571 * spu-low.c (spu_kill): Wait for inferior to terminate.
15572 Call clear_inferiors.
15573 (spu_detach): Call clear_inferiors.
15574
15575 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15576
15577 * aclocal.m4: Regenerate.
15578 * config.in: Likewise.
15579 * configure: Likewise.
15580
15581 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15582
15583 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15584 (parse_spufs_run): New function.
15585 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15586 (ppc_breakpoint_at): Handle SPU breakpoints.
15587
15588 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15589
15590 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15591 (SPUFS_MAGIC): Define.
15592 (spu_enumerate_spu_ids): New function.
15593 (linux_qxfer_spu): New function.
15594 (linux_target_ops): Install linux_qxfer_spu.
15595
15596 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15597
15598 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15599 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15600 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15601 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15602 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15603 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15604 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15605 (init_registers_powerpc_cell32l): Add prototype.
15606 (init_registers_powerpc_cell64l): Likewise.
15607 (ppc_arch_setup): Detect Cell/B.E. architecture.
15608
15609 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15610
15611 * Makefile.in (datarootdir): New variable.
15612
15613 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * linux-low.c (linux_write_memory): Update debugging output.
15616 * Makefile.in (clean): Add new descriptions.
15617 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15618 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15619 * configure.srv: Add new files for arm*-*-linux*.
15620 * linux-arm-low.c: Add new declarations.
15621 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15622 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15623 (HWCAP_VFPv3D16): New.
15624 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15625 instead of __IWMMXT__.
15626 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15627 (arm_arch_setup): New.
15628 (target_regsets): Remove #ifdef. Add VFP regset.
15629 (the_low_target): Use arm_arch_setup.
15630
15631 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15632
15633 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15634 the main thread again.
15635
15636 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15637
15638 Adding Neutrino gdbserver.
15639 * configure: Regenerated.
15640 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15641 * configure.srv (i[34567]86-*-nto*): New target.
15642 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15643 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15644 (nto_comctrl) [__QNX__]: New function.
15645 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15646
15647 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15648
15649 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15650 srv_tgtobj.
15651
15652 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15653 Pedro Alves <pedro@codesourcery.com>
15654
15655 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15656 don't support CONTEXT_EXTENDED_REGISTERS.
15657 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15658 (the_low_target): Install them.
15659 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15660 failing with ERROR_PIPE_NOT_CONNECTED.
15661
15662 2009-06-30 Doug Evans <dje@google.com>
15663 Pierre Muller <muller@ics.u-strasbg.fr>
15664
15665 Add h/w watchpoint support to x86-linux, win32-i386.
15666 * Makefile.in (SFILES): Add i386-low.c
15667 (i386_low_h): Define.
15668 (i386-low.o): Add dependencies.
15669 (linux-x86-low.o): Add i386-low.h dependency.
15670 (win32-i386-low.o): Ditto.
15671 * i386-low.c: New file.
15672 * i386-low.h: New file.
15673 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15674 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15675 * linux-low.c (linux_add_process): Initialize arch_private.
15676 (linux_remove_process): Free arch_private.
15677 (add_lwp): Initialize arch_private.
15678 (delete_lwp): Free arch_private.
15679 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15680 provided.
15681 * linux-low.h (process_info_private): New member arch_private.
15682 (lwp_info): New member arch_private.
15683 (linux_target_ops): New members new_process, new_thread,
15684 prepare_to_resume.
15685 (ptid_of): New macro.
15686 * linux-x86-low.c: Include stddef.h, i386-low.h.
15687 (arch_process_info): New struct.
15688 (arch_lwp_info): New struct.
15689 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15690 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15691 (i386_dr_low_get_status): New function.
15692 (x86_insert_point, x86_remove_point): New functions.
15693 (x86_stopped_by_watchpoint): New function.
15694 (x86_stopped_data_address): New function.
15695 (x86_linux_new_process, x86_linux_new_thread): New functions.
15696 (x86_linux_prepare_to_resume): New function.
15697 (the_low_target): Add entries for insert_point, remove_point,
15698 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15699 prepare_to_resume.
15700 * server.c (debug_hw_points): New global.
15701 (monitor_show_help): Document set debug-hw-points.
15702 (handle_query): Process "set debug-hw-points".
15703 * server.h (debug_hw_points): Declare.
15704 (paddress): Declare.
15705 * utils.c (NUMCELLS, CELLSIZE): New macros.
15706 (get_sell, xsnprintf, paddress): New functions.
15707 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15708 remove_point, stopped_by_watchpoint, stopped_data_address.
15709 * win32-i386-low.c: Include i386-low.h.
15710 (debug_reg_state): Replaces dr.
15711 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15712 (i386_dr_low_get_status): New function.
15713 (i386_insert_point, i386_remove_point): New functions.
15714 (i386_stopped_by_watchpoint): New function.
15715 (i386_stopped_data_address): New function.
15716 (i386_initial_stuff): Update.
15717 (get_thread_context,set_thread_context,i386_thread_added): Update.
15718 (the_low_target): Add entries for insert_point,
15719 remove_point, stopped_by_watchpoint, stopped_data_address.
15720 * win32-low.c (win32_insert_watchpoint): New function.
15721 (win32_remove_watchpoint): New function.
15722 (win32_stopped_by_watchpoint): New function.
15723 (win32_stopped_data_address): New function.
15724 (win32_target_ops): Add entries for insert_watchpoint,
15725 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15726 * win32-low.h (win32_target_ops): New members insert_point,
15727 remove_point, stopped_by_watchpoint, stopped_data_address.
15728
15729 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15730
15731 * server.c (process_serial_event): Re-return unsupported, not
15732 error, if the type isn't recognized. Re-allow supporting only
15733 insert or remove packets. Also call require_running for
15734 breakpoints. Add missing break statement to default case. Tidy.
15735 * target.h (struct target_ops): Rename insert_watchpoint to
15736 insert_point, and remove_watchpoint to remove_point.
15737
15738 * linux-low.h (struct linux_target_ops): Likewise.
15739 * linux-low.c (linux_insert_watchpoint): Rename to ...
15740 (linux_insert_point): ... this. Adjust.
15741 (linux_remove_watchpoint): Rename to ...
15742 (linux_remove_point): ... this. Adjust.
15743 (linux_target_ops): Adjust.
15744 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15745 (cris_insert_point): ... this.
15746 (cris_remove_watchpoint): Rename to ...
15747 (cris_remove_point): ... this.
15748 (the_low_target): Adjust.
15749
15750 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15751
15752 * server.c (handle_v_kill): Pass signal_pid to
15753 kill_inferior if multi_process is zero.
15754
15755 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15756
15757 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15758 * target.h (target_ops): Comment for *_watchpoint to make it clear
15759 the functions can get types '0' and '1'.
15760
15761 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15762
15763 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15764 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15765 * regcache.c (get_regcache): Likewise.
15766 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15767 * win32-low.c (child_fetch_inferior_registers): Remove check for
15768 regno 0.
15769
15770 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15771 Pedro Alves <pedro@codesourcery.com>
15772
15773 * target.h (struct target_ops) <supports_multi_process>: New
15774 callback.
15775 (target_supports_multi_process): New.
15776 * server.c (handle_query): Even if GDB reports support, only
15777 enable multi-process if the target also supports it. Report
15778 multi-process support only if the target backend supports it.
15779 * linux-low.c (linux_supports_multi_process): New function.
15780 (linux_target_ops): Install it as target_supports_multi_process
15781 callback.
15782
15783 2009-05-24 Doug Evans <dje@google.com>
15784
15785 Global renaming of find_thread_pid to find_thread_ptid.
15786 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15787 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15788 All callers updated.
15789
15790 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15791 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15792 directly.
15793
15794 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15795 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15796 (linux_resume_one_lwp): Ditto.
15797
15798 2009-05-23 Doug Evans <dje@google.com>
15799
15800 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15801 from struct inferior_list_entry * to struct lwp_info *.
15802 All callers updated.
15803
15804 2009-05-13 Doug Evans <dje@google.com>
15805
15806 * linux-x86-low.c: Don't include assert.h.
15807 (x86_siginfo_fixup): Use fatal, not assert.
15808 (x86_arch_setup): Fix comment.
15809
15810 2009-05-12 Doug Evans <dje@google.com>
15811
15812 Biarch support for i386/amd64 gdbserver.
15813 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15814 Add linux-x86-low.c.
15815 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15816 (linux-x86-low.o): Add.
15817 * linux-x86-64-low.c: Delete.
15818 * linux-i386-low.c: Delete.
15819 * linux-x86-low.c: New file.
15820 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15821 linux-x86-low.o.
15822 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15823 linux-x86-low.o.
15824 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15825 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15826 (linux_child_pid_to_exec_file): New function.
15827 (elf_64_header_p, elf_64_file_p): New functions.
15828 (siginfo_fixup): New function.
15829 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15830 give target a chance to convert layout.
15831 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15832 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15833
15834 2009-05-07 Doug Evans <dje@google.com>
15835
15836 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15837 (regsets_store_inferior_registers): Ditto.
15838
15839 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15840
15841 PR server/10048
15842
15843 * linux-low.c (must_set_ptrace_flags): Delete.
15844 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15845 of the global.
15846 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15847 `lwp->must_set_ptrace_flags' instead.
15848 (linux_wait_for_event_1): Set ptrace options here.
15849 (linux_wait_1): ... not here.
15850
15851 2009-04-30 Doug Evans <dje@google.com>
15852
15853 * inferiors.c (started_inferior_callback): New function.
15854 (attached_inferior_callback): New function.
15855 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15856 * server.c (print_started_pid, print_attached_pid): New functions.
15857 (detach_or_kill_for_exit): New function.
15858 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15859 * server.h (have_started_inferiors_p): Declare.
15860 (have_attached_inferiors_p): Declare.
15861
15862 * inferiors.c (remove_process): Fix memory leak, free process.
15863 * linux-low.c (linux_remove_process): New function.
15864 (linux_kill): Call it instead of remove_process.
15865 (linux_detach, linux_wait_1): Ditto.
15866
15867 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15868
15869 * configure.srv: Add x86 Windows CE target.
15870
15871 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15872
15873 * inferiors.c (get_thread_process): Make global.
15874 * server.h (get_thread_process): Add prototype.
15875 * thread-db.c (find_one_thread): Use get_thread_process
15876 instead of current_process.
15877 (thread_db_get_tls_address): Do not crash if called when
15878 thread layer is not yet initialized.
15879
15880 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15881
15882 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15883 * spu-low.c (current_tid): Rename to ...
15884 (current_ptid): ... this.
15885 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15886 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15887 ptid_get_lwp (current_ptid) instead of current_tid.
15888 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15889 instead of current_tid. Use find_process_pid to verify pid
15890 argument is valid. Pass proper argument to remove_process.
15891 (spu_thread_alive): Compare current_ptid instead of current_tid.
15892 (spu_resume): Likewise.
15893
15894 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15895
15896 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15897 variable.
15898
15899 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15900
15901 Implement the multiprocess extensions, and add linux multiprocess
15902 support.
15903
15904 * server.h (ULONGEST): Declare.
15905 (struct ptid, ptid_t): New.
15906 (minus_one_ptid, null_ptid): Declare.
15907 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15908 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15909 (struct inferior_list_entry): Change `id' type from unsigned from
15910 to ptid_t.
15911 (struct sym_cache, struct breakpoint, struct
15912 process_info_private): Forward declare.
15913 (struct process_info): Declare.
15914 (current_process): Declare.
15915 (all_processes): Declare.
15916 (initialize_inferiors): Declare.
15917 (add_thread): Adjust to use ptid_t.
15918 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15919 (add_process, remove_process, find_thread_pid): Declare.
15920 (find_inferior_id): Adjust to use ptid_t.
15921 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15922 (multi_process): Declare.
15923 (push_event): Adjust to use ptid_t.
15924 (read_ptid, write_ptid): Declare.
15925 (prepare_resume_reply): Adjust to use ptid_t.
15926 (clear_symbol_cache): Declare.
15927 * inferiors.c (all_processes): New.
15928 (null_ptid, minus_one_ptid): New.
15929 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15930 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15931 (add_thread): Change unsigned long to ptid. Remove gdb_id
15932 parameter. Adjust.
15933 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15934 (gdb_id_to_thread): Rename to ...
15935 (find_thread_pid): ... this. Change unsigned long to ptid.
15936 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15937 (loaded_dll, pull_pid_from_list): Adjust.
15938 (add_process, remove_process, find_process_pid)
15939 (get_thread_process, current_process, initialize_inferiors): New.
15940 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15941 (struct target_waitstatus) <related_pid>: Ditto.
15942 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15943 return type to int.
15944 (struct target_ops) <join>: Add `pid' argument.
15945 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15946 (struct target_ops) <wait>: Add `ptid' field. Change return type
15947 to ptid.
15948 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15949 (mywait): Add `ptid' argument. Change return type to ptid_t.
15950 (target_pid_to_str): Declare.
15951 * target.c (set_desired_inferior): Adjust to use ptids.
15952 (mywait): Add new `ptid' argument. Adjust.
15953 (target_pid_to_str): New.
15954 * mem-break.h (free_all_breakpoints): Declare.
15955 * mem-break.c (breakpoints): Delelete.
15956 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15957 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15958 to use per-process breakpoint list.
15959 (free_all_breakpoints): New.
15960 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15961 (symbol_cache, all_symbols_looked_up): Delete.
15962 (hexchars): New.
15963 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15964 read_ptid): New.
15965 (prepare_resume_reply): Change ptid argument's type from unsigned
15966 long to ptid_t. Adjust. Implement W;process and X;process.
15967 (free_sym_cache, clear_symbol_cache): New.
15968 (look_up_one_symbol): Adjust to per-process symbol cache. *
15969 * server.c (cont_thread, general_thread, step_thread): Change type
15970 to ptid_t.
15971 (attached): Delete.
15972 (multi_process): New.
15973 (last_ptid): Change type to ptid_t.
15974 (struct vstop_notif) <ptid>: Change type to ptid_t.
15975 (queue_stop_reply, push_event): Change `ptid' argument's type to
15976 ptid_t.
15977 (discard_queued_stop_replies): Add `pid' argument.
15978 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15979 changes. Don't reference the `attached' global.
15980 (attach_inferior): Adjust to mywait interface changes.
15981 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15982 features. Handle and report "multiprocess+". Handle
15983 "qAttached:PID".
15984 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15985 changes.
15986 (handle_v_kill): New.
15987 (handle_v_stopped): Adjust to use target_pid_to_str.
15988 (handle_v_requests): Allow multiple attaches and runs when
15989 multiprocess extensions are in effect. Handle "vKill".
15990 (myresume): Adjust to use ptids.
15991 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15992 (handle_status): Adjust to discard_queued_stop_replies interface
15993 change.
15994 (first_thread_of, kill_inferior_callback)
15995 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15996 (main): Call initialize_inferiors. Adjust to use ptids, killing
15997 and detaching from all inferiors. Handle multiprocess packet
15998 variants.
15999 * linux-low.h: Include gdb_proc_service.h.
16000 (struct process_info_private): New.
16001 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16002 <lwpid_of>: Use ptid_get_lwp.
16003 (get_lwp_thread): Adjust.
16004 (struct lwp_info): Add `dead' member.
16005 (find_lwp_pid): Declare.
16006 * linux-low.c (thread_db_active): Delete.
16007 (new_inferior): Adjust comment.
16008 (inferior_pid): Delete.
16009 (linux_add_process): New.
16010 (handle_extended_wait): Adjust.
16011 (add_lwp): Change unsigned long to ptid.
16012 (linux_create_inferior): Add process to processes table. Adjust
16013 to use ptids. Don't set new_inferior here.
16014 (linux_attach_lwp): Rename to ...
16015 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16016 it. Adjust to use ptids.
16017 (linux_attach_lwp): New.
16018 (linux_attach): Add process to processes table. Don't set
16019 new_inferior here.
16020 (struct counter): New.
16021 (second_thread_of_pid_p, last_thread_of_process_p): New.
16022 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16023 multiple processes.
16024 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16025 processes. Remove process from process table.
16026 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16027 to multiple processes.
16028 (any_thread_of): New.
16029 (linux_detach): Add `pid' argument, and handle it. Remove process
16030 from processes table.
16031 (linux_join): Add `pid' argument. Handle it.
16032 (linux_thread_alive): Change unsighed long argument to ptid_t.
16033 Consider dead lwps as not being alive.
16034 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16035 threads we're not interested in.
16036 (same_lwp, find_lwp_pid): New.
16037 (linux_wait_for_lwp): Change `pid' argument's type from int to
16038 ptid_t. Adjust.
16039 (linux_wait_for_event): Rename to ...
16040 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16041 from int to ptid_t. Adjust.
16042 (linux_wait_for_event): New.
16043 (linux_wait_1): Add `ptid' argument. Change return type to
16044 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16045 that exit from the process table.
16046 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16047 Adjust.
16048 (mark_lwp_dead): New.
16049 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16050 stopping all threads, mark its main lwp as dead.
16051 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16052 ptids.
16053 (fetch_register, usr_store_inferior_registers)
16054 (regsets_fetch_inferior_registers)
16055 (regsets_store_inferior_registers, linux_read_memory)
16056 (linux_write_memory): Inline `inferior_pid'.
16057 (linux_look_up_symbols): Adjust to use per-process
16058 `thread_db_active'.
16059 (linux_request_interrupt): Adjust to use ptids.
16060 (linux_read_auxv): Inline `inferior_pid'.
16061 (initialize_low): Don't reference thread_db_active.
16062 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16063 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16064 (ps_getpid): Return the pid of the current inferior.
16065 * thread-db.c (proc_handle, thread_agent): Delete.
16066 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16067 per-process data.
16068 (find_one_thread): Change argument type to ptid_t. Adjust to
16069 per-process data.
16070 (maybe_attach_thread): Adjust to per-process data and ptids.
16071 (thread_db_find_new_threads): Ditto.
16072 (thread_db_init): Ditto.
16073 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16074 processes table. Adjust to use ptids.
16075 (spu_kill, spu_detach): Adjust interface. Remove process from
16076 processes table.
16077 (spu_join, spu_thread_alive): Adjust interface.
16078 (spu_wait): Adjust interface. Remove process from processes
16079 table. Adjust to use ptids.
16080 * win32-low.c (current_inferior_tid): Delete.
16081 (current_inferior_ptid): New.
16082 (debug_event_ptid): New.
16083 (thread_rec): Take a ptid. Adjust.
16084 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16085 (child_delete_thread): Ditto.
16086 (do_initial_child_stuff): Add `attached' argument. Add process to
16087 processes table.
16088 (child_fetch_inferior_registers, child_store_inferior_registers):
16089 Adjust.
16090 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16091 (win32_attach): Pass 1 to do_initial_child_stuff.
16092 (win32_kill): Adjust interface. Remove process from processes
16093 table.
16094 (win32_detach): Ditto.
16095 (win32_join): Adjust interface.
16096 (win32_thread_alive): Take a ptid.
16097 (win32_resume): Adjust to use ptids.
16098 (get_child_debug_event): Ditto.
16099 (win32_wait): Adjust interface. Remove exiting process from
16100 processes table.
16101
16102 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16103
16104 Non-stop mode support.
16105
16106 * server.h (non_stop): Declare.
16107 (gdb_client_data, handler_func): Declare.
16108 (delete_file_handler, add_file_handler, start_event_loop):
16109 Declare.
16110 (handle_serial_event, handle_target_event, push_event)
16111 (putpkt_notif): Declare.
16112 * target.h (enum resume_kind): New.
16113 (struct thread_resume): Replace `step' field by `kind' field.
16114 (TARGET_WNOHANG): Define.
16115 (struct target_ops) <wait>: Add `options' argument.
16116 <supports_non_stop, async, start_non_stop>: New fields.
16117 (target_supports_non_stop, target_async): New.
16118 (start_non_stop): Declare.
16119 (mywait): Add `options' argument.
16120 * target.c (mywait): Add `options' argument. Print child exit
16121 notifications here.
16122 (start_non_stop): New.
16123 * server.c (non_stop, own_buf, mem_buf): New globals.
16124 (struct vstop_notif): New.
16125 (notif_queue): New global.
16126 (queue_stop_reply, push_event, discard_queued_stop_replies)
16127 (send_next_stop_reply): New.
16128 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16129 interface changes.
16130 (attach_inferior): In non-stop mode, don't wait for the target
16131 here.
16132 (handle_general_set): Handle QNonStop.
16133 (handle_query): When handling qC, return the current general
16134 thread, instead of the first thread of the list.
16135 (handle_query): If the backend supports non-stop mode, include
16136 QNonStop+ in the qSupported query response.
16137 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16138 and non-stop mode.
16139 (handle_v_attach, handle_v_run): Handle non-stop mode.
16140 (handle_v_stopped): New.
16141 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16142 (myresume): Adjust to use resume_kind. Handle non-stop.
16143 (queue_stop_reply_callback): New.
16144 (handle_status): Handle non-stop mode.
16145 (main): Clear non_stop flag on reconnection. Use the event-loop.
16146 Refactor serial protocol handling from here ...
16147 (process_serial_event): ... to this new function. When GDB
16148 selects any thread, select one here. In non-stop mode, wait until
16149 GDB acks all pending events before exiting.
16150 (handle_serial_event, handle_target_event): New.
16151 * remote-utils.c (remote_open): Install remote_desc in the event
16152 loop.
16153 (remote_close): Remove remote_desc from the event loop.
16154 (putpkt_binary): Rename to...
16155 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16156 (putpkt_binary): New as wrapper around putpkt_binary_1.
16157 (putpkt_notif): New.
16158 (prepare_resume_reply): In non-stop mode, don't change the
16159 general_thread.
16160 * event-loop.c: New.
16161 * Makefile.in (OBJ): Add event-loop.o.
16162 (event-loop.o): New rule.
16163
16164 * linux-low.h (pid_of): Moved here.
16165 (lwpid_of): New.
16166 (get_lwp_thread): Use lwpid_of.
16167 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16168 * linux-low.c (pid_of): Delete.
16169 (inferior_pid): Use lwpid_of.
16170 (linux_event_pipe): New.
16171 (target_is_async_p): New.
16172 (delete_lwp): New.
16173 (handle_extended_wait): Use lwpid_of.
16174 (add_lwp): Don't set lwpid field.
16175 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16176 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16177 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16178 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16179 first. Adjust to linux_wait_for_event interface changes. Use
16180 lwpid_of.
16181 (linux_detach): Don't delete the main lwp here.
16182 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16183 (status_pending_p): Don't consider explicitly suspended lwps.
16184 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16185 pointer. Add OPTIONS argument. Change return type to int. Use
16186 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16187 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16188 pointer. Add status pointer argument. Return a pid instead of a
16189 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16190 changes. In non-stop mode, don't switch to a random thread.
16191 (linux_wait): Rename to...
16192 (linux_wait_1): ... this. Add target_options argument, and handle
16193 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16194 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16195 clean exit and signal exit code. Don't stop all threads in
16196 non-stop mode. In all-stop mode, only stop all threads when
16197 reporting a stop to GDB. Handle explicit thread stop requests.
16198 (async_file_flush, async_file_mark): New.
16199 (linux_wait): New.
16200 (send_sigstop): Use lwpid_of.
16201 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16202 interface changes. In non-stop mode, don't switch to a random
16203 thread.
16204 (linux_resume_one_lwp): Use lwpid_of.
16205 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16206 (linux_resume_one_thread): ... this. Handle resume_stop. In
16207 non-stop mode, don't look for pending flag in all threads.
16208 (resume_status_pending_p): Don't consider explicitly suspended
16209 threads.
16210 (my_waitpid): Reimplement. Emulate __WALL.
16211 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16212 Use lwpid_of.
16213 (sigchld_handler, linux_supports_non_stop, linux_async)
16214 (linux_start_non_stop): New.
16215 (linux_target_ops): Register linux_supports_non_stop, linux_async
16216 and linux_start_non_stop.
16217 (initialize_low): Install SIGCHLD handler.
16218 * thread-db.c (thread_db_create_event, find_one_thread)
16219 (thread_db_get_tls_address): Use lwpid_of.
16220 * win32-low.c (win32_detach): Adjust to use resume_kind.
16221 (win32_wait): Add `options' argument.
16222 * spu-low.c (spu_resume): Adjust to use resume_kind.
16223 (spu_wait): Add `options' argument.
16224
16225 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16226
16227 Decouple target code from remote protocol.
16228
16229 * target.h (enum target_waitkind): New.
16230 (struct target_waitstatus): New.
16231 (struct target_ops) <wait>: Return an unsigned long. Take a
16232 target_waitstatus pointer instead of a char pointer.
16233 (mywait): Likewise.
16234 * target.c (mywait): Change prototype to return an unsigned long.
16235 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16236 * server.h (thread_from_wait, old_thread_from_wait): Delete
16237 declarations.
16238 (prepare_resume_reply): Change prototype to take a
16239 target_waitstatus.
16240 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16241 (last_status, last_ptid): New.
16242 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16243 pid instead of a signal.
16244 (attach_inferior): Remove "status" and "signal" parameters.
16245 Adjust.
16246 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16247 not as an address.
16248 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16249 (handle_v_requests, myresume): Remove "status" and "signal"
16250 parameters. Adjust.
16251 (handle_status): New.
16252 (main): Delete local `status'. Adjust.
16253 * remote-utils.c: Include target.h.
16254 (prepare_resume_reply): Change prototype to take a
16255 target_waitstatus. Adjust.
16256
16257 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16258 interface.
16259 * spu-low.c (spu_wait): Adjust.
16260 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16261 Delete.
16262 (win32_wait): Adjust.
16263
16264 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16265
16266 * target.h (struct thread_resume): Delete leave_stopped member.
16267 (struct target_ops): Add a `n' argument to the `resume' callback.
16268 * server.c (start_inferior): Adjust.
16269 (handle_v_cont, myresume): Adjust.
16270 * linux-low.c (check_removed_breakpoint): Adjust to resume
16271 interface change, and to removed leave_stopped field.
16272 (resume_ptr): Delete.
16273 (struct thread_resume_array): New.
16274 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16275 resume interface change.
16276 (linux_continue_one_thread, linux_queue_one_thread)
16277 (resume_status_pending_p): Check if the resume field is NULL
16278 instead of checking the leave_stopped member.
16279 (linux_resume): Adjust to the target resume interface change.
16280 * spu-low.c (spu_resume): Adjust to the target resume interface
16281 change.
16282 * win32-low.c (win32_detach, win32_resume): Ditto.
16283
16284 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16285
16286 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16287 flag.
16288 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16289 pending.
16290 (linux_continue_one_thread): Only preserve the stepping flag if
16291 there's a pending breakpoint.
16292
16293 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16294
16295 * server.c (main): After the inferior having exited, call
16296 remote_close before exiting gdbserver.
16297
16298 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16299
16300 Fix size of FPSCR in Power 7 processors.
16301 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16302 (PPC_FEATURE_HAS_DFP): New #define.
16303 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16304 size of the FPSCR.
16305
16306 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16307
16308 * server.c (handle_query) Whitespace and formatting.
16309
16310 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16311
16312 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16313 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16314 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16315 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16316 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16317 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16318 Makefile.in, configure.ac: Fix whitespace throughout.
16319 * configure: Regenerate.
16320
16321 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16322
16323 * inferiors.c (find_inferior): Make it safe for the callback
16324 function to delete the currently iterated inferior.
16325
16326 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16327
16328 * Makefile.in (linuw_low_h): Move higher.
16329 (thread-db.o): Depend on $(linux_low_h).
16330
16331 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16332
16333 Rename "process" to "lwp" throughout.
16334
16335 * linux-low.c (all_processes): Rename to...
16336 (all_lwps): ... this.
16337 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16338 (add_process): Rename to ...
16339 (add_lwp): ... this. Adjust.
16340 (linux_create_inferior): Adjust.
16341 (linux_attach_lwp): Adjust.
16342 (linux_attach): Adjust.
16343 (linux_kill_one_process): Rename to ...
16344 (linux_kill_one_lwp): ... this. Adjust.
16345 (linux_kill): Adjust.
16346 (linux_detach_one_process): Rename to ...
16347 (linux_detach_one_lwp): ... this. Adjust.
16348 (linux_detach): Adjust.
16349 (check_removed_breakpoint): Adjust.
16350 (status_pending_p): Adjust.
16351 (linux_wait_for_process): Rename to ...
16352 (linux_wait_for_lwp): ... this. Adjust.
16353 (linux_wait_for_event): Adjust.
16354 (send_sigstop): Adjust.
16355 (wait_for_sigstop): Adjust.
16356 (stop_all_processes): Rename to ...
16357 (stop_all_lwps): ... this.
16358 (linux_resume_one_process): Rename to ...
16359 (linux_resume_one_lwp): ... this. Adjust.
16360 (linux_set_resume_request, linux_continue_one_thread)
16361 (linux_queue_one_thread, resume_status_pending_p)
16362 (usr_store_inferior_registers, regsets_store_inferior_registers)
16363 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16364 Adjust.
16365 * linux-low.h (get_process): Rename to ...
16366 (get_lwp): ... this. Adjust.
16367 (get_thread_process): Rename to ...
16368 (get_thread_lwp): ... this. Adjust.
16369 (get_process_thread): Rename to ...
16370 (get_lwp_thread): ... this. Adjust.
16371 (struct process_info): Rename to ...
16372 (struct lwp_info): ... this.
16373 (all_processes): Rename to ...
16374 (all_lwps): ... this.
16375 * proc-service.c (ps_lgetregs): Adjust.
16376 * thread-db.c (thread_db_create_event, find_one_thread)
16377 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16378
16379 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16380
16381 * server.c (handle_query): Handle "qAttached".
16382
16383 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16384
16385 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16386 GPLv3, update license URL.
16387
16388 2009-03-01 Doug Evans <dje@google.com>
16389
16390 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16391 (server_h): Add gdb_signals.h.
16392 (signals.o): Update.
16393 * server.h (target_signal_from_host,target_signal_to_host_p)
16394 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16395
16396 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16397
16398 * remote-utils.c (getpkt): Also generate remote-debug
16399 information if noack_mode is set.
16400
16401 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16402
16403 * server.c (handle_query): Report qXfer:siginfo:read and
16404 qXfer:siginfo:write as supported and handle them.
16405 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16406 * linux-low.c (linux_xfer_siginfo): New.
16407 (linux_target_ops): Set it.
16408
16409 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16410
16411 * server.c (gdbserver_usage): Mention --remote-debug.
16412 (main): Accept '--remote-debug' switch.
16413
16414 2009-01-18 Doug Evans <dje@google.com>
16415
16416 * regcache.c (new_register_cache): No need to check result of xcalloc.
16417 * server.c (handle_search_memory): Back out calls to xmalloc,
16418 result is checked and error is returned to user upon failure.
16419 (handle_query): Ditto. Add more checks for result of malloc.
16420 (handle_v_cont): Check result of malloc, report error back to
16421 user upon failure.
16422 (handle_v_run): Ditto. Call freeargv.
16423 * server.h (freeargv): Declare.
16424 * utils.c (freeargv): New fn.
16425
16426 2009-01-15 Doug Evans <dje@google.com>
16427
16428 * gdbreplay.c (perror_with_name): Make arg const char *.
16429 * server.h (target_signal_to_name): Make return type const char *.
16430 * thread-db.c (thread_db_err_str): Make return type const char *.
16431 * utils.c (perror_with_name): Make arg const char *.
16432
16433 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16434
16435 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16436 when handling a EXIT_PROCESS_DEBUG_EVENT.
16437
16438 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16439
16440 * gdbreplay.c (gdbreplay_version): Update copyright year.
16441 * server.c (gdbserver_version): Likewise.
16442
16443 2009-01-05 Doug Evans <dje@google.com>
16444
16445 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16446 (handle_extended_wait): Improve comment.
16447
16448 2008-12-13 Doug Evans <dje@google.com>
16449
16450 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16451 * server.h (ATTR_MALLOC): New macro.
16452 (xmalloc,xcalloc,xstrdup): Declare.
16453 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16454 * inferiors.c: Ditto.
16455 * linux-low.c: Ditto.
16456 * mem-break.c: Ditto.
16457 * regcache.c: Ditto.
16458 * remote-utils.c: Ditto.
16459 * server.c: Ditto.
16460 * target.c: Ditto.
16461 * win32-low.c: Ditto.
16462
16463 2008-12-12 Doug Evans <dje@google.com>
16464
16465 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16466 in debugging printf.
16467
16468 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16469
16470 2008-12-09 Doug Evans <dje@google.com>
16471
16472 * linux-low.h (struct process_info): Delete member tid, unused.
16473 * thread-db.c (find_one_thread): Update.
16474 (maybe_attach_thread): Update.
16475
16476 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16477
16478 * target.h (struct target_ops): Add qxfer_osdata member.
16479 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16480 and dirent.h.
16481 (linux_qxfer_osdata): New functions.
16482 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16483 callback.
16484 * server.c (handle_query): Handle "qXfer:osdata:read:".
16485 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16486 (buffer_xml_printf): New functions.
16487 * server.h (struct buffer): New.
16488 (buffer_grow_str, buffer_grow_str0): New macros.
16489 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16490 (buffer_xml_printf): Declare.
16491
16492 2008-11-24 Doug Evans <dje@google.com>
16493
16494 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16495
16496 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16497
16498 * server.c (handle_v_run): Always use the supplied argument list.
16499
16500 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16501
16502 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16503 (xtensa_regmap_table): Add entry for scompare1.
16504
16505 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16506
16507 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16508 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16509 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16510 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16511 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16512 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16513 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16514 XML target descriptions.
16515 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16516 when inferior is running on an ISA 2.05 or later processor. Add
16517 special case to return offset for full 64-bit slot of FPSCR when
16518 in 32-bits.
16519
16520 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16521
16522 * Makefile.in (SFILES, clean): Added sparc64 files.
16523 (reg-sparc64.o, reg-sparc64.c): New.
16524 * configure.srv (sparc*-*-linux*): New configuration.
16525 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16526 syscall arguments for SPARC.
16527 (regsets_store_inferior_registers): Likewise.
16528 * linux-sparc-low.c: New file.
16529
16530 2008-10-21 Doug Evans <dje@google.com>
16531
16532 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16533 (READLINE_DIR,READLINE_DEP): Delete.
16534 (INTERNAL_CFLAGS): Update.
16535 (LINTFLAGS): Update.
16536
16537 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16538
16539 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16540 whole argv from the last run, not just argv[0].
16541
16542 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16543
16544 * regcache.c (new_register_cache): Return NULL if the register
16545 cache size isn't known yet.
16546 (free_register_cache): Avoid dereferencing a NULL regcache.
16547
16548 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16549
16550 * configure.srv: Merge MIPS and MIPS64.
16551
16552 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16553
16554 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16555
16556 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16557
16558 * Makefile.in: Add required vsx dependencies.
16559
16560 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16561 Declare init_registers_powerpc_vsx32l.
16562 Declare init_registers_powerpc_vsx64l.
16563 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16564 (ppc_arch_setup): Check for VSX in hwcap.
16565 (ppc_fill_vsxregset): New function.
16566 (ppc_store_vsxregset): New function.
16567 Add new VSX entry in regset_info target_regsets.
16568
16569 * configure.srv: Add new VSX dependencies.
16570
16571 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16572
16573 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16574 (remote_open): Set or clear transport_is_reliable.
16575 (putpkt_binary): Don't expect acks in noack mode.
16576 (getpkt): Don't send ack/nac in noack mode.
16577 * server.c (handle_general_set): Handle QStartNoAckMode.
16578 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16579 qSupported.
16580 (main): Reset noack_mode on every connection.
16581 * server.h (noack_mode): Declare.
16582
16583 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16584
16585 * Makefile.in (GDBREPLAY_OBS): New variable.
16586 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16587
16588 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16589 Daniel Jacobowitz <dan@codesourcery.com>
16590
16591 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16592 (usr_store_inferior_registers): Likewise.
16593 (regsets_store_inferior_registers): Likewise.
16594
16595 2008-07-31 Rolf Jansen <rj@surtec.com>
16596 Pedro Alves <pedro@codesourcery.com>
16597
16598 * configure.ac: Check for memmem declaration.
16599 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16600 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16601 (disable_packet_qfThreadInfo): Unconditionally compile.
16602 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16603 * configure, config.in: Regenerate.
16604
16605 2008-07-28 Doug Kwan <dougkwan@google.com>
16606
16607 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16608 (linux_write_memory): Remove declaration of errno.
16609
16610 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16611
16612 * linux-low.c (handle_extended_wait): Do not use "status"
16613 variable uninitialized.
16614
16615 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16616
16617 * server.c (handle_v_attach): Inhibit reporting dll changes.
16618
16619 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16620
16621 * remote-utils.c (prepare_resume_reply): If requested, don't
16622 output "thread:TID" in the T stop reply.
16623
16624 * server.c (disable_packet_vCont, disable_packet_Tthread)
16625 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16626 (handle_query): If requested, disable support for qC, qfThreadInfo
16627 and qsThreadInfo.
16628 (handle_v_requests): If requested, disable support for vCont.
16629 (gdbserver_show_disableable): New.
16630 (main): Handle --disable-packet and --disable-packet=LIST.
16631
16632 * server.h (disable_packet_vCont, disable_packet_Tthread)
16633 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16634
16635 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16636
16637 * server.c (gdbserver_usage): Mention --version.
16638
16639 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16640
16641 * Makefile.in (gdbreplay.o): New rule.
16642
16643 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16644
16645 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16646 message, not gdbserver.
16647
16648 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16649 Nathan Sidwell <nathan@codesourcery.com>
16650 Joseph Myers <joseph@codesourcery.com>
16651
16652 * acinclude.m4: Include ../../config/acx.m4.
16653 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16654 * configure, config.in: Regenerate.
16655 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16656 * server.c (gdbserver_version): Print PKGVERSION.
16657 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16658 (main): Adjust gdbserver_usage calls.
16659 * gdbreplay.c (version, host_name): Add declarations.
16660 (gdbreplay_version, gdbreplay_usage): New.
16661 (main): Accept --version and --help options.
16662
16663 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16664
16665 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16666 (arm_breakpoint_at): Handle Thumb.
16667 (the_low_target): Add comment.
16668
16669 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16670
16671 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16672
16673 2008-05-09 Doug Evans <dje@google.com>
16674
16675 * server.h (decode_search_memory_packet): Declare.
16676 * remote-utils.c (decode_search_memory_packet): New fn.
16677 * server.c (handle_search_memory_1): New fn.
16678 (handle_search_memory): New fn.
16679 (handle_query): Process qSearch:memory packets.
16680
16681 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16682
16683 * regcache.c (registers_length): Remove.
16684 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16685 full register packet.
16686 * regcache.h (registers_length): Remove prototype.
16687 * server.h (PBUFSIZ): Define to 16384.
16688
16689 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16690
16691 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16692 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16693 powerpc-64l.o, and powerpc-altivec64l.o.
16694 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16695 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16696 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16697 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16698 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16699 to srv_xmlfiles.
16700
16701 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16702 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16703 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16704 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16705 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16706 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16707 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16708 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16709 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16710 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16711 (clean): Update.
16712
16713 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16714 (init_registers_powerpc_32l): ... this new prototype.
16715 (init_registers_powerpc_32): Remove, replace by ...
16716 (init_registers_powerpc_altivec32l): ... this new prototype.
16717 (init_registers_powerpc_e500): Remove, replace by ...
16718 (init_registers_powerpc_e500l): ... this new prototype.
16719 (init_registers_ppc64): Remove, replace by ...
16720 (init_registers_powerpc_64l): ... this new prototype.
16721 (init_registers_powerpc_64): Remove, replace by ...
16722 (init_registers_powerpc_altivec64l): ... this new prototype.
16723 (ppc_num_regs): Set to 73.
16724 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16725 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16726 (ppc_cannot_store_register): Handle orig_r3 and trap.
16727 (ppc_arch_setup): Update init_registers_... calls.
16728 (ppc_fill_gregset): Handle orig_r3 and trap.
16729
16730 * inferiors.c (clear_inferiors): Reset current_inferior.
16731
16732 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16733
16734 * acinclude.m4: Add override.m4.
16735 * configure: Regenerate.
16736
16737 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16738
16739 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16740 initial call to init_register_ppc64.
16741
16742 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16743
16744 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16745 single powerpc*-*-linux* case.
16746 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16747
16748 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16749
16750 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16751 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16752 from reg_xmlfiles.
16753 * linux-ppc-low.c: Include <elf.h>.
16754 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16755 (ppc_hwcap): New global variable.
16756 (ppc_regmap): Remove __SPE__ #ifdef sections.
16757 (ppc_regmap_e500): New global variable.
16758 (ppc_cannot_store_register): Update __SPE__ special case.
16759 (ppc_get_hwcap): New function.
16760 (ppc_arch_setup): Use it to determine whether inferior supports
16761 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16762 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16763 Do not access registers if target does not support AltiVec.
16764 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16765 Do not access registers if target does not support SPE.
16766 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16767
16768 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * linux-low.c (disabled_regsets, num_regsets): New.
16771 (use_regsets_p): Delete.
16772 (linux_wait_for_process): Clear disabled_regsets.
16773 (regsets_fetch_inferior_registers): Check and set it.
16774 (regsets_store_inferior_registers): Likewise.
16775 (linux_fetch_registers, linux_store_registers): Do not use
16776 use_regsets_p.
16777 (initialize_low): Allocate disabled_regsets.
16778
16779 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16780
16781 * Makefile.in (LIBOBJS): New.
16782 (OBS): Use LIBOBJS.
16783 (memmem.o): New rule.
16784 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16785 * configure: Regenerated.
16786
16787 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16788
16789 * server.c (handle_query): Never return "unsupported" for
16790 qXfer:features:read queries.
16791
16792 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16793
16794 * server.c (get_features_xml): Fix inverted condition.
16795 (handle_query): Always support qXfer:feature:read.
16796
16797 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16798
16799 * server.c (wrapper_argv): New.
16800 (start_inferior): Handle wrapper_argv. If set, expect an extra
16801 trap.
16802 (gdbserver_usage): Document --wrapper.
16803 (main): Parse --wrapper.
16804
16805 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16806
16807 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16808 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16809 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16810 (ppc_set_pc): Likewise.
16811 (ppc_arch_setup): New function.
16812 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16813 of collect_register.
16814 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16815
16816 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16817
16818 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16819 instead of linux-ppc64-low.o.
16820 * linux-ppc64-low.c: Remove file.
16821 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16822 (linux-ppc64-low.o): Remove rule.
16823
16824 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16825 (init_registers_powerpc_64): Likewise.
16826 (ppc_regmap): Conditionally define depending on __powerpc64__.
16827 (ppc_cannot_store_register): Do not special-case "fpscr" when
16828 compiled on __powerpc64__.
16829 (ppc_collect_ptrace_register): New function.
16830 (ppc_supply_ptrace_register): New function.
16831 (ppc_breakpoint): Change type to "unsigned int".
16832 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16833 (the_low_target): Conditionally provide initializers for the
16834 arch_setup member depending on __powerpc64__. Install
16835 collect_ptrace_register and supply_ptrace_register members.
16836
16837 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16838
16839 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16840 * server.c (gdbserver_xmltarget): Define.
16841 (get_features_xml): Use it to replace "target.xml" and arch_string.
16842
16843 * configure.srv: Remove srv_xmltarget. Add XML files that were
16844 mentioned there to srv_xmlfiles instead. Remove conditional tests
16845 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16846 srv_xmlfiles and srv_regobj to include all possible choices.
16847 * configure.ac (srv_xmltarget): Remove.
16848 (srv_xmlfiles): Do not add "target.xml".
16849 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16850 checks for supplementary target information.
16851 * configure: Regenerate.
16852 * Makefile.in (XML_TARGET): Remove.
16853 (target.xml): Remove rule.
16854 (clean): Do not clean up target.xml.
16855 (.PRECIOUS): Do not mention target.xml.
16856
16857 * target.h (struct target_ops): Remove arch_string member.
16858 * linux-low.c (linux_arch_string): Remove.
16859 (linux_target_ops): Remove arch_string initializer.
16860 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16861 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16862 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16863 * spu-low.c (spu_arch_string): Remove.
16864 (spu_target_ops): Remove arch_string initializer.
16865 * win32-low.c (win32_arch_string): Remove.
16866 (win32_target_ops): Remove arch_string initializer.
16867 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16868 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16869 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16870
16871 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16872
16873 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16874 by collect_ptrace_register and supply_ptrace_register hooks.
16875 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16876 instead of checking for the_low_target.left_pad_xfer.
16877 (usr_store_inferior_registers): Use collect_ptrace_register callback
16878 instead of checking for the_low_target.left_pad_xfer.
16879
16880 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16881 (s390_supply_ptrace_register): Likewise.
16882 (s390_fill_gregset): Call s390_collect_ptrace_register.
16883 (the_low_target): Update.
16884
16885 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16886 (ppc_supply_ptrace_register): Likewise.
16887 (the_low_target): Update.
16888
16889 * linux-i386-low.c (the_low_target): Update.
16890 * linux-x86-64-low.c (the_low_target): Update.
16891
16892 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16893
16894 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16895 reg-s390.o and reg-s390x.o.
16896
16897 * linux-low.c (new_inferior): New global variable.
16898 (linux_create_inferior, linux_attach): Set it.
16899 (linux_wait_for_process): Call the_low_target.arch_setup after the
16900 target has stopped for the first time.
16901 (initialize_low): Do not call the_low_target.arch_setup.
16902
16903 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16904 (s390_set_pc): Likewise.
16905 (s390_arch_setup): New function.
16906 (the_low_target): Use s390_arch_setup as arch_setup routine.
16907
16908 * regcache.c (realloc_register_cache): New function.
16909 (set_register_cache): Call it for each existing regcache.
16910
16911 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16912
16913 * server.h (init_registers): Remove prototype.
16914
16915 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16916 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16917 instead of init_registers ().
16918 * linux-arm-low.c (init_registers_arm): Add prototype.
16919 (init_registers_arm_with_iwmmxt): Likewise.
16920 (the_low_target): Add initializer for arch_setup field.
16921 * linux-cris-low.c (init_registers_cris): Add prototype.
16922 (the_low_target): Add initializer for arch_setup field.
16923 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16924 (the_low_target): Add initializer for arch_setup field.
16925 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16926 (the_low_target): Add initializer for arch_setup field.
16927 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16928 (the_low_target): Add initializer for arch_setup field.
16929 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16930 (the_low_target): Add initializer for arch_setup field.
16931 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16932 (the_low_target): Add initializer for arch_setup field.
16933 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16934 (init_registers_mips64_linux): Likewise.
16935 (the_low_target): Add initializer for arch_setup field.
16936 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16937 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16938 (the_low_target): Add initializer for arch_setup field.
16939 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16940 (init_registers_powerpc_64): Likewise.
16941 (the_low_target): Add initializer for arch_setup field.
16942 * linux-s390-low.c (init_registers_s390): Add prototype.
16943 (init_registers_s390x): Likewise.
16944 (the_low_target): Add initializer for arch_setup field.
16945 * linux-sh-low.c (init_registers_sh): Add prototype.
16946 (the_low_target): Add initializer for arch_setup field.
16947 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16948 (the_low_target): Add initializer for arch_setup field.
16949 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16950 (the_low_target): Add initializer for arch_setup field.
16951
16952 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16953 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16954 instead of init_registers ().
16955 * win32-arm-low.c (init_registers_arm): Add prototype.
16956 (the_low_target): Add initializer for arch_setup field.
16957 * win32-i386-low.c (init_registers_i386): Add prototype.
16958 (the_low_target): Add initializer for arch_setup field.
16959
16960 * spu-low.c (init_registers_spu): Add prototype.
16961 (initialize_low): Call initialie_registers_spu () instead of
16962 initialize_registers ().
16963
16964 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16965
16966 * server.c (handle_v_requests): When handling the vRun and vAttach
16967 packets, if already debugging a process, don't kill it. Return an
16968 error instead.
16969
16970 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16971
16972 * server.c (handle_query): Correct length check.
16973
16974 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16975
16976 * win32-low.c (do_initial_child_stuff): Add process handle
16977 parameter. Set current_process_handle and current_process_id from the
16978 parameters. Clear globals.
16979 (win32_create_inferior): Don't set current_process_handle and
16980 current_process_id here. Instead pass them on the call to
16981 do_initial_child_stuff.
16982 (win32_attach): Likewise.
16983 (win32_clear_inferiors): New.
16984 (win32_kill): Don't close the current process handle or the
16985 current thread handle here. Instead call win32_clear_inferiors.
16986 (win32_detach): Don't open a new handle to the process. Call
16987 win32_clear_inferiors.
16988 (win32_join): Don't rely on current_process_handle; open a new
16989 handle using the process id.
16990 (win32_wait): Call win32_clear_inferiors when the inferior process
16991 has exited.
16992
16993 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16994
16995 * server.c (monitor_show_help): Add "exit".
16996
16997 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16998
16999 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17000 (clean): Add reg-xtensa.c.
17001 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17002 * configure.srv (xtensa*-*-linux*) New target.
17003 * linux-xtensa-low.c: New.
17004 * xtensa-xtregs.c: New.
17005
17006 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17007
17008 * hostio.c: Don't include errno.h.
17009 (errno_to_fileio_errno): Move to hostio-errno.
17010 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17011 error number outputting to the target->hostio_last_error callback.
17012 (hostio_packet_error): Use FILEIO_EINVAL directly.
17013 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17014 calls to hostio_error.
17015 * hostio-errno.c: New.
17016 * server.h (hostio_last_error_from_errno): Declare.
17017 * target.h (target_ops): Add hostio_last_error member.
17018 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17019 as hostio_last_error handler.
17020 * spu-low.c (spu_target_ops): Likewise.
17021 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17022 (wince_hostio_last_error): New functions.
17023 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17024 as hostio_last_error handler.
17025 (win32_target_ops) [!_WIN32_WCE]: Register
17026 hostio_last_error_from_errno as hostio_last_error handler.
17027 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17028 (hostio-errno.o): New rule.
17029 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17030 * configure.srv (srv_hostio_err_objs): New variable. Default to
17031 hostio-errno.o.
17032 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17033 * configure: Regenerate.
17034
17035 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17036
17037 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17038 (linux_kill, linux_detach): Clean up the process list.
17039 * remote-utils.c (remote_open): Improve port number parsing.
17040 (putpkt_binary, input_interrupt): Only send interrupts if the target
17041 is running.
17042 * server.c (extended_protocol): Make static.
17043 (attached): Define earlier.
17044 (exit_requested, response_needed, program_argv): New variables.
17045 (target_running): New.
17046 (start_inferior): Clear attached here.
17047 (attach_inferior): Set attached here.
17048 (require_running): Define.
17049 (handle_query): Use require_running and target_running. Implement
17050 "monitor exit".
17051 (handle_v_attach, handle_v_run): New.
17052 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17053 (gdbserver_usage): Update.
17054 (main): Redo argument parsing. Handle --debug and --multi. Handle
17055 --attach along with other options or after the port. Save
17056 program_argv. Support no initial program. Resynchronize
17057 communication with GDB after an error. Handle "monitor exit".
17058 Use require_running and target_running. Always allow the extended
17059 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17060 restart in extended mode.
17061 * README: Refer to the GDB manual. Update --attach usage.
17062
17063 2007-12-20 Andreas Schwab <schwab@suse.de>
17064
17065 * linux-low.c (STACK_SIZE): Define.
17066 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17067 (linux_test_for_tracefork): Likewise.
17068
17069 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17070
17071 * linux-low.c (linux_wait_for_event): Update messages. Do not
17072 reinsert auto-delete breakpoints.
17073 * mem-break.c (struct breakpoint): Change return type of handler to
17074 int.
17075 (set_breakpoint_at): Update handler type.
17076 (reinsert_breakpoint_handler): Return 1 instead of calling
17077 delete_breakpoint.
17078 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17079 setting a new one.
17080 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17081 * mem-break.h (set_breakpoint_at): Update handler type.
17082 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17083 * win32-low.c (auto_delete_breakpoint): New.
17084 (get_child_debug_event): Use it.
17085
17086 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17087
17088 * configure.ac: Check for pread and pwrite.
17089 * hostio.c (handle_pread): Fall back to lseek and read.
17090 (handle_pwrite): Fall back to lseek and write.
17091 * config.in, configure: Regenerated.
17092
17093 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17094
17095 * server.c (myresume): Add own_buf argument.
17096 (main): Update calls.
17097
17098 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17099
17100 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17101 * remote-utils.c (remote_open): Do not call disable_async_io.
17102 (block_async_io): Delete.
17103 (unblock_async_io): Make static.
17104 (initialize_async_io): New.
17105 * server.c (handle_v_cont): Handle async I/O here.
17106 (myresume): Likewise. Move other common resume tasks here...
17107 (main): ... from here. Call initialize_async_io. Disable async
17108 I/O before the main loop.
17109 * server.h (initialize_async_io): Declare.
17110 (block_async_io, unblock_async_io): Delete prototypes.
17111 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17112
17113 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17114
17115 * remote-utils.c (readchar): Allow binary data in received messages.
17116
17117 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17118
17119 * win32-low.c (attaching): New global.
17120 (win32_create_inferior): Clear the `attaching' global.
17121 (win32_attach): Set the `attaching' global.
17122 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17123 attaching. Only set a breakpoint at the entry point if not
17124 attaching.
17125
17126 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17127
17128 * server.c (main): Don't report dll events on the initial
17129 connection on attaches.
17130
17131 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17132
17133 * server.c (main): Relax numerical bases supported for the pid of
17134 the --attach command line argument.
17135
17136 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17137
17138 * win32-low.c (win32_attach): Call OpenProcess before
17139 DebugActiveProcess, not after. Add last error output to error
17140 call.
17141
17142 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17143
17144 * win32-low.c (win32_get_thread_context)
17145 (win32_set_thread_context): New functions.
17146 (thread_rec): Use win32_get_thread_context.
17147 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17148 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17149 field.
17150
17151 2007-12-03 Leo Zayas
17152 Pedro Alves <pedro_alves@portugalmail.pt>
17153
17154 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17155 global variables.
17156 (child_add_thread): Minor cleanup.
17157 (child_continue): Resume artificially suspended threads before
17158 calling ContinueDebugEvent.
17159 (suspend_one_thread): New.
17160 (fake_breakpoint_event): New.
17161 (get_child_debug_event): Change return type to int. Check here if
17162 gdb sent an interrupt request. If a soft interrupt was requested,
17163 fake a breakpoint event. Return 0 if there is no event to handle,
17164 and 1 otherwise.
17165 (win32_wait): Don't check here if gdb sent an interrupt request.
17166 Ensure there is a valid event to handle.
17167 (win32_request_interrupt): Add soft interruption method as last
17168 resort.
17169
17170 2007-12-03 Leo Zayas
17171 Pedro Alves <pedro_alves@portugalmail.pt>
17172
17173 * win32-low.h (win32_thread_info): Add descriptions to the
17174 structure members. Replace `suspend_count' counter by a
17175 `suspended' flag.
17176 * win32-low.c (thread_rec): Update condition of when to get the
17177 context from the inferior. Rely on ContextFlags being set if it
17178 has already been retrieved. Only suspend the inferior thread if
17179 we haven't already. Warn if that fails.
17180 (continue_one_thread): s/suspend_count/suspended/. Only call
17181 ResumeThread once. Warn if that fails.
17182
17183 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17184
17185 * win32-low.c (win32_wait): Don't read from the inferior when it
17186 has already exited.
17187
17188 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17189
17190 * Makefile.in (win32_low_h): New variable.
17191 (win32-low.o): Add dependency on $(win32_low_h).
17192 (win32-arm-low.o, win32-i386-low.o): New rules.
17193
17194 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17195
17196 * hostio.c: Correct copyright year.
17197
17198 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17199
17200 * Makefile.in (OBS): Add hostio.o.
17201 (hostio.o): New rule.
17202 * server.h (handle_vFile): Declare.
17203 * hostio.c: New file.
17204 * server.c (handle_v_requests): Take packet_len and new_packet_len
17205 for binary packets. Call handle_vFile.
17206 (main): Update call to handle_v_requests.
17207
17208 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17209
17210 * linux-low.c: Include <sched.h>.
17211
17212 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17213
17214 * linux-low.c (linux_tracefork_grandchild): New.
17215 (linux_tracefork_child): Use clone.
17216 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17217
17218 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17219
17220 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17221
17222 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17223
17224 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17225
17226 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17227
17228 * inferiors.c (change_inferior_id): Delete.
17229 (add_pid_to_list, pull_pid_from_list): New.
17230 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17231 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17232 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17233 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17234 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17235 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17236 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17237 (using_threads): Always set to 1.
17238 (handle_extended_wait): New.
17239 (add_process): Do not set TID.
17240 (linux_create_inferior): Set must_set_ptrace_flags.
17241 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17242 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17243 (linux_thread_alive): Rename TID argument to LWPID.
17244 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17245 (linux_wait_for_event): Do not use TID or check using_threads. Update
17246 call to dead_thread_notify. Call handle_extended_wait.
17247 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17248 (send_sigstop): Delete sigstop_sent.
17249 (wait_for_sigstop): Avoid TID.
17250 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17251 (linux_test_for_tracefork): New.
17252 (linux_lookup_signals): Use thread_db_active and
17253 linux_supports_tracefork_flag.
17254 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17255 * linux-low.h (get_process_thread): Avoid TID.
17256 (struct process_ifo): Move thread_known and tid to the end. Remove
17257 sigstop_sent.
17258 (linux_attach_lwp, thread_db_init): Update prototypes.
17259 * server.h (change_inferior_id): Delete prototype.
17260 (add_pid_to_list, pull_pid_from_list): New prototypes.
17261 * thread-db.c (thread_db_use_events): New.
17262 (find_first_thread): Rename to...
17263 (find_one_thread): ...this. Update callers and messages. Do not
17264 call fatal. Check thread_db_use_events. Do not call
17265 change_inferior_id or new_thread_notify.
17266 (maybe_attach_thread): Update. Do not call new_thread_notify.
17267 (thread_db_init): Set thread_db_use_events. Check use_events.
17268 * utils.c (fatal, warning): Correct message prefix.
17269
17270 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17271
17272 * Makefile.in (clean): Remove new files.
17273 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17274 (powerpc-64.o, powerpc-64.c): New rules.
17275 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17276 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17277 with SPE.
17278 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17279 SPE targets.
17280 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17281 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17282 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17283 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17284 (target_regsets): Add AltiVec and SPE register sets.
17285 * configure.ac: Check for AltiVec and SPE.
17286 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17287 (ppc_fill_vrregset, ppc_store_vrregset): New.
17288 (target_regsets): Add AltiVec register set.
17289 * configure: Regenerated.
17290
17291 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17292
17293 * linux-low.c (O_LARGEFILE): Define.
17294 (linux_read_memory): Use /proc/PID/mem.
17295 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17296 * configure, config.in: Regenerated.
17297
17298 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17299
17300 * linux-low.c (linux_wait_for_event): Do not pass signals while
17301 single-stepping.
17302
17303 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17304
17305 * win32-low.c (create_process): New.
17306 (win32_create_inferior): Use create_process instead of
17307 CreateProcess. If create_process failed retry appending an ".exe"
17308 suffix. Store the GetLastError result immediatelly after
17309 create_process calls and use it on the call to error.
17310
17311 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17312
17313 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17314
17315 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17316
17317 * configure.ac: Switch license to GPLv3.
17318
17319 2007-08-01 Michael Snyder <msnyder@access-company.com>
17320
17321 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17322
17323 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17324
17325 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17326 typedef.
17327 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17328 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17329 CloseToolhelp32Snapshot.
17330 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17331 CloseToolhelp32Snapshot.
17332
17333 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17334
17335 * server.c (main): Check for inferior exit before main loop.
17336
17337 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17338
17339 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17340 instead of on tmp_desc.
17341
17342 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17343 Daniel Jacobowitz <dan@codesourcery.com>
17344
17345 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17346 (add_thread): Minor cleanups.
17347 (clear_inferiors): Move lower in the file. Clear the DLL
17348 list.
17349 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17350 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17351 (xml_escape_text): New.
17352 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17353 for qSupported.
17354 (handle_v_cont): Report errors.
17355 (gdbserver_version): Update.
17356 (main): Correct size of own_buf. Do not report initial DLL events.
17357 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17358 (unloaded_dll, xml_escape_text): New.
17359 * win32-low.c (enum target_waitkind): Update comments.
17360 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17361 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17362 (win32_EnumProcessModules, win32_GetModuleInformation)
17363 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17364 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17365 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17366 (win32_Module32First, win32_Module32Next, load_toolhelp)
17367 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17368 (get_child_debug_event): Handle DLL events.
17369 (win32_wait): Likewise.
17370
17371 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17372
17373 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17374 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17375
17376 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17377
17378 * win32-low.c (handle_output_debug_string): Ignore event if not
17379 waiting.
17380
17381 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17382
17383 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17384
17385 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17386
17387 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17388
17389 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17390
17391 * inferiors.c (change_inferior_id): Add comment.
17392 * linux-low.c (check_removed_breakpoint): Add an early
17393 prototype. Improve debug output.
17394 (linux_attach): Doc update.
17395 (linux_detach_one_process, linux_detach): Clean up before releasing
17396 each process.
17397 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17398 * linux-low.h (struct process_info): Doc improvement.
17399 * mem-break.c (delete_all_breakpoints): New.
17400 * mem-break.h (delete_all_breakpoints): New prototype.
17401 * thread-db.c (find_first_thread): New.
17402 (thread_db_create_event): Call it instead of
17403 thread_db_find_new_threads. Clean up unused variables.
17404 (maybe_attach_thread): Remove first thread handling.
17405 (thread_db_find_new_threads): Use find_first_thread.
17406 (thread_db_get_tls_address): Likewise.
17407
17408 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17409
17410 * thread-db.c (thread_db_find_new_threads): Add prototype.
17411 (thread_db_create_event): Check for the main thread before adding
17412 a new thread.
17413 (maybe_attach_thread): Only enable event reporting if TID == 0.
17414 (thread_db_get_tls_address): Check for new threads.
17415
17416 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17417
17418 * linux-low.c (linux_create_inferior): Try execv before execvp.
17419 * spu-low.c (spu_create_inferior): Likewise.
17420
17421 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17422
17423 * linux-low.c (linux_create_inferior): Change execv to execvp.
17424 * spu-low.c (spu_create_inferior): Likewies.
17425
17426 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17427
17428 * Makefile.in (clean): Clean new files instead of deleted ones.
17429 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17430 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17431 rules.
17432 * configure.srv: Specify XML files and new regformats for MIPS and
17433 MIPS64 GNU/Linux.
17434 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17435 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17436 an entry for the restart register.
17437 (mips_cannot_fetch_register, mips_cannot_store_register)
17438 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17439 register names to match the XML descriptions.
17440 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17441 restart register instead of $0.
17442
17443 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17444 Markus Deuling <deuling@de.ibm.com>
17445
17446 * remote-utils.c (decode_xfer_write): New function.
17447 * server.h (decode_xfer_write): Add prototype.
17448 * server.c (handle_query): Add PACKET_LEN argument. Support
17449 qXfer:spu:read and qXfer:spu:write packets.
17450 (main): Pass packet_len to handle_query.
17451 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17452 * target.h (target_ops): Add qxfer_spu.
17453
17454 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17455
17456 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17457 accessing non-seekable spufs files.
17458
17459 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17460
17461 * server.c (handle_query): Add reply for qC packet.
17462
17463 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17464 Leo Zayas <lerele@champenstudios@com>
17465
17466 * server.h (check_remote_input_interrupt_request): New function.
17467 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17468 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17469 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17470 (check_remote_input_interrupt_request): New function.
17471 * server.h (check_remote_input_interrupt_request): Declare.
17472 * win32-low.c (winapi_DebugBreakProcess,
17473 winapi_GenerateConsoleCtrlEvent): New typedefs.
17474 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17475 to 250 ms.
17476 (win32_wait): Check for remote interrupt request
17477 with check_remote_input_interrupt_request.
17478 (win32_request_interrupt): New function.
17479 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17480
17481 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17482
17483 * win32-low.c (debug_registers_changed,
17484 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17485 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17486 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17487 (thread_rec): Get context using the low target.
17488 (child_add_thread): Call thread_added on the low target,
17489 which does the same thing.
17490 (regptr): Delete.
17491 (do_initial_child_stuff): Remove debug registers references.
17492 Set context using the low target. Resume threads after
17493 setting the contexts.
17494 (child_continue): Remove dead variable. Remove debug
17495 registers references.
17496 (child_fetch_inferior_registers): Go through the low target.
17497 (do_child_store_inferior_registers): Remove.
17498 (child_store_inferior_registers): Go through the low target.
17499 (win32_resume): Remove debug registers references.
17500 Set context using the low target.
17501 (handle_exception): Change return type to void. Don't record
17502 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17503 first chance exception.
17504 (get_child_debug_event): Change return type to void. Remove
17505 goto loop. Always return after waiting for debug event.
17506 (win32_wait): Convert to switch statement. Handle spurious
17507 events.
17508
17509 * win32-i386-low.c (debug_registers_changed,
17510 debug_registers_used): New.
17511 (initial_stuff): Rename to ...
17512 (i386_initial_stuff): ... this. Clear debug registers
17513 state variables.
17514 (store_debug_registers): Delete.
17515 (i386_get_thread_context): New.
17516 (load_debug_registers): Delete.
17517 (i386_set_thread_context): New.
17518 (i386_thread_added): New.
17519 (single_step): Rename to ...
17520 (i386_single_step): ... this.
17521 (do_fetch_inferior_registers): Rename to ...
17522 (i386_fetch_inferior_register): ... this.
17523 (i386_store_inferior_register): New.
17524 (the_low_target): Adapt to new interface.
17525
17526 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17527 (arm_get_thread_context): New.
17528 (arm_set_thread_context): New.
17529 (regptr): New.
17530 (do_fetch_inferior_registers): Rename to ...
17531 (arm_fetch_inferior_register): ... this.
17532 (arm_store_inferior_register): New.
17533 (arm_wince_breakpoint): Reimplement as unsigned long.
17534 (arm_wince_breakpoint_len): Define.
17535 (the_low_target): Adapt to new interface.
17536
17537 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17538 load_debug_registers. Add get_thread_context, set_thread_context,
17539 thread_added and store_inferior_register. Rename
17540 fetch_inferior_registers to fetch_inferior_register.
17541 (regptr): Remove declaration.
17542
17543 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17544
17545 * linux-low.c (linux_detach): Change return type to int. Return 0.
17546 * spu-low.c (spu_detach): Likewise.
17547
17548 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17549
17550 * target.h (target_ops): Change return type of detach to int.
17551 Add join.
17552 (join_inferior): New.
17553 * server.c (main): Don't skip detach support on mingw32.
17554 If the inferior doesn't support detaching return error.
17555 Call join_inferior instead of using waitpid.
17556 * linux-low.c (linux_join): New.
17557 (linux_target_op): Add linux_join.
17558 * spu-low.c (spu_join): New.
17559 (spu_target_ops): Add spu_join.
17560 * win32-low.c (win32_detach): Adapt to new interface.
17561 Reopen current_process_handle before detaching. Issue a child
17562 resume before detaching.
17563 (win32_join): New.
17564 (win32_target_op): Add win32_join.
17565
17566 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17567
17568 * win32-low.c (win32-attach): Fix return value.
17569 * target.h (target_ops): Describe ATTACH return values.
17570
17571 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17572
17573 * win32-low.c (GETPROCADDRESS): Define.
17574 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17575 (winapi_DebugSetProcessKillOnExit): Likewise.
17576 (win32_create_inferior): Force usage of ansi CreateProcessA.
17577 (win32_attach): Use GETPROCADDRESS.
17578 (win32_detach): Likewise.
17579
17580 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17581
17582 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17583
17584 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17585
17586 * win32-low.c: Commit leftover changes from 2007-03-29.
17587
17588 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17589
17590 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17591 fields short instead of int. Add explicit padding.
17592 (i387_cache_to_fsave): Remove unnecessary casts.
17593 (i387_fsave_to_cache): Doc fix.
17594 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17595
17596 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17597
17598 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17599 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17600
17601 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17602
17603 * configure.srv (arm*-*-mingw32ce*): Move near the other
17604 arm targets.
17605
17606 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17607
17608 * configure.ac: Add errno checking.
17609 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17610 sys/file.h and malloc.h.
17611 (AC_CHECK_DECLS): Add perror.
17612 (srv_mingwce): Handle.
17613 * configure.srv (i[34567]86-*-cygwin*): Add
17614 win32-i386-low.o to srv_tgtobj.
17615 (i[34567]86-*-mingw*): Likewise.
17616 (arm*-*-mingw32ce*): Add case.
17617 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17618 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17619 [__MINGW32CE__] (strerror): New function.
17620 [__MINGW32CE__] (errno): Define to GetLastError.
17621 [__MINGW32CE__] (COUNTOF): New macro.
17622 (remote_open): Remove extra close call.
17623 * mem-break.c (delete_breakpoint_at): New function.
17624 * mem-break.h (delete_breakpoint_at): Declare.
17625 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17626 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17627 [USE_WIN32API] (read, write): Add char* casts.
17628 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17629 * server.h: Include wincecompat.h on Windows CE.
17630 [HAVE_ERRNO_H]: Check.
17631 (perror): Declare if not declared.
17632 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17633 (perror_with_name): Remove errno declaration.
17634 * wincecompat.h: New.
17635 * wincecompat.c: New.
17636 * win32-low.h: New.
17637 * win32-arm-low.c: New.
17638 * win32-i386-low.c: New.
17639 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17640 (OUTMSG2): Make it safe.
17641 (_T): New macro.
17642 (COUNTOF): New macro.
17643 (NUM_REGS): Get it from the low target.
17644 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17645 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17646 (thread_rec): Let low target handle debug registers.
17647 (child_add_thread): Likewise.
17648 (child_init_thread_list): Likewise.
17649 (continue_one_thread): Likewise.
17650 (regptr): New.
17651 (do_child_fetch_inferior_registers): Move to ...
17652 * win32-i386-low.c: ... here, and rename to ...
17653 (do_fetch_inferior_registers): ... this.
17654 * win32-low.c (child_fetch_inferior_registers):
17655 Go through the low target.
17656 (do_child_store_inferior_registers): Use regptr.
17657 (strwinerror): New function.
17658 (win32_create_inferior): Handle Windows CE.
17659 Use strwinerror instead of strerror on Windows error
17660 codes. Add program to the error output.
17661 Don't close the main thread handle on Windows CE.
17662 (win32_attach): Use coredll.dll on Windows CE.
17663 (win32_kill): Close current process and current
17664 thread handles.
17665 (win32_detach): Use coredll.dll on Windows CE.
17666 (win32_resume): Let low target handle debug registers, and
17667 step request.
17668 (handle_exception): Add/Remove initial breakpoint. Avoid
17669 non-existant WSTOPSIG on Windows CE.
17670 (win32_read_inferior_memory): Cast to remove warning.
17671 (win32_arch_string): Go through the low target.
17672 (initialize_low): Call set_breakpoint_data with the low
17673 target's breakpoint.
17674 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17675 FOP_REGNUM, mappings): Move to ...
17676 * win32-i386-low.c: ... here.
17677 * win32-low.c (win32_thread_info): Move to ...
17678 * win32-low.h: ... here.
17679 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17680 win32-arm-low.c and wincecompat.c.
17681 (all:): Add $EXEEXT.
17682 (install-only:): Likewise.
17683 (gdbserver:): Likewise.
17684 (gdbreplay:): Likewise.
17685 * config.in: Regenerate.
17686 * configure: Regenerate.
17687
17688 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17689
17690 * win32-low.c: Rename typedef thread_info to
17691 win32_thread_info throughout.
17692
17693 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17694
17695 * win32-i386-low.c: Rename to ...
17696 * win32-low.c: ... this.
17697 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17698 * Makefile.in: Likewise.
17699
17700 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17701
17702 * remote-utils.c (monitor_output): Constify msg parameter.
17703 * server.h (monitor_output): Likewise.
17704 * win32-i386-low.c (handle_output_debug_string): New.
17705 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17706 handle_output_debug_string.
17707 (get_child_debug_event): Likewise.
17708
17709 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17710
17711 * server.c (main): Correct strtoul check.
17712
17713 2007-03-27 Jon Ringle <jon@ringle.org>
17714
17715 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17716
17717 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17718
17719 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17720
17721 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17722
17723 * terminal.h: Check HAVE_SGTTY_H.
17724
17725 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17726
17727 * remote-utils.c (remote_open): Print out the assigned port number.
17728
17729 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17730
17731 * remote-utils.c (monitor_output): New function.
17732 * server.c (debug_threads): Define here.
17733 (monitor_show_help): New function.
17734 (handle_query): Handle qRcmd.
17735 (main): Do not handle 'd' packet.
17736 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17737 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17738 of debug_threads.
17739
17740 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17741
17742 * Makefile.in (EXEEXT): New.
17743 (clean): Use $(EXEEXT).
17744
17745 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17746
17747 * target.h (target_ops): Rename send_signal to request_interrupt,
17748 and remove enum target_signal parameter.
17749 * linux-low.c (linux_request_interrupt): Rename from
17750 linux_send_signal, and always send SIGINT.
17751 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17752 and always send SIGINT.
17753 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17754 of send_signal.
17755 (input_interrupt): Likewise.
17756
17757 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17758
17759 * server.c (get_features_xml): Check if target implemented
17760 arch_string.
17761 * win32-i386-low.c (win32_arch_string): New.
17762 (win32_target_ops): Add win32_arch_string as arch_string member.
17763
17764 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17765
17766 * spu-low.c (spu_arch_string): New.
17767 (spu_target_ops): Add spu_arch_string.
17768
17769 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17770
17771 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17772 * configure.ac: Do not check for terminal.h.
17773 * configure, config.in: Regenerated.
17774
17775 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17776
17777 * Makefile.in (OBS): Add $(XML_BUILTIN).
17778 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17779 (clean): Update.
17780 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17781 (arm-with-iwmmxt.c): New.
17782 * config.in, configure: Regenerate.
17783 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17784 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17785 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17786 (arm*-*-linux*): Add iWMMXt and regset support.
17787 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17788 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17789 (arm_store_wmmxregset, target_regsets): New.
17790 * server.c (get_features_xml): Take annex argument. Check builtin
17791 XML documents.
17792 (handle_query): Handle multiple annexes.
17793
17794 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17795
17796 * remote-utils.c [USE_WIN32API] (read, write): Define.
17797 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17798 write.
17799
17800 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17801
17802 * linux-i386-low.c (the_low_target): Set arch_string.
17803 * linux-x86-64-low.c (the_low_target): Likewise.
17804 * linux-low.c (linux_arch_string): New.
17805 (linux_target_ops): Add it.
17806 * linux-low.h (struct linux_target_ops): Add arch_string.
17807 * server.c (write_qxfer_response): Use const void * for DATA.
17808 (get_features_xml): New.
17809 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17810 * target.h (struct target_ops): Add arch_string method.
17811
17812 2007-01-03 Denis Pilat <denis.pilat@st.com>
17813 Daniel Jacobowitz <dan@codesourcery.com>
17814
17815 * linux-low.c (linux_kill): Handle being called with no threads.
17816 * win32-i386-low.c (win32_kill): Likewise.
17817 (get_child_debug_event): Clear current_process_handle.
17818
17819 2006-12-30 Denis PILAT <denis.pilat@st.com>
17820 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * remote-utils.c (remote_open): Check the type of specified
17823 serial port devices before opening them.
17824 * server.c (main): Kill the inferior if an error occurs during
17825 the first remote_open.
17826
17827 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17828
17829 * README: Update supported targets.
17830
17831 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17832
17833 * Makefile.in (clean): Remove reg-mips64.c.
17834 (reg-mips64.c, reg-mips64.o): New rules.
17835 * configure.srv: Handle mips64. Include regset support for mips.
17836 * linux-mips-low.c (union mips_register): New.
17837 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17838 (mips_breakpoint, mips_breakpoint_at): Use int.
17839 (mips_collect_register, mips_supply_register)
17840 (mips_collect_register_32bit, mips_supply_register_32bit)
17841 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17842 (mips_store_fpregset, target_regsets): New.
17843 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17844
17845 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17846
17847 * configure.srv: Add target "spu*-*-*".
17848 * Makefile.in (clean): Remove reg-spu.c.
17849 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17850 * spu-low.c: New file.
17851
17852 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17853
17854 * configure.ac: Correct td_thr_tls_get_addr test.
17855 * configure: Regenerated.
17856
17857 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17858
17859 * linux-low.c (linux_wait_for_event): Reformat. Use the
17860 pass_signals array.
17861 * remote-utils.c (decode_address_to_semicolon): New.
17862 * server.c (pass_signals, handle_general_set): New.
17863 (handle_query): Mention QPassSignals for qSupported.
17864 (main): Call handle_general_set.
17865 * server.h (pass_signals, decode_address_to_semicolon): New.
17866
17867 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17868
17869 * server.c (handle_query): Correct error handling for read_auxv.
17870
17871 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17872
17873 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17874 and srv_linux_thread_db to yes.
17875 * linux-s390-low.c (s390_fill_gregset): New function.
17876 (target_regsets): Define data structure.
17877
17878 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17879
17880 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17881 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17882 * config.in, configure: Regenerated.
17883 * inferiors.c (gdb_id_to_thread): New function.
17884 (gdb_id_to_thread_id): Use it.
17885 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17886 * linux-low.h (struct process_info): Add th member.
17887 (thread_db_get_tls_address): New prototype.
17888 * remote-utils.c (decode_address): Make non-static.
17889 * server.c (handle_query): Handle qGetTLSAddr.
17890 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17891 * target.h (struct target_ops): Add get_tls_address.
17892 * thread-db.c (maybe_attach_thread): Save the thread handle.
17893 (thread_db_get_tls_address): New.
17894
17895 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17896
17897 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17898 (linux_resume_one_process): Take a siginfo_t *. Update all
17899 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17900 (struct pending_signals): Add a siginfo_t.
17901 (linux_wait_for_process): Always set last_status.
17902 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17903 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17904 * linux-low.h (struct process_info): Add last_status.
17905
17906 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17907
17908 * remote-utils.c (try_rle): New function.
17909 (putpkt_binary): Use it.
17910
17911 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17912
17913 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17914 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17915 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17916 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17917 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17918 point registers.
17919
17920 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17921
17922 * server.c (terminal_fd): New variable.
17923 (old_foreground_pgrp): Likewise.
17924 (restore_old_foreground_pgrp): New function.
17925 (start_inferior): Record the terminal file descriptor in terminal_fd
17926 and its original foreground group in old_foreground_pgrp. Register
17927 restore_old_foreground_pgrp with atexit().
17928
17929 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17930
17931 * server.c (handle_query): Correct qPart to qXfer.
17932
17933 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17934
17935 * configure.ac: Check for more headers which are missing on
17936 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17937 * configure.srv: Add Cygwin and mingw32.
17938 * remote-utils.c: Don't include headers unconditionally which
17939 are missing on mingw32. Include <winsock.h> for mingw32.
17940 (remote_open): Adjust for mingw32 support. Flush
17941 standard error after writing to it.
17942 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17943 (unblock_async_io, enable_async_io, disable_async_io)
17944 (readchar, getpkt): Update for Winsock support.
17945 (prepare_resume_reply): Expect a protocol signal number.
17946 * server.c: Disable <sys/wait.h> on mingw32.
17947 (start_inferior): Adjust for mingw32 support. Flush
17948 standard error after writing to it.
17949 (attach_inferior): Likewise. Use protocol signal
17950 numbers.
17951 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17952 and names.
17953 * win32-i386-low.c: New file.
17954 * Makefile.in (XM_CLIBS): Set.
17955 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17956 (win32-i386-low.o): New dependency rule.
17957 * linux-low.c (linux_wait): Use target signal numbers.
17958 * target.h (struct target_ops): Doc fix.
17959 * server.h (target_signal_to_name): New prototype.
17960 * gdbreplay.c: Don't include headers unconditionally which
17961 are missing on mingw32. Include <winsock.h> for mingw32.
17962 (remote_close, remote_open): Adjust for Winsock support.
17963 * configure, config.in: Regenerated.
17964
17965 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17966
17967 * server.c (decode_xfer_read, write_qxfer_response): New.
17968 (handle_query): Take a packet length argument. Handle
17969 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17970 the qSupported response.
17971 (main): Update call to handle_query.
17972
17973 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17974
17975 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17976 (putpkt_binary): Renamed from putpkt and adjusted for binary
17977 data.
17978 (putpkt): New wrapper for putpkt_binary.
17979 (readchar): Don't mask off the high bit.
17980 (decode_X_packet): New function.
17981 * server.c (main): Call putpkt_binary if a handler sets the packet
17982 length. Save the length of the incoming packet. Handle 'X'.
17983 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17984
17985 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17986
17987 * server.c (handle_query): Handle qSupported.
17988
17989 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17990
17991 * remote-utils.c (all_symbols_looked_up): New variable.
17992 (look_up_one_symbol): Check it.
17993 * server.h (look_up_one_symbol): New declaration.
17994 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17995
17996 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17997
17998 * Makefile.in (linux-arm-low.o): Update dependencies.
17999 * linux-arm-low.c: Include "gdb_proc_service.h".
18000 (PTRACE_GET_THREAD_AREA): Define.
18001 (ps_get_thread_area): New function.
18002
18003 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18004
18005 * configure.srv (m68k*-*-uclinux*): New target.
18006 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18007 (linux_resume_one_process): Remove extraneous cast.
18008 (linux_read_offsets): New.
18009 (linux_target_op): Add linux_read_offsets on mmuless systems.
18010 * server.c (handle_query): Add qOffsets logic.
18011 * target.h (struct target_ops): Add read_offsets.
18012
18013 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18014
18015 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18016 (PTRACE_GET_THREAD_AREA): Define.
18017 (ps_get_thread_area): New function.
18018 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18019 (linux-x86-64-low.o): Update.
18020
18021 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18022
18023 * configure.ac: Remove checks for prfpregset_t.
18024 * gdb_proc_service.h: New file.
18025 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18026 new "gdb_proc_service.h".
18027 * proc-service.c: Likewise.
18028 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18029 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18030 * Makefile.in (gdb_proc_service_h): Updated.
18031 * configure, config.in: Regenerated.
18032
18033 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18034
18035 * remote-utils.c (prepare_resume_reply): Move declaration
18036 of gdb_id_from_wait to the top of the block.
18037
18038 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18039
18040 * linux-low.c (regsets_store_inferior_registers): Read the regset
18041 from the target before filling it.
18042
18043 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18044
18045 * server.c (attach_inferior): Return SIGTRAP for a successful
18046 attach.
18047
18048 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18049
18050 * Makefile.in (OBS): Add version.o.
18051 (STAGESTUFF): Delete.
18052 (version.o): Add dependencies.
18053 (version.c): Replace rule.
18054 (clean): Remove version.c.
18055 * server.c (gdbserver_version): New.
18056 (gdbserver_usage): Use printf.
18057 (main): Handle --version and --help.
18058 * server.h (version, host_name): Add declarations.
18059
18060 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18061
18062 * linux-arm-low.c:
18063 * linux-arm-low.c:
18064 * inferiors.c:
18065 * i387-fp.h:
18066 * i387-fp.c:
18067 * gdbreplay.c:
18068 * regcache.c:
18069 * proc-service.c:
18070 * mem-break.h:
18071 * mem-break.c:
18072 * linux-x86-64-low.c:
18073 * linux-sh-low.c:
18074 * linux-s390-low.c:
18075 * linux-ppc64-low.c:
18076 * linux-ppc-low.c:
18077 * linux-mips-low.c:
18078 * linux-m68k-low.c:
18079 * linux-m32r-low.c:
18080 * linux-low.h:
18081 * linux-low.c:
18082 * linux-ia64-low.c:
18083 * linux-i386-low.c:
18084 * linux-crisv32-low.c:
18085 * thread-db.c:
18086 * terminal.h:
18087 * target.h:
18088 * target.c:
18089 * server.h:
18090 * server.c:
18091 * remote-utils.c:
18092 * regcache.h:
18093 * utils.c:
18094 * Makefile.in:
18095 * configure.ac:
18096 * gdbserver.1: Add (C) after Copyright. Update the FSF
18097 address.
18098
18099 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18100
18101 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18102 (arm_breakpoint_at): Recognize both breakpoints.
18103 (the_low_target): Use the correct breakpoint instruction.
18104
18105 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18106
18107 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18108 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18109 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18110 (the_low_target): Update.
18111
18112 2005-10-25 Andreas Schwab <schwab@suse.de>
18113
18114 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18115
18116 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18117 (ia64_num_regs): Reduce to 462.
18118
18119 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18120
18121 * acinclude.m4: Correct quoting.
18122 * aclocal.m4: Regenerated.
18123
18124 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18125 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18126 (thread_db_init): Call thread_db_err_str.
18127 * configure.ac: Check for TD_VERSION.
18128 * config.in, configure: Regenerated.
18129
18130 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18131
18132 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18133
18134 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18135
18136 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18137 is not available. Define HAVE_PTRACE_GETREGS if it is.
18138 * config.in, configure: Regenerated.
18139 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18140 * linux-i386-low.c, linux-m68k-low.c: Update to use
18141 HAVE_PTRACE_GETREGS.
18142 * linux-low.c (regsets_fetch_inferior_registers)
18143 (regsets_store_inferior_registers): Only return 0 if we processed
18144 GENERAL_REGS.
18145 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18146 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18147
18148 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18149
18150 * inferiors.c (struct thread_info): Add gdb_id.
18151 (add_thread): Add gdb_id argument.
18152 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18153 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18154 calls to add_thread.
18155 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18156 * server.c (handle_query): Use thread_to_gdb_id.
18157 (handle_v_cont, main): Use gdb_id_to_thread_id.
18158 * server.h (add_thread): Update prototype.
18159 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18160 prototypes.
18161
18162 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18163
18164 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18165 left-padded registers.
18166 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18167 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18168
18169 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18170
18171 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18172 * configure: Regenerate.
18173 * config.in: Regenerate.
18174 * server.h (NEED_DECLARATION_STRERROR):
18175 Replace with !HAVE_DECL_STRERROR.
18176
18177 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18178
18179 * linux-low.c (linux_wait, linux_send_signal): Don't test
18180 an unsigned long variable for > 0 if it could be MAX_ULONG.
18181 * server.c (myresume): Likewise.
18182 * target.c (set_desired_inferior): Likewise.
18183
18184 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18185
18186 * configure.ac: Simplify and improve check for socklen_t.
18187 * configure, config.in: Regenerate.
18188
18189 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18190
18191 * acconfig.h: Remove.
18192 * configure.ac: Add a test for socklen_t. Use three-argument
18193 AC_DEFINE throughout.
18194 * config.in: Regenerated using autoheader 2.59.
18195 * configure: Regenerated.
18196
18197 * gdbreplay.c (socklen_t): Provide a default.
18198 (remote_open): Use socklen_t.
18199 * remote-utils.c (socklen_t): Provide a default.
18200 (remote_open): Use socklen_t.
18201 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18202 unsigned char.
18203
18204 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18205 char for buffers.
18206 * linux-low.c (linux_read_memory, linux_write_memory)
18207 (linux_read_auxv): Likewise.
18208 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18209 (check_mem_write): Likewise.
18210 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18211 Likewise.
18212 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18213 (registers_from_string, register_data): Likewise.
18214 * server.c (handle_query, main): Likewise.
18215 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18216 (decode_M_packet): Likewise.
18217 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18218 * target.h (struct target_ops): Update read_memory, write_memory,
18219 and read_auxv.
18220 (read_inferior_memory, write_inferior_memory): Update.
18221 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18222 to unsigned char *.
18223 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18224 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18225 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18226 linux-s390-low.c, linux-sh-low.c: Update for changes in
18227 read_inferior_memory and the_low_target->breakpoint.
18228
18229 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18230
18231 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18232 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18233 * configure.srv: Add powerpc64-*-linux*.
18234 * linux-ppc64-low.c: New file.
18235
18236 2005-05-23 Orjan Friberg <orjanf@axis.com>
18237
18238 * linux-cris-low.c: New file with support for CRIS.
18239 * linux-crisv32-low.c: Ditto for CRISv32.
18240 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18241 (clean): Add reg-cris.c and reg-crisv32.c.
18242 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18243 reg-crisv32.o, and reg-crisv32.c to make rules.
18244 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18245 recognized targets.
18246
18247 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18248
18249 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18250 of sizeof (PTRACE_XFER_TYPE).
18251 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18252
18253 2005-05-12 Orjan Friberg <orjanf@axis.com>
18254
18255 * target.h (struct target_ops): Add insert_watchpoint,
18256 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18257 pointers for hardware watchpoint support.
18258 * linux-low.h (struct linux_target_ops): Ditto.
18259 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18260 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18261 to linux_target_ops.
18262 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18263 reply packet.
18264 * server.c (main): Recognize 'Z' and 'z' packets.
18265
18266 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18267
18268 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18269 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18270 (the_low_target): Add new members.
18271
18272 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18273
18274 * proc-service.c (ps_lgetregs): Search all_processes instead of
18275 all_threads.
18276
18277 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18278
18279 * server.c (start_inferior): Change return type to int.
18280 (attach_inferior): Change sigptr to int *.
18281 (handle_v_cont, handle_v_requests): Change signal to int *.
18282 (main): Change signal to int.
18283
18284 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18285
18286 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18287 * configure.srv: Add m32r*-*-linux*.
18288 * linux-m32r-low.c: New file.
18289
18290 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18291
18292 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18293
18294 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18295
18296 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18297 Take unsigned long arguments for PIDs.
18298 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18299 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18300 (wait_for_sigstop, linux_resume_one_process)
18301 (regsets_fetch_inferior_registers, linux_send_signal)
18302 (linux_read_auxv): Likewise. Update the types of variables holding
18303 PIDs. Update format string specifiers.
18304 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18305 * remote-utils.c (prepare_resume_reply): Likewise.
18306 * server.c (cont_thread, general_thread, step_thread)
18307 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18308 unsigned long.
18309 (handle_query): Update format specifiers.
18310 (handle_v_cont, main): Use strtoul for thread IDs.
18311 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18312 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18313 (general_thread, step_thread, thread_from_wait)
18314 (old_thread_from_wait): Update.
18315 * target.h (struct thread_resume): Use unsigned long for THREAD.
18316 (struct target_ops): Use unsigned long for arguments to attach and
18317 thread_alive.
18318
18319 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18320
18321 * acinclude.m4: Include bfd/bfd.m4 directly.
18322 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18323 <agriffis@toolchain.org>.
18324 * aclocal.m4, configure: Regenerated.
18325
18326 2005-01-07 Andrew Cagney <cagney@gnu.org>
18327
18328 * configure.ac: Rename configure.in, require autoconf 2.59.
18329 * configure: Re-generate.
18330
18331 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18332
18333 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18334 LIBS when finished.
18335 * aclocal.m4: Regenerated.
18336 * configure: Regenerated.
18337
18338 2004-11-21 Andreas Schwab <schwab@suse.de>
18339
18340 * linux-m68k-low.c (m68k_num_gregs): Define.
18341 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18342 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18343 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18344 (m68k_breakpoint_at): New. Add to the_low_target.
18345
18346 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18347 srv_linux_thread_db to yes.
18348
18349 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18350
18351 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18352 (ARCH_SET_FS): Likewise.
18353 (ARCH_GET_FS): Likewise.
18354 (ARCH_GET_GS): Likewise.
18355
18356 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18357
18358 * linux-i386-low.c (ps_get_thread_area): New.
18359 * linux-x86-64-low.c (ps_get_thread_area): New.
18360 * linux-low.c: Include <sys/syscall.h>.
18361 (linux_kill_one_process): Don't kill the first thread here.
18362 (linux_kill): Kill the first thread here.
18363 (kill_lwp): New function.
18364 (send_sigstop, linux_send_signal): Use it.
18365 * proc-service.c: Clean up #ifdefs.
18366 (fpregset_info): Delete.
18367 (ps_lgetregs): Update and enable implementation.
18368 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18369 implementations.
18370 * remote-utils.c (struct sym_cache, symbol_cache): New.
18371 (input_interrupt): Print a clearer message.
18372 (async_io_enabled): New variable.
18373 (enable_async_io, disable_async_io): Use it. Update comments.
18374 (look_up_one_symbol): Use the symbol cache.
18375 * thread-db.c (thread_db_look_up_symbols): New function.
18376 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18377
18378 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18379
18380 * configure.in: Test for -rdynamic.
18381 * configure: Regenerated.
18382 * Makefile (INTERNAL_LDFLAGS): New.
18383 (gdbserver, gdbreplay): Use it.
18384
18385 2004-09-02 Andrew Cagney <cagney@gnu.org>
18386
18387 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18388
18389 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18390
18391 * linux-low.c (linux_wait): Clear all_processes list also.
18392
18393 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18394
18395 * linux-low.c: Include <errno.h>. Remove extern declaration of
18396 errno.
18397
18398 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18399
18400 * gdbreplay.c, server.h, utils.c: Update copyright years.
18401
18402 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18403
18404 * server.c (main): Print child status or termination signal from
18405 variable 'signal', not 'sig'.
18406
18407 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18408
18409 * linux-low.c (linux_read_memory): Change return type to
18410 int. Check for and return error from ptrace().
18411 * target.c (read_inferior_memory): Change return type to int. Pass
18412 back return status from the_target->read_memory().
18413 * target.h (struct target_ops): Adapt *read_memory() prototype.
18414 Update comment.
18415 (read_inferior_memory): Adapt prototype.
18416 * server.c (main): Return an error packet if
18417 read_inferior_memory() returns an error.
18418
18419 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18420
18421 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18422 Unify with other clean targets.
18423
18424 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18425
18426 * server.c (handle_v_cont): Call set_desired_inferior.
18427
18428 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18429
18430 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18431
18432 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18433
18434 * linux-low.c (linux_wait): Unblock async I/O.
18435 (linux_resume): Block and enable async I/O.
18436 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18437 * server.h (block_async_io, unblock_async_io): Add prototypes.
18438
18439 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18440
18441 * remote-utils.c (remote_open): Print a status notice after
18442 opening a TCP port.
18443 * server.c (attach_inferior): Print a status notice after
18444 attaching.
18445
18446 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18447
18448 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18449
18450 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18451
18452 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18453 error packet.
18454 * server.c, target.h: Update copyright years.
18455
18456 2004-02-25 Roland McGrath <roland@redhat.com>
18457
18458 * target.h (struct target_ops): New member `read_auxv'.
18459 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18460 * linux-low.c (linux_read_auxv): New function.
18461 (linux_target_ops): Initialize `read_auxv' member to that.
18462
18463 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18464
18465 Committed by Jim Blandy <jimb@redhat.com>.
18466
18467 * linux-s390-low.c (s390_num_regs): Update.
18468 (s390_regmap): Remove control registers. Use __s390x__ predefine
18469 instead of GPR_SIZE to distiguish s390 and s390x targets.
18470
18471 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18472
18473 * linux-low.c: Update copyright year.
18474 (check_removed_breakpoint): Clear pending_is_breakpoint.
18475 (linux_set_resume_request, linux_queue_one_thread)
18476 (resume_status_pending_p): New functions.
18477 (linux_continue_one_thread): Use process->resume.
18478 (linux_resume): Only resume threads if there are no pending events.
18479 * linux-low.h (struct process_info): Add resume request
18480 pointer.
18481
18482 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18483
18484 * regcache.c (new_register_cache): Clear the allocated register
18485 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18486
18487 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18488
18489 * linux-low.c (linux_resume): Take a struct thread_resume *
18490 argument.
18491 (linux_wait): Update call.
18492 (resume_ptr): New static variable.
18493 (linux_continue_one_thread): Renamed from
18494 linux_continue_one_process. Use resume_ptr.
18495 (linux_resume): Use linux_continue_one_thread.
18496 * server.c (handle_v_cont, handle_v_requests): New functions.
18497 (myresume): New function.
18498 (main): Handle 'v' case.
18499 * target.h (struct thread_resume): New type.
18500 (struct target_ops): Change argument of "resume" to struct
18501 thread_resume *.
18502 (myresume): Delete macro.
18503
18504 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18505
18506 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18507 (uninstall): Support DESTDIR.
18508
18509 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18510
18511 * configure.srv: Add xscale*linux copy of arm*linux entry.
18512
18513 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18514
18515 * linux-arm-low.c (arm_reinsert_addr): New function.
18516 (the_low_target): Add arm_reinsert_addr.
18517
18518 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18519
18520 * mem-break.c: Remove whitespace at end of file.
18521
18522 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18523
18524 * configure.in: Check whether we need to prototype strerror.
18525 * server.h: Optionally prototype strerror.
18526 * gdbreplay.c (perror_with_name): Use strerror.
18527 * linux-low.c (linux_attach_lwp): Use strerror.
18528 * utils.c (perror_with_name): Use strerror.
18529 * config.in, configure: Regenerated.
18530
18531 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18532
18533 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18534 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18535
18536 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18537
18538 * Makefile.in (SFILES): Update.
18539 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18540 low-sun3.c: Remove files.
18541
18542 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18543
18544 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18545 (linux_detach_one_process, linux_detach): New functions.
18546 (linux_target_ops): Add linux_detach.
18547 * server.c (main): Handle 'D' packet.
18548 * target.h (struct target_ops): Add "detach" member.
18549 (detach_inferior): Define.
18550
18551 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18552
18553 From Kelley Cook <kelleycook@wideopenwest.com>:
18554 * configure.srv: Accept i[34567]86 variants.
18555
18556 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18557
18558 * linux-low.c (linux_wait_for_event): Correct comment typos.
18559 (linux_resume_one_process): Call check_removed_breakpoint.
18560 (linux_send_signal): New function.
18561 (linux_target_ops): Add linux_send_signal.
18562 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18563 of kill.
18564 * target.h (struct target_ops): Add send_signal.
18565
18566 2003-05-29 Jim Blandy <jimb@redhat.com>
18567
18568 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18569 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18570 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18571 away part of the register's value.
18572
18573 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18574
18575 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18576 (linux_wait_for_event, linux_init_signals): Likewise.
18577
18578 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18579
18580 * configure.in: Check for stdlib.h.
18581 * configure: Regenerated.
18582 * config.in: Regenerated.
18583
18584 2003-01-04 Andreas Schwab <schwab@suse.de>
18585
18586 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18587
18588 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18589
18590 * Makefile.in: Remove obsolete code.
18591
18592 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18593
18594 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18595 defined(PT_FPR0_HI).
18596
18597 2002-11-17 Stuart Hughes <seh@zee2.com>
18598
18599 * linux-arm-low.c (arm_num_regs): Increase.
18600 (arm_regmap): Include status register.
18601
18602 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18603
18604 * linux-low.c (register_addr): Remove incorrect -1 check.
18605
18606 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18607
18608 * linux-low.c (linux_create_inferior): Call setpgid. Return
18609 the new PID.
18610 (unstopped_p, linux_signal_pid): Remove.
18611 (linux_target_ops): Remove linux_signal_pid.
18612 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18613 global instead of target method.
18614 * target.h (struct target_ops): Remove signal_pid. Update comment
18615 for create_inferior.
18616 * server.c (signal_pid): New variable.
18617 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18618 gdbserver. Set the child to be the foreground process group.
18619 (attach_inferior): Set signal_pid.
18620
18621 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18622
18623 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18624
18625 2002-08-20 Jim Blandy <jimb@redhat.com>
18626
18627 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18628 default for this.
18629
18630 2002-08-01 Andrew Cagney <cagney@redhat.com>
18631
18632 * Makefile.in: Make chill references obsolete.
18633
18634 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18635
18636 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18637 * configure: Regenerate.
18638 * config.in: Regenerate.
18639
18640 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18641
18642 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18643 (perror_with_name, remote_close, remote_open, expect, play): Static.
18644
18645 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18646
18647 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18648 byte offsets instead of an array of indexes.
18649 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18650
18651 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18652
18653 * regcache.c: Add comment.
18654
18655 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18656
18657 * thread-db.c: New file.
18658 * proc-service.c: New file.
18659 * acinclude.m4: New file.
18660 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18661 proc-service.o, and thread-db.o.
18662 (linux-low.o): Add USE_THREAD_DB.
18663 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18664 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18665 * aclocal.m4: Regenerated.
18666 * config.in: Regenerated.
18667 * configure: Regenerated.
18668 * configure.in: Check for proc_service.h, sys/procfs.h,
18669 thread_db.h, and linux/elf.h headrs.
18670 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18671 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18672 Check for -lthread_db and thread support.
18673 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18674 PowerPC, and SuperH.
18675 * i387-fp.c: Constify arguments.
18676 * i387-fp.h: Likewise.
18677 * inferiors.c: (struct thread_info): Renamed from
18678 `struct inferior_info'. Remove PID member. Use generic inferior
18679 list header. All uses updated.
18680 (inferiors, signal_pid): Removed.
18681 (all_threads): New variable.
18682 (get_thread): Define.
18683 (add_inferior_to_list): New function.
18684 (for_each_inferior): New function.
18685 (change_inferior_id): New function.
18686 (add_inferior): Removed.
18687 (remove_inferior): New function.
18688 (add_thread): New function.
18689 (free_one_thread): New function.
18690 (remove_thread): New function.
18691 (clear_inferiors): Use for_each_inferior and free_one_thread.
18692 (find_inferior): New function.
18693 (find_inferior_id): New function.
18694 (inferior_target_data): Update argument type.
18695 (set_inferior_target_data): Likewise.
18696 (inferior_regcache_data): Likewise.
18697 (set_inferior_regcache_data): Likewise.
18698 * linux-low.c (linux_bp_reinsert): Remove.
18699 (all_processes, stopping_threads, using_thrads)
18700 (struct pending_signals, debug_threads, pid_of): New.
18701 (inferior_pid): Replace with macro.
18702 (struct inferior_linux_data): Remove.
18703 (get_stop_pc, add_process): New functions.
18704 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18705 Use add_process and add_thread.
18706 (linux_attach_lwp): New function, based on old linux_attach. Use
18707 add_process and add_thread. Set stop_expected for new threads.
18708 (linux_attach): New function.
18709 (linux_kill_one_process): New function.
18710 (linux_kill): Kill all LWPs.
18711 (linux_thread_alive): Use find_inferior_id.
18712 (check_removed_breakpoints, status_pending_p): New functions.
18713 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18714 Update. Use WNOHANG. Wait for cloned processes also. Update process
18715 struct for the found process.
18716 (linux_wait_for_event): New function.
18717 (linux_wait): Use it. Support LWPs.
18718 (send_sigstop, wait_for_sigstop, stop_all_processes)
18719 (linux_resume_one_process, linux_continue_one_process): New functions.
18720 (linux_resume): Support LWPs.
18721 (REGISTER_RAW_SIZE): Remove.
18722 (fetch_register): Use register_size instead. Call supply_register.
18723 (usr_store_inferior_registers): Likewise. Call collect_register.
18724 Fix recursive case.
18725 (regsets_fetch_inferior_registers): Improve error message.
18726 (regsets_store_inferior_registers): Add debugging.
18727 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18728 (unstopped_p, linux_signal_pid): New functions.
18729 (linux_target_ops): Add linux_signal_pid.
18730 (linux_init_signals): New function.
18731 (initialize_low): Call it. Initialize using_threads.
18732 * regcache.c (inferior_regcache_data): Add valid
18733 flag.
18734 (get_regcache): Fetch registers lazily. Add fetch argument
18735 and update all callers.
18736 (regcache_invalidate_one, regcache_invalidate): New
18737 functions.
18738 (new_register_cache): Renamed from create_register_cache.
18739 Return the new regcache.
18740 (free_register_cache): Change argument to a void *.
18741 (registers_to_string, registers_from_string): Call get_regcache
18742 with fetch flag set.
18743 (register_data): Make static. Pass fetch flag to get_regcache.
18744 (supply_register): Call get_regcache with fetch flag clear.
18745 (collect_register): Call get_regcache with fetch flag set.
18746 (collect_register_as_string): New function.
18747 * regcache.h: Update.
18748 * remote-utils.c (putpkt): Flush after debug output and use
18749 stderr.
18750 Handle input interrupts while waiting for an ACK.
18751 (input_interrupt): Use signal_pid method.
18752 (getpkt): Flush after debug output and use stderr.
18753 (outreg): Use collect_register_as_string.
18754 (new_thread_notify, dead_thread_notify): New functions.
18755 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18756 and general_thread.
18757 (look_up_one_symbol): Flush after debug output.
18758 * server.c (step_thread, server_waiting): New variables.
18759 (start_inferior): Don't use signal_pid. Update call to mywait.
18760 (attach_inferior): Update call to mywait.
18761 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18762 (main): Don't fetch/store registers explicitly. Use
18763 set_desired_inferior. Support proposed ``Hs'' packet. Update
18764 calls to mywait.
18765 * server.h: Update.
18766 (struct inferior_list, struct_inferior_list_entry): New.
18767 * target.c (set_desired_inferior): New.
18768 (write_inferior_memory): Constify.
18769 (mywait): New function.
18770 * target.h: Update.
18771 (struct target_ops): New signal_pid method.
18772 (mywait): Removed macro, added prototype.
18773
18774 * linux-low.h (regset_func): Removed.
18775 (regset_fill_func, regset_store_func): New.
18776 (enum regset_type): New.
18777 (struct regset_info): Add type field. Use new operation types.
18778 (struct linux_target_ops): stop_pc renamed to get_pc.
18779 Add decr_pc_after_break and breakpoint_at.
18780 (get_process, get_thread_proess, get_process_thread)
18781 (strut process_info, all_processes, linux_attach_lwp)
18782 (thread_db_init): New.
18783
18784 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18785 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18786 (the_low_target): Add new members.
18787 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18788 (i386_store_fpxregset): Constify.
18789 (target_regsets): Add new kind identifier.
18790 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18791 (i386_set_pc): Add debugging.
18792 (i386_breakpoint_at): New function.
18793 (the_low_target): Add new members.
18794 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18795 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18796 (mips_breakpoint_at): New.
18797 (the_low_target): Add new members.
18798 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18799 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18800 (the_low_target): Add new members.
18801 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18802 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18803 (the_low_target): Add new members.
18804 * linux-x86-64-low.c (target_regsets): Add new kind
18805 identifier.
18806
18807 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18808
18809 From Martin Pool <mbp@samba.org>:
18810 * server.c (gdbserver_usage): New function.
18811 (main): Call it.
18812
18813 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18814
18815 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18816 stop_at -> stop_pc.
18817
18818 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18819
18820 * Makefile.in: Remove obsolete code.
18821
18822 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18823
18824 * linux-low.c (regsets_fetch_inferior_registers),
18825 (regsets_store_inferior_registers): Removed cast to int from
18826 ptrace() calls.
18827 * regcache.h: Added declaration of struct inferior_info.
18828
18829 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18830
18831 * inferiors.c (struct inferior_info): Add regcache_data.
18832 (add_inferior): Call create_register_cache.
18833 (clear_inferiors): Call free_register_cache.
18834 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18835 * regcache.c (struct inferior_regcache_data): New.
18836 (registers): Remove.
18837 (get_regcache): New function.
18838 (create_register_cache, free_register_cache): New functions.
18839 (set_register_cache): Don't initialize the register cache here.
18840 (registers_to_string, registers_from_string, register_data): Call
18841 get_regcache.
18842 * regcache.h: Add prototypes.
18843 * server.h: Likewise.
18844
18845 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18846
18847 * mem-break.c: New file.
18848 * mem-break.h: New file.
18849 * Makefile.in: Add mem-break.o rule; update server.h
18850 dependencies.
18851 * inferiors.c (struct inferior_info): Add target_data
18852 member.
18853 (clear_inferiors): Free target_data member if set.
18854 (inferior_target_data, set_inferior_target_data): New functions.
18855 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18856 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18857 * linux-low.c (linux_bp_reinsert): New variable.
18858 (struct inferior_linux_data): New.
18859 (linux_create_inferior): Use set_inferior_target_data.
18860 (linux_attach): Likewise. Call add_inferior.
18861 (linux_wait_for_one_inferior): New function.
18862 (linux_wait): Call it.
18863 (linux_write_memory): Add const.
18864 (initialize_low): Call set_breakpoint_data.
18865 * linux-low.h (struct linux_target_ops): Add breakpoint
18866 handling members.
18867 * server.c (attach_inferior): Remove extra add_inferior
18868 call.
18869 * server.h: Include mem-break.h. Update inferior.c
18870 prototypes.
18871 * target.c (read_inferior_memory)
18872 (write_inferior_memory): New functions.
18873 * target.h (read_inferior_memory)
18874 (write_inferior_memory): Change macros to prototypes.
18875 (struct target_ops): Update comments. Add const to write_memory
18876 definition.
18877
18878 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18879
18880 * linux-low.c (usr_store_inferior_registers): Support
18881 registers which are allowed to fail to store.
18882 * linux-low.h (linux_target_ops): Likewise.
18883 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18884 (ppc_cannot_store_register): FPSCR may not be storable.
18885
18886 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18887
18888 * server.h: Include <string.h> if HAVE_STRING_H.
18889 * ChangeLog: Correct paths in last ChangeLog entry.
18890
18891 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18892
18893 * linux-low.h: Remove obsolete prototypes.
18894 (struct linux_target_ops): New.
18895 (extern the_low_target): New.
18896 * linux-low.c (num_regs, regmap): Remove declarations.
18897 (register_addr): Use the_low_target explicitly.
18898 (fetch_register): Likewise.
18899 (usr_fetch_inferior_registers): Likewise.
18900 (usr_store_inferior_registers): Likewise.
18901 * linux-arm-low.c (num_regs): Remove.
18902 (arm_num_regs): Define.
18903 (arm_regmap): Renamed from regmap, made static.
18904 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18905 made static.
18906 (arm_cannot_store_register): Renamed from cannot_store_register,
18907 made static.
18908 (the_low_target): New.
18909 * linux-i386-low.c (num_regs): Remove.
18910 (i386_num_regs): Define.
18911 (i386_regmap): Renamed from regmap, made static.
18912 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18913 made static.
18914 (i386_cannot_store_register): Renamed from cannot_store_register,
18915 made static.
18916 (the_low_target): New.
18917 * linux-ia64-low.c (num_regs): Remove.
18918 (ia64_num_regs): Define.
18919 (ia64_regmap): Renamed from regmap, made static.
18920 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18921 made static.
18922 (ia64_cannot_store_register): Renamed from cannot_store_register,
18923 made static.
18924 (the_low_target): New.
18925 * linux-m68k-low.c (num_regs): Remove.
18926 (m68k_num_regs): Define.
18927 (m68k_regmap): Renamed from regmap, made static.
18928 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18929 made static.
18930 (m68k_cannot_store_register): Renamed from cannot_store_register,
18931 made static.
18932 (the_low_target): New.
18933 * linux-mips-low.c (num_regs): Remove.
18934 (mips_num_regs): Define.
18935 (mips_regmap): Renamed from regmap, made static.
18936 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18937 made static.
18938 (mips_cannot_store_register): Renamed from cannot_store_register,
18939 made static.
18940 (the_low_target): New.
18941 * linux-ppc-low.c (num_regs): Remove.
18942 (ppc_num_regs): Define.
18943 (ppc_regmap): Renamed from regmap, made static.
18944 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18945 made static.
18946 (ppc_cannot_store_register): Renamed from cannot_store_register,
18947 made static.
18948 (the_low_target): New.
18949 * linux-s390-low.c (num_regs): Remove.
18950 (s390_num_regs): Define.
18951 (s390_regmap): Renamed from regmap, made static.
18952 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18953 made static.
18954 (s390_cannot_store_register): Renamed from cannot_store_register,
18955 made static.
18956 (the_low_target): New.
18957 * linux-sh-low.c (num_regs): Remove.
18958 (sh_num_regs): Define.
18959 (sh_regmap): Renamed from regmap, made static.
18960 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18961 made static.
18962 (sh_cannot_store_register): Renamed from cannot_store_register,
18963 made static.
18964 (the_low_target): New.
18965 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18966 (the_low_target): New.
18967
18968 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18969
18970 * Makefile.in: Add stamp-h target.
18971 * configure.in: Create stamp-h.
18972 * configure: Regenerated.
18973
18974 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18975
18976 * inferiors.c: New file.
18977 * target.c: New file.
18978 * target.h: New file.
18979 * Makefile.in: Add target.o and inferiors.o. Update
18980 dependencies.
18981 * linux-low.c (inferior_pid): New static variable,
18982 moved from server.c.
18983 (linux_create_inferior): Renamed from create_inferior.
18984 Call add_inferior. Return 0 on success instead of a PID.
18985 (linux_attach): Renamed from myattach.
18986 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18987 (linux_thread_alive): Renamed from mythread_alive.
18988 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18989 child dies.
18990 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18991 (regsets_store_inferior_registers): Correct error message.
18992 Add missing ``return 0''.
18993 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18994 (linux_store_registers): Renamed from store_inferior_registers.
18995 (linux_read_memory): Renamed from read_inferior_memory.
18996 (linux_write_memory): Renamed from write_inferior_memory.
18997 (linux_target_ops): New structure.
18998 (initialize_low): Call set_target_ops ().
18999 * remote-utils.c (unhexify): New function.
19000 (hexify): New function.
19001 (input_interrupt): Send signals to ``signal_pid''.
19002 * server.c (inferior_pid): Remove.
19003 (start_inferior): Update create_inferior call.
19004 (attach_inferior): Call add_inferior.
19005 (handle_query): New function.
19006 (main): Call handle_query for `q' packets.
19007 * server.h: Include "target.h". Remove obsolete prototypes.
19008 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19009
19010 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19011
19012 * Makefile.in: Add WARN_CFLAGS. Update configury
19013 dependencies.
19014 * configure.in: Check for <string.h>
19015 * configure: Regenerate.
19016 * config.in: Regenerate.
19017 * gdbreplay.c: Include needed system headers.
19018 (remote_open): Remove strchr prototype.
19019 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19020 * regcache.c (supply_register): Change buf argument to const void *.
19021 (supply_register_by_name): Likewise.
19022 (collect_register): Change buf argument to void *.
19023 (collect_register_by_name): Likewise.
19024 * regcache.h: Add missing prototypes.
19025 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19026 * server.c (handle_query): New function.
19027 (attached): New static variable, moved out of main.
19028 (main): Quiet longjmp clobber warnings.
19029 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19030 * utils.c (error): Remove NORETURN.
19031 (fatal): Likewise.