]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: turn target op 'process_qsupported' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
0df28b1b
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's process_qsupported op into a method
4 of process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (target_process_qsupported): Update the macro.
9 * target.cc (process_target::process_qsupported): Define.
10
11 Update the derived classes and callers below.
12
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_process_qsupported): Turn into ...
15 (linux_process_target::process_qsupported): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 * win32-low.cc (win32_target_ops): Update.
20
9da41fda
TBA
212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 Turn process_stratum_target's read_loadmap op into a method of
24 process_target.
25
26 * target.h (struct process_stratum_target): Remove the target op.
27 (class process_target): Add the target op. Also add
28 'supports_read_loadmap'.
29 * target.cc (process_target::read_loadmap): Define.
30 (process_target::supports_read_loadmap): Define.
31
32 Update the derived classes and callers below.
33
34 * server.cc (handle_qxfer_fdpic): Update.
35 (handle_query): Update.
36 * linux-low.cc (linux_target_ops): Update.
37 (linux_process_target::supports_read_loadmap): Define.
38 (linux_read_loadmap): Turn into ...
39 (linux_process_target::read_loadmap): ... this.
40 * linux-low.h (class linux_process_target): Update.
41 * lynx-low.cc (lynx_target_ops): Update.
42 * nto-low.cc (nto_target_ops): Update.
43 * win32-low.cc (win32_target_ops): Update.
44
95a45fc1
TBA
452020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
46
47 Turn process_stratum_target's core_of_thread op into a method of
48 process_target.
49
50 * target.h (struct process_stratum_target): Remove the target op.
51 (class process_target): Add the target op.
52 (target_core_of_thread): Update the macro.
53 * target.cc (process_target::core_of_thread): Define.
54
55 Update the derived classes and callers below.
56
57 * linux-low.cc (linux_target_ops): Update.
58 (linux_process_target::core_of_thread): 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
55cf3021
TBA
642020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
65
66 Turn process_stratum_target's handle_monitor_command 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_monitor_command): Update the macro.
72 * target.cc (process_target::handle_monitor_command): Define.
73
74 Update the derived classes and callers below.
75
76 * server.cc (handle_query): Update.
77 * linux-low.cc (linux_target_ops): Update.
78 (linux_process_target::handle_monitor_command): Define.
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
fb00dfce
TBA
842020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
85
86 Turn process_stratum_target's handle_new_gdb_connection op into a
87 method of process_target.
88
89 * target.h (struct process_stratum_target): Remove the target op.
90 (class process_target): Add the target op.
91 (target_handle_new_gdb_connection): Update the macro.
92 * target.cc (process_target::handle_new_gdb_connection): Define.
93
94 Update the derived classes and callers below.
95
96 * linux-low.cc (linux_target_ops): Update.
97 (linux_handle_new_gdb_connection): Turn into ...
98 (linux_process_target::handle_new_gdb_connection): ... this.
99 * linux-low.h (class linux_process_target): Update.
100 * lynx-low.cc (lynx_target_ops): Update.
101 * nto-low.cc (nto_target_ops): Update.
102 * win32-low.cc (win32_target_ops): Update.
103
9690a72a
TBA
1042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
105
106 Turn process_stratum_target's supports_fork_events,
107 supports_vfork_events, and supports_exec_events ops into methods
108 of process_target.
109
110 * target.h (struct process_stratum_target): Remove the target ops.
111 (class process_target): Add the target ops.
112 (target_supports_fork_events): Update the macro.
113 (target_supports_vfork_events): Update the macro.
114 (target_supports_exec_events): Update the macro.
115 * target.cc (process_target::supports_fork_events): Define.
116 (process_target::supports_vfork_events): Define.
117 (process_target::supports_exec_events): Define.
118
119 Update the derived classes and callers below.
120
121 * linux-low.cc (linux_target_ops): Update.
122 (linux_supports_fork_events): Turn into ...
123 (linux_process_target::supports_fork_events): ... this.
124 (linux_supports_vfork_events): Turn into ...
125 (linux_process_target::supports_vfork_events): ... this.
126 (linux_supports_exec_events): Turn into ...
127 (linux_process_target::supports_exec_events): ... 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
652aef77
TBA
1332020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
134
135 Turn process_stratum_target's supports_multi_process op into a
136 method of process_target.
137
138 * target.h (struct process_stratum_target): Remove the target op.
139 (class process_target): Add the target op.
140 * target.cc (process_target::supports_multi_process): Define.
141 (target_supports_multi_process): Update.
142
143 Update the derived classes and callers below.
144
145 * linux-low.cc (linux_target_ops): Update.
146 (linux_supports_multi_process): Turn into ...
147 (linux_process_target::supports_multi_process): ... this.
148 * linux-low.h (class linux_process_target): Update.
149 * lynx-low.cc (lynx_target_ops): Update.
150 * nto-low.cc (nto_target_ops): Update.
151 * win32-low.cc (win32_target_ops): Update.
152
0dc587d4
TBA
1532020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
154
155 Turn process_stratum_target's supports_non_stop, async, and
156 start_non_stop ops into methods of process_target.
157
158 * target.h (struct process_stratum_target): Remove the target ops.
159 (class process_target): Add the target ops.
160 (target_supports_non_stop): Update the macro.
161 (target_async): Update the macro.
162 (start_non_stop): Remove declaration.
163 * target.cc (process_target::supports_non_stop): Define.
164 (process_target::async): Define.
165 (process_target::start_non_stop): Define.
166 (start_non_stop): Remove.
167
168 Update the derived classes and callers below.
169
170 * server.cc (handle_qxfer_siginfo): Update.
171 (handle_query): Update.
172 * linux-low.cc (linux_target_ops): Update.
173 (linux_supports_non_stop): Turn into ...
174 (linux_process_target::supports_non_stop): ... this.
175 (linux_async): Turn into ...
176 (linux_process_target::async): ... this.
177 (linux_start_non_stop): Turn into ...
178 (linux_process_target::start_non_stop): ... this.
179 * linux-low.h (class linux_process_target): Update.
180 * lynx-low.cc (lynx_target_ops): Update.
181 * nto-low.cc (nto_target_ops): Update.
182 (nto_supports_non_stop): Remove; rely on the default behavior
183 instead.
184 * win32-low.cc (win32_target_ops): Update.
185
d7abedf7
TBA
1862020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
187
188 Turn process_stratum_target's qxfer_siginfo op into a method of
189 process_target.
190
191 * target.h (struct process_stratum_target): Remove the target op.
192 (class process_target): Add the target op. Also add
193 'supports_qxfer_siginfo'.
194 * target.cc (process_target::qxfer_siginfo): Define.
195 (process_target::supports_qxfer_siginfo): Define.
196
197 Update the derived classes and callers below.
198
199 * server.cc (handle_qxfer_siginfo): Update.
200 (handle_query): Update.
201 * linux-low.cc (linux_target_ops): Update.
202 (linux_process_target::supports_qxfer_siginfo): Define.
203 (linux_xfer_siginfo): Turn into ...
204 (linux_process_target::qxfer_siginfo): ... this.
205 * linux-low.h (class linux_process_target): Update.
206 * lynx-low.cc (lynx_target_ops): Update.
207 * nto-low.cc (nto_target_ops): Update.
208 * win32-low.cc (win32_target_ops): Update.
209
2d0795ee
TBA
2102020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
211
212 Turn process_stratum_target's qxfer_osdata op into a method of
213 process_target.
214
215 * target.h (struct process_stratum_target): Remove the target op.
216 (class process_target): Add the target op. Also add
217 'supports_qxfer_osdata'.
218 * target.cc (process_target::qxfer_osdata): Define.
219 (process_target::supports_qxfer_osdata): Define.
220
221 Update the derived classes and callers below.
222
223 * server.cc (handle_qxfer_osdata): Update.
224 (handle_query): Update.
225 * linux-low.cc (linux_target_ops): Update.
226 (linux_process_target::supports_qxfer_osdata): Define.
227 (linux_qxfer_osdata): Turn into ...
228 (linux_process_target::qxfer_osdata): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 * nto-low.cc (nto_target_ops): Update.
232 * win32-low.cc (win32_target_ops): Update.
233
ea06bbaa
TBA
2342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
235
236 Turn process_stratum_target's hostio_last_error op into a
237 method of process_target.
238
239 * target.h (struct process_stratum_target): Remove the target op.
240 (class process_target): Add the target op.
241 * target.cc: Add "hostio.h" to includes.
242 (process_target::hostio_last_error): Define.
243
244 Update the derived classes and callers below.
245
246 * hostio.cc (hostio_error): Update.
247 * linux-low.cc: Remove "hostio.h" from includes.
248 (linux_target_ops): Update.
249 * lynx-low.cc (lynx_target_ops): Update.
250 * nto-low.cc (nto_target_ops): Update.
251 * win32-low.h (class win32_process_target): Update.
252 * win32-low.cc (win32_target_ops): Update.
253 (wince_hostio_last_error): Turn into ...
254 (win32_process_target::hostio_last_error): ... this.
255
6e3fd7e9
TBA
2562020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
257
258 Turn process_stratum_target's get_tls_address op into a method of
259 process_target.
260
261 * target.h (struct process_stratum_target): Remove the target op.
262 (class process_target): Add the target op. Also add
263 'supports_get_tls_address'.
264 * target.cc (process_target::get_tls_address): Define.
265 (process_target::supports_get_tls_address): Define.
266
267 Update the derived classes and callers below.
268
269 * server.cc (handle_query): Update.
270 * linux-low.cc (linux_target_ops): Update.
271 (linux_process_target::supports_get_tls_address): Define.
272 (linux_process_target::get_tls_address): Define.
273 * linux-low.h (class linux_process_target): Update.
274 * lynx-low.cc (lynx_target_ops): Update.
275 * nto-low.cc (nto_target_ops): Update.
276 * win32-low.cc (win32_target_ops): Update.
277
5203ae1e
TBA
2782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
279
280 Turn process_stratum_target's read_offsets op into a method of
281 process_target.
282
283 * target.h (struct process_stratum_target): Remove the target op.
284 (class process_target): Add the target op. Also add
285 'supports_read_offsets'.
286 * target.cc (process_target::read_offsets): Define.
287 (process_target::supports_read_offsets): Define.
288
289 Update the derived classes and callers below.
290
291 * server.cc (handle_query): Update.
292 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
293 (linux_target_ops): Update.
294 (linux_process_target::supports_read_offsets): Define.
295 (linux_read_offsets): Turn into ...
296 (linux_process_target::read_offsets): ... this.
297 * linux-low.h (class linux_process_target): Update.
298 * lynx-low.cc (lynx_target_ops): Update.
299 * nto-low.cc (nto_target_ops): Update.
300 * win32-low.cc (win32_target_ops): Update.
301
6eeb5c55
TBA
3022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
303
304 Turn process_stratum_target's stopped_by_watchpoint and
305 stopped_data_address ops into methods of process_target.
306
307 * target.h (struct process_stratum_target): Remove the target ops.
308 (class process_target): Add the target ops.
309 * target.cc (process_target::stopped_by_watchpoint): Define.
310 (process_target::stopped_data_address): Define.
311
312 Update the derived classes and callers below.
313
314 * remote-utils.cc (prepare_resume_reply): Update.
315 * linux-low.cc (linux_target_ops): Update.
316 (linux_stopped_by_watchpoint): Turn into ...
317 (linux_process_target::stopped_by_watchpoint): ... this.
318 (linux_stopped_data_address): Turn into ...
319 (linux_process_target::stopped_data_address): ... this.
320 * linux-low.h (class linux_process_target): Update.
321 * lynx-low.cc (lynx_target_ops): Update.
322 * nto-low.cc (nto_target_ops): Update.
323 (nto_stopped_by_watchpoint): Turn into ...
324 (nto_process_target::stopped_by_watchpoint): ... this.
325 (nto_stopped_data_address): Turn into ...
326 (nto_process_target::stopped_data_address): ... this.
327 * nto-low.h (class nto_process_target): Update.
328 * win32-low.cc (win32_target_ops): Update.
329 (win32_stopped_by_watchpoint): Turn into ...
330 (win32_process_target::stopped_by_watchpoint): ... this.
331 (win32_stopped_data_address): Turn into ...
332 (win32_process_target::stopped_data_address): ... this.
333 * win32-low.h (class win32_process_target): Update.
334
22aa6223
TBA
3352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
336
337 Turn process_stratum_target's supports_hardware_single_step op into
338 a method of process_target.
339
340 * target.h (struct process_stratum_target): Remove the target op.
341 (class process_target): Add the target op.
342 (target_supports_hardware_single_step): Update the macro.
343 (target_can_do_hardware_single_step): Remove declaration.
344 * target.cc (process_target::supports_hardware_single_step): Define.
345 (target_can_do_hardware_single_step): Remove.
346
347 Update the derived classes and callers below.
348
349 * linux-low.h (class linux_process_target): Update.
350 * linux-low.cc (linux_target_ops): Update.
351 (linux_supports_hardware_single_step): Turn into ...
352 (linux_process_target::supports_hardware_single_step): ... this.
353 * lynx-low.h (class lynx_process_target): Update.
354 * lynx-low.cc (lynx_target_ops): Update.
355 (lynx_process_target::supports_hardware_single_step): Define.
356 * nto-low.h (class nto_process_target): Update.
357 * nto-low.cc (nto_target_ops): Update.
358 (nto_process_target::supports_hardware_single_step): Define.
359 * win32-low.h (class win32_process_target): Update.
360 * win32-low.cc (win32_target_ops): Update.
361 (win32_process_target::supports_hardware_single_step): Define.
362
93fe88b2
TBA
3632020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
364
365 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
366 ops into methods of process_target.
367
368 * target.h (struct process_stratum_target): Remove the target ops.
369 (class process_target): Add the target ops.
370 (target_stopped_by_hw_breakpoint): Update the macro.
371 (target_supports_stopped_by_hw_breakpoint): Update the macro.
372 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
373 (process_target::supports_stopped_by_hw_breakpoint): Define.
374
375 Update the derived classes and callers below.
376
377 * linux-low.cc (linux_target_ops): Update.
378 (linux_stopped_by_hw_breakpoint): Turn into ...
379 (linux_process_target::stopped_by_hw_breakpoint): ... this.
380 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
381 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
382 * linux-low.h (class linux_process_target): Update.
383 * lynx-low.cc (lynx_target_ops): Update.
384 * nto-low.cc (nto_target_ops): Update.
385 * win32-low.cc (win32_target_ops): Update.
386
84320c4e
TBA
3872020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
388
389 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
390 ops into methods of process_target.
391
392 * target.h (struct process_stratum_target): Remove the target ops.
393 (class process_target): Add the target ops.
394 (target_stopped_by_sw_breakpoint): Update the macro.
395 (target_supports_stopped_by_sw_breakpoint): Update the macro.
396 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
397 (process_target::supports_stopped_by_sw_breakpoint): Define.
398
399 Update the derived classes and callers below.
400
401 * linux-low.cc (linux_target_ops): Update.
402 (linux_stopped_by_sw_breakpoint): Turn into ...
403 (linux_process_target::stopped_by_sw_breakpoint): ... this.
404 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
405 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
406 * linux-low.h (class linux_process_target): Update.
407 * lynx-low.cc (lynx_target_ops): Update.
408 * nto-low.cc (nto_target_ops): Update.
409 * win32-low.cc (win32_target_ops): Update.
410
7e0bde70
TBA
4112020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
412
413 Turn process_stratum_target's insert_point and remove_point ops
414 into methods of process_target.
415
416 * target.h (struct process_stratum_target): Remove the target ops.
417 (class process_target): Add the target ops.
418 * target.cc (process_target::insert_point): Define.
419 (process_target::remove_point): Define.
420
421 Update the derived classes and callers below.
422
423 * mem-break.cc (set_raw_breakpoint_at): Update.
424 (delete_raw_breakpoint): Update.
425 (uninsert_raw_breakpoint): Update.
426 (reinsert_raw_breakpoint): Update.
427 * linux-low.cc (linux_target_ops): Update.
428 (linux_insert_point): Turn into ...
429 (linux_process_target::insert_point): ... this.
430 (linux_remove_point): Turn into ...
431 (linux_process_target::remove_point): ... this.
432 * linux-low.h (class linux_process_target): Update.
433 * lynx-low.cc (lynx_target_ops): Update.
434 * nto-low.cc (nto_target_ops): Update.
435 (nto_insert_point): Turn into ...
436 (nto_process_target::insert_point): ... this.
437 (nto_remove_point): Turn into ...
438 (nto_process_target::remove_point): ... this.
439 * nto-low.h (class nto_process_target): Update.
440 * win32-low.cc (win32_target_ops): Update.
441 (win32_insert_point): Turn into ...
442 (win32_process_target::insert_point): ... this.
443 (win32_remove_point): Turn into ...
444 (win32_process_target::remove_point): ... this.
445 * win32-low.h (class win32_process_target): Update.
446
a2b2297a
TBA
4472020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
448
449 Turn process_stratum_target's supports_z_point_type op into a
450 method of process_target.
451
452 * target.h (struct process_stratum_target): Remove the target op.
453 (class process_target): Add the target op.
454 * target.cc (process_target::supports_z_point_type): Define.
455
456 Update the derived classes and callers below.
457
458 * mem-break.cc (z_type_supported): Update.
459 * linux-low.cc (linux_target_ops): Update.
460 (linux_supports_z_point_type): Turn into ...
461 (linux_process_target::supports_z_point_type): ... this.
462 * linux-low.h (class linux_process_target): Update.
463 * lynx-low.cc (lynx_target_ops): Update.
464 * nto-low.cc (nto_target_ops): Update.
465 (nto_supports_z_point_type): Turn into ...
466 (nto_process_target::supports_z_point_type): ... this.
467 * nto-low.h (class nto_process_target): Update.
468 * win32-low.cc (win32_target_ops): Update.
469 (win32_supports_z_point_type): Turn into ...
470 (win32_process_target::supports_z_point_type): ... this.
471 * win32-low.h (class win32_process_target): Update.
472
eac215cc
TBA
4732020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
474
475 Turn process_stratum_target's read_auxv op into a method of
476 process_target.
477
478 * target.h (class process_stratum_target): Remove the target op.
479 (struct process_target): Add the target op. Also add
480 'supports_read_auxv'.
481 * target.cc (process_target::read_auxv): Define.
482 (process_target::supports_read_auxv): Define.
483
484 Update the derived classes and callers below.
485
486 * server.cc (handle_qxfer_auxv): Update.
487 (handle_query): Update.
488 * linux-low.cc (linux_target_ops): Update.
489 (linux_process_target::supports_read_auxv): Define.
490 (linux_read_auxv): Turn into ...
491 (linux_process_target::read_auxv): ... this.
492 * linux-low.h (class linux_process_target): Update.
493 * lynx-low.cc (lynx_target_ops): Update.
494 * nto-low.cc (nto_target_ops): Update.
495 (nto_process_target::supports_read_auxv): Define.
496 (nto_read_auxv): Turn into ...
497 (nto_process_target::read_auxv): ... this.
498 * nto-low.h (class nto_process_target): Update.
499 * win32-low.cc (win32_target_ops): Update.
500
eb497a2a
TBA
5012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
502
503 Turn process_stratum_target's request_interrupt op into a method of
504 process_target.
505
506 * target.h (struct process_stratum_target): Remove the target op.
507 (class process_target): Add the target op.
508
509 Update the derived classes and callers below.
510
511 * remote-utils.cc (putpkt_binary_1): Update.
512 (input_interrupt): Update.
513 (getpkt): Update.
514 * server.cc (handle_v_requests): Update.
515 * linux-low.cc (linux_target_ops): Update.
516 (linux_request_interrupt): Turn into ...
517 (linux_process_target::request_interrupt): ... this.
518 * linux-low.h (class linux_process_target): Update.
519 * lynx-low.cc (lynx_target_ops): Update.
520 (lynx_request_interrupt): Turn into ...
521 (lynx_process_target::request_interrupt): ... this.
522 * lynx-low.h (class lynx_process_target): Update.
523 * nto-low.cc (nto_target_ops): Update.
524 (nto_request_interrupt): Turn into ...
525 (nto_process_target::request_interrupt): ... this.
526 * nto-low.h (class nto_process_target): Update.
527 * win32-low.cc (win32_target_ops): Update.
528 (win32_request_interrupt): Turn into ...
529 (win32_process_target::request_interrupt): ... this.
530 * win32-low.h (class win32_process_target): Update.
531
2a31c7aa
TBA
5322020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
533
534 Turn process_stratum_target's look_up_symbols op into a method of
535 process_target.
536
537 * target.h (struct process_stratum_target): Remove the target op.
538 (class process_target): Add the target op.
539 * target.cc (process_target::look_up_symbols): Define.
540
541 Update the derived classes and callers below.
542
543 * server.cc (handle_query): Update.
544 * linux-low.cc (linux_target_ops): Update.
545 (linux_look_up_symbols): Turn into ...
546 (linux_process_target::look_up_symbols): ... this.
547 * linux-low.h (class linux_process_target): Update.
548 * lynx-low.cc (lynx_target_ops): Update.
549 * nto-low.cc (nto_target_ops): Update.
550 * win32-low.cc (win32_target_ops): Update.
551
e2558df3
TBA
5522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
553
554 Turn process_stratum_target's read_memory and write_memory
555 ops into methods of process_target.
556
557 * target.h (struct process_stratum_target): Remove the target ops.
558 (class process_target): Add the target ops.
559
560 Update the derived classes and callers below.
561
562 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
563 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
564 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
565 (arm_get_syscall_trapinfo): Update.
566 * linux-cris-low.cc (cris_breakpoint_at): Update.
567 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
568 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
569 * linux-mips-low.cc (mips_breakpoint_at): Update.
570 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
571 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
572 * linux-sh-low.cc (sh_breakpoint_at): Update.
573 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
574 (sparc_store_gregset_from_stack): Update.
575 (sparc_breakpoint_at): Update.
576 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
577 * linux-tile-low.cc (tile_breakpoint_at): Update.
578 * linux-x86-low.cc (x86_breakpoint_at): Update.
579 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
580 * mem-brea.cc (insert_memory_breakpoint): Update.
581 (validate_inserted_breakpoint): Update.
582 * target.cc (read_inferior_memory): Update.
583 (target_write_memory): Update.
584 * linux-low.cc (linux_target_ops): Update.
585 (linux_read_memory): Make a wrapper around the read_memory target
586 op call.
587 (linux_process_target::read_memory): Rename from linux_read_memory.
588 (linux_write_memory): Turn into ...
589 (linux_process_target::write_memory): ... this.
590 * linux-low.h (class linux_process_target): Update.
591 * lynx-low.cc (lynx_target_ops): Update.
592 (lynx_read_memory): Turn into ...
593 (lynx_process_target::read_memory): ... this.
594 (lynx_write_memory): Turn into ...
595 (lynx_process_target::write_memory): ... this.
596 * lynx-low.h (class lynx_process_target): Update.
597 * nto-low.cc (nto_target_ops): Update.
598 (nto_read_memory): Turn into ...
599 (nto_process_target::read_memory): ... this.
600 (nto_write_memory): Turn into ...
601 (nto_process_target::write_memory): ... this.
602 * nto-low.h (class nto_process_target): Update.
603 * win32-low.cc (win32_target_ops): Update.
604 (win32_read_inferior_memory): Turn into ...
605 (win32_process_target::read_memory): ... this.
606 (win32_write_inferior_memory): Turn into ...
607 (win32_process_target::write_memory): ... this.
608 * win32-low.h (class win32_process_target): Update.
609
79b44087
TBA
6102020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
611
612 Turn process_stratum_target's prepare_to_access_memory and
613 done_accessing_memory ops into methods of process_target.
614
615 * target.h (struct process_stratum_target): Remove the target ops.
616 (class process_target): Add the target ops.
617 * target.cc (process_target::prepare_to_access_memory): Define.
618 (process_target::done_accessing_memory): Define.
619 (prepare_to_access_memory): Update.
620 (done_accessing_memory): Update.
621
622 Update the derived classes and callers below.
623
624 * linux-low.cc (linux_target_ops): Update.
625 (linux_prepare_to_access_memory): Turn into ...
626 (linux_process_target::prepare_to_access_memory): ... this.
627 (linux_done_accessing_memory): Turn into ...
628 (linux_process_target::done_accessing_memory): ... this.
629 * linux-low.h (class linux_process_target): Update.
630 * lynx-low.cc (lynx_target_ops): Update.
631 * nto-low.cc (nto_target_ops): Update.
632 * win32-low.cc (win32_target_ops): Update.
633
a5a4d4cd
TBA
6342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
635
636 Turn process_stratum_target's fetch_registers and store_registers
637 ops into methods of process_target.
638
639 * target.h (struct process_stratum_target): Remove the target ops.
640 (class process_target): Add the target ops.
641 (fetch_inferior_registers): Update the macro.
642 (store_inferior_registers): Update the macro.
643
644 Update the derived classes and callers below.
645
646 * linux-low.cc (linux_target_ops): Update.
647 (linux_fetch_registers): Turn into ...
648 (linux_process_target::fetch_registers): ... this.
649 (linux_store_registers): Turn into ...
650 (linux_process_target::store_registers): ... this.
651 * linux-low.h (class linux_process_target): Update.
652 * lynx-low.cc (lynx_target_ops): Update.
653 (lynx_fetch_registers): Turn into ...
654 (lynx_process_target::fetch_registers): ... this.
655 (lynx_store_registers): Turn into ...
656 (lynx_process_target::store_registers): ... this.
657 * lynx-low.h (class lynx_process_target): Update.
658 * nto-low.cc (nto_target_ops): Update.
659 (nto_fetch_registers): Turn into ...
660 (nto_process_target::fetch_registers): ... this.
661 (nto_store_registers): Turn into ...
662 (nto_process_target::store_registers): ... this.
663 * nto-low.h (class nto_process_target): Update.
664 * win32-low.cc (win32_target_ops): Update.
665 (win32_fetch_inferior_registers): Turn into ...
666 (win32_process_target::fetch_registers): ... this.
667 (win32_store_inferior_registers): Turn into ...
668 (win32_process_target::store_registers): ... this.
669 * win32-low.h (class win32_process_target): Update.
670
6532e7e3
TBA
6712020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
672
673 Turn process_stratum_target's wait op into a method of
674 process_target.
675
676 * target.h (struct process_stratum_target): Remove the target op.
677 (class process_target): Add the target op.
678
679 Update the derived classes and callers below.
680
681 * target.cc (target_wait): Update.
682 * linux-low.cc (linux_target_ops): Update.
683 (linux_wait): Turn into ...
684 (linux_process_target::wait): ... this.
685 * linux-low.h (class linux_process_target): Update.
686 * lynx-low.cc (lynx_target_ops): Update.
687 (lynx_wait): Turn into ...
688 (lynx_process_target::wait): ... this.
689 * lynx-low.h (class lynx_process_target): Update.
690 * nto-low.cc (nto_target_ops): Update.
691 (nto_wait): Turn into ...
692 (nto_process_target::wait): ... this.
693 * nto-low.h (class nto_process_target): Update.
694 * win32-low.cc (win32_target_ops): Update.
695 (win32_wait): Turn into ...
696 (win32_process_target::wait): ... this.
697 (do_initial_child_stuff): Update.
698 * win32-low.h (class win32_process_target): Update.
699
0e4d7e35
TBA
7002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
701
702 Turn process_stratum_target's resume op into a method of
703 process_target.
704
705 * target.h (struct process_stratum_target): Remove the target op.
706 (class process_target): Add the target op.
707
708 Update the derived classes and callers below.
709
710 * server.cc (resume): Update.
711 * target.cc (target_stop_and_wait): Update.
712 (target_continue_no_signal): Update.
713 (target_continue): Update.
714 * linux-low.cc (linux_target_ops): Update.
715 (linux_resume): Turn into ...
716 (linux_process_target::resume): ... this.
717 * linux-low.h (class linux_process_target): Update.
718 * lynx-low.cc (lynx_target_ops): Update.
719 (lynx_resume): Turn into ...
720 (lynx_process_target::resume): ... this.
721 * lynx-low.h (class lynx_process_target): Update.
722 * nto-low.cc (nto_target_ops): Update.
723 (nto_resume): Turn into ...
724 (nto_process_target::resume): ... this.
725 * nto-low.h (class nto_process_target): Update.
726 * win32-low.cc (win32_target_ops): Update.
727 (win32_resume): Turn into ...
728 (win32_process_target::resume): ... this.
729 (win32_process_target::detach): Update.
730 (do_initial_child_stuff): Update.
731 * win32-low.h (class win32_process_target): Update.
732
13d3d99b
TBA
7332020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
734
735 Turn process_stratum_target's thread_alive op into a method of
736 process_target.
737
738 * target.h (struct process_stratum_target): Remove the target op.
739 (class process_target): Add the target op.
740 (mythread_alive): Update the macro.
741
742 Update the derived classes and callers below.
743
744 * linux-low.cc (linux_target_ops): Update.
745 (linux_thread_alive): Turn into ...
746 (linux_process_target::thread_alive): ... this.
747 (wait_for_sigstop): Update.
748 * linux-low.h (class linux_process_target): Update.
749 * lynx-low.cc (lynx_target_ops): Update.
750 (lynx_thread_alive): Turn into ...
751 (lynx_process_target::thread_alive): ... this.
752 * lynx-low.h (class lynx_process_target): Update.
753 * nto-low.cc (nto_target_ops): Update.
754 (nto_thread_alive): Turn into ...
755 (nto_process_target::thread_alive): ... this.
756 * nto-low.h (class nto_process_target): Update.
757 * win32-low.cc (win32_target_ops): Update.
758 (win32_thread_alive): Turn into ...
759 (win32_process_target::thread_alive): ... this.
760 * win32-low.h (class win32_process_target): Update.
761
95a49a39
TBA
7622020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
763
764 Turn process_stratum_target's join op into a method of
765 process_target.
766
767 * target.h (struct process_stratum_target): Remove the target op.
768 (class process_target): Add the target op.
769 (join_inferior): Update the macro.
770
771 Update the derived classes and callers below.
772
773 * linux-low.cc (linux_target_ops): Update.
774 (linux_join): Turn into ...
775 (linux_process_target::join): ... this.
776 * linux-low.h (class linux_process_target): Update.
777 * lynx-low.cc (lynx_target_ops): Update.
778 (lynx_join): Turn into ...
779 (lynx_process_target::join): ... this.
780 * lynx-low.h (class lynx_process_target): Update.
781 * nto-low.cc (nto_target_ops): Update.
782 (nto_process_target::join): Define.
783 * nto-low.h (class nto_process_target): Update.
784 * win32-low.cc (win32_target_ops): Update.
785 (win32_join): Turn into ...
786 (win32_process_target::join): ... this.
787 * win32-low.h (class win32_process_target): Update.
788
8adb37b9
TBA
7892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
790
791 Turn process_stratum_target's mourn op into a method of
792 process_target.
793
794 * target.h (struct process_stratum_target): Remove the target op.
795 (class process_target): Add the target op.
796
797 Update the derived classes and callers below.
798
799 * target.cc (target_mourn_inferior): Update.
800 * linux-low.cc (linux_target_ops): Update.
801 (linux_mourn): Turn into ...
802 (linux_process_target::mourn): ... this.
803 (handle_extended_wait): Update.
804 (linux_process_target::kill): Update.
805 (linux_process_target::detach): Update.
806 * linux-low.h (class linux_process_target): Update.
807 * lynx-low.cc (lynx_target_ops): Update.
808 (lynx_mourn): Turn into ...
809 (lynx_process_target::mourn): ... this.
810 * lynx-low.h (class lynx_process_target): Update.
811 * nto-low.cc (nto_target_ops): Update.
812 (nto_mourn): Turn into ...
813 (nto_process_target::mourn): ... this.
814 * nto-low.h (class nto_process_target): Update.
815 * win32-low.cc (win32_target_ops): Update.
816 (win32_mourn): Turn into ...
817 (win32_process_target::mourn): ... this.
818 * win32-low.h (class win32_process_target): Update.
819
9061c9cf
TBA
8202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
821
822 Turn process_stratum_target's detach op into a method of
823 process_target.
824
825 * target.h (struct process_stratum_target): Remove the target op.
826 (class process_target): Add the target op.
827 (detach_inferior): Update the macro.
828
829 Update the derived classes and callers below.
830
831 * linux-low.cc (linux_target_ops): Update.
832 (linux_detach): Turn into ...
833 (linux_process_target::detach): ... this.
834 * linux-low.h (class linux_process_target): Update.
835 * lynx-low.cc (lynx_target_ops): Update.
836 (lynx_detach): Turn into ...
837 (lynx_process_target::detach): ... this.
838 * lynx-low.h (class lynx_process_target): Update.
839 * nto-low.cc (nto_target_ops): Update.
840 (nto_detach): Turn into ...
841 (nto_process_target::detach): ... this.
842 * nto-low.h (class nto_process_target): Update.
843 * win32-low.cc (win32_target_ops): Update.
844 (win32_detach): Turn into ...
845 (win32_process_target::detach): ... this.
846 * win32-low.h (class win32_process_target): Update.
847
c6885a57
TBA
8482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
849
850 Turn process_stratum_target's kill op into a method of
851 process_target.
852
853 * target.h (struct process_stratum_target): Remove the target op.
854 (class process_target): Add the target op.
855
856 Update the derived classes and callers below.
857
858 * target.cc (kill_inferior): Update.
859 * linux-low.cc (linux_target_ops): Update.
860 (linux_kill): Turn into ...
861 (linux_process_target::kill): ... this.
862 * linux-low.h (class linux_process_target): Update.
863 * lynx-low.cc (lynx_target_ops): Update.
864 (lynx_kill): Turn into ...
865 (lynx_process_target::kill): ... this.
866 * lynx-low.h (class lynx_process_target): Update.
867 * nto-low.cc (nto_target_ops): Update.
868 (nto_kill): Turn into ...
869 (nto_process_target::kill): ... this.
870 * nto-low.h (class nto_process_target): Update.
871 * win32-low.cc (win32_target_ops): Update.
872 (win32_kill): Turn into ...
873 (win32_process_target::kill): ... this.
874 * win32-low.h (class win32_process_target): Update.
875
ef03dad8
TBA
8762020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
877
878 Turn process_stratum_target's attach op into a method of
879 process_target.
880
881 * target.h (struct process_stratum_target): Remove the target op.
882 (class process_target): Add the target op.
883 (myattach): Update the macro.
884
885 Update the derived classes and callers below.
886
887 * linux-low.cc (linux_target_ops): Update.
888 (linux_attach): Turn into ...
889 (linux_process_target::attach): ... this.
890 * linux-low.h (class linux_process_target): Update.
891 * lynx-low.cc (lynx_target_ops): Update.
892 (lynx_attach): Turn into ...
893 (lynx_process_target::attach): ... this.
894 * lynx-low.h (class lynx_process_target): Update.
895 * nto-low.cc (nto_target_ops): Update.
896 (nto_attach): Turn into ...
897 (nto_process_target::attach): ... this.
898 * nto-low.h (class nto_process_target): Update.
899 * win32-low.cc (win32_target_ops): Update.
900 (win32_attach): Turn into ...
901 (win32_process_target::attach): ... this.
902 * win32-low.h (class win32_process_target): Update.
903
6dee9afb
TBA
9042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
905
906 Turn process_stratum_target's post_create_inferior op into a method
907 of process_target.
908
909 * target.h (struct process_stratum_target): Remove the target op.
910 (class process_target): Add the target op.
911 (target_post_create_inferior): Update the macro.
912 * target.cc (process_target::post_create_inferior): Define.
913
914 Update the derived classes and callers below.
915
916 * linux-low.cc (linux_target_ops): Update.
917 (linux_post_create_inferior): Turn into ...
918 (linux_process_target::post_create_inferior): ... this.
919 * linux-low.h (class linux_process_target): Update.
920 * lynx-low.cc (lynx_target_ops): Update.
921 * nto-low.cc (nto_target_ops): Update.
922 * win32-low.cc (win32_target_ops): Update.
923
15295543
TBA
9242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
925
926 Turn process_stratum_target's create_inferior op into a method of
927 process_target.
928
929 * target.h (struct process_stratum_target): Remove the target op.
930 (class process_target): Add the target op.
931 (create_inferior): Rename the macro to ...
932 (target_create_inferior): ... this.
933
934 Update the derived classes and callers below.
935
936 * server.cc (handle_v_run): Update.
937 (captured_main): Update.
938 (process_serial_event): Update.
939 * linux-low.cc (linux_target_ops): Update.
940 (linux_create_inferior): Turn into ...
941 (linux_process_target::create_inferior): ... this.
942 * linux-low.h (class linux_process_target): Update.
943 * lynx-low.cc (lynx_target_ops): Update.
944 (lynx_create_inferior): Turn into ...
945 (lynx_process_target::create_inferior): ... this.
946 * lynx-low.h (class lynx_process_target): Update.
947 * nto-low.cc (nto_target_ops): Update.
948 (nto_create_inferior): Turn into ...
949 (nto_process_target::create_inferior): ... this.
950 * nto-low.h (class nto_process_target): Update.
951 * win32-low.cc (win32_target_ops): Update.
952 (win32_create_inferior): Turn into ...
953 (win32_process_target::create_inferior): ... this.
954 * win32-low.h (class win32_process_target): Update.
955
5ef9273d
TBA
9562020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
957
958 * target.h (class process_target): New class definition.
959 (struct process_stratum_target) <pt>: New field with type
960 'process_target*'.
961 * linux-low.h (class linux_process_target): Define as a derived
962 class of 'process_target'.
963 * linux-low.cc (linux_target_ops): Add a linux_process_target*
964 as the 'pt' field.
965 * lynx-low.h (class lynx_process_target): Define as a derived
966 class of 'process_target'.
967 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
968 as the 'pt' field.
969 * nto-low.h (class nto_process_target): Define as a derived
970 class of 'process_target'.
971 * nto-low.cc (nto_target_ops): Add an nto_process_target*
972 as the 'pt' field.
973 * win32-low.h (class win32_process_target): Define as a derived
974 class of 'process_target'.
975 * win32-low.cc (win32_target_ops): Add a win32_process_target*
976 as the 'pt' field.
977
9f1528a1
AB
9782020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
979
980 * configure: Regenerate.
981
bf84f706
MR
9822020-02-19 Maciej W. Rozycki <macro@wdc.com>
983 Andrew Burgess <andrew.burgess@embecosm.com>
984
985 * linux-riscv-low.cc: New file.
986 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
987 and nat/riscv-linux-tdesc.c.
988 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
989 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
990 Define.
991
1a627e7e
TT
9922020-02-14 Tom Tromey <tom@tromey.com>
993
994 * acinclude.m4: Don't include acx_configure_dir.m4.
995 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
996 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
997 (all, install-only, uninstall, clean-info, clean)
998 (maintainer-clean): Don't recurse.
999 (subdir_do, all-lib): Remove.
1000 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1001 (GNULIB_H): Remove.
1002 (generated_files): Update.
1003 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1004 * configure: Rebuild.
1005 * configure.ac: Don't configure gnulib or libiberty.
1006 (GNULIB): Update.
1007
a9b34532
EZ
10082020-02-14 Eli Zaretskii <eliz@gnu.org>
1009
1010 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1011 preparing the command line for CreateProcess.
1012 (win32_create_inferior): Reflect the program name in debugging
1013 output that shows the process and its command line.
1014
feacfcac
SM
10152020-02-13 Simon Marchi <simon.marchi@efficios.com>
1016
1017 * Makefile.in: Rename source files from .c to .cc.
1018 * %.c: Rename to %.cc.
1019 * configure.ac: Rename server.c to server.cc.
1020 * configure: Re-generate.
1021
06b3c5bd
SM
10222020-02-13 Simon Marchi <simon.marchi@efficios.com>
1023
1024 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1025
052793ad
HD
10262020-02-12 Hannes Domani <ssbssa@yahoo.de>
1027
1028 * win32-low.c (win32_create_inferior): Set signal_pid.
1029
f20e3e82
MR
10302020-02-12 Maciej W. Rozycki <macro@wdc.com>
1031 Pedro Alves <palves@redhat.com>
1032
1033 Skip building gdbserver in a cross-configuration.
1034 * configure.srv: Set $gdbserver_host depending on whether $target
1035 is $host. Use $gdbserver_host instead of $host.
1036
8ddd8e0e
SM
10372020-02-11 Simon Marchi <simon.marchi@efficios.com>
1038
1039 * configure: Re-generate.
1040
898e7f60
SM
10412020-02-11 Simon Marchi <simon.marchi@efficios.com>
1042
1043 * configure: Re-generate.
1044
58df732b
SM
10452020-02-11 Simon Marchi <simon.marchi@efficios.com>
1046
1047 * acinclude.m4: Update warning.m4 path.
1048
7928d571
HD
10492020-02-09 Hannes Domani <ssbssa@yahoo.de>
1050
1051 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1052 (handle_exception): Set siginfo_er.
1053 (win32_xfer_siginfo): New function.
1054
919adfe8
TT
10552020-02-07 Tom Tromey <tom@tromey.com>
1056 Pedro Alves <palves@redhat.com>
1057
1058 * README: Update build documentation.
1059 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1060 host, not target.
1061 * configure.ac: Update paths.
1062 * configure: Rebuild.
1063 * acinclude.m4: Update paths.
1064 * Makefile.in: Update include paths.
1065 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1066 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1067 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1068 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1069 (%-generated.c): Update paths.
1070 * Move entire directory from ../gdb/gdbserver.
1071
287c844a
MR
10722020-01-29 Maciej W. Rozycki <macro@wdc.com>
1073
1074 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1075
548a204f
PFC
10762020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1077
1078 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1079 assignment instead of srv_linux_obj.
1080
a2236a08
HD
10812020-01-28 Hannes Domani <ssbssa@yahoo.de>
1082
1083 * server.c (handle_qxfer_libraries): Write segment-address with
1084 paddress.
1085
bdaed379
HD
10862020-01-24 Hannes Domani <ssbssa@yahoo.de>
1087
1088 * Makefile.in (install-strip): New target.
1089 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1090 * aclocal.m4: Regenerate.
1091 * configure: Regenerate.
1092 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1093
42cd72aa
MR
10942020-01-24 Maciej W. Rozycki <macro@wdc.com>
1095
1096 * Makefile.in (SFILES): Adjust paths to point to real files.
1097 (OBS): Move waitstatus.o to target/waitstatus.o.
1098 (TAGS): Transform paths appropriately.
1099 (%.o): Rename to...
1100 (nat/%.o): ... this pattern rule.
1101 (%.o): Rename to...
1102 (target/%.o): ... this pattern rule.
1103 * configure.srv: Adjust paths throughout to include nat/ prefix
1104 with the revant files.
1105 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1106 * configure: Regenerate.
1107
42ba50ec
MR
11082020-01-24 Maciej W. Rozycki <macro@wdc.com>
1109
1110 * Makefile.in (TAGS): Remove config files from the recipe.
1111
05ea2a05
TT
11122020-01-14 Tom Tromey <tom@tromey.com>
1113
1114 * configure: Rebuild.
1115 * configure.ac: Remove any checks that were added to common.m4.
1116 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1117 lib-link.m4.
1118
01027315
TT
11192020-01-14 Tom Tromey <tom@tromey.com>
1120
1121 * server.h: Include config.h.
1122 * gdbreplay.c: Include config.h.
1123 * configure: Rebuild.
1124 * configure.ac: Don't source common.host.
1125 * acinclude.m4: Update path.
1126 * Makefile.in (INCSUPPORT): New variable.
1127 (INCLUDE_CFLAGS): Add INCSUPPORT.
1128 (SFILES): Update paths.
1129 (version-generated.c): Update path to create-version.sh.
1130 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1131
b2ceabe8
TT
11322020-01-14 Tom Tromey <tom@tromey.com>
1133
1134 * configure.ac (LIBS): Use WIN32APILIBS.
1135 (USE_WIN32API): Don't define.
1136 * configure: Rebuild.
1137
25c51f71
TT
11382020-01-14 Tom Tromey <tom@tromey.com>
1139
1140 * configure: Rebuild.
1141
c0bd321d
SM
11422020-01-13 Simon Marchi <simon.marchi@efficios.com>
1143
1144 * Makefile.in (%-generated.c): Remove rule for files from
1145 regformats/i386.
1146
bb564c58
SM
11472020-01-13 Simon Marchi <simon.marchi@efficios.com>
1148
1149 * configure: Re-generate.
1150
6e37c371
SM
11512020-01-13 Simon Marchi <simon.marchi@efficios.com>
1152
1153 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1154 Define to static.
1155 * tracepoint.c (stop_tracing, flush_trace_buffer,
1156 about_to_request_buffer_space, get_trace_state_variable_value,
1157 set_trace_state_variable_value, gdb_collect): Add declaration.
1158
df4a0200
SM
11592020-01-13 Simon Marchi <simon.marchi@efficios.com>
1160
1161 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1162 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1163 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1164 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1165 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1166 static.
1167
89e94ec9
SM
11682020-01-13 Simon Marchi <simon.marchi@efficios.com>
1169
1170 * inferiors.c: Include gdbsupport/common-inferior.h.
1171
2552728a
SM
11722020-01-13 Simon Marchi <simon.marchi@efficios.com>
1173
1174 * hostio-errno.c: Include hostio.h.
1175
4025fa09
SM
11762020-01-13 Simon Marchi <simon.marchi@efficios.com>
1177
1178 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1179 prerequisite.
1180
c0b0a142
SM
11812020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1182
1183 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1184 * linux-arm-tdesc.h: Include arch/arm.h.
1185
bb1183e2
SM
11862020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1189
f5df0b5f
SM
11902020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1191
1192 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1193 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1194
5b6d1e4f
PA
11952020-01-10 Pedro Alves <palves@redhat.com>
1196
1197 * fork-child.c (post_fork_inferior): Pass target down to
1198 startup_inferior.
1199 * inferiors.c (switch_to_thread): Add process_stratum_target
1200 parameter.
1201 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1202 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1203 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1204 * remote-utils.c (prepare_resume_reply): Pass the target to
1205 switch_to_thread.
1206 * target.c (the_target): Now a process_stratum_target.
1207 (done_accessing_memory): Pass the target to switch_to_thread.
1208 (set_target_ops): Ajust to use process_stratum_target.
1209 * target.h (struct target_ops): Rename to ...
1210 (struct process_stratum_target): ... this.
1211 (the_target, set_target_ops): Adjust.
1212 (prepare_to_access_memory): Adjust comment.
1213 * win32-low.c (child_xfer_memory): Adjust to use
1214 process_stratum_target.
1215 (win32_target_ops): Now a process_stratum_target.
1216
559e7e50
EZ
12172020-01-06 Eli Zaretskii <eliz@gnu.org>
1218 Pedro Alves <palves@redhat.com>
1219
1220 * win32-low.c (get_child_debug_event): Extract the fatal exception
1221 from the exit status and convert to the equivalent Posix signal
1222 number.
1223 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1224 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1225
48189bec
HD
12262020-01-01 Hannes Domani <ssbssa@yahoo.de>
1227
1228 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1229
5dd8bf88
JB
12302020-01-01 Joel Brobecker <brobecker@adacore.com>
1231
1232 * server.c (gdbserver_version): Change copyright year to 2020.
1233 * gdbreplay.c (gdbreplay_version): Likewise.
1234
0ad6b8ee
CB
12352019-12-19 Christian Biesinger <cbiesinger@google.com>
1236
1237 * configure: Regenerate.
1238 * configure.ac: Quote variable arguments of test.
1239
1ee7b812
BE
12402019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1241
1242 * Makefile.in: Fix build with GNU Make 3.81
1243
d9fa87f4
TT
12442019-12-16 Tom Tromey <tromey@adacore.com>
1245
1246 * server.c (get_exec_file): Constify result.
1247
ab7d13f0
CB
12482019-12-10 Christian Biesinger <cbiesinger@google.com>
1249
1250 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1251 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1252 * config.in: Regenerate.
1253 * configure: Regenerate.
1254 * configure.ac: Don't check for strerror.
1255 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1256 Call safe_strerror instead of strerror.
1257 * server.h (strerror): Remove this now-unnecessary declaration.
1258 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1259 strerror.
1260 (gdb_agent_helper_thread): Likewise.
1261 * utils.c (perror_with_name): Likewise.
1262
4da8c3a8
TT
12632019-11-26 Tom Tromey <tom@tromey.com>
1264
1265 * configure, config.in: Rebuild.
1266
21987b9c
TT
12672019-11-26 Tom Tromey <tom@tromey.com>
1268
1269 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1270 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1271 gdb_sigmask.
1272 * configure, config.in: Rebuild.
1273
5e030278
TT
12742019-11-26 Tom Tromey <tom@tromey.com>
1275
1276 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1277 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1278 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1279 * acinclude.m4: Include ax_pthread.m4.
1280 * config.in, configure: Rebuild.
1281
6d91ce9a
CB
12822019-11-26 Christian Biesinger <cbiesinger@google.com>
1283
1284 * debug.c (debug_set_output): Call safe_strerror instead of
1285 strerror.
1286 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1287 (linux_kill_one_lwp): Likewise.
1288 (linux_detach_one_lwp): Likewise.
1289 (linux_wait_for_event_filtered): Likewise.
1290 (store_register): Likewise.
1291 * lynx-low.c (lynx_attach): Likewise.
1292 * mem-break.c (insert_memory_breakpoint): Likewise.
1293 (remove_memory_breakpoint): Likewise.
1294 (delete_fast_tracepoint_jump): Likewise.
1295 (set_fast_tracepoint_jump): Likewise.
1296 (uninsert_fast_tracepoint_jumps_at): Likewise.
1297 (reinsert_fast_tracepoint_jumps_at): Likewise.
1298 * nto-low.c (nto_xfer_memory): Likewise.
1299 (nto_resume): Likewise.
1300
6cdd651f
LM
13012019-11-20 Luis Machado <luis.machado@linaro.org>
1302
1303 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1304 instead of register count.
1305 * tdesc.c (tdesc_contains_feature): New function.
1306 * tdesc.h (tdesc_contains_feature): New prototype.
1307
cd850b40
CB
13082019-11-15 Christian Biesinger <cbiesinger@google.com>
1309
1310 * Makefile.in: Add safe-strerror.c.
1311 * configure: Regenerate.
1312 * configure.ac: Don't source common.host.
1313
5abebf3c
CB
13142019-11-15 Christian Biesinger <cbiesinger@google.com>
1315
1316 * config.in: Regenerate.
1317 * configure: Regenerate.
1318
e06f3d6e
AB
13192019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1320
1321 * ax.c (ax_printf): Handle size_t_arg.
1322
ca3a04f6
CB
13232019-11-06 Christian Biesinger <cbiesinger@google.com>
1324
1325 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1326 * mi/mi-main.c (output_cores): Likewise.
1327 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1328 (linux_xfer_osdata_modules): Likewise.
1329 * remote.c (register_remote_support_xml): Likewise.
1330 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1331 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1332
e48f6033
CB
13332019-11-01 Christian Biesinger <cbiesinger@google.com>
1334
1335 * configure: Regenerate.
1336 * configure.ac: Remove check for strerror_r.
1337
e7e97a2e
CB
13382019-10-31 Christian Biesinger <cbiesinger@google.com>
1339
1340 * config.in: Regenerate.
1341 * configure: Regenerate.
1342 * configure.ac: Also check for strerror_r.
1343
75cafaa6
CB
13442019-10-31 Christian Biesinger <cbiesinger@google.com>
1345
1346 * ax.h (debug_agent): Remove duplicate declaration.
1347
30baf67b
TV
13482019-10-26 Tom de Vries <tdevries@suse.de>
1349
1350 * linux-aarch64-low.c: Fix typos in comments.
1351 * linux-arm-low.c: Same.
1352 * linux-low.c: Same.
1353 * linux-ppc-low.c: Same.
1354 * proc-service.c: Same.
1355 * regcache.h: Same.
1356 * server.c: Same.
1357 * tracepoint.c: Same.
1358 * win32-low.c: Same.
1359
52c64cf7
TT
13602019-10-25 Tom Tromey <tromey@adacore.com>
1361
1362 * utils.c (xstrdup): Remove.
1363
c12d372d
TT
13642019-10-23 Tom Tromey <tom@tromey.com>
1365
1366 * configure, config.in: Rebuild.
1367
4d0b984b
TT
13682019-10-23 Tom Tromey <tom@tromey.com>
1369
1370 * configure: Rebuild.
1371 * acinclude.m4: Use m4_include, not sinclude.
1372
c5adaa19
TT
13732019-10-17 Tom Tromey <tromey@adacore.com>
1374
1375 * configure: Rebuild.
1376 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1377 in AC_CONFIG_FILES invocation.
1378 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1379 invocation.
1380
fec4e896
CB
13812019-10-16 Christian Biesinger <cbiesinger@google.com>
1382
1383 * server.c: Include xml-builtin.h.
1384 (get_xml_features): Don't declare xml_builtins here.
1385
00975ff6
AB
13862019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1387
1388 * Makefile.in: Remove references to vec-ipa.o.
1389
0dc32745
AB
13902019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1391
1392 * Makefile.in: Remove references to vec.c.
1393
3e6ec53a
CB
13942019-10-02 Christian Biesinger <cbiesinger@google.com>
1395
1396 * server.c (server_waiting): Change to bool.
1397 (extended_protocol): Likewise.
1398 (response_needed): Likewise.
1399 (exit_requested): Likewise.
1400 (run_once): Likewise.
1401 (report_no_resumed): Likewise.
1402 (non_stop): Likewise.
1403 (disable_packet_vCont): Likewise.
1404 (disable_packet_Tthread): Likewise.
1405 (disable_packet_qC): Likewise.
1406 (disable_packet_qfThreadInfo): Likewise.
1407 (handle_general_set): Update.
1408 (handle_detach): Update.
1409 (handle_monitor_command): Update.
1410 (handle_query): Update.
1411 (captured_main): Update.
1412 (process_serial_event): Update.
1413 * server.h (server_waiting): Change to bool.
1414 (disable_packet_vCont): Likewise.
1415 (disable_packet_Tthread): Likewise.
1416 (disable_packet_qC): Likewise.
1417 (disable_packet_qfThreadInfo): Likewise.
1418 (run_once): Likewise.
1419 (non_stop): Likewise.
1420 * target.c (target_stop_and_wait): Update.
1421
80fd2826
TT
14222019-10-02 Tom Tromey <tromey@adacore.com>
1423
1424 * Makefile.in (SFILES): Add common-inferior.c.
1425 (OBS): Add common-inferior.o.
1426 * server.c (startup_with_shell): Don't define.
1427
46f29a9a
AB
14282019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1429
1430 * linux-low.c (linux_low_read_btrace): Update for change to
1431 std::vector.
1432
f9d949fb
CB
14332019-09-20 Christian Biesinger <cbiesinger@google.com>
1434
1435 * debug.c (debug_threads): Remove comment in favor of the header.
1436 * debug.h (using_threads): Add declaration.
1437 (debug_threads): Add comment.
1438 * linux-aarch64-low.c: Include debug.h and remove declaration of
1439 debug_threads.
1440 * nto-low.c: Likewise.
1441 * remote-utils.c: Likewise.
1442 * thread-db.c: Likewise.
1443
abf516c6
UW
14442019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1445
1446 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1447 and powerpc-cell64l-ipa.o.
1448 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1449 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1450 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1451 (spu*-*-*): Remove.
1452
1453 * spu-low.c: Remove file.
1454
1455 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1456 (parse_spufs_run): Remove.
1457 (ppc_get_pc): Remove Cell/B.E. support.
1458 (ppc_set_pc): Likewise.
1459 (ppc_breakpoint_at): Likewise.
1460 (ppc_arch_setup): Likewise.
1461 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1462 tdesc_powerpc_cell32l.
1463 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1464 or init_registers_powerpc_cell32l.
1465 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1466 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1467 or init_registers_powerpc_cell32l.
1468 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1469 (init_registers_powerpc_cell32l): Remove prototype.
1470 (init_registers_powerpc_cell64l): Likewise.
1471
1472 * target.h (struct target_ops): Remove qxfer_spu member.
1473 * server.c (handle_qxfer_spu): Remove.
1474 (qxfer_packets): Remove entry for "spu".
1475 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1476 * linux-low.c (SPUFS_MAGIC): Remove.
1477 (spu_enumerate_spu_ids): Remove.
1478 (linux_qxfer_spu): Remove.
1479 (linux_target_ops): Remove qxfer_spu member.
1480 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1481 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1482 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1483
2d41fa11
SDJ
14842019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1485
1486 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1487 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1488 * config.in: Regenerate.
1489 * configure: Regenerate.
1490
d59b55f0
TT
14912019-08-15 Tom Tromey <tromey@adacore.com>
1492
1493 * target.c (target_write_memory): Use gdb::byte_vector.
1494
4196ab2a
TT
14952019-08-15 Tom Tromey <tromey@adacore.com>
1496
1497 * tracepoint.c (write_inferior_data_pointer)
1498 (write_inferior_integer, write_inferior_int8)
1499 (write_inferior_uinteger, m_tracepoint_action_download)
1500 (r_tracepoint_action_download, x_tracepoint_action_download)
1501 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1502 (download_agent_expr, download_tracepoint_1)
1503 (download_trace_state_variables, upload_fast_traceframes): Update.
1504 * server.c (gdb_write_memory): Update.
1505 * remote-utils.c (relocate_instruction): Update.
1506 * proc-service.c (ps_pdwrite): Update.
1507 * mem-break.c (remove_memory_breakpoint)
1508 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1509 (uninsert_fast_tracepoint_jumps_at)
1510 (reinsert_fast_tracepoint_jumps_at): Update.
1511 * linux-x86-low.c (append_insns)
1512 (i386_install_fast_tracepoint_jump_pad)
1513 (amd64_write_goto_address, i386_write_goto_address): Update.
1514 * linux-s390-low.c (append_insns, s390_write_goto_address):
1515 Update.
1516 * linux-ppc-low.c (ppc_relocate_instruction)
1517 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1518 (ppc_write_goto_address): Update.
1519 * linux-aarch64-low.c (append_insns): Update.
1520 * target.h (struct target_ops): Update.
1521 (write_inferior_memory): Don't declare.
1522 * target.c (target_write_memory): Rename from
1523 write_inferior_memory. Remove old target_write_memory.
1524
c6778d00
TT
15252019-08-15 Tom Tromey <tromey@adacore.com>
1526
1527 * target.c (write_inferior_memory): Use std::vector.
1528
404f2902
FCE
15292019-08-06 Frank Ch. Eigler <fche@redhat.com>
1530
1531 PR build/24886
1532 * configure.ac: Drop enable-libmcheck support.
1533 * configure, config.in: Rebuild.
1534 * acinclude.m4: Don't include it.
1535
4c5aa8e0
AH
15362019-07-19 Alan Hayward <alan.hayward@arm.com>
1537
1538 * configure.srv: Remove Arm xml files.
1539
7cc17433
AH
15402019-07-19 Alan Hayward <alan.hayward@arm.com>
1541
1542 * configure.srv: Add new files. Remove xml generated files.
1543 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1544 registers.
1545 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1546 * linux-aarch32-tdesc.c: New file.
1547 * linux-aarch32-tdesc.h: New file.
1548 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1549 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1550 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1551 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1552 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1553 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1554 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1555 (arm_read_description): Call arm_linux_read_description.
1556 (initialize_low_arch): Don't init registers.
1557 * linux-arm-tdesc.c: New file.
1558 * linux-arm-tdesc.h: New file.
1559
166a82be
AH
15602019-07-10 Alan Hayward <alan.hayward@arm.com>
1561
1562 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1563 Move counter inside for.
1564 (arm_read_description): Check ptrace earlier.
1565 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1566
268a13a5
TT
15672019-07-09 Tom Tromey <tom@tromey.com>
1568
1569 * configure: Rebuild.
1570 * configure.ac: Change common to gdbsupport.
1571 * acinclude.m4: Change common to gdbsupport.
1572 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1573 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1574 common to gdbsupport.
1575 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1576 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1577 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1578 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1579 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1580 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1581 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1582 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1583 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1584 common to gdbsupport.
1585
350fab54
AH
15862019-07-04 Alan Hayward <alan.hayward@arm.com>
1587
1588 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1589 defines.
1590 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1591
2b40fda7
AH
15922019-07-04 Alan Hayward <alan.hayward@arm.com>
1593
1594 * configure.srv: Remove legacy xml.
1595 * linux-aarch64-low.c (initialize_low_arch): Remove
1596 initialize_low_tdesc call.
1597 * linux-aarch64-tdesc-selftest.c: Remove file.
1598 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1599 * linux-x86-low.c (initialize_low_arch): Remove
1600 initialize_low_tdesc call.
1601 * linux-x86-tdesc-selftest.c: Remove file.
1602 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1603
7d10623d
TV
16042019-06-20 Tom de Vries <tdevries@suse.de>
1605
1606 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1607 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1608
8d6a48df
TV
16092019-06-19 Tom de Vries <tdevries@suse.de>
1610
1611 * debug.h (debug_write): Change return type to ssize_t.
1612 * debug.c (debug_write): Same.
1613
73cc7272
TT
16142019-06-14 Tom Tromey <tom@tromey.com>
1615
1616 * configure.ac: Use new path to gnulib.
1617 * configure: Rebuild.
1618 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1619 to gnulib.
1620
08f10e02
TT
16212019-06-11 Tom Tromey <tom@tromey.com>
1622
1623 * Makefile.in (SFILES): Add alloc.c.
1624 (OBS): Add alloc.o.
1625 (IPA_OBJS): Add alloc-ipa.o.
1626 (alloc-ipa.o): New target.
1627 (%.o: ../%.c): New pattern rule.
1628
422186a9
TT
16292019-06-10 Tom Tromey <tromey@adacore.com>
1630
1631 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1632 end warning with a newline.
1633 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1634 newline.
1635 * thread-db.c (attach_thread): Don't end warning with a newline.
1636 (thread_db_notice_clone): Likewise.
1637 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1638 newline.
1639 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1640 end warning with a newline.
1641
b02f78f9
PA
16422019-06-04 Pedro Alves <palves@redhat.com>
1643
1644 * server.c (captured_main): Use make_unique_xstrdup.
1645
88ed7edb
TT
16462019-06-02 Tom Tromey <tom@tromey.com>
1647
1648 * gdbreplay.c (fromhex): Remove.
1649 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1650
33a6bc35
TT
16512019-05-29 Tom Tromey <tromey@adacore.com>
1652
1653 * configure: Rebuild.
1654
e90a813d
KB
16552019-05-06 Kevin Buettner <kevinb@redhat.com>
1656
1657 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1658 sign extension code on 32-bit builds.
1659
353ea2d1
EZ
16602019-05-03 Eli Zaretskii <eliz@gnu.org>
1661
1662 * remote-utils.c:
1663 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1664
b494cdff
TT
16652019-04-19 Tom Tromey <tom@tromey.com>
1666
1667 * server.c (struct vstop_notif): Derive from notif_event.
1668 <base>: Remove.
1669 (queue_stop_reply): Update.
1670 (remove_all_on_match_ptid): Change type. Rewrite.
1671 (discard_queued_stop_replies): Rewrite.
1672 (in_queued_stop_replies_ptid): Change type.
1673 (in_queued_stop_replies): Rewrite.
1674 (notif_stop): Update.
1675 (queue_stop_reply_callback): Update.
1676 (captured_main): Don't call initialize_notif.
1677 (push_stop_notification): Update.
1678 * notif.c (notif_write_event, handle_notif_ack)
1679 (notif_event_enque, notif_push): Update.
1680 (notif_event_xfree, initialize_notif): Remove.
1681 * notif.h (struct notif_event): Include <list>, not
1682 "common/queue.h".
1683 (struct notif_server) <queue>: Now a std::list.
1684 (notif_event_p): Remove typedef.
1685 (initialize_notif): Don't declare.
1686 (struct notif_event): Add virtual destructor.
1687
a7e559cc
AH
16882019-04-17 Alan Hayward <alan.hayward@arm.com>
1689
1690 * ax.c (ax_vdebug): Call debug_printf.
1691 * debug.c (debug_write): New function.
1692 * debug.h (debug_write): New declaration.
1693 * linux-low.c (sigchld_handler): Call debug_write.
1694
aeb2e706
AH
16952019-04-17 Alan Hayward <alan.hayward@arm.com>
1696
1697 * debug.c (debug_set_output): New function.
1698 (debug_vprintf): Send output to debug_file.
1699 (debug_flush): Likewise.
1700 * debug.h (debug_set_output): New declaration.
1701 * server.c (handle_monitor_command): Add debug-file option.
1702 (captured_main): Likewise.
1703
c1bc0935
AH
17042019-04-17 Alan Hayward <alan.hayward@arm.com>
1705
1706 * debug.c (remote_debug): Add definition.
1707 * debug.h (remote_debug): Add declaration.
1708 * hostio.c (remote_debug): Remove declaration.
1709 * remote-utils.c (struct ui_file): Likewise.
1710 (remote_debug): Likewise.
1711 * remote-utils.h (remote_debug): Likewise,
1712 * server.c (remote_debug): Remove definition.
1713
3f52fdbc
KB
17142019-04-10 Kevin Buettner <kevinb@redhat.com>
1715
1716 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1717 when using a 64-bit gdbserver.
1718
b0319eaa
TT
17192019-04-09 Tom Tromey <tromey@adacore.com>
1720
1721 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1722
eedc3f4f
TT
17232019-04-08 Tom Tromey <tom@tromey.com>
1724
1725 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1726 throw.
1727 (linux_resume_one_lwp): Likewise.
1728
230d2906
TT
17292019-04-08 Tom Tromey <tom@tromey.com>
1730
1731 * gdbreplay.c: Update.
1732 * linux-low.c: Update.
1733 * server.c: Update.
1734
a70b8144
TT
17352019-04-08 Tom Tromey <tom@tromey.com>
1736
1737 * server.c: Use C++ exception handling.
1738 * linux-low.c: Use C++ exception handling.
1739 * gdbreplay.c: Use C++ exception handling.
1740
3d6e9d23
TT
17412019-04-08 Tom Tromey <tom@tromey.com>
1742
1743 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1744 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1745 (captured_main, main): Update.
1746 * gdbreplay.c (main): Update.
1747
0570503d
PFC
17482019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1749
1750 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1751 value in argument pointer, return 1 if the entry is found and 0
1752 otherwise. Move comment.
1753 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1754 * linux-low.h (linux_get_auxv): Declare.
1755 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1756
227a9e65
TT
17572019-04-05 Tom Tromey <tromey@adacore.com>
1758
1759 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1760 variables.
1761
69f4c9cc
AH
17622019-03-28 Alan Hayward <alan.hayward@arm.com>
1763
1764 * linux-low.c (AT_HWCAP2): Add define if not already included.
1765
974c89e0
AH
17662019-03-26 Alan Hayward <alan.hayward@arm.com>
1767
1768 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1769 (aarch64_arch_setup): Call linux_get_hwcap.
1770 * linux-arm-low.c (arm_get_hwcap): Remove function.
1771 (arm_read_description): Call linux_get_hwcap.
1772 * linux-low.c (linux_get_auxv): New function.
1773 (linux_get_hwcap): Likewise.
1774 (linux_get_hwcap2): Likewise.
1775 * linux-low.h (linux_get_hwcap): New declaration.
1776 (linux_get_hwcap2): Likewise.
1777 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1778 (ppc_arch_setup): Call linux_get_hwcap.
1779 * linux-s390-low.c (s390_get_hwcap): Remove function.
1780 (s390_arch_setup): Call linux_get_hwcap.
1781
1ef53e6b
AH
17822019-03-22 Alan Hayward <alan.hayward@arm.com>
1783 Jiong Wang <jiong.wang@arm.com>
1784
1785 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1786 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1787 to fail.
1788 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1789
ee4fbcfa
AH
17902019-03-22 Alan Hayward <alan.hayward@arm.com>
1791 Jiong Wang <jiong.wang@arm.com>
1792
1793 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1794 (aarch64_get_hwcap): New function.
1795 (aarch64_arch_setup): Read APIA hwcap.
1796
6dc0ebde
AH
17972019-03-22 Alan Hayward <alan.hayward@arm.com>
1798 Jiong Wang <jiong.wang@arm.com>
1799
1800 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1801 (initialize_low_tracepoint): Likewise.
1802 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1803 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1804 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1805 (aarch64_linux_read_description): Likewise.
1806 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1807
1163a4b7
JB
18082019-03-12 John Baldwin <jhb@FreeBSD.org>
1809
1810 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1811 i386_create_target_description for 'segments' parameter.
1812 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1813 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1814 * win32-i386-low.c (i386_arch_setup): Likewise.
1815
d3a70e03
TT
18162019-03-12 Tom Tromey <tromey@adacore.com>
1817
1818 * linux-low.c (iterate_over_lwps): Update.
1819
37991b4f
TT
18202019-03-06 Tom Tromey <tom@tromey.com>
1821
1822 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1823 (captured_main): Use SCOPE_EXIT.
1824
45950eb6
SDJ
18252019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1826
1827 * configure.srv: Use '$enable_unittest' instead of '$development'
1828 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1829 case.
1830
43ac54fc
TT
18312019-02-27 Tom Tromey <tromey@adacore.com>
1832
1833 * gdbreplay.c (logchar): Handle \r\n.
1834
df0da8a2
AH
18352019-02-07 Alan Hayward <alan.hayward@arm.com>
1836
1837 * linux-low.c (linux_attach): Add process before lwp.
1838 * server.c (attach_inferior): Check if already attached.
1839
1a5c2598
TT
18402019-02-07 Tom Tromey <tom@tromey.com>
1841
1842 * x86-tdesc.h: Rename include guard.
1843 * x86-low.h: Add include guard.
1844 * wincecompat.h: Rename include guard.
1845 * win32-low.h: Add include guard.
1846 * utils.h: Rename include guard.
1847 * tracepoint.h: Rename include guard.
1848 * tdesc.h: Rename include guard.
1849 * target.h: Rename include guard.
1850 * server.h: Rename include guard.
1851 * remote-utils.h: Rename include guard.
1852 * regcache.h: Rename include guard.
1853 * nto-low.h: Rename include guard.
1854 * notif.h: Add include guard.
1855 * mem-break.h: Rename include guard.
1856 * lynx-low.h: Add include guard.
1857 * linux-x86-tdesc.h: Add include guard.
1858 * linux-s390-tdesc.h: Add include guard.
1859 * linux-ppc-tdesc-init.h: Add include guard.
1860 * linux-low.h: Add include guard.
1861 * linux-aarch64-tdesc.h: Add include guard.
1862 * linux-aarch32-low.h: Add include guard.
1863 * inferiors.h: Rename include guard.
1864 * i387-fp.h: Rename include guard.
1865 * hostio.h: Rename include guard.
1866 * gdbthread.h: Rename include guard.
1867 * gdb_proc_service.h: Rename include guard.
1868 * event-loop.h: Rename include guard.
1869 * dll.h: Rename include guard.
1870 * debug.h: Rename include guard.
1871 * ax.h: Rename include guard.
1872
956cc47c
SN
18732018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1874
1875 PR gdb/23985
1876 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1877 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1878
a0707f3c
TT
18792019-01-25 Tom Tromey <tom@tromey.com>
1880
1881 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1882
0747795c
TT
18832019-01-25 Tom Tromey <tom@tromey.com>
1884
1885 * win32-low.c: Fix common/ includes.
1886 * win32-i386-low.c: Fix common/ includes.
1887 * tracepoint.c: Fix common/ includes.
1888 * thread-db.c: Fix common/ includes.
1889 * target.h: Fix common/ includes.
1890 * symbol.c: Fix common/ includes.
1891 * spu-low.c: Fix common/ includes.
1892 * server.h: Fix common/ includes.
1893 * server.c: Fix common/ includes.
1894 * remote-utils.c: Fix common/ includes.
1895 * regcache.h: Fix common/ includes.
1896 * regcache.c: Fix common/ includes.
1897 * nto-x86-low.c: Fix common/ includes.
1898 * notif.h: Fix common/ includes.
1899 * mem-break.h: Fix common/ includes.
1900 * lynx-low.c: Fix common/ includes.
1901 * lynx-i386-low.c: Fix common/ includes.
1902 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1903 * linux-x86-low.c: Fix common/ includes.
1904 * linux-low.c: Fix common/ includes.
1905 * inferiors.h: Fix common/ includes.
1906 * i387-fp.c: Fix common/ includes.
1907 * hostio.c: Fix common/ includes.
1908 * hostio-errno.c: Fix common/ includes.
1909 * gdbthread.h: Fix common/ includes.
1910 * gdbreplay.c: Fix common/ includes.
1911 * fork-child.c: Fix common/ includes.
1912 * event-loop.c: Fix common/ includes.
1913 * ax.c:
1914 (enum gdb_agent_op): Fix common/ includes.
1915
be6d4f74
TT
19162019-01-21 Tom Tromey <tom@tromey.com>
1917
1918 * tracepoint.c: Fix includes.
1919 * remote-utils.c: Fix includes.
1920 * linux-x86-low.c: Fix includes.
1921
66d91b39
JB
19222019-01-01 Joel Brobecker <brobecker@adacore.com>
1923
1924 * gdbreplay.c (gdbreplay_version): Update copyright year in
1925 version message.
1926 * server.c (gdbserver_version): Likewise.
1927
754e3168
AH
19282018-12-05 Alan Hayward <alan.hayward@arm.com>
1929
1930 * linux-low.c (add_lwp): Switch ordering.
1931
d105de22
TT
19322018-11-29 Tom Tromey <tom@tromey.com>
1933
1934 * win32-low.c (win32_join): Take pid, not process.
1935 * target.h (struct target_ops) <join>: Change argument type.
1936 (join_inferior): Change argument name.
1937 * spu-low.c (spu_join): Take pid, not process.
1938 * server.c (handle_detach): Preserve pid before destroying
1939 process.
1940 * lynx-low.c (lynx_join): Take pid, not process.
1941 * linux-low.c (linux_join): Take pid, not process.
1942
50138245
AH
19432018-11-23 Alan Hayward <alan.hayward@arm.com>
1944
1945 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1946 (aarch64_cannot_fetch_register): Likewise.
1947 (struct linux_target_ops): Update references.
1948
64f57f3d
PFC
19492018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1950
1951 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1952
8d619c01
EBM
19532018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1954
1955 * configure.srv (ipa_ppc_linux_regobj): Add
1956 powerpc-isa207-htm-vsx32l-ipa.o and
1957 powerpc-isa207-htm-vsx64l-ipa.o.
1958 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1959 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1960 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1961 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1962 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1963 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1964 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1965 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1966 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1967 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1968 (init_registers_powerpc_isa207_htm_vsx32l)
1969 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1970 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1971 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1972 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1973 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1974 (ppc_store_tm_ctarregset): New functions.
1975 (ppc_regsets): Add entries for HTM regsets.
1976 (ppc_arch_setup): Set htm in features struct when needed. Set
1977 sizes for the HTM regsets.
1978 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1979 (initialize_low_arch): Call
1980 init_registers_powerpc_isa207_htm_vsx32l and
1981 init_registers_powerpc_isa207_htm_vsx64l.
1982 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1983 PPC_TDESC_ISA207_HTM_VSX.
1984 (initialize_low_tracepoint): Call
1985 init_registers_powerpc_isa207_htm_vsx32l and
1986 init_registers_powerpc_isa207_htm_vsx64l.
1987
232bfb86
EBM
19882018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1989
1990 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1991 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1992 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1993 (ppc_store_pmuregset): New functions.
1994 (ppc_regsets): Add entries for ebb and pmu regsets.
1995 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1996 pmu regsets are available. Set sizes for these regsets.
1997
f2cf6173
EBM
19982018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1999
2000 * configure.srv (ipa_ppc_linux_regobj): Add
2001 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2002 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2003 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2004 rs6000/powerpc-isa207-vsx32l.xml, and
2005 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2006 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2007 <PPC_TDESC_ISA207_VSX>: New enum value.
2008 (init_registers_powerpc_isa207_vsx32l): Declare.
2009 (init_registers_powerpc_isa207_vsx64l): Declare.
2010 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2011 (ppc_store_tarregset): New function.
2012 (ppc_regsets): Add entry for the TAR regset.
2013 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2014 size for the TAR regsets.
2015 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2016 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2017 and init_registers_powerpc_isa207_vsx64l.
2018 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2019 (initialize_low_tracepoint): Call
2020 init_registers_powerpc_isa207_vsx32l and
2021 init_registers_powerpc_isa207_vsx64l.
2022
7ca18ed6
EBM
20232018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2024 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2025
2026 * configure.srv (ipa_ppc_linux_regobj): Add
2027 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2028 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2029 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2030 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2031 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2032 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2033 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2034 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2035 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2036 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2037 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2038 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2039 (ppc_hwcap): Add comment.
2040 (ppc_hwcap2): New global.
2041 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2042 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2043 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2044 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2045 when needed. Set sizes for the the DSCR and PPR regsets.
2046 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2047 (initialize_low_arch): Call
2048 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2049 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2050 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2051 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2052 (initialize_low_tracepoint): Call
2053 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2054 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2055
5c849b22
PFC
20562018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2057
2058 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2059
8ecfd7bd
SDJ
20602018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2061 Simon Marchi <simark@simark.ca>
2062
2063 * acinclude.m4: Include "../selftest.m4".
2064 * configure: Regenerate.
2065 * configure.ac: Use "GDB_AC_SELFTEST".
2066 * configure.srv: Use "$enable_unittests" instead of
2067 "$development" when checking whether unit tests have been
2068 enabled.
2069 * server.c (captured_main): Update message informing that
2070 selftests have been disabled.
2071
96643e35
TT
20722018-10-04 Tom Tromey <tom@tromey.com>
2073
2074 * configure: Rebuild.
2075
da4ae14a
TT
20762018-10-04 Tom Tromey <tom@tromey.com>
2077
2078 * server.c (handle_status): Rename inner "thread".
2079 (process_serial_event): Declare "res" in 'm' case.
2080 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2081 (iterate_over_lwps): Rename inner "thread".
2082 (linux_qxfer_libraries_svr4): Rename inner "len".
2083 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2084
7c619dbd
GB
20852018-10-01 Gary Benson <gbenson@redhat.com>
2086
2087 * gdb_proc_service.h: Moved common code to
2088 common/gdb_proc_service.h.
2089
3795e814
GB
20902018-10-01 Gary Benson <gbenson@redhat.com>
2091
2092 * gdb_proc_service.h: Synchronize comments and whitespace with
2093 GDB's version of this file.
2094
49b036f1
TT
20952018-09-25 Tom Tromey <tom@tromey.com>
2096
2097 * configure: Rebuild.
2098 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2099
8ff03f0b
SM
21002018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2101
2102 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2103 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2104 ($(IPA_LIB)): Sort IPA_OBJS.
2105
a1cd91dc
SM
21062018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2107
2108 * Makefile.in: Remove references to $(ADD_DEPS).
2109
752312ba
TT
21102018-09-16 Tom Tromey <tom@tromey.com>
2111
2112 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2113 variables.
2114 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2115 variables.
2116
f1628857
TT
21172018-09-05 Tom Tromey <tom@tromey.com>
2118
2119 * configure: Rebuild.
2120
ad202fcc
SM
21212018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2122
2123 PR build/23399
2124 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2125
d3d8724a
TT
21262018-08-27 Tom Tromey <tom@tromey.com>
2127
2128 PR build/23087:
2129 * configure: Rebuild.
2130
b4f183d2
TT
21312018-08-27 Tom Tromey <tom@tromey.com>
2132
2133 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2134 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2135 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2136 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2137 (s390x_emit_stack_adjust): Add casts to unsigned char.
2138
4e2aa472
SM
21392018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2140
2141 PR gdb/23374
2142 PR gdb/23375
2143 * server.h (struct client_state) <disable_randomization>:
2144 Initialize to 1.
2145
cf4088a9
SM
21462018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2147
2148 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2149 variable.
2150 (mips_supply_ptrace_register): Likewise.
2151
a0de763e
TT
21522018-07-22 Tom Tromey <tom@tromey.com>
2153
2154 * configure: Rebuild.
2155
b0a7723d
TT
21562018-07-22 Tom Tromey <tom@tromey.com>
2157
2158 * win32-low.c (win32_create_inferior): Remove unused variables.
2159 * gdbreplay.c (remote_open): Remove unused variable.
2160 * remote-utils.c (remote_prepare): Remove unused variable.
2161 * x86-tdesc.h (X86_TDESC_H): Define.
2162 (amd64_expedite_regs): Define conditionally.
2163 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2164 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2165 * remote-utils.c (readchar): Remove unused variable.
2166
a780ef4f
PA
21672018-07-13 Pedro Alves <palves@redhat.com>
2168
2169 * linux-low.c (linux_kill): Change parameter to process_info
2170 pointer instead of pid. Adjust.
2171 * lynx-low.c (lynx_kill): Likewise.
2172 * nto-low.c (nto_kill): Likewise.
2173 * spu-low.c (spu_kill): Likewise.
2174 * win32-low.c (win32_kill): Likewise.
2175 * server.c (handle_v_kill, kill_inferior_callback)
2176 (detach_or_kill_for_exit): Adjust.
2177 * target.c (kill_inferior): Change parameter to process_info
2178 pointer instead of pid. Adjust.
2179 * target.h (struct target_ops) <kill>: Change parameter to
2180 process_info pointer instead of pid. Adjust all implementations
2181 and callers.
2182 (kill_inferior): Likewise.
2183
ef2ddb33
PA
21842018-07-13 Pedro Alves <palves@redhat.com>
2185
2186 * linux-low.c (linux_detach, linux_join): Change parameter to
2187 process_info pointer instead of pid. Adjust.
2188 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2189 * nto-low.c (nto_detach): Likewise.
2190 * spu-low.c (spu_detach, spu_join): Likewise.
2191 * win32-low.c (win32_detach, win32_join): Likewise.
2192 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2193 * target.h (struct target_ops) <detach, join>: Change parameter to
2194 process_info pointer instead of pid. Adjust all implementations
2195 and callers.
2196 (detach_inferior, join_inferior): Rename 'pid' parameter to
2197 'proc'.
2198
c7ab0aef
SDJ
21992018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2200 Jan Kratochvil <jan.kratochvil@redhat.com>
2201 Paul Fertser <fercerpav@gmail.com>
2202 Tsutomu Seki <sekiriki@gmail.com>
2203
2204 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2205 (OBS): Add 'common/netstuff.o'.
2206 (GDBREPLAY_OBS): Likewise.
2207 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2208 (remote_open): Implement support for IPv6
2209 connections.
2210 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2211 and 'wspiapi.h'.
2212 (handle_accept_event): Accept connections from IPv6 sources.
2213 (remote_prepare): Handle IPv6-style hostnames; implement
2214 support for IPv6 connections.
2215 (remote_open): Implement support for printing connections from
2216 IPv6 sources.
2217
31445d10
PA
22182018-07-11 Pedro Alves <palves@redhat.com>
2219
2220 PR gdb/23377
2221 * mem-break.c (any_persistent_commands): Add process_info
2222 parameter and use it instead of relying on the current process.
2223 Change return type to bool.
2224 * mem-break.h (any_persistent_commands): Add process_info
2225 parameter and change return type to bool.
2226 * server.c (handle_detach): Remove require_running_or_return call.
2227 Look up the process_info for the process we're about to detach.
2228 If not found, return back error to GDB. Adjust
2229 any_persistent_commands call to pass down a process pointer.
2230
cb197132
PA
22312018-07-11 Pedro Alves <palves@redhat.com>
2232
2233 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2234 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2235 instead of collect_register_by_name.
2236 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2237 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2238
1b919490
VB
22392018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2240 Pedro Alves <palves@redhat.com>
2241
2242 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2243
d7e15655
TT
22442018-07-03 Tom Tromey <tom@tromey.com>
2245
2246 * linux-low.c: Update.
2247 * lynx-low.c: Update.
2248 * mem-break.c: Update.
2249 * nto-low.c: Update.
2250 * remote-utils.c: Update.
2251 * server.c: Update.
2252 * spu-low.c: Update.
2253 * target.c: Update.
2254 * win32-low.c: Update.
2255
26a57c92
TT
22562018-07-03 Tom Tromey <tom@tromey.com>
2257
2258 * server.c: Update.
2259
0e998d96
TT
22602018-07-03 Tom Tromey <tom@tromey.com>
2261
2262 * linux-low.c: Update.
2263
cc6bcb54
TT
22642018-07-03 Tom Tromey <tom@tromey.com>
2265
2266 * target.c: Update.
2267
e38504b3
TT
22682018-07-03 Tom Tromey <tom@tromey.com>
2269
2270 * linux-low.c: Update.
2271 * linux-mips-low.c: Update.
2272 * lynx-low.c: Update.
2273 * nto-low.c: Update.
2274 * remote-utils.c: Update.
2275 * server.c: Update.
2276 * spu-low.c: Update.
2277 * target.c: Update.
2278 * thread-db.c: Update.
2279
e99b03dc
TT
22802018-07-03 Tom Tromey <tom@tromey.com>
2281
2282 * linux-low.c: Update.
2283 * linux-mips-low.c: Update.
2284 * lynx-low.c: Update.
2285 * mem-break.c: Update.
2286 * nto-low.c: Update.
2287 * remote-utils.c: Update.
2288 * server.c: Update.
2289 * spu-low.c: Update.
2290 * target.c: Update.
2291 * tracepoint.c: Update.
2292
f2907e49
TT
22932018-07-03 Tom Tromey <tom@tromey.com>
2294
2295 * linux-low.c: Update.
2296 * linux-ppc-low.c: Update.
2297 * linux-x86-low.c: Update.
2298 * proc-service.c: Update.
2299 * server.c: Update.
2300 * spu-low.c: Update.
2301 * thread-db.c: Update.
2302 * win32-low.c: Update.
2303
fd79271b
TT
23042018-07-03 Tom Tromey <tom@tromey.com>
2305
2306 * linux-low.c: Update.
2307 * lynx-low.c: Update.
2308 * nto-low.c: Update.
2309 * remote-utils.c: Update.
2310 * spu-low.c: Update.
2311 * thread-db.c: Update.
2312 * win32-low.c: Update.
2313
c0867626
SDJ
23142018-06-29 Joel Brobecker <brobecker@adacore.com>
2315
2316 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2317 parameter in call to 'amd64_create_target_description'.
2318
2512d7ef
JK
23192018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2320
2321 * x86-tdesc.h: Remove executable permission flag.
2322
d0ac1c44
SM
23232018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2324
2325 * configure.ac: Remove AC_PREREQ, add missing quoting.
2326 * configure: Re-generate.
2327 * config.in: Re-generate.
2328 * aclocal.m4: Re-generate.
2329
c4eb05ff
SM
23302018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2331
2332 * tracepoint.h (current_traceframe): Remove declaration.
2333
02895270
AH
23342018-06-18 Alan Hayward <alan.hayward@arm.com>
2335
2336 * linux-aarch64-low.c (is_sve_tdesc): New function.
2337 (aarch64_sve_regs_copy_to_regcache): Likewise.
2338 (aarch64_sve_regs_copy_from_regcache): Likewise.
2339 (aarch64_regs_info): Add SVE checks.
2340 (initialize_low_arch): Initialize SVE.
2341
e9902bfc
AH
23422018-06-18 Alan Hayward <alan.hayward@arm.com>
2343
2344 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2345
fefa175e
AH
23462018-06-11 Alan Hayward <alan.hayward@arm.com>
2347
2348 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2349 (initialize_low_tracepoint): Likewise
2350 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2351 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2352 param.
2353 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2354 checks.
2355 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2356
b91ad3ff
AH
23572018-06-11 Alan Hayward <alan.hayward@arm.com>
2358
2359 * server.h (PBUFSIZ): Increase size
2360
f868386e
AH
23612018-06-11 Alan Hayward <alan.hayward@arm.com>
2362
2363 * regcache.c (regcache::raw_compare): New function.
2364 * regcache.h (regcache::raw_compare): New declaration.
2365
9c861883
AH
23662018-06-11 Alan Hayward <alan.hayward@arm.com>
2367
2368 * regcache.c (new_register_cache): Use new.
2369 (free_register_cache): Use delete.
2370 (register_data): Use const.
2371 (supply_register): Move body inside regcache.
2372 (regcache::raw_supply): New override function.
2373 (collect_register): Move body inside regcache.
2374 (regcache::raw_collect): New override function.
2375 (regcache::get_register_status): New override function.
2376 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2377
40591844
TT
23782018-06-09 Tom Tromey <tom@tromey.com>
2379
2380 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2381 declare queue.
2382 (event_queue): Use std::queue.
2383 (gdb_event_xfree): Remove.
2384 (initialize_event_loop, process_event, wait_for_event): Update.
2385
6341380d
SC
23862018-06-08 Stan Cox <scox@redhat.com>
2387
2388 * win32-low.c (win32_create_inferior): last_ptid and last_status
2389 moved to client_state.
2390
03349c93
PA
23912018-06-08 Pedro Alves <palves@redhat.com>
2392
2393 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2394 common/common-exceptions.o, common/common-utils.o,
2395 common/errors.o, common/print-utils.o and utils.o.
2396 * gdbreplay.c: Include "common-defs.h" instead of the two
2397 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2398 string.h or alloca.h.
2399 (perror_with_name): Delete.
2400 (remote_open): Use xstrdup instead of strdup.
2401 (main): Rename to ...
2402 (captured_main): ... this.
2403 (main): New.
2404
8dcc53b3
TT
24052018-06-08 Tom Tromey <tom@tromey.com>
2406
2407 * linux-low.c (linux_low_read_btrace): Update.
2408
c12a5089
SC
24092018-06-04 Stan Cox <scox@redhat.com>
2410
2411 * server.h (struct client_state): New.
2412 * server.c (cont_thread, general_thread, multi_process)
2413 (report_fork_events, report_vfork_events, report_exec_events)
2414 (report_thread_events, swbreak_feature, hwbreak_feature)
2415 (vCont_supported, disable_randomization, pass_signals)
2416 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2417 Moved to client_state.
2418 * remote-utils.c (remote_debug, noack_mode)
2419 (transport_is_reliable): Moved to client_state.
2420 * tracepoint.c (current_traceframe): Moved to client_state.
2421
2422 Update all callers.
2423 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2424 linux-low.c, remote-utils.h, target.c: Use client_state.
2425
122394f1
AH
24262018-05-31 Alan Hayward <alan.hayward@arm.com>
2427
2428 * configure.srv: Add new c/h file.
2429
95228a0d
AH
24302018-05-31 Alan Hayward <alan.hayward@arm.com>
2431
2432 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2433 null VQ.
2434
d8dab6c3
MR
24352018-05-25 Maciej W. Rozycki <macro@mips.com>
2436
2437 * gdb.arch/mips-fpregset-core.exp: New test.
2438 * gdb.arch/mips-fpregset-core.c: New test source.
2439
81e25b7c
EK
24402018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2441
2442 PR server/23198
2443 * hostio.c (require_int): Do not report overflow for integers
2444 between 0xfffffff and 0x7fffffff.
2445
7e947ad3
MR
24462018-05-22 Maciej W. Rozycki <macro@mips.com>
2447
2448 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2449 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2450 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2451 functions.
2452 (the_low_target): Wire them.
2453
1d75a658
PFC
24542018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2455
2456 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2457 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2458 mode. Call collect_register_by_name with vscr using
2459 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2460 (ppc_store_vrregset): Add and set vscr_offset variable as in
2461 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2462 vscr_offset.
2463
d078308a
PFC
24642018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2465
2466 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2467 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2468 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2469
7273b5fc
PFC
24702018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2471
2472 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2473 (ppc_store_vsxregset): Likewise.
2474 (ppc_fill_vrregset): Likewise.
2475 (ppc_store_vrregset): Likewise.
2476 (ppc_fill_evrregset): Likewise.
2477 (ppc_store_evrregset): Likewise.
2478 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2479 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2480 needed.
2481
2e077f5e
PFC
24822018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2483
2484 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2485 wordsize of the inferior. Call ppc_linux_target_wordsize.
2486
bd64614e
PFC
24872018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2488
2489 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2490 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2491 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2492 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2493 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2494 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2495 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2496 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2497 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2498 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2499 (tdesc_powerpc_e500l): Remove.
2500 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2501 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2502 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2503 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2504 linux-ppc-tdesc.h.
2505 (ppc_arch_setup): Remove target description matching code. Fill a
2506 ppc_linux_features struct and call ppc_linux_match_description
2507 with it.
2508
75d74cca
MR
25092018-05-22 Maciej W. Rozycki <macro@mips.com>
2510
2511 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2512 width of the requested register exceeds the width of the
2513 `ptrace' data type.
2514 (mips_cannot_store_register): Likewise.
2515
e4439e43
MR
25162018-05-21 Maciej W. Rozycki <macro@mips.com>
2517
2518 * linux-mips-low.c (mips_fetch_register): New function. Update
2519 preceding comment.
2520 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2521 (the_low_target): Wire `mips_fetch_register'.
2522
55271bf9
JB
25232018-05-10 Joel Brobecker <brobecker@adacore.com>
2524
2525 * lynx-i386-low.c (LYNXOS_178): New macro.
2526 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2527 the layout on LynxOS-178.
2528 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2529 handle floating point registers that are not supported by
2530 LynxOS-178.
2531
1a34f210
TT
25322018-05-10 Tom Tromey <tom@tromey.com>
2533
2534 * configure: Rebuild.
2535
190852c8
JB
25362018-05-10 Joel Brobecker <brobecker@adacore.com>
2537
2538 PR server/23158:
2539 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2540 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2541 Use it to set the expedite_regs field in the given tdesc.
2542 * x86-tdesc.h: New file.
2543 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2544 Adjust following the addition of the new expedite_regs parameter
2545 to init_target_desc.
2546 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2547 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2548 (i386_linux_read_description, amd64_linux_read_description):
2549 Adjust following the addition of the new expedite_regs parameter
2550 to init_target_desc.
2551 * lynx-i386-low.c: #include "x86-tdesc.h".
2552 (lynx_i386_arch_setup): Adjust following the addition of the new
2553 expedite_regs parameter to init_target_desc.
2554 * nto-x86-low.c: #include "x86-tdesc.h".
2555 (nto_x86_arch_setup): Adjust following the addition of the new
2556 expedite_regs parameter to init_target_desc.
2557 * win32-i386-low.c: #include "x86-tdesc.h".
2558 (i386_arch_setup): Adjust following the addition of the new
2559 expedite_regs parameter to init_target_desc.
2560
7dbac825
JB
25612018-05-10 Joel Brobecker <brobecker@adacore.com>
2562
2563 PR server/23158:
2564 * win32-low.c (win32_create_inferior): Add call to my_wait
2565 setting last_status global.
2566
906994d9
JB
25672018-05-10 Joel Brobecker <brobecker@adacore.com>
2568
2569 PR server/23158:
2570 * win32-low.c (create_process): Only call gdb_tilde_expand if
2571 inferior_cwd is not NULL.
2572
8ee22052
AB
25732018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2574
2575 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2576 registers to the cache if their values have changed.
2577 (i387_xsave_to_cache): Provide default values for x87 control
2578 registers when these features are available, but disabled.
2579 * regcache.c (supply_register_by_name_zeroed): New function.
2580 * regcache.h (supply_register_by_name_zeroed): Declare new
2581 function.
2582
aff689d3
TT
25832018-05-07 Tom Tromey <tom@tromey.com>
2584
2585 * configure: Rebuild.
2586
85e26832
TT
25872018-05-04 Tom Tromey <tom@tromey.com>
2588
2589 * configure: Rebuild.
2590
a3b60e45
JK
25912018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2592 Pedro Alves <palves@redhat.com>
2593
2594 * linux-aarch64-low.c (aarch64_stopped_data_address):
2595 Likewise.
2596
632e107b
TT
25972018-04-27 Tom Tromey <tom@tromey.com>
2598
2599 * configure: Rebuild.
2600
458412c3
TT
26012018-04-23 Tom Tromey <tom@tromey.com>
2602
2603 * configure: Rebuild.
2604
f31c089e
SM
26052018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2606
2607 * Makefile.in (depcomp): Add "..".
2608 (all_deps_files): New and use it.
2609
b319b098
AH
26102018-04-18 Alan Hayward <alan.hayward@arm.com>
2611
2612 * configure.srv (aarch64*-*-linux*): Don't include xml.
2613 (i[34567]86-*-cygwin*): Likewise.
2614 (i[34567]86-*-linux*): Likewise.
2615 (i[34567]86-*-lynxos*): Likewise.
2616 (i[34567]86-*-mingw32ce*): Likewise.
2617 (i[34567]86-*-mingw*): Likewise.
2618 (i[34567]86-*-nto*): Likewise.
2619 (tic6x-*-uclinux): Likewise.
2620 (x86_64-*-linux*): Likewise.
2621 (x86_64-*-mingw*): Likewise.
2622 (x86_64-*-cygwin*): Likewise.
2623
3b74854b
AH
26242018-04-18 Alan Hayward <alan.hayward@arm.com>
2625
2626 * tdesc.c: Remove xml parameter.
2627
e98577a9
AH
26282018-04-18 Alan Hayward <alan.hayward@arm.com>
2629
2630 * server.c (get_features_xml): Remove cast.
2631 * tdesc.c (void target_desc::accept): Fill in function.
2632 (tdesc_get_features_xml): Remove old xml creation.
2633 (print_xml_feature::visit_pre): Add xml vistor.
2634 * tdesc.h (struct target_desc): Make xmltarget mutable.
2635 (tdesc_get_features_xml): Remove declaration.
2636
d278f585
AH
26372018-04-18 Alan Hayward <alan.hayward@arm.com>
2638
2639 * tdesc.c (tdesc_architecture_name): Add new function.
2640 (tdesc_osabi_name): Likewise.
2641 (tdesc_get_features_xml): Use new functions.
2642
eee8a18d
AH
26432018-04-18 Alan Hayward <alan.hayward@arm.com>
2644
2645 * tdesc.c (tdesc_create_flags): Remove.
2646 (tdesc_add_flag): Likewise.
2647 (tdesc_named_type): Likewise.
2648 (tdesc_create_union): Likewise.
2649 (tdesc_create_struct): Likewise.
2650 (tdesc_create_vector): Likewise.
2651 (tdesc_add_bitfield): Likewise.
2652 (tdesc_add_field): Likewise.
2653 (tdesc_set_struct_size): Likewise.
2654
82ec9bc7
AH
26552018-04-18 Alan Hayward <alan.hayward@arm.com>
2656
2657 * tdesc.c (~target_desc): Remove implictly deleted items.
2658 (init_target_desc): Iterate all features.
2659 (tdesc_get_features_xml): Use vector.
2660 (tdesc_create_feature): Create feature.
2661 * tdesc.h (tdesc_feature) Remove
2662 (target_desc): Add features.
2663
ea3e7d71
AH
26642018-04-18 Alan Hayward <alan.hayward@arm.com>
2665
2666 * Makefile.in: Add common/tdesc.c
2667 * tdesc.c (init_target_desc): init all reg_defs from register
2668 vector.
2669 (tdesc_create_reg): Create tdesc_reg.
2670 * tdesc.h (tdesc_feature): Add register vector.
2671
17d08cd4
SM
26722018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2673
2674 * tdesc.h (struct target_desc) <features>: Change type to
2675 std::vector<std::string>.
2676 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2677 changes.
2678 (tdesc_get_features_xml): Likewise.
2679 (tdesc_create_feature): Likewise.
2680
5cd3e386
AH
26812018-03-26 Alan Hayward <alan.hayward@arm.com>
2682
2683 * regcache.c (find_register_by_number): Return a ref.
2684 (find_regno): Use references.
2685 (register_size): Likewise.
2686 (register_data): Likewise.
2687 * tdesc.c (target_desc::~target_desc): Remove free calls.
2688 (target_desc::operator==): Use std::vector compare.
2689 (init_target_desc): Use reference.
2690 (tdesc_create_reg): Use reg constructors.
2691 * tdesc.h (struct target_desc): Replace pointer with object.
2692
dff7492c
AH
26932018-03-23 Alan Hayward <alan.hayward@arm.com>
2694
2695 * regcache.c (find_register_by_number): Make static.
2696 (find_regno): Use find_register_by_number
2697 * regcache.h (struct reg): Remove declaration.
2698
d80e5242
AH
26992018-03-23 Alan Hayward <alan.hayward@arm.com>
2700
2701 * tdesc.c (target_desc::~target_desc): Move to here.
2702 (target_desc::operator==): Likewise.
2703 * tdesc.h (target_desc::~target_desc): Move from here.
2704 (target_desc::operator==): Likewise.
2705
f69c5afb
AA
27062018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2707
2708 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2709
ce29f843
AA
27102018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2711
2712 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2713 S390_TDESC_GS.
2714 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2715 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2716 and init_registers_s390_gs_linux64.
2717
c49bd90b
AA
27182018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2719
2720 * linux-s390-low.c (s390_fill_gs): Remove function.
2721 (s390_fill_gsbc): Remove function.
2722 (s390_regsets): Set fill functions for the guarded storage regsets
2723 to NULL.
2724
7edb9bd3
AA
27252018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2726
2727 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2728 the word size. Add comment.
2729 (s390_get_wordsize): New function.
2730 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2731 pswm with it. Instead, use s390_get_wordsize to determine the
2732 word size first and derive the correct tdesc from that directly.
2733
39be3c7e
SM
27342018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2735
2736 * Makefile.in: Include silent-rules.mk.
2737 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2738 (COMPILE): Add ECHO_CXX.
2739 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2740 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2741 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2742 (version-generated.c): Add ECHO_GEN.
2743 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2744 (IPAGENT_COMPILE): Add ECHO_CXX.
2745 (%-generated.c): Add ECHO_REGDAT.
2746
3ae9ce5d
TT
27472018-03-14 Tom Tromey <tom@tromey.com>
2748
2749 PR cli/14977:
2750 * ax.c (ax_printf): Special case for NULL.
2751
e6a58aa8
SM
27522018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2753
2754 * linux-low.c (linux_qxfer_libraries_svr4): Use
2755 xml_escape_text_append.
2756
f6e8a41e
SM
27572018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2758
2759 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2760
b9671caf
SM
27612018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2762
2763 * server.c (handle_general_set): Remove unnecessary xstrdup.
2764
e80aaf61
SM
27652018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2766
2767 * server.c (parse_debug_format_options): Adjust to
2768 delim_string_to_char_ptr_vec changes.
2769 * thread-db.c (thread_db_load_search): Adjust to
2770 dirnames_to_char_ptr_vec changes.
2771
b1223e78
MM
27722018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2773
2774 * target.h (target_enable_btrace, target_disable_btrace)
2775 (target_read_btrace, target_read_btrace_conf): Turn macro into
2776 inline function. Throw error if target method is not defined.
2777 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2778 check for btrace target method. Be prepared to handle exceptions
2779 from btrace target methods.
2780
81561546
SDJ
27812018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2782
2783 * server.c (captured_main): Change order of error message printed
2784 when the current working directory cannot be found.
2785
25e3c82c
SDJ
27862018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2787
2788 * server.c: Include "filenames.h" and "pathstuff.h".
2789 (program_name): Delete variable.
2790 (program_path): New anonymous class.
2791 (get_exec_wrapper): Use "program_path" instead of
2792 "program_name".
2793 (handle_v_run): Likewise.
2794 (captured_main): Likewise.
2795 (process_serial_event): Likewise.
2796
b4987c95
SDJ
27972018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2798
2799 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2800 (OBJS): Add "pathstuff.o".
2801 * server.c (current_directory): New global variable.
2802 (captured_main): Initialize "current_directory".
2803
f46cd62a
AH
28042018-02-26 Alan Hayward <alan.hayward@arm.com>
2805
2806 * tdesc.c: Use common/tdesc.h.
2807 * tdesc.h: Likewise.
2808
a543c5ca
AH
28092018-02-20 Alan Hayward <alan.hayward@arm.com>
2810 Simon Marchi <simon.marchi@ericsson.com>
2811
2812 * Makefile.in: Switch order of make rules.
2813
b5884fa7
AH
28142018-02-19 Alan Hayward <alan.hayward@arm.com>
2815
2816 * Makefile.in: Add common directory in build.
2817 * configure.ac: Add common reference.
2818 * configure: Regenerate.
2819
de6242d3
MM
28202018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2821
2822 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2823 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2824 * spu-low.c (spu_target_ops): Likewise.
2825 * win32-low.c (win32_target_ops): Likewise.
2826 * server.c (supported_btrace_packets): Report packets unconditionally.
2827 * target.h (target_ops) <supports_btrace>: Remove.
2828 (target_supports_btrace): Remove.
2829
9ee23a85
MM
28302018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2831
2832 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2833 (handle_btrace_disable): Change return type to void. Use exceptions
2834 to report errors.
2835 (handle_btrace_general_set): Catch exception and copy message to
2836 return message.
2837
8ce47547
TT
28382018-02-08 Tom Tromey <tom@tromey.com>
2839
2840 * linux-low.c (install_software_single_step_breakpoints): Use
2841 make_scoped_restore.
2842 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2843 (do_restore_current_thread_cleanup): Remove.
2844 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2845 declare.
2846
45dd3607
TT
28472018-02-08 Tom Tromey <tom@tromey.com>
2848
2849 * mem-break.c (set_raw_breakpoint_at): Use
2850 gdb::unique_xmalloc_ptr.
2851
e671cd59
PA
28522018-01-30 Pedro Alves <palves@redhat.com>
2853
2854 PR gdb/13211
2855 * target.c (target_terminal::terminal_state): Rename to ...
2856 (target_terminal::m_terminal_state): ... this.
2857
a0aad537
JC
28582018-01-19 James Clarke <jrtc27@jrtc27.com>
2859
2860 * linux-low.c (handle_extended_wait): Surround call to
2861 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2862
4d9b86e1
SM
28632018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2864
2865 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2866 linux_ptrace_attach_fail_reason_string now returning an
2867 std::string.
2868 (linux_attach): Likewise.
2869 * thread-db.c (attach_thread): Likewise.
2870
f517c180
EA
28712018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2872
2873 PR gdb/21559
2874 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2875 checking for fs_base/gs_base fields in struct user_regs_struct.
2876 * configure: Regenerate.
2877
9a70f35c
YQ
28782018-01-16 Yao Qi <yao.qi@linaro.org>
2879
2880 PR gdb/18749
2881 * linux-low.c (fetch_register): Call supply_register instead of
2882 error.
2883
605fd3c6
YQ
28842018-01-08 Yao Qi <yao.qi@linaro.org>
2885 Simon Marchi <simon.marchi@ericsson.com>
2886
2887 * Makefile.in (OBS): Remove selftest.o.
2888 * configure.ac: Set srv_selftest_objs if $development is true.
2889 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2890 * configure: Re-generated.
2891 * server.c (captured_main): Wrap variable selftest_filter with
2892 GDB_SELF_TEST.
2893
2cc05030
SM
28942018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2895
2896 * server.c (parse_debug_format_options): Return std::string.
2897 (handle_monitor_command, captured_main): Adjust.
2898
e379cee6
PA
28992018-01-05 Pedro Alves <palves@redhat.com>
2900
2901 PR gdb/18653
2902 * server.c (captured_main): Pass quiet=false to
2903 save_original_signals_state.
2904
82e1e79a
JB
29052018-01-01 Joel Brobecker <brobecker@adacore.com>
2906
2907 * gdbreplay.c (gdbreplay_version): Update copyright year in
2908 version message.
2909 * server.c (gdbserver_version): Likewise.
2910
8e481c3b
TT
29112017-12-08 Tom Tromey <tom@tromey.com>
2912
2913 * ax.c (ax_printf): Update.
2914
a8806230
YQ
29152017-12-07 Yao Qi <yao.qi@linaro.org>
2916
2917 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2918 aarch64_linux_read_description.
2919 * linux-amd64-ipa.c (idx2mask): New array.
2920 (get_ipa_tdesc): Move idx2mask out.
2921 (initialize_low_tracepoint): Initialize target descriptions.
2922 * linux-i386-ipa.c (idx2mask): New array.
2923 (get_ipa_tdesc): Move idx2mask out.
2924 (initialize_low_tracepoint): Initialize target descriptions.
2925
d4a0e8b5
SM
29262017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2927
2928 * tdesc.c (struct tdesc_type): Change return type.
2929 (tdesc_add_flag): Change parameter type.
2930 (tdesc_add_bitfield): Likewise.
2931 (tdesc_add_field): Likewise.
2932 (tdesc_set_struct_size): Likewise.
2933
798a7429
SM
29342017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2935
2936 * regcache.c (registers_to_string): Remove unused variable.
2937
c0e15c9b
SM
29382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2939
2940 * inferiors.c (for_each_inferior_with_data): Remove.
2941 * inferiors.h (for_each_inferior_with_data): Remove.
2942 * server.c (handle_qxfer_threads_worker): Change parameter type.
2943 (handle_qxfer_threads_proper): Use for_each_thread.
2944
f0045347
SM
29452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2946
2947 * inferiors.c (for_each_inferior): Remove.
2948 (clear_inferiors): Use for_each_thread.
2949 * inferiors.h (for_each_inferior): Remove.
2950 * linux-low.c (linux_wait_for_event_filtered): Use
2951 for_each_thread.
2952 (linux_stabilize_threads): Likewise.
2953 * regcache.c (regcache_release): Likewise.
2954 * server.c (gdb_wants_all_threads_stopped): Likewise.
2955 (clear_pending_status_callback): Remove.
2956 (handle_status): Use for_each_thread.
2957 (captured_main): Likewise.
2958 * win32-low.c (child_init_thread_list): Likewise.
2959 (win32_clear_inferiors): Likewise.
2960 (fake_breakpoint_event): Likewise.
2961
9521758b
SM
29622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2963
2964 * inferiors.h (find_inferior): Remove.
2965 * inferiors.c (find_inferior): Remove.
2966
8f86d7aa
SM
29672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2968
2969 * linux-low.c (resume_status_pending_p): Update comment.
2970 (need_step_over_p): Update comment.
2971
e2b44075
SM
29722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2973
2974 * linux-low.c (proceed_one_lwp): Return void, change parameter
2975 type.
2976 (unsuspend_and_proceed_one_lwp): Likewise.
2977 (proceed_all_lwps): Use for_each_thread.
2978 (unstop_all_lwps): Likewise.
2979
c80825ff
SM
29802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2981
2982 * linux-low.c (linux_resume_one_thread): Return void, take
2983 parameter directly.
2984 (linux_resume): Use for_each_thread.
2985
df3e4dbe
SM
29862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2987
2988 * linux-low.c (send_sigstop_callback): Return void, change
2989 parameter type. Rename to...
2990 (send_sigstop): ... this.
2991 (suspend_and_send_sigstop_callback): Return void, change parameter
2992 type. Rename to...
2993 (suspend_and_send_sigstop): ... this.
2994 (stop_all_lwps): Use for_each_thread.
2995
5a6b0a41
SM
29962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2997
2998 * linux-low.c (lwp_running): Return bool, remove unused
2999 argument.
3000 (linux_stabilize_threads): Use find_thread.
3001
39a64da5
SM
30022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3003
3004 * linux-low.c (select_singlestep_lwp_callback): Remove.
3005 (count_events_callback): Remove.
3006 (select_event_lwp_callback): Remove.
3007 (select_event_lwp): Use find_thread/for_each_thread.
3008
a1385b7b
SM
30092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3010
3011 * linux-low.c (not_stopped_callback): Return bool, take filter
3012 argument directly.
3013 (linux_wait_for_event_filtered): Use find_thread.
3014 (linux_wait_1): Likewise.
3015
454296a2
SM
30162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3017
3018 * linux-low.c (same_lwp): Remove.
3019 (find_lwp_pid): Use find_thread.
3020
6b2a85da
SM
30212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3022
3023 * linux-low.c (delete_lwp_callback): Remove.
3024 (linux_mourn): Use for_each_thread.
3025
798a38e8
SM
30262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3027
3028 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3029 args parameter, don't check for pid.
3030 (linux_detach): Use for_each_thread.
3031
e4eb0dec
SM
30322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3033
3034 * linux-low.c (struct counter): Remove.
3035 (second_thread_of_pid_p): Remove.
3036 (last_thread_of_process_p): Use find_thread.
3037
83e1b6c1
SM
30382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3039
3040 * inferiors.c (find_inferior_in_random): Remove.
3041 * inferiors.h (find_inferior_in_random): Remove.
3042 * linux-low.c (status_pending_p_callback): Return bool, accept
3043 parameter ptid directly.
3044 (linux_wait_for_event_filtered): Use find_thread_in_random.
3045 (linux_wait_1): Likewise.
3046
8dc7b443
SM
30472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3048
3049 * inferiors.c (find_inferior_id): Remove.
3050 (find_thread_ptid): Move implemention from find_inferior_id to
3051 here.
3052 * inferiors.h (find_inferior_id): Remove.
3053 * server.c (handle_status): Use find_thread_ptid.
3054 (process_serial_event): Likewise.
3055 * thread-db.c (find_one_thread): Likewise.
3056 (thread_db_thread_handle): Likewise.
3057 * win32-low.c (thread_rec): Likewise.
3058 (child_delete_thread): Likewise.
3059 (win32_thread_alive): Likewise.
3060 (get_child_debug_event): Likewise.
3061
da25033c
SM
30622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3063
3064 * linux-mips-low.c (update_watch_registers_callback): Return
3065 void, remove pid_p parameter, don't check for pid.
3066 (mips_insert_point, mips_remove_point): Use for_each_thread.
3067
c91bb56b
SM
30682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3069
3070 * lynx.low (lynx_delete_thread_callback): Remove.
3071 (lynx_mourn): Use for_each_thread.
3072
634a3254
SM
30732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3074
3075 * regcache.c (regcache_invalidate_one): Remove.
3076 (regcache_invalidate_pid): use for_each_thread.
3077
41272101
TT
30782017-11-26 Tom Tromey <tom@tromey.com>
3079
3080 * linux-low.c (linux_create_inferior): Update.
3081
f5291a6f
UW
30822017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3083
3084 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3085
6654d750
AH
30862017-11-24 Alan Hayward <alan.hayward@arm.com>
3087
3088 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3089 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3090 * linux-aarch64-tdesc-selftest.c: New file.
3091 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3092
30932017-11-24 Alan Hayward <alan.hayward@arm.com>
3094
3095 * configure.srv: Add new file.
3096 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3097 * linux-aarch64-tdesc-selftest.c: New file.
3098 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3099
49bdb7ee
AH
31002017-11-24 Alan Hayward <alan.hayward@arm.com>
3101
3102 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3103 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3104 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3105
d6d7ce56
AH
31062017-11-24 Alan Hayward <alan.hayward@arm.com>
3107
3108 * configure.srv: Add new files.
3109 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3110 aarch64_linux_read_description.
3111 * linux-aarch64-low.c (aarch64_linux_read_description):
3112 Merge with aarch64_arch_setup.
3113 (aarch64_arch_setup): Call aarch64_linux_read_description.
3114 * linux-aarch64-tdesc.c: New file.
3115 * linux-aarch64-tdesc.h: New file.
3116
506fe5f4
YQ
31172017-11-24 Yao Qi <yao.qi@linaro.org>
3118
3119 * configure.srv: Set $srv_regobj for tic6x-linux.
3120 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3121 (tic6x_read_description): Move some code to tic6x_arch_setup.
3122 (tic6x_tdesc_test): New function.
3123 (initialize_low_arch): Call selftests::register_test.
3124
29f9a567
YQ
31252017-11-22 Yao Qi <yao.qi@linaro.org>
3126
3127 * remote-utils.c (prepare_resume_reply): Use memcpy.
3128
578290ec
SM
31292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3130
3131 * linux-low.c (kill_one_lwp_callback): Return void, take
3132 argument directly, don't filter on pid.
3133 (linux_kill): Use for_each_thread.
3134
eca55aec
SM
31352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3136
3137 * linux-low.c (need_step_over_p): Return bool, remove dummy
3138 argument.
3139 (linux_resume, proceed_all_lwps): Use find_thread.
3140
25c28b4d
SM
31412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3142
3143 * linux-low.c (resume_status_pending_p): Return bool, remove
3144 flag_p argument.
3145 (linux_resume): Use find_thread.
3146
5fdda392
SM
31472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3148
3149 * linux-low.c (struct thread_resume_array): Remove.
3150 (linux_set_resume_request): Return void, take arguments
3151 directly.
3152 (linux_resume): Use for_each_thread.
3153
fcb056a5
SM
31542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3155
3156 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3157 return bool, remove data argument.
3158 (linux_stabilize_threads): Use find_thread.
3159
139720c5
SM
31602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3161
3162 * linux-low.c (unsuspend_one_lwp): Remove.
3163 (unsuspend_all_lwps): Use for_each_thread, inline code from
3164 unsuspend_one_lwp.
3165
6d1e5673
SM
31662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3167
3168 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3169 * linux-low.c (struct iterate_over_lwps_args): Remove.
3170 (iterate_over_lwps_filter): Remove.
3171 (iterate_over_lwps): Use find_thread.
3172
bbf550d5
SM
31732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3174
3175 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3176 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3177 code from reset_lwp_ptrace_options_callback.
3178
00192f77
SM
31792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3180
3181 * linux-arm-low.c (struct update_registers_data): Remove.
3182 (update_registers_callback): Return void, take arguments
3183 directly, don't check thread's pid.
3184 (arm_insert_point, arm_remove_point): Use for_each_thread.
3185
2bee2b6c
SM
31862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3187
3188 * win32-low.c (continue_one_thread): Return void, take argument
3189 directly.
3190 (child_continue): Use for_each_thread.
3191
0b360f19
SM
31922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3193
3194 * win32-i386-low.c (update_debug_registers_callback): Rename
3195 to ...
3196 (update_debug_registers): ... this, return void, remove pid_p arg.
3197 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3198
f27866ba
SM
31992017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3200
3201 * inferiors.h (struct process_info): Add constructor, initialize
3202 fields..
3203 <syscalls_to_catch>: Change type to std::vector<int>.
3204 * inferiors.c (add_process): Allocate process_info with new.
3205 (remove_process): Free process_info with delete.
3206 * linux-low.c (handle_extended_wait): Adjust.
3207 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3208 * server.c (handle_general_set): Adjust.
3209
e849ea89
PA
32102017-11-16 Pedro Alves <palves@redhat.com>
3211
3212 * remote-utils.c (remote_close): Block SIGIO signals instead of
3213 uninstalling the SIGIO handler.
3214
1d0aa65c
AH
32152017-11-16 Alan Hayward <alan.hayward@arm.com>
3216
3217 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3218
3491a34c
YQ
32192017-11-16 Yao Qi <yao.qi@linaro.org>
3220
3221 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3222 (tic6x_store_gregset): Likewise.
3223 (tic6x_usrregs_info): Move it up.
3224
a602f924
AH
32252017-11-15 Alan Hayward <alan.hayward@arm.com>
3226
3227 * Makefile.in: Update arch rules.
3228 * configure.srv: Explicitly mark arch/ files.
3229
5616b6c3
AS
32302017-11-13 Andreas Schwab <schwab@suse.de>
3231
3232 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3233 function.
3234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3235
d1928160
PA
32362017-11-06 Pedro Alves <palves@redhat.com>
3237
3238 * config.in, configure: Regenerate.
3239
bac608e7
SM
32402017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3241
3242 * target.c (struct thread_search): Remove.
3243 (thread_search_callback): Remove.
3244 (prepare_to_access_memory): Use for_each_thread instead of
3245 find_inferior. Inline code from thread_search_callback.
3246
eaddb425
SM
32472017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3248
3249 * server.c (struct visit_actioned_threads_data): Remove.
3250 (visit_actioned_threads): Change prototype to take arguments
3251 directly.
3252 (resume): Use find_thread instead of find_inferior.
3253
99078d34
SM
32542017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3255
3256 * server.c (queue_stop_reply_callback): Change prototype, return
3257 void.
3258 (find_status_pending_thread_callback): Remove.
3259 (handle_status): Replace find_inferior with find_thread and
3260 for_each_thread.
3261
cc628f3d
AH
32622017-10-25 Alan Hayward <alan.hayward@arm.com>
3263
3264 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3265 with REGNO.
3266 (aarch64_store_gregset): Likewise.
3267 (aarch64_fill_fpregset): Likewise.
3268 (aarch64_store_fpregset): Likewise.
3269
4d3bb80e
SM
32702017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3271
3272 * gdbthread.h (find_thread, for_each_thread): New functions.
3273 * inferiors.c (thread_of_pid): Remove.
3274 (find_any_thread_of_pid): Use find_thread.
3275 * linux-low.c (num_lwps): Use for_each_thread.
3276
7a7cdfa0
YQ
32772017-10-17 Yao Qi <yao.qi@linaro.org>
3278
3279 * Makefile.in: Remove one rule.
3280 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3281
e675d170
YQ
32822017-10-17 Yao Qi <yao.qi@linaro.org>
3283
3284 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3285 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3286
7eb4e0f9
YQ
32872017-10-17 Yao Qi <yao.qi@linaro.org>
3288
3289 * configure.srv: Rename arm.o with arch/arm.o.
3290
60d6cfc9
YQ
32912017-10-17 Yao Qi <yao.qi@linaro.org>
3292
3293 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3294 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3295 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3296 (arch-i386.o, arch-amd64.o): Remove rules.
3297 (arch/%.o): New rule.
3298 Update POSTCOMPILE and COMPILE.pre.
3299 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3300 * configure: Re-generated.
3301 * configure.srv: Replace arch-i386.o with arch/i386.o.
3302 Replace arch-amd64.o with arch/amd64.o.
3303
5bfda255
YQ
33042017-10-16 Yao Qi <yao.qi@linaro.org>
3305
3306 * configure: Regenerated.
3307
9c80ecd6
SM
33082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3309
3310 * inferiors.h: (struct inferior_list): Remove.
3311 (struct inferior_list_entry); Remove.
3312 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3313 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3314 get_first_inferior): Remove.
3315 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3316 find_inferior_id, find_inferior_in_random): Change signature.
3317 * inferiors.c (all_threads): Change type to
3318 std::list<thread_info *>.
3319 (get_thread): Remove macro.
3320 (find_inferior, find_inferior_id): Change signature, implement
3321 using find_thread.
3322 (find_inferior_in_random): Change signature, implement using
3323 find_thread_in_random.
3324 (for_each_inferior, for_each_inferior_with_data): Change
3325 signature, implement using for_each_thread.
3326 (add_inferior_to_list, remove_inferior): Remove.
3327 (add_thread, get_first_thread, thread_of_pid,
3328 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3329 (get_first_inferior, one_inferior_p, clear_inferior_list):
3330 Remove.
3331 (clear_inferiors, get_thread_process): Update.
3332 * gdbthread.h: Include <list>.
3333 (struct thread_info) <entry>: Remove field.
3334 <id>: New field.
3335 (all_threads): Change type to std::list<thread_info *>.
3336 (get_first_inferior): Add doc.
3337 (find_thread, for_each_thread, find_thread_in_random): New
3338 functions.
3339 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3340 * linux-arm-low.c (update_registers_callback): Update.
3341 * linux-low.c (second_thread_of_pid_p): Update.
3342 (kill_one_lwp_callback, linux_detach_lwp_callback,
3343 delete_lwp_callback, status_pending_p_callback, same_lwp,
3344 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3345 iterate_over_lwps, not_stopped_callback,
3346 resume_stopped_resumed_lwps, count_events_callback,
3347 select_singlestep_lwp_callback, select_event_lwp_callback,
3348 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3349 suspend_and_send_sigstop_callback, wait_for_sigstop,
3350 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3351 lwp_running, linux_set_resume_request, resume_status_pending_p,
3352 need_step_over_p, start_step_over, linux_resume_one_thread,
3353 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3354 reset_lwp_ptrace_options_callback): Update.
3355 * linux-mips-low.c (update_watch_registers_callback): Update.
3356 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3357 Update.
3358 (free_register_cache_thread_one): Remove.
3359 (regcache_release): Update.
3360 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3361 handle_qxfer_threads_worker): Update.
3362 (handle_query): Update, use list iterator.
3363 (visit_actioned_threads, handle_pending_status,
3364 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3365 clear_pending_status_callback, set_pending_status_callback,
3366 find_status_pending_thread_callback, handle_status,
3367 process_serial_event): Update.
3368 * target.c (thread_search_callback): Update.
3369 * thread-db.c (thread_db_get_tls_address): Update.
3370 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3371 Update.
3372 * win32-i386-low.c (update_debug_registers_callback): Update.
3373 * win32-low.c (delete_thread_info, child_delete_thread,
3374 continue_one_thread, suspend_one_thread,
3375 get_child_debug_event): Adjust.
3376
9179355e
SM
33772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3378
3379 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3380 * inferiors.h: Include <list>.
3381 (struct process_info) <entry>: Remove field.
3382 <pid>: New field.
3383 (pid_of): Change macro to function.
3384 (ptid_of, lwpid_of): Remove macro.
3385 (all_processes): Change type to std::list<process_info *>.
3386 (ALL_PROCESSES): Remove macro.
3387 (for_each_process, find_process): New function.
3388 * inferiors.c (all_processes): Change type to
3389 std::list<process_info *>.
3390 (find_thread_process): Adjust.
3391 (add_process): Likewise.
3392 (remove_process): Likewise.
3393 (find_process_pid): Likewise.
3394 (get_first_process): Likewise.
3395 (started_inferior_callback): Remove.
3396 (have_started_inferiors_p): Adjust.
3397 (attached_inferior_callback): Remove.
3398 (have_attached_inferiors_p): Adjust.
3399 * linux-low.c (check_zombie_leaders): Likewise.
3400 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3401 (x86_linux_update_xmltarget): Adjust.
3402 * server.c (handle_query): Likewise.
3403 (gdb_reattached_process): Remove.
3404 (handle_status): Adjust.
3405 (kill_inferior_callback): Likewise.
3406 (detach_or_kill_inferior): Remove.
3407 (print_started_pid): Likewise.
3408 (print_attached_pid): Likewise.
3409 (detach_or_kill_for_exit): Update.
3410 (process_serial_event): Likewise.
3411 * linux-arm-low.c (arm_new_fork): Likewise.
3412
c9cb8905
SM
34132017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3414
3415 * dll.h: Include <list>.
3416 (struct dll_info): Add constructor.
3417 <entry>: Remove field.
3418 (all_dlls): Change type to std::list<dll_info>.
3419 * dll.c: Include <algorithm>.
3420 (get_dll): Remove macro.
3421 (all_dlls): Change type to std::list<dll_info *>.
3422 (free_one_dll): Remove.
3423 (match_dll): Likewise.
3424 (loaded_dll): Adjust.
3425 (unloaded_dll): Adjust to all_dlls type change, use
3426 std::find_if. Inline code from match_dll.
3427 (clear_dlls): Adjust to all_dlls type change.
3428 * server.c (emit_dll_description): Remove.
3429 (handle_qxfer_libraries): Adjust to all_dlls type change,
3430 integrate emit_dll_description's functionality.
3431
04ec7890
SM
34322017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3433
3434 * linux-low.h (struct linux_target_ops) <delete_process>: New
3435 field.
3436 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3437 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3438 (struct linux_target_ops): Add delete_process callback.
3439 * linux-arm-low.c (arm_delete_process): New.
3440 (struct linux_target_ops): Add delete_process callback.
3441 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3442 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3443 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3444 * linux-mips-low.c (mips_linux_delete_process): New.
3445 (struct linux_target_ops): Add delete_process callback.
3446 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3447 * linux-s390-low.c (struct linux_target_ops): Likewise.
3448 * linux-sh-low.c (struct linux_target_ops): Likewise.
3449 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3450 * linux-tile-low.c (struct linux_target_ops): Likewise.
3451 * linux-x86-low.c (x86_linux_delete_process): New.
3452 (struct linux_target_ops): Add delete_process callback.
3453 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3454
466eecee
SM
34552017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3456
3457 * linux-aarch64-low.c (the_low_target): Add thread delete
3458 callback.
3459 * linux-arm-low.c (arm_delete_thread): New function.
3460 (the_low_target): Add thread delete callback.
3461 * linux-bfin-low.c (the_low_target): Likewise.
3462 * linux-crisv32-low.c (the_low_target): Likewise.
3463 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3464 set.
3465 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3466 field.
3467 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3468 * linux-mips-low.c (mips_linux_delete_thread): New function.
3469 (the_low_target): Add thread delete callback.
3470 * linux-ppc-low.c (the_low_target): Likewise.
3471 * linux-s390-low.c (the_low_target): Likewise.
3472 * linux-sh-low.c (the_low_target): Likewise.
3473 * linux-tic6x-low.c (the_low_target): Likewise.
3474 * linux-tile-low.c (the_low_target): Likewise.
3475 * linux-x86-low.c (the_low_target): Likewise.
3476 * linux-xtensa-low.c (the_low_target): Likewise.
3477
b79f7801
YZ
34782017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3479
3480 * win32-low.c: Include "common-inferior.h".
3481
bc3b087d
SDJ
34822017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3483
3484 * inferiors.c (set_inferior_cwd): New function.
3485 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3486 (handle_query): Inform that QSetWorkingDir is supported.
3487 * win32-low.c (create_process): Pass the inferior's cwd to
3488 CreateProcess.
3489
d092c5a2
SDJ
34902017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3491
3492 * inferiors.c (current_inferior_cwd): New global variable.
3493 (get_inferior_cwd): New function.
3494 * inferiors.h (struct process_info) <cwd>: New field.
3495
7da0a886
SDJ
34962017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3497
3498 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3499 (OBS): Add gdb_tilde_expand.o.
3500
289a6840
SM
35012017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3502
3503 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3504 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3505
256642e8
PA
35062017-09-29 Pedro Alves <palves@redhat.com>
3507
3508 * ax.c (gdb_parse_agent_expr): Constify.
3509 * ax.h (gdb_parse_agent_expr): Constify.
3510 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3511 Constify.
3512 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3513 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3514 * remote-utils.h (read_ptid): Constify.
3515 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3516 (process_point_options, process_serial_event): Constify.
3517 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3518 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3519 (cmd_qtbuffer): Constify.
3520
5b9ca4d4
PA
35212017-09-29 Pedro Alves <palves@redhat.com>
3522
3523 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3524 fails.
3525
94c207e0
PA
35262017-09-29 Pedro Alves <palves@redhat.com>
3527
3528 * linux-low.c (handle_extended_wait): Pass parent thread instead
3529 of process to thread_db_notice_clone.
3530 * linux-low.h (thread_db_notice_clone): Replace parent process
3531 parameter with parent thread parameter.
3532 * thread-db.c (find_one_thread): Add comment.
3533 (thread_db_notice_clone): Replace parent process parameter with
3534 parent thread parameter. Temporarily switch to the parent thread.
3535
75352e28
SDJ
35362017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3537
3538 * gdbthread.h: Include "common-gdbthread.h".
3539 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3540 "if" when validating the ptid.
3541 * remote-utils.c: Include "gdbthread.h".
3542 (prepare_resume_reply): Use "switch_to_thread".
3543 * target.c (done_accessing_memory): Likewise.
3544
ad339634
AA
35452017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3546
3547 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3548 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3549 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3550 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3551 s390x-gs-linux64-ipa.o to ipa_obj.
3552 * linux-s390-low.c (HWCAP_S390_GS): New define.
3553 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3554 New functions.
3555 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3556 (s390_arch_setup): Check for guarded-storage support and choose
3557 appropriate tdesc.
3558 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3559 init_registers_s390x_gs_linux64.
3560 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3561 enum value.
3562 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3563 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3564
cc4d742f
SM
35652017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3566
3567 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3568
f6327dcb
KB
35692017-09-21 Kevin Buettner <kevinb@redhat.com>
3570
3571 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3572 (thread_db_thread_handle): Declare.
3573 * linux-low.c (linux_target_ops): Initialize thread_handle.
3574 * server.c (handle_qxfer_threads_worker): Add support for
3575 "handle" attribute.
3576 * target.h (struct target_ops): Add new function pointer,
3577 thread_handle.
3578 (target_thread_handle): Define.
3579 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3580 field in lwp.
3581 (thread_db_thread_handle): New function.
3582
86299109
KB
35832017-09-21 Kevin Buettner <kevinb@redhat.com>
3584
3585 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3586 * linux-low.h (thread_db_notice_clone): Declare.
3587 * thread-db.c (thread_db_notice_clone): New function.
3588
f557a88a
PA
35892017-09-21 Pedro Alves <palves@redhat.com>
3590
3591 * server.c (gdb_read_memory, handle_status, process_serial_event)
3592 (handle_serial_event, handle_target_event): Adjust to
3593 set_desired_thread prototype change.
3594 * target.c (set_desired_thread): Remove 'use_general' parameter
3595 and adjust.
3596 * target.h (set_desired_thread): Remove 'use_general' parameter.
3597
223ffa71
TT
35982017-09-20 Tom Tromey <tom@tromey.com>
3599
3600 * target.c (target_terminal::terminal_state): Define.
3601 (target_terminal::init): Rename from target_terminal_init.
3602 (target_terminal::inferior): Rename from
3603 target_terminal_inferior.
3604 (target_terminal::ours): Rename from target_terminal_ours.
3605 (target_terminal::ours_for_output, target_terminal::info): New.
3606
04fd3ba9
SM
36072017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3608
3609 * server.c (accumulate_file_name_length): Remove.
3610 (emit_dll_description): Adjust to std::string change.
3611 (handle_qxfer_libraries): Use std::string to hold document.
3612
5e187554
SM
36132017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3614
3615 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3616 return type of xml_escape_text.
3617 * server.c (emit_dll_description): Likewise.
3618
1526853e
SM
36192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3620
3621 * server.c (captured_main): Accept argument for --selftest.
3622 Update run_tests call.
3623 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3624 when registering selftests.
3625
c4dfafab
SDJ
36262017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3627
3628 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3629 instead of "VEC" for "target_desc.reg_defs".
3630 (regcache_cpy): Likewise.
3631 (registers_to_string): Likewise.
3632 (registers_from_string): Likewise.
3633 (find_regno): Likewise.
3634 (supply_regblock): Likewise.
3635 (regcache_raw_read_unsigned): Likewise.
3636 * tdesc.c (init_target_desc): Likewise.
3637 (tdesc_create_reg): Likewise.
3638 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3639 (struct target_desc) <reg_defs>: Convert to "std::vector".
3640 (target_desc): Do not initialize "reg_defs".
3641 (~target_desc): Update code to use "std::vector" instead of "VEC"
3642 for "target_desc.reg_defs".
3643 (operator==): Likewise.
3644
124aceb4
SM
36452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3646
3647 * inferiors.h (thread_to_gdb_id): Remove.
3648 * inferiors.c (thread_to_gdb_id): Remove.
3649 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3650 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3651 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3652 Likewise.
3653 * nto-low.c (nto_fetch_registers, nto_store_registers,
3654 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3655
96cde54f
SM
36562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3657
3658 * inferiors.h (gdb_id_to_thread_id): Remove.
3659 * inferiors.c (gdb_id_to_thread_id): Remove.
3660 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3661 removal. Move pid declaration closer to where it's used.
3662
e8ca139e
SM
36632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3664
3665 * server.c (handle_detach): New function.
3666 (process_serial_event): Move code out, call handle_detach.
3667
f8a4e119
SM
36682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3669
3670 * server.c (require_running): Rename to ...
3671 (require_running_or_return): ... this ...
3672 (require_running_or_break): ... and this.
3673 (handle_query, process_serial_event): Adjust.
3674
0eb0a407
SM
36752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3676
3677 * linux-low.c (linux_set_resume_request): Remove unused
3678 variables.
3679
785922a5
SM
36802017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3681
3682 * server.c (first_thread_of): Remove.
3683 (process_serial_event): Replace usage of first_thread_of with
3684 find_any_thread_of_pid.
3685 * tracepoint.c (same_process_p): Remove.
3686 (gdb_agent_about_to_close): Replace usage of same_process_p with
3687 find_any_thread_of_pid.
3688 * linux-x86-low.c (same_process_callback): Remove.
3689 (x86_arch_setup_process_callback): Replace usage of
3690 same_process_callback with find_any_thread_of_pid.
3691 * thread-db.c (any_thread_of): Remove.
3692 (switch_to_process): Replace usage of any_thread_of with
3693 find_any_thread_of_pid.
3694 * inferiors.c (thread_pid_matches_callback): Remove.
3695 (find_thread_process): Adjust to use find_any_thread_of_pid.
3696
a059f00c
SDJ
36972017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3698
3699 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3700 with "!VEC_empty".
a059f00c 3701
cc397f3a
SDJ
37022017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3703
3704 * linux-low.c (handle_extended_wait): Use
3705 "allocate_target_description" instead of "XNEW".
3706 * linux-x86-low.c (initialize_low_arch): Likewise.
3707
22916b07
YQ
37082017-09-05 Yao Qi <yao.qi@linaro.org>
3709
3710 * configure.srv (srv_i386_regobj): Remove.
3711 (srv_amd64_regobj): Remove.
3712 (srv_regobj): Set it to "" for x86 non-linux targets.
3713 * linux-x86-tdesc.c (i386_linux_read_description):
3714 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3715 (init_registers_i386): Remove the declaration.
3716 (tdesc_i386): Remove the declaration.
3717 (lynx_i386_arch_setup): Call i386_create_target_description.
3718 * nto-x86-low.c: Likewise.
3719 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3720 [!__x86_64__]: include arch/i386.h.
3721 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3722
38602d55
YQ
37232017-09-05 Yao Qi <yao.qi@linaro.org>
3724
3725 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3726 i386/amd64-XXX-linux from it.
3727
44b886ff
YQ
37282017-09-05 Yao Qi <yao.qi@linaro.org>
3729
3730 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3731 false.
3732 (ipa_amd64_linux_regobj): Remove.
3733 (ipa_x32_linux_regobj): Remove.
3734
b4570e4b
YQ
37352017-09-05 Yao Qi <yao.qi@linaro.org>
3736
3737 * Makefile.in (arch-amd64.o): New rule.
3738 * configure.srv: Append arch-amd64.o.
3739 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3740 (get_ipa_tdesc): Call amd64_linux_read_description.
3741 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3742 and init_registers_amd64_XXX.
3743 * linux-x86-low.c (x86_linux_read_description): Call
3744 amd64_linux_read_description.
3745 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3746 (initialize_low_arch): Don't call init_registers_x32_XXX and
3747 init_registers_amd64_XXX.
3748 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3749 and tdesc_amd64_XXX.
3750 [__x86_64__] (amd64_tdesc_test): New function.
3751 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3752 and init_registers_amd64_XXX.
3753 * linux-x86-tdesc.c: Include arch/amd64.h.
3754 (xcr0_to_tdesc_idx): New function.
3755 (i386_linux_read_description): New function.
3756 (amd64_get_ipa_tdesc_idx): New function.
3757 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3758 (amd64_get_ipa_tdesc): Declare.
3759
d1f28ea2
YQ
37602017-09-05 Yao Qi <yao.qi@linaro.org>
3761
3762 * configure.srv (srv_i386_linux_xmlfiles): Remove
3763 i386/i386-XXX-linux.xml from it.
3764
25a93583
YQ
37652017-09-05 Yao Qi <yao.qi@linaro.org>
3766
3767 * configure.srv: Set srv_i386_linux_regobj empty if $development
3768 is false.
3769 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3770 initialize_low_tdesc.
3771 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3772 with #if initialize_low_tdesc.
3773 * linux-x86-tdesc-selftest.c: New file.
3774 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3775
5f035c07
YQ
37762017-09-05 Yao Qi <yao.qi@linaro.org>
3777
3778 * Makefile.in (arch-i386.o): New rule.
3779 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3780 (x86_64-*-linux*): Likewise.
3781 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3782 include arch/i386.h.
3783 (i386_linux_read_description): Remove code and call
3784 i386_create_target_description.
3785 * tdesc.c (allocate_target_description): New function.
3786 * tdesc.h (set_tdesc_architecture): Remove declaration.
3787 (set_tdesc_osabi): Likewise.
3788
0abe8a89
YQ
37892017-09-05 Yao Qi <yao.qi@linaro.org>
3790
3791 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3792 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3793 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3794 .xmltarget.
3795 * server.c (get_features_xml): Call tdesc_get_features_xml.
3796 * tdesc.c (set_tdesc_architecture): New function.
3797 (set_tdesc_osabi): New function.
3798 (tdesc_get_features_xml): New function.
3799 (tdesc_create_feature): Add an argument.
3800 * tdesc.h (struct target_desc) <features>: New field.
3801 <arch, osabi>: New field.
3802 (~target_desc): xfree features, arch, and osabi.
3803 (target_desc::oerator==): Don't compare .xmltarget.
3804 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3805 (set_tdesc_osabi): Likewise.
3806 (tdesc_get_features_xml): Likewise.
3807
0a188386
YQ
38082017-09-05 Yao Qi <yao.qi@linaro.org>
3809
3810 * linux-x86-tdesc.c: Include selftest.h.
3811 (i386_tdesc_test): New function.
3812 (initialize_low_tdesc): Call selftests::register_test.
3813 * tdesc.h: Include regdef.h.
3814 (target_desc): Override operator == and !=.
3815
f49ff000
YQ
38162017-09-05 Yao Qi <yao.qi@linaro.org>
3817
3818 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3819 (ipa_obj): Likewise.
3820 * linux-i386-ipa.c: Include common/x86-xstate.h
3821 (get_ipa_tdesc): Call i386_linux_read_description.
3822 (initialize_low_tracepoint): Don't call init_registers_XXX
3823 functions, call initialize_low_tdesc instead.
3824 * linux-x86-low.c (x86_linux_read_description): Call
3825 i386_linux_read_description.
3826 (initialize_low_arch): Don't call init_registers_i386_XXX
3827 functions, call initialize_low_tdesc.
3828 * linux-x86-tdesc.c: New file.
3829 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3830 (i386_get_ipa_tdesc_idx): Declare.
3831 (i386_get_ipa_tdesc): Declare.
3832 (initialize_low_tdesc): Declare.
3833
2b68ef2f
YQ
38342017-09-05 Yao Qi <yao.qi@linaro.org>
3835
3836 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3837 instead of 0.
3838
f7000548
YQ
38392017-09-05 Yao Qi <yao.qi@linaro.org>
3840
3841 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3842 * regcache.c (get_thread_regcache): Use VEC_length.
3843 (init_register_cache): Likewise.
3844 (regcache_cpy): Likewise.
3845 (registers_to_string): Iterate reg_defs via VEC_iterate.
3846 (find_regno): Likewise.
3847 (find_register_by_number): Use VEC_index.
3848 (register_size): Call find_register_by_number.
3849 (register_data): Call find_register_by_number.
3850 (supply_regblock): Use VEC_length.
3851 (regcache_raw_read_unsigned): Likewise.
3852 * tdesc.c (init_target_desc): Iterate reg_defs via
3853 VEC_iterate.
3854 (default_description): Update initializer.
3855 (copy_target_description): Don't update field num_registers.
3856 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3857 <num_registers>: Remove.
3858
50a421ac
SM
38592017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3860
3861 * Makefile.in (.SECONDARY): Define target.
3862
23fdd69e
SM
38632017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3864
3865 * linux-low.c (linux_wait_1): Adjust.
3866 * server.c (queue_stop_reply_callback): Adjust.
3867
0a2dde4a
SDJ
38682017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3869
3870 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3871 QEnvironmentUnset and QEnvironmentReset packets.
3872 (handle_query): Inform remote that QEnvironmentHexEncoded,
3873 QEnvironmentUnset and QEnvironmentReset are supported.
3874
6afd337d
SM
38752017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3876
3877 * inferiors.h (inferior_target_data): Rename to ...
3878 (thread_target_data): ... this.
3879 (inferior_regcache_data): Rename to ...
3880 (thread_regcache_data): ... this.
3881 (set_inferior_regcache_data): Rename to ...
3882 (set_thread_regcache_data): ... this.
3883 * inferiors.c (inferior_target_data): Rename to ...
3884 (thread_target_data): ... this.
3885 (inferior_regcache_data): Rename to ...
3886 (thread_regcache_data): ... this.
3887 (set_inferior_regcache_data): Rename to ...
3888 (set_thread_regcache_data): ... this.
3889 (free_one_thread): Update.
3890 * linux-low.h (get_thread_lwp): Update.
3891 * regcache.c (get_thread_regcache): Update.
3892 (regcache_invalidate_thread): Update.
3893 (free_register_cache_thread): Update.
3894 * win32-i386-low.c (update_debug_registers_callback): Update.
3895 (win32_get_current_dr): Update.
3896 * win32-low.c (thread_rec): Update.
3897 (delete_thread_info): Update.
3898 (continue_one_thread): Update.
3899 (suspend_one_thread): Update.
3900
a160cc46
SM
39012017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3902
3903 * inferiors.c (set_inferior_target_data): Remove.
3904 * inferiors.h (set_inferior_target_data): Remove.
3905
6d580b63
YQ
39062017-08-18 Yao Qi <yao.qi@linaro.org>
3907
3908 * Makefile.in (OBS): Add selftest.o.
3909 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3910 * configure, config.in: Re-generated.
3911 * server.c: Include common/sefltest.h.
3912 (captured_main): Handle option --selftest.
3913
f5a29eb0
YQ
39142017-08-09 Yao Qi <yao.qi@linaro.org>
3915
3916 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3917 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3918 i386-avx-mpx.o and i386-mmx.o.
3919 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3920 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3921 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3922 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3923 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3924 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3925 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3926 i386/amd64-avx-mpx.xml.
3927
57757c2f
YQ
39282017-08-09 Yao Qi <yao.qi@linaro.org>
3929
3930 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3931 and x32-avx-avx512.o.
3932 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3933 i386/x32-avx-avx512.xml.
3934
229d26fc
SM
39352017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3936
3937 * tracepoint.h (enum class fast_tpoint_collect_result): New
3938 enumeration.
3939 (fast_tracepoint_collecting): Change return type to
3940 fast_tpoint_collect_result.
3941 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3942 * linux-low.h: Include tracepoint.h.
3943 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3944 fast_tpoint_collect_result.
3945 * linux-low.c (handle_tracepoints): Adjust.
3946 (linux_fast_tracepoint_collecting): Change return type to
3947 fast_tpoint_collect_result.
3948 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3949 linux_wait_1, stuck_in_jump_pad_callback,
3950 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3951 proceed_one_lwp): Adjust to type change.
3952
2e1e43e1
YQ
39532017-07-10 Yao Qi <yao.qi@linaro.org>
3954
3955 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3956
adc764e7
YQ
39572017-06-29 Yao Qi <yao.qi@linaro.org>
3958
3959 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3960 Remove.
3961 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3962
a206891a
SM
39632017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3964
3965 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3966
9a6c7d9c
SDJ
39672017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3968
3969 * linux-low.c (linux_create_inferior): Adjust code to access the
3970 environment information via 'gdb_environ' class.
3971 * lynx-low.c (lynx_create_inferior): Likewise.
3972 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3973 (get_environ): Return a pointer to 'our_environ'.
3974 (captured_main): Initialize 'our_environ'.
3975 * server.h (get_environ): Adjust prototype.
3976 * spu-low.c (spu_create_inferior): Adjust code to access the
3977 environment information via 'gdb_environ' class.
3978
ae3e2ccf
SM
39792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3980
3981 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3982 usage of "register" keyword.
3983
3e019bdc
SM
39842017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3985
3986 * configure: Re-generate.
3987
8465943a
SM
39882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3989
3990 * configure: Re-generate.
3991
cf0dd6f0
SM
39922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3993
3994 * Makefile.in (COMPILE.pre): Add "-x c++".
3995
9845682b
SDJ
39962017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3997
3998 * fork-child.c: Conditionally include <signal.h>.
3999
aefd8b33
SDJ
40002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4001
4002 * server.c (handle_general_set): Handle new packet
4003 "QStartupWithShell".
4004 (handle_query): Add "QStartupWithShell" to the list of supported
4005 packets.
4006 (gdbserver_usage): Add help text explaining the
4007 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4008 options.
4009 (captured_main): Recognize and act upon the presence of the new
4010 CLI options.
4011
2090129c
SDJ
40122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4013 Pedro Alves <palves@redhat.com>
4014
4015 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4016 * configure: Regenerate.
4017 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4018 "fork-inferior.o".
4019 (i[34567]86-*-lynxos*): Likewise.
4020 (spu*-*-*): Likewise.
4021 * fork-child.c: New file.
4022 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4023 and "environ.h".
4024 (linux_ptrace_fun): New function.
4025 (linux_create_inferior): Adjust function prototype to reflect
4026 change on "target.h". Adjust function code to use
4027 "fork_inferior".
4028 (linux_request_interrupt): Delete "signal_pid".
4029 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4030 (lynx_ptrace_fun): New function.
4031 (lynx_create_inferior): Adjust function prototype to reflect
4032 change on "target.h". Adjust function code to use
4033 "fork_inferior".
4034 * nto-low.c (nto_create_inferior): Adjust function prototype and
4035 code to reflect change on "target.h". Update comments.
4036 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4037 "common-terminal.h" and "environ.h".
4038 (terminal_fd): Moved to fork-child.c.
4039 (old_foreground_pgrp): Likewise.
4040 (restore_old_foreground_pgrp): Likewise.
4041 (last_status): Make it global.
4042 (last_ptid): Likewise.
4043 (our_environ): New variable.
4044 (startup_with_shell): Likewise.
4045 (program_name): Likewise.
4046 (program_argv): Rename to...
4047 (program_args): ...this.
4048 (wrapper_argv): New variable.
4049 (start_inferior): Delete function.
4050 (get_exec_wrapper): New function.
4051 (get_exec_file): Likewise.
4052 (get_environ): Likewise.
4053 (prefork_hook): Likewise.
4054 (post_fork_inferior): Likewise.
4055 (postfork_hook): Likewise.
4056 (postfork_child_hook): Likewise.
4057 (handle_v_run): Update code to deal with arguments coming from the
4058 remote host. Update calls from "start_inferior" to
4059 "create_inferior".
4060 (captured_main): Likewise. Initialize environment variable. Call
4061 "have_job_control".
4062 * server.h (post_fork_inferior): New prototype.
4063 (get_environ): Likewise.
4064 (last_status): Declare.
4065 (last_ptid): Likewise.
4066 (signal_pid): Likewise.
4067 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4068 (spu_ptrace_fun): New function.
4069 (spu_create_inferior): Adjust function prototype to reflect change
4070 on "target.h". Adjust function code to use "fork_inferior".
4071 * target.c (target_terminal_init): New function.
4072 (target_terminal_inferior): Likewise.
4073 (target_terminal_ours): Likewise.
4074 * target.h: Include <vector>.
4075 (struct target_ops) <create_inferior>: Update prototype.
4076 (create_inferior): Update macro.
4077 * utils.c (gdb_flush_out_err): New function.
4078 * win32-low.c (win32_create_inferior): Adjust function prototype
4079 and code to reflect change on "target.h".
4080
043a4934
SDJ
40812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4082
4083 * inferiors.c (switch_to_thread): New function.
4084
15652511
SDJ
40852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4086
4087 * Makefile.in (SFILE): Add "common/job-control.c".
4088 (OBS): Add "job-control.o".
4089
21ea5acd
SDJ
40902017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4091
4092 * Makefile: Remove "@host_makefile_frag@".
4093
e13cb306
PA
40942017-05-05 Pedro Alves <palves@redhat.com>
4095
4096 * configure: Regenerate.
4097
c94fee56
SDJ
40982017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4099
4100 * configure: Regenerate.
4101
a0ff9e1a
SM
41022017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4103
4104 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4105 software_single_step change of return type to
4106 std::vector<CORE_ADDR>.
4107 * linux-low.c (install_software_single_step_breakpoints):
4108 Likewise.
4109 * linux-low.h (install_software_single_step_breakpoints):
4110 Likewise.
4111
be628ab8
SDJ
41122017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4113
4114 * remote-utils.c: Include "gdb_termios.h" instead of
4115 "terminal.h".
4116 * terminal.h: Delete file.
4117
7c5ded6a
SDJ
41182017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4119
4120 * server.c: Include <vector>.
4121 <program_argv, wrapper_argv>: Convert to std::vector.
4122 (start_inferior): Rewrite function to use C++.
4123 (handle_v_run): Likewise. Update code that calculates the argv
4124 based on the vRun packet; use C++.
4125 (captured_main): Likewise.
4126
436252de
SM
41272017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4128
4129 * server.c (handle_v_cont): Initialize thread_resume::thread
4130 with null_ptid.
4131
9bf2a700
PA
41322017-04-05 Pedro Alves <palves@redhat.com>
4133
4134 * configure: Regenerate.
4135
a121b7c1
PA
41362017-04-05 Pedro Alves <palves@redhat.com>
4137
4138 * gdbreplay.c (sync_error): Constify.
4139 * linux-x86-low.c (push_opcode): Constify.
4140
21c8a587
PA
41412017-04-05 Pedro Alves <palves@redhat.com>
4142
4143 * win32-low.c (get_child_debug_event)
4144 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4145 Report TARGET_WAITKIND_SPURIOUS instead.
4146
fb32b4f7
PA
41472017-04-05 Pedro Alves <palves@redhat.com>
4148
e79be6e5
SM
4149 * remote-utils.c (remote_prepare, remote_open): Constify.
4150 * remote-utils.h (remote_prepare, remote_open): Constify.
4151 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 4152
65dd1e59
SM
41532017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4154
4155 * Makefile.in (clean): Clear .deps.
4156
8fa5b777
SM
41572017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4158
4159 * .gitignore: Remove generated files, replace with wildcard.
4160 * (clean): Replace removal of generated files with wildcard.
4161 (version.c): Replace with...
4162 (version-generated.c): ...this.
4163 (xml-builtin.c): Replace with...
4164 (xml-builtin-generated.c): ...this.
4165 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4166 (%.c: *regformats*): Replace with...
4167 (%-generated.c: *regformats*): ...this.
4168
a12e714b
MF
41692017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4170
4171 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4172 (xtensa_fill_gregset): Call collect_register_by_name for
4173 threadptr register.
4174 (xtensa_store_gregset): Call supply_register_by_name for
4175 threadptr register.
4176
1a09b50a
MF
41772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4178
4179 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4180 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4181 (xtensa_store_gregset): Call supply_register for all registers in
4182 a0_regnum..a0_regnum + C0_NREGS range.
4183
1a01e7c6
SM
41842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4185
4186 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4187 (ax-ipa.o: ax.c): Remove.
4188 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4189 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4190 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4191 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4192 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4193
36bc18a8
SM
41942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4195
4196 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4197 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4198 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4199 (errors-ipa.o: ../common/errors.c): Remove.
4200 (format-ipa.o: ../common/format.c): Remove.
4201 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4202
a8ebe3d5
SM
42032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4204
4205 * Makefile.in (%-ipa.o: %.c): New rule.
4206 (tracepoint-ipa.o: tracepoint.c): Remove.
4207 (utils-ipa.o: utils.c): Remove.
4208 (remote-utils-ipa.o: remote-utils.c): Remove.
4209 (regcache-ipa.o: regcache.c): Remove.
4210 (i386-linux-ipa.o: i386-linux.c): Remove.
4211 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4212 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4213 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4214 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4215 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4216 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4217 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4218 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4219 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4220 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4221 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4222 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4223 (aarch64-ipa.o: aarch64.c): Remove.
4224 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4225 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4226 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4227 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4228 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4229 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4230 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4231 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4232 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4233 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4234 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4235 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4236 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4237 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4238 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4239 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4240 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4241 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4242 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4243 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4244 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4245 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4246 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4247 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4248 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4249 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4250 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4251 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4252 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4253 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4254 (tdesc-ipa.o: tdesc.c): Remove.
4255 (x32-linux-ipa.o: x32-linux.c): Remove.
4256 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4257 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4258
50cfacb7
SM
42592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4260
4261 * Makefile.in (%.o: ../arch/%.c): New rule.
4262 (arm.o: ../arch/arm.c): Remove.
4263 (arm-linux.o: ../arch/arm-linux.c): Remove.
4264 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4265 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4266
c5a22423
SM
42672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4268
4269 * Makefile.in (%.o: ../nat/%.c): New rule.
4270 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4271 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4272 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4273 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4274 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4275 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4276 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4277 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4278 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4279 (linux-personality.o: ../nat/linux-personality.c): Remove.
4280 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4281 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4282 (x86-linux.o: ../nat/x86-linux.c): Remove.
4283 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4284 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4285
6bda016b
SM
42862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4287
4288 * Makefile.in (%.o: ../common/%.c): New rule.
4289 (signals.o: ../common/signals.c): Remove.
4290 (print-utils.o: ../common/print-utils.c): Remove.
4291 (rsp-low.o: ../common/rsp-low.c): Remove.
4292 (common-utils.o: ../common/common-utils.c): Remove.
4293 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4294 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4295 (vec.o: ../common/vec.c): Remove.
4296 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4297 (xml-utils.o: ../common/xml-utils.c): Remove.
4298 (ptid.o: ../common/ptid.c): Remove.
4299 (buffer.o: ../common/buffer.c): Remove.
4300 (format.o: ../common/format.c): Remove.
4301 (filestuff.o: ../common/filestuff.c): Remove.
4302 (agent.o: ../common/agent.c): Remove.
4303 (errors.o: ../common/errors.c): Remove.
4304 (environ.o: ../common/environ.c): Remove.
4305 (common-debug.o: ../common/common-debug.c): Remove.
4306 (cleanups.o: ../common/cleanups.c): Remove.
4307 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4308 (fileio.o: ../common/fileio.c): Remove.
4309 (common-regcache.o: ../common/common-regcache.c): Remove.
4310 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4311 (new-op.o: ../common/new-op.c): Remove.
4312 (btrace-common.o: ../common/btrace-common.c): Remove.
4313
21122961
SM
43142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4315
4316 * Makefile.in (%.o: ../target/%.c): New rule.
4317 (waitstatus.o: ../target/waitstatus.c): Remove.
4318
c362e621
SM
43192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4320
4321 * Makefile.in
4322 (%.c: ../regformats/%.dat,
4323 (%.c: ../regformats/arm/%.dat,
4324 (%.c: ../regformats/i386/%.dat,
4325 (%.c: ../regformats/rs6000/%.dat): New rules.
4326 (aarch64.c): Remove.
4327 (reg-arm.c): Remove.
4328 (arm-with-iwmmxt.c): Remove.
4329 (arm-with-vfpv2.c): Remove.
4330 (arm-with-vfpv3.c): Remove.
4331 (arm-with-neon.c): Remove.
4332 (reg-bfin.c): Remove.
4333 (reg-cris.c): Remove.
4334 (reg-crisv32.c): Remove.
4335 (i386.c): Remove.
4336 (i386-linux.c): Remove.
4337 (i386-avx.c): Remove.
4338 (i386-avx-linux.c): Remove.
4339 (i386-avx-avx512.c): Remove.
4340 (i386-avx-avx512-linux.c): Remove.
4341 (i386-mpx.c): Remove.
4342 (i386-mpx-linux.c): Remove.
4343 (i386-avx-mpx-avx512-pku.c): Remove.
4344 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4345 (i386-avx-mpx.c): Remove.
4346 (i386-avx-mpx-linux.c): Remove.
4347 (i386-mmx.c): Remove.
4348 (i386-mmx-linux.c): Remove.
4349 (reg-ia64.c): Remove.
4350 (reg-m32r.c): Remove.
4351 (reg-m68k.c): Remove.
4352 (reg-cf.c): Remove.
4353 (mips-linux.c): Remove.
4354 (mips-dsp-linux.c): Remove.
4355 (mips64-linux.c): Remove.
4356 (mips64-dsp-linux.c): Remove.
4357 (nios2-linux.c): Remove.
4358 (powerpc-32.c): Remove.
4359 (powerpc-32l.c): Remove.
4360 (powerpc-altivec32l.c): Remove.
4361 (powerpc-cell32l.c): Remove.
4362 (powerpc-vsx32l.c): Remove.
4363 (powerpc-isa205-32l.c): Remove.
4364 (powerpc-isa205-altivec32l.c): Remove.
4365 (powerpc-isa205-vsx32l.c): Remove.
4366 (powerpc-e500l.c): Remove.
4367 (powerpc-64l.c): Remove.
4368 (powerpc-altivec64l.c): Remove.
4369 (powerpc-cell64l.c): Remove.
4370 (powerpc-vsx64l.c): Remove.
4371 (powerpc-isa205-64l.c): Remove.
4372 (powerpc-isa205-altivec64l.c): Remove.
4373 (powerpc-isa205-vsx64l.c): Remove.
4374 (s390-linux32.c): Remove.
4375 (s390-linux32v1.c): Remove.
4376 (s390-linux32v2.c): Remove.
4377 (s390-linux64.c): Remove.
4378 (s390-linux64v1.c): Remove.
4379 (s390-linux64v2.c): Remove.
4380 (s390-te-linux64.c): Remove.
4381 (s390-vx-linux64.c): Remove.
4382 (s390-tevx-linux64.c): Remove.
4383 (s390x-linux64.c): Remove.
4384 (s390x-linux64v1.c): Remove.
4385 (s390x-linux64v2.c): Remove.
4386 (s390x-te-linux64.c): Remove.
4387 (s390x-vx-linux64.c): Remove.
4388 (s390x-tevx-linux64.c): Remove.
4389 (tic6x-c64xp-linux.c): Remove.
4390 (tic6x-c64x-linux.c): Remove.
4391 (tic6x-c62x-linux.c): Remove.
4392 (reg-sh.c): Remove.
4393 (reg-sparc64.c): Remove.
4394 (reg-spu.c): Remove.
4395 (amd64.c): Remove.
4396 (amd64-linux.c): Remove.
4397 (amd64-avx.c): Remove.
4398 (amd64-avx-linux.c): Remove.
4399 (amd64-avx-avx512.c): Remove.
4400 (amd64-avx-avx512-linux.c): Remove.
4401 (amd64-mpx.c): Remove.
4402 (amd64-mpx-linux.c): Remove.
4403 (amd64-avx-mpx-avx512-pku.c): Remove.
4404 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4405 (amd64-avx-mpx.c): Remove.
4406 (amd64-avx-mpx-linux.c): Remove.
4407 (x32.c): Remove.
4408 (x32-linux.c): Remove.
4409 (x32-avx.c): Remove.
4410 (x32-avx-linux.c): Remove.
4411 (x32-avx-avx512.c): Remove.
4412 (x32-avx-avx512-linux.c): Remove.
4413 (reg-xtensa.c): Remove.
4414 (reg-tilegx.c): Remove.
4415 (reg-tilegx32.c): Remove.
4416
1672e0d9
SDJ
44172017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4418
4419 * Makefile.in (SFILES): Add "common/environ.c".
4420 (OBJS): Add "common/environ.h".
4421
239b6d10
WT
44222017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4423
4424 * configure.ac: Check if the fs_base and gs_base members of
4425 `struct user_regs_struct' exist.
4426 * config.in: Regenerated.
4427 * configure: Likewise.
4428
694b382c
AT
44292017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4430
4431 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4432 target_read_memory.
4433 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4434 (get_next_pcs_syscall_next_pc): Likewise.
4435
7dc53023
LM
44362016-12-23 Luis Machado <lgustavo@codesourcery.com>
4437
4438 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4439 * nto-x86-low.c: Likewise.
4440
ad02e4fe
SM
44412016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4442
4443 * Makefile.in: Include disable-implicit-rules.mk.
4444
dcb07cfa
PA
44452016-11-23 Pedro Alves <palves@redhat.com>
4446
4447 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4448 (debug_vprintf): Use std::chrono::steady_clock instead of
4449 gettimeofday. Use '.' instead of ':'.
4450 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4451 (get_timestamp): Use std::chrono::steady_clock instead of
4452 gettimeofday.
4453
8629c02c
SM
44542016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4455
4456 * Makefile.in: Fix whitespace formatting.
4457
b593ecca
SM
44582016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4459
4460 * Makefile.in (SFILES, OBS): Flatten list and order
4461 alphabetically.
4462
9986ba08
PA
44632016-11-23 Pedro Alves <palves@redhat.com>
4464
4465 * event-loop.c (handle_file_event): Use warning.
4466 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4467 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4468 Use warning.
4469
4eefa7bc
PA
44702016-11-23 Pedro Alves <palves@redhat.com>
4471
4472 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4473 output.
4474 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4475 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4476 debug_printf and debug_flush for debug output.
4477 * server.c (handle_general_set): Likewise.
4478 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4479 output.
4480
5443506e
SM
44812016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4482
4483 * Makefile.in (.c.o): Replace rule with ...
4484 (%.o: %.c): ... this one.
4485
3b165252
SM
44862016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4487
4488 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4489 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4490 make.
4491 * configure.ac: Remove checks for the make program.
4492 * configure: Re-generate.
4493
0bcda685
PA
44942016-10-28 Pedro Alves <palves@redhat.com>
4495
4496 * Makefile.in (CXX_DIALECT): Get from configure.
4497 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4498 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4499 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4500 * config.in: Regenerate.
4501 * configure: Regenerate.
4502
c3805894
YQ
45032016-10-27 Yao Qi <yao.qi@linaro.org>
4504
4505 * linux-low.c (linux_supports_range_stepping): Return true if
4506 can_software_single_step return true.
4507
89342618
YQ
45082016-10-27 Yao Qi <yao.qi@linaro.org>
4509
4510 * inferiors.c (find_inferior_in_random): New function.
4511 * inferiors.h (find_inferior_in_random): Declare.
4512 * linux-low.c (linux_wait_for_event_filtered): Call
4513 find_inferior_in_random instead of find_inferior.
4514
e3652c84
YQ
45152016-10-27 Yao Qi <yao.qi@linaro.org>
4516
4517 * linux-low.c (linux_wait_1): If single-step breakpoints are
4518 inserted, remove them.
4519
5a04c4cf
PA
45202016-10-26 Pedro Alves <palves@redhat.com>
4521
4522 * linux-low.c (handle_extended_wait): Link parent/child fork
4523 threads.
4524 (linux_wait_1): Unlink them.
4525 (linux_set_resume_request): Ignore resume requests for
4526 already-resumed and unhandled fork child threads.
4527 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4528 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4529 New functions.
4530 (handle_v_requests) <vCont>: Don't call require_running.
4531 * server.h (in_queued_stop_replies): New declaration.
4532
cb93dc7f
YQ
45332016-10-24 Yao Qi <yao.qi@linaro.org>
4534
4535 PR server/20733
4536 * linux-aarch64-low.c (append_insns): Cast the return value to
4537 'uint32_t *'.
4538
a1078bea
YQ
45392016-10-10 Yao Qi <yao.qi@linaro.org>
4540
4541 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4542
1fb77080
SDJ
45432016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4544
4545 * target.c (target_supports_multi_process): New function, moved
4546 from...
4547 * target.h (target_supports_multi_process): ... here. Remove
4548 macro.
4549
39b5a3b9
TT
45502016-10-05 Tom Tromey <tom@tromey.com>
4551
4552 PR remote/20655:
4553 * tracepoint.c (handle_tracepoint_bkpts): Check
4554 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4555
c1d0b70a
YQ
45562016-10-05 Yao Qi <yao.qi@linaro.org>
4557
4558 * configure.srv: Update the path of arm-*.xml files.
4559
0a69eedb
YQ
45602016-10-05 Terry Guo <terry.guo@arm.com>
4561 Yao Qi <yao.qi@linaro.org>
4562
4563 * Makefile.in: Adjust the path of rules.
4564 * configure.srv: Update the path of xml files.
4565 * regformats/arm-with-iwmmxt.dat: Regenerated.
4566 * regformats/arm-with-neon.dat: Likewise.
4567 * regformats/arm-with-vfpv2.dat: Likewise.
4568 * regformats/arm-with-vfpv3.dat Likewise.
4569
17e16485
YQ
45702016-09-30 Yao Qi <yao.qi@linaro.org>
4571
4572 PR gdbserver/20627
4573 * target.c (target_stop_and_wait): Don't call
4574 target_continue_no_signal, use resume_stop instead.
4575
edeeb602
YQ
45762016-09-26 Yao Qi <yao.qi@linaro.org>
4577
4578 * linux-low.c (linux_wait_1): Call debug_exit.
4579
503b1c39
PA
45802016-09-23 Pedro Alves <palves@redhat.com>
4581
4582 * Makefile.in (SFILES): Add common/new-op.c.
4583 (OBS): Add common/new-op.o.
4584 (new-op.o): New rule.
4585
74172ecf
SM
45862016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4587
4588 * .gitinore: Ignore more files.
4589
fc6cda2e
YQ
45902016-09-21 Yao Qi <yao.qi@linaro.org>
4591
4592 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4593 23.
4594
bc1e6c81
SDJ
45952016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4596
4597 * server.c (start_inferior): Call target_mourn_inferior instead of
4598 mourn_inferior; pass ptid_t argument to it.
4599 (resume): Likewise.
4600 (handle_target_event): Likewise.
4601 * target.c (target_mourn_inferior): New function.
4602 * target.h (mourn_inferior): Delete macro.
4603
0e00e962
AA
46042016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4605
4606 * linux-low.c (lwp_is_stepping): New function.
4607
1d8cb77d
CL
46082016-09-06 Carl Love <cel@us.ibm.com>
4609
4610 * server.c (start_inferior): Fixed comment, requested comment change
4611 didn't get updated correctly. Removed reference to ptrace () call as
4612 it is only true on Linux systems.
4613
7313bced
CL
46142016-09-06 Carl Love <cel@us.ibm.com>
4615
4616 * server.c (start_inferior): Do not call
4617 function target_post_create_inferior () if the
4618 inferior process has already exited.
4619
cf6de44d
PA
46202016-09-05 Pedro Alves <palves@redhat.com>
4621
4622 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4623 (COMPILE.pre, CC_LD): Use CXX directly.
4624 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4625 * acinclude.m4: Don't include build-with-cxx.m4.
4626 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4627 * configure: Regenerate.
4628
c1da6748
AT
46292016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4630
4631 PR gdb/19495
4632 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4633 call writing data to own_buf.
4634
f2b9e3df
SDJ
46352016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4636
4637 * target.c (mywait): Call target_wait instead of
4638 the_target->wait.
4639 (target_wait): New function.
4640
049a8570
SDJ
46412016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4642
4643 * server.c (start_inferior): New variable 'ptid'. Replace calls
4644 to the_target->resume by target_continue{,_no_signal}, depending
4645 on the case.
4646 * target.c (target_stop_and_wait): Call target_continue_no_signal
4647 instead of the_target->resume.
4648 (target_continue): New function.
4649
3aa5cfa0
AT
46502016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4651
4652 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4653
754653a7
AZ
46542016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4655
4656 PR server/20491
4657 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4658 ps_prochandle.
4659 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4660 * linux-arm-low.c (ps_get_thread_area): Likewise.
4661 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4662 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4663 * linux-mips-low.c (ps_get_thread_area): Likewise.
4664 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4665 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4666 * linux-x86-low.c (ps_get_thread_area): Likewise.
4667 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4668
ed036b40
PA
46692016-08-19 Pedro Alves <palves@redhat.com>
4670
4671 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4672
c8ef42ee
PA
46732016-08-19 Pedro Alves <palves@redhat.com>
4674
4675 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4676 comment. Use memcpy instead of casting through unsigned long.
4677
9c235a72
PA
46782016-08-19 Pedro Alves <palves@redhat.com>
4679
4680 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4681 allocating around 0x80000000.
4682
201506da
PA
46832016-08-19 Pedro Alves <palves@redhat.com>
4684
4685 PR gdb/20415
4686 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4687 (x32-avx512-linux-ipa.o): New rules.
4688 * configure.ac (x86_64-*-linux*): New x32 check.
4689 * configure.srv (ipa_x32_linux_regobj): New.
4690 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4691 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4692 descriptions.
4693 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4694 descriptions.
4695 * configure: Regenerate.
4696
f348d89a
PA
46972016-08-09 Pedro Alves <palves@redhat.com>
4698
4699 PR gdb/18653
4700 * Makefile.in (OBS): Add signals-state-save-restore.o.
4701 (signals-state-save-restore.o): New rule.
4702 * config.in: Regenerate.
4703 * configure: Regenerate.
4704 * linux-low.c: Include "signals-state-save-restore.h".
4705 (linux_create_inferior): Call
4706 restore_original_signals_state.
4707 * server.c: Include "dispositions-save-restore.h".
4708 (captured_main): Call save_original_signals_state.
4709
1baf5149
PA
47102016-08-05 Pedro Alves <palves@redhat.com>
4711
4712 * configure: Regenerate.
4713
fcd4a73d
YQ
47142016-08-04 Yao Qi <yao.qi@linaro.org>
4715
4716 * linux-low.c (regsets_fetch_inferior_registers): Check
4717 errno is ESRCH or not.
4718
979659d0
YQ
47192016-08-02 Yao Qi <yao.qi@linaro.org>
4720
4721 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4722 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4723 (thread_db_load_search): Update.
4724 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4725 td_ta_set_event and td_ta_event_getmsg.
4726
6598661d
PA
47272016-07-26 Pedro Alves <palves@redhat.com>
4728
4729 PR server/20414
4730 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4731 of unsigned long for 64-bit registers and use uint32_t instead of
4732 unsigned int for 32-bit registers.
4733
9cf12d57
PA
47342016-07-26 Pedro Alves <palves@redhat.com>
4735
4736 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4737 to 'ptrace'.
4738
305450ed
TT
47392016-07-21 Tom Tromey <tom@tromey.com>
4740
4741 * configure: Rebuild.
4742
2583da7c
YQ
47432016-07-21 Yao Qi <yao.qi@linaro.org>
4744
4745 * mem-break.c (find_gdb_breakpoint): Cast bp to
4746 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4747
21536b36
YQ
47482016-07-21 Yao Qi <yao.qi@linaro.org>
4749
4750 * server.c (handle_v_requests): Support s and S actions
4751 if target_supports_software_single_step return true.
4752
8901d193
YQ
47532016-07-21 Yao Qi <yao.qi@linaro.org>
4754
4755 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4756 is resume_step, call maybe_hw_step.
4757 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4758 and unstop them.
4759 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4760 breakpoints or not.
4761 (proceed_one_lwp): If resume request is resume_step, install
4762 reinsert breakpoints and call maybe_hw_step.
4763
0e9a339e
YQ
47642016-07-21 Yao Qi <yao.qi@linaro.org>
4765
4766 * linux-low.c (proceed_one_lwp): Declare.
4767 (linux_resume_one_thread): Remove local variable 'step'.
4768 Lift code enqueue signal. Call proceed_one_lwp instead of
4769 linux_resume_one_lwp.
4770
4281b351
YQ
47712016-07-21 Yao Qi <yao.qi@linaro.org>
4772
4773 * linux-low.c (linux_resume_one_thread): Call
4774 enqueue_pending_signal.
4775
984a2c04
YQ
47762016-07-21 Yao Qi <yao.qi@linaro.org>
4777
4778 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4779 * inferiors.c (do_restore_current_thread_cleanup): New function.
4780 (make_cleanup_restore_current_thread): Likewise.
4781 * linux-low.c (install_software_single_step_breakpoints): Call
4782 make_cleanup_restore_current_thread. Switch current_thread to
4783 thread.
4784
bec903c9
YQ
47852016-07-21 Yao Qi <yao.qi@linaro.org>
4786
4787 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4788 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4789 (clone_one_breakpoint): Likewise.
4790 (delete_reinsert_breakpoints): Change parameter to thread.
4791 Callers updated.
4792 (has_reinsert_breakpoints): Likewise.
4793 (uninsert_reinsert_breakpoints): Likewise.
4794 (reinsert_reinsert_breakpoints): Likewise.
4795 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4796 (delete_reinsert_breakpoints): Likewise.
4797 (reinsert_reinsert_breakpoints): Likewise.
4798 (uninsert_reinsert_breakpoints): Likewise.
4799 (has_reinsert_breakpoints): Likewise.
4800
63c40ec7
YQ
48012016-07-21 Yao Qi <yao.qi@linaro.org>
4802
4803 * inferiors.c (get_thread_process): Make parameter const.
4804 * inferiors.h (get_thread_process): Update declaration.
4805 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4806 Add new parameters child_thread and parent_thread. Callers
4807 updated.
4808 * mem-break.h (clone_all_breakpoints): Update declaration.
4809
9aa76cd0
YQ
48102016-07-21 Yao Qi <yao.qi@linaro.org>
4811
4812 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4813 <command_list, handler>: Remove.
4814 (struct gdb_breakpoint): New.
4815 (struct other_breakpoint): New.
4816 (struct reinsert_breakpoint): New.
4817 (is_gdb_breakpoint): New function.
4818 (any_persistent_commands): Update command_list if
4819 is_gdb_breakpoint returns true.
4820 (set_breakpoint): Create breakpoints according to their types.
4821 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4822 (set_gdb_breakpoint_1): Likewise.
4823 (set_gdb_breakpoint): Likewise.
4824 (clear_breakpoint_conditions): Change parameter type to
4825 'struct gdb_breakpoint *'.
4826 (clear_breakpoint_commands): Likewise.
4827 (clear_breakpoint_conditions_and_commands): Likewise.
4828 (add_condition_to_breakpoint): Likewise.
4829 (add_breakpoint_condition): Likewise.
4830 (add_commands_to_breakpoint): Likewise.
4831 (check_breakpoints): Check other_breakpoint.
4832 (clone_one_breakpoint): Clone breakpopint according to its type.
4833 * mem-break.h (struct gdb_breakpoint): Declare.
4834 (set_gdb_breakpoint): Update declaration.
4835 (clear_breakpoint_conditions_and_commands): Likewise.
4836 (add_breakpoint_condition): Likewise.
4837 (add_breakpoint_commands): Likewise.
4838 * server.c (process_point_options): Change parameter type to
4839 'struct gdb_breakpoint *'.
4840
811f8301
YQ
48412016-07-21 Yao Qi <yao.qi@linaro.org>
4842
4843 * mem-break.c (set_breakpoint_at): Rename it to ...
4844 (set_breakpoint_type_at): ... it.
4845 (set_breakpoint_at): Call set_breakpoint_type_at.
4846 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4847 * mem-break.h (set_breakpoint_at): Update comments.
4848
b1c51e36
CLT
48492016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4850
4851 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4852 to buf parameter.
4853 (nios2_store_gregset): Likewise.
4854
ced2dffb
PA
48552016-07-01 Pedro Alves <palves@redhat.com>
4856 Antoine Tremblay <antoine.tremblay@ericsson.com>
4857
4858 * linux-low.c: Change interface to take the target lwp_info
4859 pointer directly and return void. Handle detaching from a zombie
4860 thread.
4861 (linux_detach_lwp_callback): New function.
4862 (linux_detach): Detach from the leader thread after detaching from
4863 the clone threads.
4864
2ac09a5b
YQ
48652016-06-28 Yao Qi <yao.qi@linaro.org>
4866
4867 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4868 for variable new_offset.
4869 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4870 (aarch64_ftrace_insn_reloc_cb): Likewise.
4871 (aarch64_ftrace_insn_reloc_tb): Likewise.
4872 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4873 PRIx64 instead of PRIx32.
4874
79e7fd4f
YQ
48752016-06-28 Yao Qi <yao.qi@linaro.org>
4876
4877 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4878 (the_low_target): Install arm_get_syscall_trapinfo.
4879
061fc021
YQ
48802016-06-28 Yao Qi <yao.qi@linaro.org>
4881
4882 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4883 function.
4884 (the_low_target): Install aarch64_get_syscall_trapinfo.
4885
4cc32bec
YQ
48862016-06-28 Yao Qi <yao.qi@linaro.org>
4887
4888 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4889 Callers updated.
4890 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4891 Remove parameter sysno.
4892 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4893 sysret.
4894
782c1122
AA
48952016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4896
4897 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4898 (s390_emit_ne_goto): Likewise.
4899 (s390_emit_lt_goto): Likewise.
4900 (s390_emit_le_goto): Likewise.
4901 (s390_emit_gt_goto): Likewise.
4902 (s390_emit_ge_goto): Likewise.
4903 (s390x_emit_eq_goto): Likewise.
4904 (s390x_emit_ne_goto): Likewise.
4905 (s390x_emit_lt_goto): Likewise.
4906 (s390x_emit_le_goto): Likewise.
4907 (s390x_emit_gt_goto): Likewise.
4908 (s390x_emit_ge_goto): Likewise.
4909 (s390_emit_ops_impl): Mark variable static.
4910 (s390x_emit_ops): Likewise.
4911
2e7b624b
YQ
49122016-06-17 Yao Qi <yao.qi@linaro.org>
4913
4914 * linux-low.c (handle_extended_wait): Call
4915 uninsert_reinsert_breakpoints for the parent process. Remove
4916 reinsert breakpoints from the child process. Reinsert them to
4917 the parent process when vfork is done.
4918 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4919 (reinsert_reinsert_breakpoints): New function.
4920 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4921 (reinsert_reinsert_breakpoints): Declare.
4922
8a81c5d7
YQ
49232016-06-17 Yao Qi <yao.qi@linaro.org>
4924
4925 * linux-low.c (handle_extended_wait): If the parent is doing
4926 step-over, remove the reinsert breakpoints from the forked child.
4927
f50bf8e5
YQ
49282016-06-17 Yao Qi <yao.qi@linaro.org>
4929
4930 * linux-low.c (unsuspend_all_lwps): Declare.
4931 (linux_low_filter_event): If thread exited, call finish_step_over.
4932 If step-over is finished, unsuspend other threads.
4933
8376a3cb
YQ
49342016-06-17 Yao Qi <yao.qi@linaro.org>
4935
4936 * linux-low.c (linux_resume_one_lwp_throw): Assert
4937 has_reinsert_breakpoints returns false.
4938 * mem-break.c (delete_disabled_breakpoints): Assert
4939 bp type isn't reinsert_breakpoint.
4940
f79b145d
YQ
49412016-06-17 Yao Qi <yao.qi@linaro.org>
4942
4943 * linux-low.c (maybe_hw_step): New function.
4944 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4945 (finish_step_over): Switch current_thread to lwp temporarily,
4946 and assert has_reinsert_breakpoints returns true.
4947 (proceed_one_lwp): Call maybe_hw_step.
4948 * mem-break.c (has_reinsert_breakpoints): New function.
4949 * mem-break.h (has_reinsert_breakpoints): Declare.
4950
0ae534d2
JT
49512016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4952
4953 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4954
fcdad592
YQ
49552016-05-17 Yao Qi <yao.qi@linaro.org>
4956
4957 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4958 instead of find_inferior.
4959
9e784964
YQ
49602016-05-05 Yao Qi <yao.qi@linaro.org>
4961
4962 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4963 Initialize res to zero.
4964
cf2ebb6e
YQ
49652016-05-05 Yao Qi <yao.qi@linaro.org>
4966
4967 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4968 to uint32_t.
4969
c1aebf87
UW
49702016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4971
4972 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4973 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4974 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4975
35fd2deb 49762016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4977 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4978
4979 * tracepoint.c (write_inferior_int8): New function.
4980 (cmd_qtenable_disable): Write enable flag using
4981 write_inferior_int8.
4982
484b3c32
YQ
49832016-04-25 Yao Qi <yao.qi@linaro.org>
4984
4985 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4986 (need_step_over_p): Return zero if the LWP has pending signals
4987 can be delivered on software single step target.
4988
85ba7d86
YQ
49892016-04-25 Yao Qi <yao.qi@linaro.org>
4990
4991 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4992 return instead of error.
4993
3539aa13
YQ
49942016-04-22 Yao Qi <yao.qi@linaro.org>
4995
4996 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4997 to 23.
4998
5b061e98
YQ
49992016-04-22 Yao Qi <yao.qi@linaro.org>
5000
5001 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5002 signal when stepping over breakpoint with software single
5003 step.
5004
3451269c
PA
50052016-04-21 Pedro Alves <palves@redhat.com>
5006
5007 * linux-s390-low.c (s390_collect_ptrace_register)
5008 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5009 add casts.
5010 (s390_check_regset): Use void * instead of gdb_byte *.
5011
a2358508
PA
50122016-04-20 Pedro Alves <palves@redhat.com>
5013
5014 * configure: Renegerate.
5015
6885166d
YQ
50162016-04-20 Yao Qi <yao.qi@linaro.org>
5017
5018 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5019 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5020 number 16.
5021 (arm_store_gregset): Likewise.
5022
2b863f51
WT
50232016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5024
5025 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5026 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5027 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5028 (amd64-avx-mpx-linux.c): New rules.
5029 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5030 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5031 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5032 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5033 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5034 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5035 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5036 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5037 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5038 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5039 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5040 * linux-x86-low.c (x86_linux_read_description): Add case for
5041 X86_XSTATE_AVX_MPX_MASK.
5042 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5043 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5044 init_registers_i386_avx_mpx_linux.
5045 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5046 (initialize_low_tracepoint): Call
5047 init_registers_i386_avx_mpx_linux.
5048 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5049 (initialize_low_tracepoint): Call
5050 init_registers_amd64_avx_mpx_linux.
5051 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5052 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5053 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5054 declarations.
5055
9b30624b
PA
50562016-04-18 Pedro Alves <palves@redhat.com>
5057
5058 * configure: Regenerate.
5059
45e3745e
AT
50602016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5061
5062 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5063 (aarch64_emit_sub): Likewise.
5064
2afc13ff
PA
50652016-04-12 Pedro Alves <palves@redhat.com>
5066
5067 * utils.c (prepare_to_throw_exception): Delete.
5068
6e774b13
SM
50692016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5070
5071 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5072
4dca19f8
MK
50732016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5074
5075 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5076
d0a9981f
MK
50772016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5078
5079 * linux-aarch64-ipa.c: Add <elf.h> include.
5080 * linux-ppc-ipa.c: Add <elf.h> include.
5081 * linux-s390-ipa.c: Add <elf.h> include.
5082
252db07e
MK
50832016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5084
5085 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5086 (get_raw_reg_ptr): Likewise.
5087 (get_trace_state_variable_value_ptr): Likewise.
5088 (set_trace_state_variable_value_ptr): Likewise.
5089 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5090 char *.
5091
14e2b6d9
MK
50922016-03-31 Wei-cheng Wang <cole945@gmail.com>
5093 Marcin Kościelnicki <koriakin@0x04.net>
5094
5095 PR/17221
5096 * linux-ppc-low.c (emit_insns): New function.
5097 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5098 (ppc_emit_prologue): New function.
5099 (ppc_emit_epilogue): New function.
5100 (ppc_emit_add): New function.
5101 (ppc_emit_sub): New function.
5102 (ppc_emit_mul): New function.
5103 (ppc_emit_lsh): New function.
5104 (ppc_emit_rsh_signed): New function.
5105 (ppc_emit_rsh_unsigned): New function.
5106 (ppc_emit_ext): New function.
5107 (ppc_emit_zero_ext): New function.
5108 (ppc_emit_log_not): New function.
5109 (ppc_emit_bit_and): New function.
5110 (ppc_emit_bit_or): New function.
5111 (ppc_emit_bit_xor): New function.
5112 (ppc_emit_bit_not): New function.
5113 (ppc_emit_equal): New function.
5114 (ppc_emit_less_signed): New function.
5115 (ppc_emit_less_unsigned): New function.
5116 (ppc_emit_ref): New function.
5117 (ppc_emit_const): New function.
5118 (ppc_emit_reg): New function.
5119 (ppc_emit_pop): New function.
5120 (ppc_emit_stack_flush): New function.
5121 (ppc_emit_swap): New function.
5122 (ppc_emit_stack_adjust): New function.
5123 (ppc_emit_call): New function.
5124 (ppc_emit_int_call_1): New function.
5125 (ppc_emit_void_call_2): New function.
5126 (ppc_emit_if_goto): New function.
5127 (ppc_emit_goto): New function.
5128 (ppc_emit_eq_goto): New function.
5129 (ppc_emit_ne_goto): New function.
5130 (ppc_emit_lt_goto): New function.
5131 (ppc_emit_le_goto): New function.
5132 (ppc_emit_gt_goto): New function.
5133 (ppc_emit_ge_goto): New function.
5134 (ppc_write_goto_address): New function.
5135 (ppc_emit_ops_impl): New static variable.
5136 (ppc64v1_emit_prologue): New function.
5137 (ppc64v2_emit_prologue): New function.
5138 (ppc64_emit_epilogue): New function.
5139 (ppc64_emit_add): New function.
5140 (ppc64_emit_sub): New function.
5141 (ppc64_emit_mul): New function.
5142 (ppc64_emit_lsh): New function.
5143 (ppc64_emit_rsh_signed): New function.
5144 (ppc64_emit_rsh_unsigned): New function.
5145 (ppc64_emit_ext): New function.
5146 (ppc64_emit_zero_ext): New function.
5147 (ppc64_emit_log_not): New function.
5148 (ppc64_emit_bit_and): New function.
5149 (ppc64_emit_bit_or): New function.
5150 (ppc64_emit_bit_xor): New function.
5151 (ppc64_emit_bit_not): New function.
5152 (ppc64_emit_equal): New function.
5153 (ppc64_emit_less_signed): New function.
5154 (ppc64_emit_less_unsigned): New function.
5155 (ppc64_emit_ref): New function.
5156 (ppc64_emit_const): New function.
5157 (ppc64v1_emit_reg): New function.
5158 (ppc64v2_emit_reg): New function.
5159 (ppc64_emit_pop): New function.
5160 (ppc64_emit_stack_flush): New function.
5161 (ppc64_emit_swap): New function.
5162 (ppc64v1_emit_call): New function.
5163 (ppc64v2_emit_call): New function.
5164 (ppc64v1_emit_int_call_1): New function.
5165 (ppc64v2_emit_int_call_1): New function.
5166 (ppc64v1_emit_void_call_2): New function.
5167 (ppc64v2_emit_void_call_2): New function.
5168 (ppc64_emit_if_goto): New function.
5169 (ppc64_emit_eq_goto): New function.
5170 (ppc64_emit_ne_goto): New function.
5171 (ppc64_emit_lt_goto): New function.
5172 (ppc64_emit_le_goto): New function.
5173 (ppc64_emit_gt_goto): New function.
5174 (ppc64_emit_ge_goto): New function.
5175 (ppc64v1_emit_ops_impl): New static variable.
5176 (ppc64v2_emit_ops_impl): New static variable.
5177 (ppc_emit_ops): New function.
5178 (linux_low_target): Wire in ppc_emit_ops.
5179
a2174ba4
MK
51802016-03-31 Wei-cheng Wang <cole945@gmail.com>
5181 Marcin Kościelnicki <koriakin@0x04.net>
5182
5183 PR/17221
5184 * Makefile.in: Add powerpc-*-ipa.o
5185 * configure.srv: Add ipa_obj for powerpc*-linux.
5186 * linux-ppc-ipa.c: New file.
5187 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5188 includes.
5189 (PPC_FIELD): New macro.
5190 (PPC_SEXT): New macro.
5191 (PPC_OP6): New macro.
5192 (PPC_BO): New macro.
5193 (PPC_LI): New macro.
5194 (PPC_BD): New macro.
5195 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5196 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5197 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5198 (ppc_get_thread_area): New function.
5199 (is_elfv2_inferior): New function.
5200 (gen_ds_form): New function.
5201 (GEN_STD): New macro.
5202 (GEN_STDU): New macro.
5203 (GEN_LD): New macro.
5204 (GEN_LDU): New macro.
5205 (gen_d_form): New function.
5206 (GEN_ADDI): New macro.
5207 (GEN_ADDIS): New macro.
5208 (GEN_LI): New macro.
5209 (GEN_LIS): New macro.
5210 (GEN_ORI): New macro.
5211 (GEN_ORIS): New macro.
5212 (GEN_LWZ): New macro.
5213 (GEN_STW): New macro.
5214 (GEN_STWU): New macro.
5215 (gen_xfx_form): New function.
5216 (GEN_MFSPR): New macro.
5217 (GEN_MTSPR): New macro.
5218 (GEN_MFCR): New macro.
5219 (GEN_MTCR): New macro.
5220 (GEN_SYNC): New macro.
5221 (GEN_LWSYNC): New macro.
5222 (gen_x_form): New function.
5223 (GEN_OR): New macro.
5224 (GEN_MR): New macro.
5225 (GEN_LWARX): New macro.
5226 (GEN_STWCX): New macro.
5227 (GEN_CMPW): New macro.
5228 (gen_md_form): New function.
5229 (GEN_RLDICL): New macro.
5230 (GEN_RLDICR): New macro.
5231 (gen_i_form): New function.
5232 (GEN_B): New macro.
5233 (GEN_BL): New macro.
5234 (gen_b_form): New function.
5235 (GEN_BNE): New macro.
5236 (GEN_LOAD): New macro.
5237 (GEN_STORE): New macro.
5238 (gen_limm): New function.
5239 (gen_atomic_xchg): New function.
5240 (gen_call): New function.
5241 (ppc_relocate_instruction): New function.
5242 (ppc_install_fast_tracepoint_jump_pad): New function.
5243 (ppc_get_min_fast_tracepoint_insn_len): New function.
5244 (ppc_get_ipa_tdesc_idx): New function.
5245 (the_low_target): Wire in the new functions.
5246 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5247 tdescs.
5248 * linux-ppc-tdesc.h: New file.
5249
a13c4696
MK
52502016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5251
5252 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5253 (alloc_jump_pad_buffer): New function.
5254 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5255 (alloc_jump_pad_buffer): New function.
5256 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5257 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5258 (alloc_jump_pad_buffer): New function.
5259 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5260 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5261 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5262 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5263
1cda1512
MK
52642016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5265
5266 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5267 * linux-amd64-ipa.c: Likewise.
5268 * linux-i386-ipa.c: Likewise.
5269 * linux-s390-ipa.c: Likewise.
5270 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5271 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5272 set_trace_state_variable_value_ptr.
5273 (struct ipa_sym_addresses): Likewise.
5274 (symbol_list): Likewise.
5275 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5276 accessing gdb_collect directly.
5277 (gdb_collect_ptr_type): New typedef.
5278 (get_raw_reg_ptr_type): New typedef.
5279 (get_trace_state_variable_value_ptr_type): New typedef.
5280 (set_trace_state_variable_value_ptr_type): New typedef.
5281 (gdb_collect_ptr): New global.
5282 (get_raw_reg_ptr): New global.
5283 (get_trace_state_variable_value_ptr): New global.
5284 (set_trace_state_variable_value_ptr): New global.
5285 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5286 accessing get_raw_reg directly.
5287 (get_get_tsv_func_addr): Likewise for
5288 get_trace_state_variable_value_ptr.
5289 (get_set_tsv_func_addr): Likewise for
5290 set_trace_state_variable_value_ptr.
5291 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5292
72fb5488
SM
52932016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5294
5295 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5296
28170b88
MK
52972016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5298
5299 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5300 packets.
5301 (relocate_instruction): Remove own_buf.
5302 * server.c (own_buf): Make global.
5303 (handle_v_requests): Make global.
5304 * server.h (own_buf): New declaration.
5305 (handle_v_requests): New prototype.
5306
f39e8743
MK
53072016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5308
5309 PR 18377
5310 * linux-s390-low.c (add_insns): New function.
5311 (s390_emit_prologue): New function.
5312 (s390_emit_epilogue): New function.
5313 (s390_emit_add): New function.
5314 (s390_emit_sub): New function.
5315 (s390_emit_mul): New function.
5316 (s390_emit_lsh): New function.
5317 (s390_emit_rsh_signed): New function.
5318 (s390_emit_rsh_unsigned): New function.
5319 (s390_emit_ext): New function.
5320 (s390_emit_log_not): New function.
5321 (s390_emit_bit_and): New function.
5322 (s390_emit_bit_or): New function.
5323 (s390_emit_bit_xor): New function.
5324 (s390_emit_bit_not): New function.
5325 (s390_emit_equal): New function.
5326 (s390_emit_less_signed): New function.
5327 (s390_emit_less_unsigned): New function.
5328 (s390_emit_ref): New function.
5329 (s390_emit_if_goto): New function.
5330 (s390_emit_goto): New function.
5331 (s390_write_goto_address): New function.
5332 (s390_emit_litpool): New function.
5333 (s390_emit_const): New function.
5334 (s390_emit_call): New function.
5335 (s390_emit_reg): New function.
5336 (s390_emit_pop): New function.
5337 (s390_emit_stack_flush): New function.
5338 (s390_emit_zero_ext): New function.
5339 (s390_emit_swap): New function.
5340 (s390_emit_stack_adjust): New function.
5341 (s390_emit_set_r2): New function.
5342 (s390_emit_int_call_1): New function.
5343 (s390_emit_void_call_2): New function.
5344 (s390_emit_eq_goto): New function.
5345 (s390_emit_ne_goto): New function.
5346 (s390_emit_lt_goto): New function.
5347 (s390_emit_le_goto): New function.
5348 (s390_emit_gt_goto): New function.
5349 (s390_emit_ge_goto): New function.
5350 (s390x_emit_prologue): New function.
5351 (s390x_emit_epilogue): New function.
5352 (s390x_emit_add): New function.
5353 (s390x_emit_sub): New function.
5354 (s390x_emit_mul): New function.
5355 (s390x_emit_lsh): New function.
5356 (s390x_emit_rsh_signed): New function.
5357 (s390x_emit_rsh_unsigned): New function.
5358 (s390x_emit_ext): New function.
5359 (s390x_emit_log_not): New function.
5360 (s390x_emit_bit_and): New function.
5361 (s390x_emit_bit_or): New function.
5362 (s390x_emit_bit_xor): New function.
5363 (s390x_emit_bit_not): New function.
5364 (s390x_emit_equal): New function.
5365 (s390x_emit_less_signed): New function.
5366 (s390x_emit_less_unsigned): New function.
5367 (s390x_emit_ref): New function.
5368 (s390x_emit_if_goto): New function.
5369 (s390x_emit_const): New function.
5370 (s390x_emit_call): New function.
5371 (s390x_emit_reg): New function.
5372 (s390x_emit_pop): New function.
5373 (s390x_emit_stack_flush): New function.
5374 (s390x_emit_zero_ext): New function.
5375 (s390x_emit_swap): New function.
5376 (s390x_emit_stack_adjust): New function.
5377 (s390x_emit_int_call_1): New function.
5378 (s390x_emit_void_call_2): New function.
5379 (s390x_emit_eq_goto): New function.
5380 (s390x_emit_ne_goto): New function.
5381 (s390x_emit_lt_goto): New function.
5382 (s390x_emit_le_goto): New function.
5383 (s390x_emit_gt_goto): New function.
5384 (s390x_emit_ge_goto): New function.
5385 (s390_emit_ops): New function.
5386 (struct linux_target_ops): Fill in emit_ops hook.
5387
abd9baf9
MK
53882016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5389
5390 PR 18377
5391 * Makefile.in: Add s390 IPA files.
5392 * configure.srv: Build IPA for s390.
5393 * linux-s390-ipa.c: New file.
5394 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5395 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5396 (tdesc_s390_linux32): Likewise.
5397 (init_registers_s390_linux32v1): Likewise.
5398 (tdesc_s390_linux32v1): Likewise.
5399 (init_registers_s390_linux32v2): Likewise.
5400 (tdesc_s390_linux32v2): Likewise.
5401 (init_registers_s390_linux64): Likewise.
5402 (tdesc_s390_linux64): Likewise.
5403 (init_registers_s390_linux64v1): Likewise.
5404 (tdesc_s390_linux64v1): Likewise.
5405 (init_registers_s390_linux64v2): Likewise.
5406 (tdesc_s390_linux64v2): Likewise.
5407 (init_registers_s390_te_linux64): Likewise.
5408 (tdesc_s390_te_linux64): Likewise.
5409 (init_registers_s390_vx_linux64): Likewise.
5410 (tdesc_s390_vx_linux64): Likewise.
5411 (init_registers_s390_tevx_linux64): Likewise.
5412 (tdesc_s390_tevx_linux64): Likewise.
5413 (init_registers_s390x_linux64): Likewise.
5414 (tdesc_s390x_linux64): Likewise.
5415 (init_registers_s390x_linux64v1): Likewise.
5416 (tdesc_s390x_linux64v1): Likewise.
5417 (init_registers_s390x_linux64v2): Likewise.
5418 (tdesc_s390x_linux64v2): Likewise.
5419 (init_registers_s390x_te_linux64): Likewise.
5420 (tdesc_s390x_te_linux64): Likewise.
5421 (init_registers_s390x_vx_linux64): Likewise.
5422 (tdesc_s390x_vx_linux64): Likewise.
5423 (init_registers_s390x_tevx_linux64): Likewise.
5424 (tdesc_s390x_tevx_linux64): Likewise.
5425 (have_hwcap_s390_vx): New static variable.
5426 (s390_arch_setup): Fill have_hwcap_s390_vx.
5427 (s390_get_thread_area): New function.
5428 (s390_ft_entry_gpr_esa): New const.
5429 (s390_ft_entry_gpr_zarch): New const.
5430 (s390_ft_entry_misc): New const.
5431 (s390_ft_entry_fr): New const.
5432 (s390_ft_entry_vr): New const.
5433 (s390_ft_main_31): New const.
5434 (s390_ft_main_64): New const.
5435 (s390_ft_exit_fr): New const.
5436 (s390_ft_exit_vr): New const.
5437 (s390_ft_exit_misc): New const.
5438 (s390_ft_exit_gpr_esa): New const.
5439 (s390_ft_exit_gpr_zarch): New const.
5440 (append_insns): New function.
5441 (s390_relocate_instruction): New function.
5442 (s390_install_fast_tracepoint_jump_pad): New function.
5443 (s390_get_min_fast_tracepoint_insn_len): New function.
5444 (s390_get_ipa_tdesc_idx): New function.
5445 (struct linux_target_ops): Wire in the above functions.
5446 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5447 * linux-s390-tdesc.h: New file.
5448
a4105d04
MK
54492016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5450
5451 * linux-s390-low.c (s390_supports_tracepoints): New function.
5452 (struct linux_target_ops): Fill supports_tracepoints hook.
5453
35ac8b3e
YQ
54542016-03-18 Yao Qi <yao.qi@linaro.org>
5455
5456 * linux-low.c (lwp_signal_can_be_delivered): New function.
5457 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5458
94610ec4
YQ
54592016-03-18 Yao Qi <yao.qi@linaro.org>
5460
5461 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5462 0 if signal is enqueued. Remove 'signal' from one debugging
5463 message. Move one debugging message to some lines below.
5464 Remove code setting 'signal' to 0.
5465
80aea927
YQ
54662016-03-18 Yao Qi <yao.qi@linaro.org>
5467
5468 * linux-low.c (linux_low_filter_event): Remove redundant
5469 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5470
b04fd3be
MK
54712016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5472
5473 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5474 (struct linux_target_ops): Wire in the above.
5475
c40c8d4b
YQ
54762016-03-03 Yao Qi <yao.qi@linaro.org>
5477
5478 * linux-low.c: Update comments to start_step_over.
5479
0f8288ae
YQ
54802016-03-03 Yao Qi <yao.qi@linaro.org>
5481
5482 PR server/19736
5483 * linux-low.c (handle_extended_wait): Set child suspended
5484 if event_lwp->bp_reinsert isn't zero.
5485
fdbd04a8
YQ
54862016-03-02 Yao Qi <yao.qi@linaro.org>
5487
5488 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5489 enqueue_pending_signal.
5490
6896a8fa
MK
54912016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5492
5493 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5494 is actually loaded.
5495
ab503087
MK
54962016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5497
5498 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5499 (s390_regmap_3264) [!__s390x__]: New global.
5500 (s390_collect_ptrace_register): Skip map entries containing -1.
5501 (s390_supply_ptrace_register): Ditto.
5502 (s390_fill_gprs_high): New function.
5503 (s390_store_gprs_high): New function.
5504 (s390_regsets): Add NT_S390_HIGH_GPRS.
5505 (s390_get_hwcap): Enable on 31-bit.
5506 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5507 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5508 Detect NT_S390_HIGH_GPRS.
5509 (s390_usrregs_info_3264): Enable on 31-bit.
5510 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5511 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5512
ae91f625
MK
55132016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5514
5515 PR gdb/13808
5516 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5517 * configure.srv: Ditto.
5518 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5519 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5520 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5521 (init_registers_amd64_linux): Remove prototype.
5522 (tdesc_amd64_linux): Remove declaration.
5523 (get_ipa_tdesc): New function.
5524 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5525 initialize remaining tdescs.
5526 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5527 (init_registers_i386_linux): Remove prototype.
5528 (tdesc_i386_linux): Remove declaration.
5529 (get_ipa_tdesc): New function.
5530 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5531 initialize remaining tdescs.
5532 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5533 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5534 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5535 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5536 (x86_get_ipa_tdesc_idx): New function.
5537 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5538 * linux-x86-tdesc.h: New file.
5539 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5540 (target_get_ipa_tdesc_idx): New macro.
5541 * tracepoint.c (ipa_tdesc_idx): New macro.
5542 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5543 (symbol_list): Add ipa_tdesc_idx.
5544 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5545 (ipa_tdesc): Remove.
5546 (ipa_tdesc_idx): New variable.
5547 (get_context_regcache): Use get_ipa_tdesc.
5548 (gdb_collect): Ditto.
5549 (gdb_probe): Ditto.
5550 * tracepoint.h (get_ipa_tdesc): New prototype.
5551 (ipa_tdesc): Remove.
5552
e7ad2f14
PA
55532016-02-24 Pedro Alves <palves@redhat.com>
5554
5555 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5556 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5557 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5558 Factor out common code between the USE_SIGTRAP_SIGINFO and
5559 !USE_SIGTRAP_SIGINFO blocks.
5560 (linux_low_filter_event): Call save_stop_reason instead of
5561 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5562 Update comments.
5563 (linux_wait_1): Update comments.
5564
657f9cde
WW
55652016-02-24 Wei-cheng Wang <cole945@gmail.com>
5566
5567 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5568 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5569 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5570 ppc_insert_point, ppc_remove_point.
5571
b00b61e1
MK
55722016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5573
5574 * linux-s390-low.c (s390_supports_z_point_type): New function.
5575 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5576
553cb527
YQ
55772016-02-16 Yao Qi <yao.qi@linaro.org>
5578
5579 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5580 PC. Get pc from regcache_read_pc.
5581
a5652c21
YQ
55822016-02-12 Yao Qi <yao.qi@linaro.org>
5583
5584 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5585 or linux_get_pc_32bit.
5586 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5587
ed443b61
YQ
55882016-02-12 Yao Qi <yao.qi@linaro.org>
5589
5590 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5591 arm_linux_get_next_pcs_fixup.
5592
020ecd38
MK
55932016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5594
5595 * tracepoint.c (x_tracepoint_action_download): Change
5596 write_inferior_data_ptr to write_inferior_data_pointer.
5597 (cmd_qtstart): Likewise.
5598 (write_inferior_data_ptr): Remove.
5599 (download_agent_expr): Change write_inferior_data_ptr to
5600 write_inferior_data_pointer.
5601 (download_tracepoint_1): Likewise.
5602 (download_tracepoint): Likewise.
5603 (download_trace_state_variables): Likewise.
5604
7cae9051
WW
56052016-02-11 Wei-cheng Wang <cole945@gmail.com>
5606 Marcin Kościelnicki <koriakin@0x04.net>
5607
5608 * tracepoint.c (struct tracepoint_action_ops): Remove.
5609 (struct tracepoint_action): Remove ops.
5610 (m_tracepoint_action_download, r_tracepoint_action_download)
5611 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5612 size and offset accordingly.
5613 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5614 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5615 (tracepoint_action_send, tracepoint_action_download): New functions.
5616 Helpers for trace action handlers.
5617 (add_tracepoint_action): Remove setup actions ops.
5618 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5619
9f6a71b4
YQ
56202016-02-10 Yao Qi <yao.qi@linaro.org>
5621
5622 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5623
1e94266c
SM
56242016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5625
5626 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5627 to AC_OUTPUT.
5628 * configure: Regenerate.
5629
8adce034
SM
56302016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5631
5632 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5633 void * to gdb_byte *.
5634 * linux-low.c (siginfo_fixup): Likewise.
5635 (linux_xfer_siginfo): Likewise.
5636 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5637 Likewise.
5638 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5639
93813b37
WT
56402016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5641
5642 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5643 to srv_tgtobj.
5644 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5645 to srv_tgtobj.
5646 * linux-x86-low.c [__x86_64__]: Include
5647 "nat/amd64-linux-siginfo.h".
5648 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5649 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5650 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5651 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5652 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5653 (cpt_si_fd, si_timerid, si_overrun): Move from
5654 nat/amd64-linux-siginfo.c.
5655 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5656
8424cc97
SM
56572016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5658
5659 * server.c (skip_to_semicolon): Remove.
5660 (process_point_options): Use strchrnul instead of
5661 skip_to_semicolon.
5662
4d18591b
YQ
56632016-01-26 Yao Qi <yao.qi@linaro.org>
5664
5665 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5666 * linux-low.c (install_software_single_step_breakpoints): Don't
5667 call regcache_read_pc.
5668 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5669 argument pc.
5670
d8020970
YQ
56712016-01-26 Yao Qi <yao.qi@linaro.org>
5672
5673 * linux-low.c (install_software_single_step_breakpoints): Call
5674 regcache_read_pc instead of get_pc.
5675
8b207339
YQ
56762016-01-26 Yao Qi <yao.qi@linaro.org>
5677
5678 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5679 (unblock_async_io): Rename to ...
5680 (block_unblock_async_io): ... it. New function.
5681 (enable_async_io): Don't install SIGIO handler. Unblock it
5682 instead.
5683 (disable_async_io): Don't ignore SIGIO. Block it instead.
5684 (initialize_async_io): Install SIGIO handler. Don't call
5685 unblock_async_io.
5686
18879fef
YQ
56872016-01-26 Yao Qi <yao.qi@linaro.org>
5688
5689 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5690 first character is '\003', call *the_target->request_interrupt.
5691
a0f8e08a
YQ
56922016-01-25 Yao Qi <yao.qi@linaro.org>
5693
5694 * remote-utils.c (new_thread_notify): Remove.
5695 (dead_thread_notify): Likewise.
5696 * remote-utils.h (new_thread_notify): Remove declaration.
5697 (dead_thread_notify): Likewise.
5698
cc5fd9ab
MK
56992016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5700
5701 * gdb.trace/pending.exp: Fix expected message on continue.
5702
99e8eb11
MK
57032016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5704
5705 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5706 it works properly on big-endian machines where sizeof (CORE_ADDR)
5707 != sizeof (void *).
5708
a994041d
PA
57092016-01-21 Pedro Alves <palves@redhat.com>
5710
5711 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5712 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5713 * configure: Regenerate.
5714
f7a6a40d
YQ
57152016-01-21 Yao Qi <yao.qi@linaro.org>
5716
5717 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5718 is_thumb and set it according to CPSR saved on the stack.
5719 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5720 arm_sigreturn_next_pc.
5721
6f69e520
YQ
57222016-01-18 Yao Qi <yao.qi@linaro.org>
5723
5724 * linux-low.c (linux_set_pc_64bit): New function.
5725 (linux_get_pc_64bit): New function.
5726 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5727 Declare.
5728 * linux-sparc-low.c (debug_threads): Remove declaration.
5729 (sparc_get_pc): Remove.
5730 (the_low_target): Use linux_get_pc_64bit instead of
5731 sparc_get_pc.
5732 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5733 (the_low_target): Use linux_get_pc_64bit and
5734 linux_set_pc_64bit.
5735
276d4552
YQ
57362016-01-18 Yao Qi <yao.qi@linaro.org>
5737
5738 * linux-arm-low.c (debug_threads): Remove declaration.
5739 (arm_get_pc, arm_set_pc): Remove.
5740 (the_low_target): Use linux_get_pc_32bit and
5741 linux_set_pc_32bit.
5742 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5743 (the_low_target): Use linux_get_pc_32bit and
5744 linux_set_pc_32bit.
5745 * linux-cris-low.c (debug_threads): Remove declaration.
5746 (cris_get_pc, cris_set_pc,): Remove.
5747 (the_low_target): Use linux_get_pc_32bit and
5748 linux_set_pc_32bit.
5749 * linux-crisv32-low.c (debug_threads): Remove declaration.
5750 (cris_get_pc, cris_set_pc): Remove.
5751 (the_low_target): Use linux_get_pc_32bit and
5752 linux_set_pc_32bit.
5753 * linux-low.c: Include inttypes.h.
5754 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5755 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5756 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5757 (the_low_target): Use linux_get_pc_32bit and
5758 linux_set_pc_32bit.
5759 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5760 (the_low_target): Use linux_get_pc_32bit and
5761 linux_set_pc_32bit.
5762 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5763 (the_low_target): Use linux_get_pc_32bit and
5764 linux_set_pc_32bit.
5765 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5766 (the_low_target): Use linux_get_pc_32bit and
5767 linux_set_pc_32bit.
5768 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5769 (the_low_target): Use linux_get_pc_32bit and
5770 linux_set_pc_32bit.
5771
eb0edac8
GB
57722016-01-18 Gary Benson <gbenson@redhat.com>
5773
5774 * configure.ac (AC_FUNC_FORK): New check.
5775 * config.in: Regenerate.
5776 * configure: Likewise.
5777
1b451dda
YQ
57782016-01-14 Yao Qi <yao.qi@linaro.org>
5779
5780 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5781 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5782 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5783 arm_get_next_pcs_ctor.
5784
82075af2
JS
57852016-01-12 Josh Stone <jistone@redhat.com>
5786 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5787
5788 * inferiors.h: Include "gdb_vecs.h".
5789 (struct process_info): Add syscalls_to_catch.
5790 * inferiors.c (remove_process): Free syscalls_to_catch.
5791 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5792 syscall_return stops.
5793 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5794 * server.c (handle_general_set): Handle QCatchSyscalls.
5795 (handle_query): Report support for QCatchSyscalls.
5796 * target.h (struct target_ops): Add supports_catch_syscall.
5797 (target_supports_catch_syscall): New macro.
5798 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5799 (struct lwp_info): Add syscall_state.
5800 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5801 Maintain syscall_state and syscalls_to_catch across exec.
5802 (get_syscall_trapinfo): New function, proxy to the_low_target.
5803 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5804 (linux_low_filter_event): Toggle syscall_state entry/return for
5805 syscall traps, and set it ignored for all others.
5806 (gdb_catching_syscalls_p): New function.
5807 (gdb_catch_this_syscall_p): New function.
5808 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5809 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5810 (linux_supports_catch_syscall): New function.
5811 (linux_target_ops): Install it.
5812 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5813 (the_low_target): Install it.
5814
8f13a3ce
MF
58152016-01-12 Mike Frysinger <vapier@gentoo.org>
5816
5817 * acinclude.m4: Include new ../warning.m4 file.
5818 * configure: Regenerated.
5819 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5820
5b3da067
MF
58212016-01-12 Mike Frysinger <vapier@gentoo.org>
5822
5823 * ax.c (is_goto_target): Mark static.
5824 * linux-low.c (register_addr): Likewise.
5825 (linux_fetch_registers, linux_store_registers): Likewise.
5826 * mem-break.c (any_persistent_commands): Fix old prototype.
5827 (add_commands_to_breakpoint): Mark static.
5828 * regcache.c (find_register_by_name): Delete unused func.
5829 * remote-utils.c (hex_or_minus_one): Mark static.
5830 * server.c (monitor_show_help): Mark static.
5831 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5832 handle_v_requests): Likewise.
5833
bc504a31
PA
58342016-01-12 Pedro Alves <palves@redhat.com>
5835
5836 Remove use of the registered trademark symbol throughout.
5837
5a0dd67a
YQ
58382016-01-08 Yao Qi <yao.qi@linaro.org>
5839
5840 * remote-utils.c (getpkt): If c is '\003', call target hook
5841 request_interrupt.
5842
b2ca446f
YQ
58432016-01-06 Yao Qi <yao.qi@linaro.org>
5844
5845 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5846 linux-aarch32-low.c.
5847 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5848 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5849 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5850 (thumb2_breakpoint): Declare.
5851 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5852 linux-aarch32-low.h.
5853 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5854 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5855 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5856
edd88788
JB
58572016-01-01 Joel Brobecker <brobecker@adacore.com>
5858
5859 * gdbreplay.c (gdbreplay_version): Change copyright year in
5860 version message.
5861 * server.c (gdbserver_version): Likewise.
5862
65da7f14
PP
58632015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5864
5865 * server.c (crc32_table): Delete.
5866 (crc32): Use libiberty's xcrc32 function.
5867
4abd5ed2
JB
58682015-12-22 Joel Brobecker <brobecker@adacore.com>
5869
5870 * lynx-low.c (lynx_delete_thread_callback): New function.
5871 (lynx_mourn): Properly delete our process and all of its
5872 threads. Remove call to clear_inferiors.
5873
0e50fe5c
JB
58742015-12-22 Joel Brobecker <brobecker@adacore.com>
5875
5876 * target.c (thread_search_callback): Add check that
5877 the thread_stopped target callback is not NULL before
5878 calling it.
5879
35adc03f
YQ
58802015-12-21 Yao Qi <yao.qi@linaro.org>
5881
5882 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5883 arm breakpoint.
5884
bd2b2909
AT
58852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5886
5887 * server.c (handle_query): Call target_supports_software_single_step.
5888
7fe5e27e
AT
58892015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5890
5891 * linux-low.c (single_step): New function.
5892 (linux_resume_one_lwp_throw): Call single_step.
5893 (start_step_over): Likewise.
5894
d9311bfa
AT
58952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5896
5897 * Makefile.in (SFILES): Append arch/arm-linux.c,
5898 arch/arm-get-next-pcs.c.
5899 (arm-linux.o): New rule.
5900 (arm-get-next-pcs.o): New rule.
5901 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5902 arm-linux.o.
5903 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5904 to linux-aarch32-low.c.
5905 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5906 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5907 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5908 (thumb2_breakpoint_len): Likewise.
5909 (arm_is_thumb_mode): Make non-static.
5910 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5911 from linux-aarch32-low.c.
5912 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5913 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5914 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5915 (thumb2_breakpoint_len): Likewise.
5916 (arm_is_thumb_mode): New declaration.
5917 * linux-arm-low.c: Include arch/arm-linux.h
5918 aarch/arm-get-next-pcs.h, sys/syscall.h.
5919 (get_next_pcs_ops): New struct.
5920 (get_next_pcs_addr_bits_remove): New function.
5921 (get_next_pcs_is_thumb): New function.
5922 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5923 (arm_sigreturn_next_pc): Likewise.
5924 (get_next_pcs_syscall_next_pc): Likewise.
5925 (arm_gdbserver_get_next_pcs): Likewise.
5926 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5927 Initialize.
5928 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5929 * server.h: Include gdb_vecs.h.
5930
68ce2059
AT
59312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5932
5933 * Makefile.in (SFILES): Append common/common-regcache.c.
5934 (OBS): Append common-regcache.o.
5935 (common-regcache.o): New rule.
5936 * regcache.c (init_register_cache): Initialize cache to
5937 REG_UNAVAILABLE.
5938 (regcache_raw_read_unsigned): New function.
5939 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5940 register_status enum.
5941
fa5308bd
AT
59422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5943
5944 * linux-aarch64-low.c (the_low_targets): Rename
5945 breakpoint_reinsert_addr to get_next_pcs.
5946 * linux-arm-low.c (the_low_targets): Likewise.
5947 * linux-bfin-low.c (the_low_targets): Likewise.
5948 * linux-cris-low.c (the_low_targets): Likewise.
5949 * linux-crisv32-low.c (the_low_targets): Likewise.
5950 * linux-low.c (can_software_single_step): Likewise.
5951 (install_software_single_step_breakpoints): New function.
5952 (start_step_over): Use install_software_single_step_breakpoints.
5953 * linux-low.h: New CORE_ADDR vector.
5954 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5955 get_next_pcs.
5956 * linux-mips-low.c (the_low_targets): Likewise.
5957 * linux-nios2-low.c (the_low_targets): Likewise.
5958 * linux-sparc-low.c (the_low_targets): Likewise.
5959
4a6ed09b
PA
59602015-12-17 Pedro Alves <palves@redhat.com>
5961
5962 * linux-low.c (linux_kill_one_lwp): Remove references to
5963 LinuxThreads.
5964 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5965 to 'kill'.
5966 (linux_init_signals): Delete.
5967 (initialize_low): Adjust.
5968 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5969
7544db95
PA
59702015-12-16 Pedro Alves <palves@redhat.com>
5971
5972 * configure.ac (compiler warning flags): When testing a
5973 -Wno-foo option, check whether -Wfoo works instead.
5974 * configure: Regenerate.
5975
8020350c
DB
59762015-12-11 Don Breazeal <donb@codesourcery.com>
5977
5978 * server.c (process_serial_event): Don't exit from gdbserver
5979 in remote mode if there are still active inferiors.
5980
db91f502
YQ
59812015-12-11 Yao Qi <yao.qi@linaro.org>
5982
5983 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5984 arm_breakpoint_at if the process is 32-bit.
5985
b37a6290
YQ
59862015-12-11 Yao Qi <yao.qi@linaro.org>
5987
5988 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5989 arm breakpoint.
5990
17b1509a
YQ
59912015-12-07 Yao Qi <yao.qi@linaro.org>
5992
5993 * configure.srv: Append arm.o to srv_tgtobj for
5994 aarch64*-*-linux* target.
5995 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5996 from linux-arm-low.c.
5997 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5998 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5999 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6000 (thumb2_breakpoint_len): Likewise.
6001 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6002 (arm_breakpoint_kinds): Likewise.
6003 (arm_breakpoint_kind_from_pc): Likewise.
6004 (arm_sw_breakpoint_from_kind): Likewise.
6005 (arm_breakpoint_kind_from_current_state): Likewise.
6006 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6007 (arm_sw_breakpoint_from_kind): Declare.
6008 (arm_breakpoint_kind_from_current_state): Declare.
6009 (arm_breakpoint_at): Declare.
6010 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6011 arm_sw_breakpoint_from_kind if process is 32-bit.
6012 (aarch64_breakpoint_kind_from_pc): New function.
6013 (aarch64_breakpoint_kind_from_current_state): New function.
6014 (the_low_target): Initialize fields breakpoint_kind_from_pc
6015 and breakpoint_kind_from_current_state.
6016 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6017 linux-aarch32-low.c.
6018 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6019 (arm_breakpoint, arm_breakpoint_len): Likewise.
6020 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6021 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6022 (arm_is_thumb_mode): Likewise.
6023 (arm_breakpoint_at): Likewise.
6024 (arm_breakpoint_kind_from_pc): Likewise.
6025 (arm_sw_breakpoint_from_kind): Likewise.
6026 (arm_breakpoint_kind_from_current_state): Likewise.
6027
6028 Revert:
6029 2015-08-04 Yao Qi <yao.qi@linaro.org>
6030
6031 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6032 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6033 * server.c (extended_protocol): Remove "static".
6034 * server.h (extended_protocol): Declare it.
6035
ece66d65
JS
60362015-12-04 Josh Stone <jistone@redhat.com>
6037
6038 * target.h (struct target_ops) <arch_setup>: Rename to ...
6039 (struct target_ops) <post_create_inferior>: ... this.
6040 (target_arch_setup): Rename to ...
6041 (target_post_create_inferior): ... this, calling post_create_inferior.
6042 * server.c (start_inferior): Update target_arch_setup calls to
6043 target_post_create_inferior.
6044 * linux-low.c (linux_low_ptrace_options): Forward declare.
6045 (linux_arch_setup): Update its comment for general use.
6046 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6047 (struct linux_target_ops): Use linux_post_create_inferior.
6048 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6049 to post_create_inferior.
6050 * nto-low.c (struct nto_target_ops): Likewise.
6051 * spu-low.c (struct spu_target_ops): Likewise.
6052 * win32-low.c (struct win32_target_ops): Likewise.
6053
e58c48b4
AT
60542015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6055
6056 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6057
fbec8956
AT
60582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6059
6060 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6061 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6062 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6063 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6064 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6065 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6066 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6067 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6068 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6069 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6070 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6071 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6072
9b4c5f87
AT
60732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6074
6075 * linux-low.c (linux_look_up_symbols): Don't call
6076 linux_supports_traceclone.
6077 * linux-low.h (thread_db_init): Remove use_events argument.
6078 * thread-db.c (thread_db_use_event): Remove global variable.
6079 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6080 (struct thread_db) <td_create_bp>: Remove field.
6081 (thread_db_create_event): Remove function.
6082 (thread_db_enable_reporting): Likewise.
6083 (find_one_thread): Don't check for thread_db_use_events.
6084 (attach_thread): Likewise.
6085 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6086 (try_thread_db_load_1): Don't check for thread_db_use_events.
6087 (thread_db_init): Remove use_events argument and thread events
6088 handling.
6089 (remove_thread_event_breakpoints): Remove function.
6090 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6091
7d00775e
AT
60922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6093
6094 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6095 New function.
6096 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6097 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6098 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6099 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6100 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6101 Initialize.
6102 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6103 New function.
6104 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6105 * linux-low.c (can_hardware_single_step): Use
6106 supports_hardware_single_step.
6107 (can_software_single_step): New function.
6108 (start_step_over): Call can_software_single_step.
6109 (linux_supports_hardware_single_step): New function.
6110 (struct target_ops) <supports_software_single_step>: Initialize.
6111 * linux-low.h (struct linux_target_ops)
6112 <supports_hardware_single_step>: Initialize.
6113 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6114 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6115 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6116 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6117 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6118 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6119 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6120 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6121 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6122 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6123 Initialize.
6124 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6125 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6126 Initialize.
6127 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6128 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6129 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6130 New function.
6131 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6132 * target.h (struct target_ops): <supports_software_single_step>:
6133 New field.
6134 (target_supports_software_single_step): New macro.
6135
2d97cd35
AT
61362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6137
6138 * linux-low.c (linux_wait_1): Fix pc advance condition.
6139 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6140 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6141
769ef81f
AT
61422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6143
6144 * linux-arm-low.c (arm_is_thumb_mode): New function.
6145 (arm_breakpoint_at): Use arm_is_thumb_mode.
6146 (arm_breakpoint_kind_from_current_state): New function.
6147 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6148 Initialize.
6149 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6150 (linux_breakpoint_kind_from_current_state): New function.
6151 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6152 * linux-low.h (struct linux_target_ops)
6153 <breakpoint_kind_from_current_state>: New field.
6154 * target.h (struct target_ops): Likewise.
6155 (target_breakpoint_kind_from_current_state): New macro.
6156
1bebeeca
PA
61572015-11-30 Pedro Alves <palves@redhat.com>
6158
6159 * linux-low.c (linux_resume): Wake up the event loop before
6160 returning.
6161
a67a9fae
PA
61622015-11-30 Pedro Alves <palves@redhat.com>
6163
6164 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6165 check.
6166 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6167 to -1.
6168 * target.c (struct thread_search): New structure.
6169 (thread_search_callback): New function.
6170 (prev_general_thread): New global.
6171 (prepare_to_access_memory, done_accessing_memory): New functions.
6172 * target.h (prepare_to_access_memory, done_accessing_memory):
6173 Replace macros with function declarations.
6174
f2faf941
PA
61752015-11-30 Pedro Alves <palves@redhat.com>
6176
6177 PR 14618
6178 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6179 report TARGET_WAITKIND_NO_RESUMED.
6180 * remote-utils.c (prepare_resume_reply): Handle
6181 TARGET_WAITKIND_NO_RESUMED.
6182 * server.c (report_no_resumed): New global.
6183 (handle_query) <qSupported>: Handle "no-resumed+". Report
6184 "no-resumed+" support.
6185 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6186 return error if the client doesn't support no-resumed events.
6187 (push_stop_notification): New function.
6188 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6189 events if the client supports them.
6190
a681f9c9
PA
61912015-11-30 Pedro Alves <palves@redhat.com>
6192
6193 * linux-low.c (thread_still_has_status_pending_p): Don't check
6194 vCont;t here.
6195 (lwp_resumed): New function.
6196 (status_pending_p_callback): Return early if the LWP is not
6197 supposed to be resumed.
6198
65706a29
PA
61992015-11-30 Pedro Alves <palves@redhat.com>
6200
6201 * linux-low.c (handle_extended_wait): Assert that the LWP's
6202 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6203 thread create events, leave the new child's status pending.
6204 (linux_low_filter_event): If GDB wants to hear about thread exit
6205 events, leave the LWP marked dead and don't delete it.
6206 (linux_wait_for_event_filtered): Don't check for thread exit.
6207 (filter_exit_event): New function.
6208 (linux_wait_1): Use it, when returning an exit event.
6209 (linux_resume_one_lwp_throw): Assert that the LWP's
6210 waitstatus is TARGET_WAITKIND_IGNORE.
6211 * remote-utils.c (prepare_resume_reply): Handle
6212 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6213 * server.c (report_thread_events): New global.
6214 (handle_general_set): Handle QThreadEvents.
6215 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6216 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6217 TARGET_WAITKIND_THREAD_EXITED.
6218 * server.h (report_thread_events): Declare.
6219
56cf4bed
PA
62202015-11-30 Pedro Alves <palves@redhat.com>
6221
6222 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6223 the thread's last_resume_kind was resume_stop.
6224
500c1d85
PA
62252015-11-30 Pedro Alves <palves@redhat.com>
6226
6227 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6228 before returning.
6229
de979965
PA
62302015-11-30 Pedro Alves <palves@redhat.com>
6231
6232 * server.c (handle_v_requests): Handle vCtrlC.
6233
34c65914
PA
62342015-11-30 Pedro Alves <palves@redhat.com>
6235
6236 * gdbthread.h (find_any_thread_of_pid): Declare.
6237 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6238 functions.
6239 * server.c (handle_query): If current_thread is NULL, look for
6240 another thread of the selected process.
6241
79efa585 62422015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 6243 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
6244
6245 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6246 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6247 name in reply.
6248 * target.h (struct target_ops) <thread_name>: New field.
6249 (target_thread_name): New macro.
6250
80d82c19
JB
62512015-11-23 Joel Brobecker <brobecker@adacore.com>
6252
6253 * regcache.h (regcache_invalidate_pid): Add declaration.
6254 * regcache.c (regcache_invalidate_pid): New function, extracted
6255 from regcache_invalidate.
6256 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6257 Add trivial documentation comment.
6258 * lynx-low.c: Use regcache_invalidate_pid instead of
6259 regcache_invalidate.
6260
64da5dd5
JB
62612015-11-23 Joel Brobecker <brobecker@adacore.com>
6262
6263 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6264 and Elf64_auxv_t if the target is Android.
6265
37ce4055
DE
62662015-11-22 Doug Evans <xdje42@gmail.com>
6267
6268 * target.h: #include <sys/types.h>.
6269
06e03fff
PA
62702015-11-19 Pedro Alves <palves@redhat.com>
6271
6272 * linux-low.c (linux_process_qsupported): Change prototype.
6273 Adjust.
6274 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6275 Change prototype.
6276 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6277 and adjust to loop over all features.
6278 * server.c (handle_query) <qSupported>: Adjust to call
6279 target_process_qsupported once, passing it a vector of unprocessed
6280 features.
6281 * target.h (struct target_ops) <process_qsupported>: Change
6282 prototype.
6283 (target_process_qsupported): Adjust.
6284
9a084706
PA
62852015-11-19 Pedro Alves <palves@redhat.com>
6286
6287 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6288 mode.
6289 * configure: Regenerate.
6290
dad44a1f
PA
62912015-11-19 Pedro Alves <palves@redhat.com>
6292
6293 * configure: Regenerate.
6294
231c0592
YQ
62952015-11-19 Yao Qi <yao.qi@linaro.org>
6296
6297 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6298 type to uint32_t.
6299
6c1c9a8b
YQ
63002015-11-19 Yao Qi <yao.qi@linaro.org>
6301
6302 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6303 (struct aarch64_operand): Move enum out.
6304
9caa3311
YQ
63052015-11-19 Yao Qi <yao.qi@linaro.org>
6306
6307 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6308 struct user_fpsimd_state *.
6309 (aarch64_store_fpregset): Likewise.
6310
6a69a054
YQ
63112015-11-19 Yao Qi <yao.qi@linaro.org>
6312
6313 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6314 struct user_pt_regs *.
6315 (aarch64_store_gregset): Likewise.
6316
1798301e
PA
63172015-11-18 Pedro Alves <palves@redhat.com>
6318
6319 * Makefile.in (all_object_files): Add $IPA_OBJS.
6320
ce7715e2
PA
63212015-11-17 Pedro Alves <palves@redhat.com>
6322
6323 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6324 GDB_SIGNAL_0 and gdb_signal_to_string.
6325
c0879059
PA
63262015-11-17 Pedro Alves <palves@redhat.com>
6327
6328 * win32-low.c (handle_output_debug_string): Remove parameter.
6329 (win32_kill): Remove our_status local and adjust call to
6330 handle_output_debug_string.
6331 (get_child_debug_event): Adjust call to
6332 handle_output_debug_string.
6333
1996e237
SM
63342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6335
6336 * linux-mips-low.c (mips_fill_gregset): Add cast.
6337 (mips_store_gregset): Likewise.
6338 (mips_fill_fpregset): Likewise.
6339 (mips_store_fpregset): Likewise.
6340
cbec665b
SM
63412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6342
6343 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6344 priv.
6345
eb3e3c67
SM
63462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6347
6348 * linux-mips-low.c (mips_linux_new_thread): Change type of
6349 watch_type to enum target_hw_bp_type.
6350
171de4b8
SM
63512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6352
6353 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6354 Change return type to arm_hwbp_type.
6355
04248ead
SM
63562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6357
6358 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6359 (arm_store_gregset): Likewise.
6360 * linux-arm-low.c (arm_get_hwcap): Likewise.
6361 (arm_read_description): Likewise.
6362
04b3479c
SM
63632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6364
6365 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6366
2bc84e8a
SM
63672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6368
6369 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6370 (ppc_fill_vsxregset): Likewise.
6371 (ppc_store_vsxregset): Likewise.
6372 (ppc_fill_vrregset): Likewise.
6373 (ppc_store_vrregset): Likewise.
6374 (ppc_fill_evrregset): Likewise.
6375 (ppc_store_evrregset): Likewise.
6376
e6c5bb05
SM
63772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6378
6379 * linux-ppc-low.c (ppc_usrregs_info): Remove
6380 forward-declaration.
6381 (ppc_arch_setup): Move lower in file.
6382
7ea45d72
SM
63832015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6384
6385 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6386 (ps_pdwrite): Likewise.
6387
69291610
HW
63882015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6389
6390 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6391 to after assert checks.
6392
b42945fd
SM
63932015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6394
6395 * proc-service.c (ps_pdread): Add/adjust casts.
6396 (ps_pdwrite): Add/adjust casts.
6397
d6f85c84
SM
63982015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6399
6400 * server.c (handle_search_memory_1): Cast return value of
6401 memmem.
6402
f98cd059
SM
64032015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6404
6405 * server.c (write_qxfer_response): Change type of data to
6406 gdb_byte *.
6407
d2412fa5
PA
64082015-10-29 Pedro Alves <palves@redhat.com>
6409
6410 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6411
c17414a2
PA
64122015-10-29 Pedro Alves <palves@redhat.com>
6413
6414 * tracepoint.c (clear_installed_tracepoints): Add casts.
6415
e053fbc4
PA
64162015-10-29 Pedro Alves <palves@redhat.com>
6417
6418 * server.c (handle_v_cont, process_serial_event): Add enum
6419 gdb_signal casts to signal parsing code.
6420
add67df8
PA
64212015-10-29 Pedro Alves <palves@redhat.com>
6422
6423 * linux-low.h (NULL_REGSET): Define.
6424 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6425 * linux-arm-low.c (arm_regsets): Likewise.
6426 * linux-crisv32-low.c (cris_regsets): Likewise.
6427 * linux-m68k-low.c (m68k_regsets): Likewise.
6428 * linux-mips-low.c (mips_regsets): Likewise.
6429 * linux-nios2-low.c (nios2_regsets): Likewise.
6430 * linux-ppc-low.c (ppc_regsets): Likewise.
6431 * linux-s390-low.c (s390_regsets): Likewise.
6432 * linux-sh-low.c (sh_regsets): Likewise.
6433 * linux-sparc-low.c (sparc_regsets): Likewise.
6434 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6435 * linux-tile-low.c (tile_regsets): Likewise.
6436 * linux-x86-low.c (x86_regsets): Likewise.
6437 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6438
50bc912a
PA
64392015-10-29 Pedro Alves <palves@redhat.com>
6440
6441 * linux-low.h (NULL_REGSET): Define.
6442 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6443 * linux-arm-low.c (arm_regsets): Likewise.
6444 * linux-crisv32-low.c (cris_regsets): Likewise.
6445 * linux-m68k-low.c (m68k_regsets): Likewise.
6446 * linux-mips-low.c (mips_regsets): Likewise.
6447 * linux-nios2-low.c (nios2_regsets): Likewise.
6448 * linux-ppc-low.c (ppc_regsets): Likewise.
6449 * linux-s390-low.c (s390_regsets): Likewise.
6450 * linux-sh-low.c (sh_regsets): Likewise.
6451 * linux-sparc-low.c (sparc_regsets): Likewise.
6452 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6453 * linux-tile-low.c (tile_regsets): Likewise.
6454 * linux-x86-low.c (x86_regsets): Likewise.
6455 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6456
682b2546
DE
64572015-10-26 Doug Evans <dje@google.com>
6458
6459 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6460
963843d4
DE
64612015-10-26 Doug Evans <dje@google.com>
6462
6463 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6464
d41401ac
DE
64652015-10-26 Doug Evans <dje@google.com>
6466
6467 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6468 for debug_printf.
6469 (attach_thread, find_new_threads_callback): Ditto.
6470
3db28855
AT
64712015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6472
6473 * mem-break.h (set_breakpoint_data): Remove.
6474
fb78e89c
AT
64752015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6476
6477 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6478 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6479 (initialize_low): Remove set_breakpoint_data call.
6480 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6481 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6482 (initialize_low): Remove set_breakpoint_data call.
6483 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6484 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6485 (initialize_low): Remove set_breakpoint_data call.
6486
2e6ee069
AT
64872015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6488
6489 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6490 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6491 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6492 * target.h (target_breakpoint_kind_from_pc): New macro.
6493
1652a986
AT
64942015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6495
6496 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6497 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6498 the default breakpoint kind.
6499
abeead09
AT
65002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6501
6502 * linux-arm-low.c (arm_supports_z_point_type): Add software
6503 breakpoint support.
6504
b0b4b501
AT
65052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6506
6507 * linux-arm-low.c: Refactor breakpoint definitions.
6508 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6509 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6510
8689682c
AT
65112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6512
6513 * Makefile.in: Add arm.c/o.
6514 * configure.srv: Likewise.
6515 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6516 (arm_breakpoint_kind_from_pc): New function.
6517 (arm_sw_breakpoint_from_kind): Return proper kind.
6518 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6519
27165294
AT
65202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6521
6522 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6523 removal.
6524 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6525 (struct raw_breakpoint) <size>: Remove.
6526 (struct raw_breakpoint) <kind>: Add.
6527 (bp_size): New function.
6528 (bp_opcode): Likewise.
6529 (find_raw_breakpoint_at): Adjust for kind.
6530 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6531 (remove_memory_breakpoint): Adjust for kind call bp_size.
6532 (set_raw_breakpoint_at): Adjust for kind.
6533 (set_breakpoint): Likewise.
6534 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6535 (delete_raw_breakpoint): Adjust for kind.
6536 (delete_breakpoint): Likewise.
6537 (find_gdb_breakpoint): Likewise.
6538 (set_gdb_breakpoint_1): Likewise.
6539 (set_gdb_breakpoint): Likewise.
6540 (delete_gdb_breakpoint_1): Likewise.
6541 (delete_gdb_breakpoint): Likewise.
6542 (uninsert_raw_breakpoint): Likewise.
6543 (reinsert_raw_breakpoint): Likewise.
6544 (set_breakpoint_data): Remove.
6545 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6546 (check_mem_read): Adjust for kind call bp_size.
6547 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6548 (clone_one_breakpoint): Adjust for kind.
6549 * mem-break.h (set_gdb_breakpoint): Likewise.
6550 (delete_gdb_breakpoint): Likewise.
6551 * server.c (process_serial_event): Likewise.
6552
dd373349
AT
65532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6554
6555 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6556 (struct linux_target_ops) <breakpoint>: Remove.
6557 (struct linux_target_ops) <breakpoint_len>: Remove.
6558 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6559 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6560 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6561 (arm_sw_breakpoint_from_kind): New function.
6562 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6563 (struct linux_target_ops) <breakpoint>: Remove.
6564 (struct linux_target_ops) <breakpoint_len>: Remove.
6565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6567 * linux-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6578 and sw_breakpoint_from_kind to increment the pc.
6579 (linux_breakpoint_kind_from_pc): New function.
6580 (linux_sw_breakpoint_from_kind): New function.
6581 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6582 (initialize_low): Call breakpoint_kind_from_pc and
6583 sw_breakpoint_from_kind to replace breakpoint_data/len.
6584 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6585 New field.
6586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6587 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6613 (struct linux_target_ops) <breakpoint>: Remove.
6614 (struct linux_target_ops) <breakpoint_len>: Remove.
6615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6617 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6618 (struct linux_target_ops) <breakpoint>: Remove.
6619 (struct linux_target_ops) <breakpoint_len>: Remove.
6620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6622 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6623 (struct linux_target_ops) <breakpoint>: Remove.
6624 (struct linux_target_ops) <breakpoint_len>: Remove.
6625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6627 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6628 (struct linux_target_ops) <breakpoint>: Remove.
6629 (struct linux_target_ops) <breakpoint_len>: Remove.
6630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6632 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6633 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6634 (struct linux_target_ops) <breakpoint>: Remove.
6635 (struct linux_target_ops) <breakpoint_len>: Remove.
6636 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6637 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6638 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6639 (struct linux_target_ops) <breakpoint>: Remove.
6640 (struct linux_target_ops) <breakpoint_len>: Remove.
6641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6642 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6643
4cd98a19
AT
66442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6645
6646 * linux-cris-low.c (cris_get_pc): Remove void arg.
6647
774ee6d2
AR
66482015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6649
6650 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6651 variable name.
6652
833dcd29
AR
66532015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6654
6655 * inferiors.c (thread_pid_matches_callback): New function.
6656 (find_thread_process): New function.
6657 (remove_thread): Reset current_thread.
6658 (remove_process): Assert threads have been removed first.
6659
8d689ee5
YQ
66602015-10-15 Yao Qi <yao.qi@linaro.org>
6661
6662 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6663 if it is 3.
6664 (aarch64_remove_point): Likewise.
6665 * regcache.c (regcache_register_size): New function.
6666
1c2e1515
YQ
66672015-10-12 Yao Qi <yao.qi@linaro.org>
6668
6669 * linux-aarch64-low.c: Update all callers as emit_load_store
6670 is renamed to aarch64_emit_load_store.
6671
e1c587c3
YQ
66722015-10-12 Yao Qi <yao.qi@linaro.org>
6673
6674 * linux-aarch64-low.c: Update all callers of function renaming
6675 from emit_insn to aarch64_emit_insn.
6676
b6542f81
YQ
66772015-10-12 Yao Qi <yao.qi@linaro.org>
6678
6679 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6680 arch/aarch64-insn.h.
6681 (struct aarch64_memory_operand): Likewise.
6682 (ENCODE): Likewise.
6683 (emit_insn): Move to arch/aarch64-insn.c.
6684 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6685 (emit_load_store): Move to arch/aarch64-insn.c.
6686 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6687 (can_encode_int32): Remove.
6688
246994ce
YQ
66892015-10-12 Yao Qi <yao.qi@linaro.org>
6690
6691 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6692 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6693 (aarch64_relocate_instruction): Likewise.
6694 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6695 (struct aarch64_insn_visitor): Likewise.
6696
0badd99f
YQ
66972015-10-12 Yao Qi <yao.qi@linaro.org>
6698
6699 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6700 (struct aarch64_insn_visitor): New.
6701 (struct aarch64_insn_relocation_data): New.
6702 (aarch64_ftrace_insn_reloc_b): New function.
6703 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6704 (aarch64_ftrace_insn_reloc_cb): Likewise.
6705 (aarch64_ftrace_insn_reloc_tb): Likewise.
6706 (aarch64_ftrace_insn_reloc_adr): Likewise.
6707 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6708 (aarch64_ftrace_insn_reloc_others): Likewise.
6709 (visitor): New.
6710 (aarch64_relocate_instruction): Use visitor.
6711
dfaffe9d
YQ
67122015-10-12 Yao Qi <yao.qi@linaro.org>
6713
6714 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6715 int. Add argument buf.
6716 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6717 aarch64_relocate_instruction.
6718
70b439f0
YQ
67192015-10-12 Yao Qi <yao.qi@linaro.org>
6720
6721 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6722 argument insn. Remove local variable insn. Don't call
6723 target_read_uint32.
6724 (aarch64_install_fast_tracepoint_jump_pad): Call
6725 target_read_uint32.
6726
7781c06f
YQ
67272015-09-30 Yao Qi <yao.qi@linaro.org>
6728
6729 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6730 (emit_load_store_pair): Likewise.
6731
9a3c8263
SM
67322015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6733
6734 * dll.c (match_dll): Add cast(s).
6735 (unloaded_dll): Likewise.
6736 * linux-low.c (second_thread_of_pid_p): Likewise.
6737 (delete_lwp_callback): Likewise.
6738 (count_events_callback): Likewise.
6739 (select_event_lwp_callback): Likewise.
6740 (linux_set_resume_request): Likewise.
6741 * server.c (accumulate_file_name_length): Likewise.
6742 (emit_dll_description): Likewise.
6743 (handle_qxfer_threads_worker): Likewise.
6744 (visit_actioned_threads): Likewise.
6745 * thread-db.c (any_thread_of): Likewise.
6746 * tracepoint.c (same_process_p): Likewise.
6747 (match_blocktype): Likewise.
6748 (build_traceframe_info_xml): Likewise.
6749
224c3ddb
SM
67502015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6751
6752 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6753 assignment.
6754 (gdb_unparse_agent_expr): Likewise.
6755 * hostio.c (require_data): Likewise.
6756 (handle_pread): Likewise.
6757 * linux-low.c (disable_regset): Likewise.
6758 (fetch_register): Likewise.
6759 (store_register): Likewise.
6760 (get_dynamic): Likewise.
6761 (linux_qxfer_libraries_svr4): Likewise.
6762 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6763 (set_fast_tracepoint_jump): Likewise.
6764 (uninsert_fast_tracepoint_jumps_at): Likewise.
6765 (reinsert_fast_tracepoint_jumps_at): Likewise.
6766 (validate_inserted_breakpoint): Likewise.
6767 (clone_agent_expr): Likewise.
6768 * regcache.c (init_register_cache): Likewise.
6769 * remote-utils.c (putpkt_binary_1): Likewise.
6770 (decode_M_packet): Likewise.
6771 (decode_X_packet): Likewise.
6772 (look_up_one_symbol): Likewise.
6773 (relocate_instruction): Likewise.
6774 (monitor_output): Likewise.
6775 * server.c (handle_search_memory): Likewise.
6776 (handle_qxfer_exec_file): Likewise.
6777 (handle_qxfer_libraries): Likewise.
6778 (handle_qxfer): Likewise.
6779 (handle_query): Likewise.
6780 (handle_v_cont): Likewise.
6781 (handle_v_run): Likewise.
6782 (captured_main): Likewise.
6783 * target.c (write_inferior_memory): Likewise.
6784 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6785 * tracepoint.c (init_trace_buffer): Likewise.
6786 (add_tracepoint_action): Likewise.
6787 (add_traceframe): Likewise.
6788 (add_traceframe_block): Likewise.
6789 (cmd_qtdpsrc): Likewise.
6790 (cmd_qtdv): Likewise.
6791 (cmd_qtstatus): Likewise.
6792 (response_source): Likewise.
6793 (response_tsv): Likewise.
6794 (cmd_qtnotes): Likewise.
6795 (gdb_collect): Likewise.
6796 (initialize_tracepoint): Likewise.
6797
afbe19f8
PL
67982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6799
6800 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6801 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6802 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6803 <NOP>: New.
6804 (enum aarch64_condition_codes): New enum.
6805 (w0): New static global.
6806 (fp): Likewise.
6807 (lr): Likewise.
6808 (struct aarch64_memory_operand) <type>: New
6809 MEMORY_OPERAND_POSTINDEX type.
6810 (postindex_memory_operand): New helper function.
6811 (emit_ret): New function.
6812 (emit_load_store_pair): New function, factored out of emit_stp
6813 with support for MEMORY_OPERAND_POSTINDEX.
6814 (emit_stp): Rewrite using emit_load_store_pair.
6815 (emit_ldp): New function.
6816 (emit_load_store): Likewise.
6817 (emit_ldr): Mention post-index instruction in comment.
6818 (emit_ldrh): New function.
6819 (emit_ldrb): New function.
6820 (emit_ldrsw): Mention post-index instruction in comment.
6821 (emit_str): Likewise.
6822 (emit_subs): New function.
6823 (emit_cmp): Likewise.
6824 (emit_and): Likewise.
6825 (emit_orr): Likewise.
6826 (emit_orn): Likewise.
6827 (emit_eor): Likewise.
6828 (emit_mvn): Likewise.
6829 (emit_lslv): Likewise.
6830 (emit_lsrv): Likewise.
6831 (emit_asrv): Likewise.
6832 (emit_mul): Likewise.
6833 (emit_sbfm): Likewise.
6834 (emit_sbfx): Likewise.
6835 (emit_ubfm): Likewise.
6836 (emit_ubfx): Likewise.
6837 (emit_csinc): Likewise.
6838 (emit_cset): Likewise.
6839 (emit_nop): Likewise.
6840 (emit_ops_insns): New helper function.
6841 (emit_pop): Likewise.
6842 (emit_push): Likewise.
6843 (aarch64_emit_prologue): New function.
6844 (aarch64_emit_epilogue): Likewise.
6845 (aarch64_emit_add): Likewise.
6846 (aarch64_emit_sub): Likewise.
6847 (aarch64_emit_mul): Likewise.
6848 (aarch64_emit_lsh): Likewise.
6849 (aarch64_emit_rsh_signed): Likewise.
6850 (aarch64_emit_rsh_unsigned): Likewise.
6851 (aarch64_emit_ext): Likewise.
6852 (aarch64_emit_log_not): Likewise.
6853 (aarch64_emit_bit_and): Likewise.
6854 (aarch64_emit_bit_or): Likewise.
6855 (aarch64_emit_bit_xor): Likewise.
6856 (aarch64_emit_bit_not): Likewise.
6857 (aarch64_emit_equal): Likewise.
6858 (aarch64_emit_less_signed): Likewise.
6859 (aarch64_emit_less_unsigned): Likewise.
6860 (aarch64_emit_ref): Likewise.
6861 (aarch64_emit_if_goto): Likewise.
6862 (aarch64_emit_goto): Likewise.
6863 (aarch64_write_goto_address): Likewise.
6864 (aarch64_emit_const): Likewise.
6865 (aarch64_emit_call): Likewise.
6866 (aarch64_emit_reg): Likewise.
6867 (aarch64_emit_pop): Likewise.
6868 (aarch64_emit_stack_flush): Likewise.
6869 (aarch64_emit_zero_ext): Likewise.
6870 (aarch64_emit_swap): Likewise.
6871 (aarch64_emit_stack_adjust): Likewise.
6872 (aarch64_emit_int_call_1): Likewise.
6873 (aarch64_emit_void_call_2): Likewise.
6874 (aarch64_emit_eq_goto): Likewise.
6875 (aarch64_emit_ne_goto): Likewise.
6876 (aarch64_emit_lt_goto): Likewise.
6877 (aarch64_emit_le_goto): Likewise.
6878 (aarch64_emit_gt_goto): Likewise.
6879 (aarch64_emit_ge_got): Likewise.
6880 (aarch64_emit_ops_impl): New static global variable.
6881 (aarch64_emit_ops): New target function, return
6882 &aarch64_emit_ops_impl.
6883 (struct linux_target_ops): Install it.
6884
bb903df0
PL
68852015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6886
6887 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6888 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6889 aarch64-ipa.o.
6890 * linux-aarch64-ipa.c: New file.
6891 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6892 and endian.h.
6893 (aarch64_get_thread_area): New target method.
6894 (extract_signed_bitfield): New helper function.
6895 (aarch64_decode_ldr_literal): New function.
6896 (enum aarch64_opcodes): New enum.
6897 (struct aarch64_register): New struct.
6898 (struct aarch64_operand): New struct.
6899 (x0): New static global.
6900 (x1): Likewise.
6901 (x2): Likewise.
6902 (x3): Likewise.
6903 (x4): Likewise.
6904 (w2): Likewise.
6905 (ip0): Likewise.
6906 (sp): Likewise.
6907 (xzr): Likewise.
6908 (aarch64_register): New helper function.
6909 (register_operand): Likewise.
6910 (immediate_operand): Likewise.
6911 (struct aarch64_memory_operand): New struct.
6912 (offset_memory_operand): New helper function.
6913 (preindex_memory_operand): Likewise.
6914 (enum aarch64_system_control_registers): New enum.
6915 (ENCODE): New macro.
6916 (emit_insn): New helper function.
6917 (emit_b): New function.
6918 (emit_bcond): Likewise.
6919 (emit_cb): Likewise.
6920 (emit_tb): Likewise.
6921 (emit_blr): Likewise.
6922 (emit_stp): Likewise.
6923 (emit_ldp_q_offset): Likewise.
6924 (emit_stp_q_offset): Likewise.
6925 (emit_load_store): Likewise.
6926 (emit_ldr): Likewise.
6927 (emit_ldrsw): Likewise.
6928 (emit_str): Likewise.
6929 (emit_ldaxr): Likewise.
6930 (emit_stxr): Likewise.
6931 (emit_stlr): Likewise.
6932 (emit_data_processing_reg): Likewise.
6933 (emit_data_processing): Likewise.
6934 (emit_add): Likewise.
6935 (emit_sub): Likewise.
6936 (emit_mov): Likewise.
6937 (emit_movk): Likewise.
6938 (emit_mov_addr): Likewise.
6939 (emit_mrs): Likewise.
6940 (emit_msr): Likewise.
6941 (emit_sevl): Likewise.
6942 (emit_wfe): Likewise.
6943 (append_insns): Likewise.
6944 (can_encode_int32_in): New helper function.
6945 (aarch64_relocate_instruction): New function.
6946 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6947 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6948 (struct linux_target_ops): Install aarch64_get_thread_area,
6949 aarch64_install_fast_tracepoint_jump_pad and
6950 aarch64_get_min_fast_tracepoint_insn_len.
6951
787749ea
PL
69522015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6953
6954 * Makefile.in (aarch64-insn.o): New rule.
6955 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6956
9812b2e6
YQ
69572015-09-21 Yao Qi <yao.qi@linaro.org>
6958
6959 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6960
18fe412b
YQ
69612015-09-21 Yao Qi <yao.qi@linaro.org>
6962
6963 * tracepoint.c (max_jump_pad_size): Remove.
6964
a0cc84cd
YQ
69652015-09-18 Yao Qi <yao.qi@linaro.org>
6966
6967 * linux-aarch64-low.c: Don't include sys/uio.h.
6968 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6969
d78908cf
WW
69702015-09-16 Wei-cheng Wang <cole945@gmail.com>
6971
6972 * tracepoint.c (eval_result_type): Change prototype.
6973 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6974
d57e0d50
PA
69752015-09-15 Pedro Alves <palves@redhat.com>
6976
6977 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6978 Check whether to report exec events instead of checking whether
6979 multiprocess is enabled.
6980
5a676acc
PA
69812015-09-15 Pedro Alves <palves@redhat.com>
6982
6983 PR remote/18965
6984 * remote-utils.c (prepare_resume_reply): Merge
6985 TARGET_WAITKIND_VFORK_DONE switch case with the
6986 TARGET_WAITKIND_FORKED case.
6987
7c5d0fad
YQ
69882015-09-15 Yao Qi <yao.qi@linaro.org>
6989
6990 * server.c (handle_query): Check string comparison using
6991 "else if" instead of "if".
6992
750ce8d1
YQ
69932015-09-15 Yao Qi <yao.qi@linaro.org>
6994
6995 * server.c (vCont_supported): New global variable.
6996 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6997 matches. Append ";vContSupported+" to own_buf.
6998 (handle_v_requests): Append ";s;S" to own_buf if target supports
6999 hardware single step or vCont_supported is false.
7000 (capture_main): Set vCont_supported to zero.
7001
70b90b91
YQ
70022015-09-15 Yao Qi <yao.qi@linaro.org>
7003
7004 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7005 it to ...
7006 (linux_supports_hardware_single_step): ... New function.
7007 (linux_target_ops): Update.
7008 * lynx-low.c (lynx_target_ops): Set field
7009 supports_hardware_single_step to target_can_do_hardware_single_step.
7010 * nto-low.c (nto_target_ops): Likewise.
7011 * spu-low.c (spu_target_ops): Likewise.
7012 * win32-low.c (win32_target_ops): Likewise.
7013 * target.c (target_can_do_hardware_single_step): New function.
7014 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7015 Remove. <supports_hardware_single_step>: New field.
7016 (target_supports_conditional_breakpoints): Remove.
7017 (target_supports_hardware_single_step): New macro.
7018 (target_can_do_hardware_single_step): Declare.
7019 * server.c (handle_query): Use target_supports_hardware_single_step
7020 instead of target_supports_conditional_breakpoints.
7021
ade90bde
YQ
70222015-09-15 Yao Qi <yao.qi@linaro.org>
7023
7024 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7025 function.
7026 (struct linux_target_ops the_low_target): Install
7027 aarch64_linux_siginfo_fixup.
7028
94585166
DB
70292015-09-11 Don Breazeal <donb@codesourcery.com>
7030 Luis Machado <lgustavo@codesourcery.com>
7031
7032 * linux-low.c (linux_mourn): Static declaration.
7033 (linux_arch_setup): Move in front of
7034 handle_extended_wait.
7035 (linux_arch_setup_thread): New function.
7036 (handle_extended_wait): Handle exec events. Call
7037 linux_arch_setup_thread. Make event_lwp argument a
7038 pointer-to-a-pointer.
7039 (check_zombie_leaders): Do not check stopped threads.
7040 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7041 (linux_low_filter_event): Add lwp and thread for exec'ing
7042 non-leader thread if leader thread has been deleted.
7043 Refactor code into linux_arch_setup_thread and call it.
7044 Pass child lwp pointer by reference to handle_extended_wait.
7045 (linux_wait_for_event_filtered): Update comment.
7046 (linux_wait_1): Prevent clobbering exec event status.
7047 (linux_supports_exec_events): New function.
7048 (linux_target_ops) <supports_exec_events>: Initialize new member.
7049 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7050 new member.
7051 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7052 * server.c (report_exec_events): New global variable.
7053 (handle_query): Handle qSupported query for exec-events feature.
7054 (captured_main): Initialize report_exec_events.
7055 * server.h (report_exec_events): Declare new global variable.
7056 * target.h (struct target_ops) <supports_exec_events>: New
7057 member.
7058 (target_supports_exec_events): New macro.
7059 * win32-low.c (win32_target_ops) <supports_exec_events>:
7060 Initialize new member.
7061
0568462b
MM
70622015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7063
7064 * linux-low.c (linux_low_enable_btrace): Remove.
7065 (linux_target_ops): Replace linux_low_enable_btrace with
7066 linux_enable_btrace.
7067
39edd165
YQ
70682015-09-03 Yao Qi <yao.qi@linaro.org>
7069
7070 * linux-aarch64-low.c (aarch64_insert_point): Call
7071 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7072 returns true.
7073
1db33b5a
UW
70742015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7075
7076 * linux-low.c (check_stopped_by_breakpoint): Use
7077 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7078
ab290430
PA
70792015-08-27 Pedro Alves <palves@redhat.com>
7080
7081 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7082
8d749320
SM
70832015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7084
6711b7f8
SM
7085 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7086 the XNEW-family equivalent.
8d749320
SM
7087 (compile_bytecodes): Likewise.
7088 * dll.c (loaded_dll): Likewise.
7089 * event-loop.c (append_callback_event): Likewise.
7090 (create_file_handler): Likewise.
7091 (create_file_event): Likewise.
7092 * hostio.c (handle_open): Likewise.
7093 * inferiors.c (add_thread): Likewise.
7094 (add_process): Likewise.
7095 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7096 * linux-arm-low.c (arm_new_process): Likewise.
7097 (arm_new_thread): Likewise.
7098 * linux-low.c (add_to_pid_list): Likewise.
7099 (linux_add_process): Likewise.
7100 (handle_extended_wait): Likewise.
7101 (add_lwp): Likewise.
7102 (enqueue_one_deferred_signal): Likewise.
7103 (enqueue_pending_signal): Likewise.
7104 (linux_resume_one_lwp_throw): Likewise.
7105 (linux_resume_one_thread): Likewise.
7106 (linux_read_memory): Likewise.
7107 (linux_write_memory): Likewise.
7108 * linux-mips-low.c (mips_linux_new_process): Likewise.
7109 (mips_linux_new_thread): Likewise.
7110 (mips_add_watchpoint): Likewise.
7111 * linux-x86-low.c (initialize_low_arch): Likewise.
7112 * lynx-low.c (lynx_add_process): Likewise.
7113 * mem-break.c (set_raw_breakpoint_at): Likewise.
7114 (set_breakpoint): Likewise.
7115 (add_condition_to_breakpoint): Likewise.
7116 (add_commands_to_breakpoint): Likewise.
7117 (clone_agent_expr): Likewise.
7118 (clone_one_breakpoint): Likewise.
7119 * regcache.c (new_register_cache): Likewise.
7120 * remote-utils.c (look_up_one_symbol): Likewise.
7121 * server.c (queue_stop_reply): Likewise.
7122 (start_inferior): Likewise.
7123 (queue_stop_reply_callback): Likewise.
7124 (handle_target_event): Likewise.
7125 * spu-low.c (fetch_ppc_memory): Likewise.
7126 (store_ppc_memory): Likewise.
7127 * target.c (set_target_ops): Likewise.
7128 * thread-db.c (thread_db_load_search): Likewise.
7129 (try_thread_db_load_1): Likewise.
7130 * tracepoint.c (add_tracepoint): Likewise.
7131 (add_tracepoint_action): Likewise.
7132 (create_trace_state_variable): Likewise.
7133 (cmd_qtdpsrc): Likewise.
7134 (cmd_qtro): Likewise.
7135 (add_while_stepping_state): Likewise.
7136 * win32-low.c (child_add_thread): Likewise.
7137 (get_image_name): Likewise.
7138
ed8b7b42
YQ
71392015-08-25 Yao Qi <yao.qi@linaro.org>
7140
7141 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7142
db3cb7cb
YQ
71432015-08-25 Yao Qi <yao.qi@linaro.org>
7144
7145 * Makefile.in (aarch64-linux.o): New rule.
7146 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7147 srv_tgtobj.
7148 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7149 (aarch64_init_debug_reg_state): Make it extern.
7150 (aarch64_linux_prepare_to_resume): Remove.
7151
f6011a1c
YQ
71522015-08-25 Yao Qi <yao.qi@linaro.org>
7153
7154 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7155 lwp_arch_private_info and ptid_of_lwp.
7156
88e2cf7e
YQ
71572015-08-25 Yao Qi <yao.qi@linaro.org>
7158
7159 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7160 Find proc_info by find_process_pid. All callers updated.
7161
5e35436e
YQ
71622015-08-25 Yao Qi <yao.qi@linaro.org>
7163
7164 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7165 Remove.
7166 (debug_reg_change_callback): Remove.
7167 (aarch64_notify_debug_reg_change): Remove.
7168
4a8a7965
YQ
71692015-08-25 Yao Qi <yao.qi@linaro.org>
7170
7171 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7172 Call current_lwp_ptid.
7173
32a271ee
YQ
71742015-08-25 Yao Qi <yao.qi@linaro.org>
7175
7176 * linux-aarch64-low.c (debug_reg_change_callback): Use
7177 debug_printf.
7178
0d51c8d7
YQ
71792015-08-25 Yao Qi <yao.qi@linaro.org>
7180
7181 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7182
31a43dd5
YQ
71832015-08-25 Yao Qi <yao.qi@linaro.org>
7184
7185 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7186
8ee52567
YQ
71872015-08-25 Yao Qi <yao.qi@linaro.org>
7188
7189 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7190 the code.
7191
ff3f0f45
YQ
71922015-08-25 Yao Qi <yao.qi@linaro.org>
7193
7194 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7195 Remove.
7196 (debug_reg_change_callback): Remove argument entry and add argument
7197 lwp. Remove local variable thread. Don't print thread id in the
7198 debugging output. Don't check whether pid of thread equals to pid.
7199 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7200 iterate_over_lwps instead find_inferior.
7201
3d40fbb5
PA
72022015-08-24 Pedro Alves <palves@redhat.com>
7203
7204 * inferiors.c (get_first_process): New function.
7205 * inferiors.h (get_first_process): New declaration.
7206 * remote-utils.c (read_ptid): Default to the first process in the
7207 list, instead of to the current thread's process.
7208
438e1e42
PA
72092015-08-24 Pedro Alves <palves@redhat.com>
7210
7211 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7212 * event-loop.c: Likewise.
7213 * remote-utils.c: Likewise.
7214 * tracepoint.c: Likewise.
7215
a8c6d4fc
PA
72162015-08-24 Pedro Alves <palves@redhat.com>
7217
7218 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7219 ptid_get_lwp.
7220
99b0bb12
PA
72212015-08-21 Pedro Alves <palves@redhat.com>
7222
7223 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7224 instead of literal 1.
7225
f8904751
PA
72262015-08-21 Pedro Alves <palves@redhat.com>
7227
7228 * tdesc.c (default_description): Explicitly zero-initialize.
7229
465a859e
PA
72302015-08-21 Pedro Alves <palves@redhat.com>
7231
7232 PR gdb/18749
7233 * inferiors.c (remove_thread): Discard any pending stop reply for
7234 this thread.
7235 * server.c (remove_all_on_match_pid): Rename to ...
7236 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7237 instead of a pid.
7238 (discard_queued_stop_replies): Change parameter to a ptid. Now
7239 extern.
7240 (handle_v_kill, kill_inferior_callback, captured_main)
7241 (process_serial_event): Adjust.
7242 * server.h (discard_queued_stop_replies): Declare.
7243
f0db101d
PA
72442015-08-21 Pedro Alves <palves@redhat.com>
7245
7246 * linux-low.c (wait_for_sigstop): Always switch to no thread
7247 selected if the previously current thread dies.
7248 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7249 process instead of the current thread's.
7250 * remote-utils.c (input_interrupt): Don't check if there's no
7251 current thread.
7252 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7253 current thread to the general thread fails, error out.
7254 (handle_qxfer_auxv, handle_qxfer_libraries)
7255 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7256 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7257 (handle_query): Check if there's a thread selected instead of
7258 checking whether there's any thread in the thread list.
7259 (handle_qxfer_threads, handle_qxfer_btrace)
7260 (handle_qxfer_btrace_conf): Don't error out early if there's no
7261 thread in the thread list.
7262 (handle_v_cont, myresume): Don't set the current thread to the
7263 continue thread.
7264 (process_serial_event) <Hg handling>: Also set thread_id if the
7265 previous general thread is still alive.
7266 (process_serial_event) <g/G handling>: If setting the current
7267 thread to the general thread fails, error out.
7268 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7269 thread's lwp instead of the current thread's.
7270 * target.c (set_desired_thread): If the desired thread was not
7271 found, leave the current thread pointing to NULL. Return an int
7272 (boolean) indicating success.
7273 * target.h (set_desired_thread): Change return type to int.
7274
40045d91
MF
72752015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7276
7277 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7278 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7279 #includes.
7280 (ps_get_thread_area): New function.
7281
45face3b
GB
72822015-08-19 Gary Benson <gbenson@redhat.com>
7283
7284 * hostio.c (handle_pread): Do not attempt to read more data
7285 than hostio_reply_with_data can fit in a packet.
7286
16d5f642
JB
72872015-08-18 Joel Brobecker <brobecker@adacore.com>
7288
7289 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7290
a738da3a
MF
72912015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7292
7293 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7294
33ebda9d
PA
72952015-08-06 Pedro Alves <palves@redhat.com>
7296
7297 * tracepoint.c (expr_eval_result): Now an int.
7298
a44892be
PA
72992015-08-06 Pedro Alves <palves@redhat.com>
7300
7301 * gdbthread.h (struct regcache): Forward declare.
7302 (struct thread_info) <regcache_data>: Now a struct regcache
7303 pointer.
7304 * inferiors.c (inferior_regcache_data)
7305 (set_inferior_regcache_data): Now work with struct regcache
7306 pointers.
7307 * inferiors.h (struct regcache): Forward declare.
7308 (inferior_regcache_data, set_inferior_regcache_data): Now work
7309 with struct regcache pointers.
7310 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7311 (free_register_cache_thread): Remove struct regcache pointer
7312 casts.
7313
608a1e46
PA
73142015-08-06 Pedro Alves <palves@redhat.com>
7315
7316 * server.c (captured_main): On error, print the exception message
7317 to stderr, and if run_once is set, throw a quit.
7318
f0ce0d3a
PA
73192015-08-06 Pedro Alves <palves@redhat.com>
7320
7321 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7322 the current thread.
7323
bf47e248
PA
73242015-08-06 Pedro Alves <palves@redhat.com>
7325
7326 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7327 reading beyond the passed in buffer length.
7328
b6b9ffcc
PL
73292015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7330
7331 * tracepoint.c (symbol_list) <required>: Remove.
7332
863d01bd
PA
73332015-08-06 Pedro Alves <palves@redhat.com>
7334
7335 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7336 count if stopping and suspending threads.
7337 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7338 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7339 (linux_detach): Complete an ongoing step-over.
7340 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7341 throughout.
7342 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7343 (linux_wait_1): If passing a signal to the inferior after
7344 finishing a step-over, unsuspend and re-resume all lwps. If we
7345 see a single-step event but the thread should be continuing, don't
7346 pass the trap to gdb.
7347 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7348 internal_error instead of gdb_assert.
7349 (enqueue_pending_signal): New function.
7350 (check_ptrace_stopped_lwp_gone): Add debug output.
7351 (start_step_over): Use internal_error instead of gdb_assert.
7352 (complete_ongoing_step_over): New function.
7353 (linux_resume_one_thread): Don't resume a suspended thread.
7354 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7355 it stepping.
7356
00db26fa
PA
73572015-08-06 Pedro Alves <palves@redhat.com>
7358
7359 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7360 (linux_thread_alive): Use lwp_is_marked_dead.
7361 (extended_event_reported): Delete.
7362 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7363 instead of extended_event_reported.
7364 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7365 as well.
7366 (lwp_is_marked_dead): New function.
7367 (lwp_running): Use lwp_is_marked_dead.
7368 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7369 comment.
7370
ad071a30
PA
73712015-08-06 Pedro Alves <palves@redhat.com>
7372
7373 * linux-low.c (linux_wait_1): Move fork event output out of the
7374 !report_to_gdb check. Pass event_child->waitstatus to
7375 target_waitstatus_to_string instead of ourstatus.
7376
524b57e6
YQ
73772015-08-04 Yao Qi <yao.qi@linaro.org>
7378
7379 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7380 if current_thread is 32 bit.
7381
6085d6f6
YQ
73822015-08-04 Yao Qi <yao.qi@linaro.org>
7383
7384 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7385 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7386 * server.c (extended_protocol): Remove "static".
7387 * server.h (extended_protocol): Declare it.
7388
8a7e4587
YQ
73892015-08-04 Yao Qi <yao.qi@linaro.org>
7390
7391 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7392 both aarch64 and aarch32.
7393 (aarch64_set_pc): Likewise.
7394
3b53ae99
YQ
73952015-08-04 Yao Qi <yao.qi@linaro.org>
7396
7397 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7398 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7399 arm-with-neon.xml to srv_xmlfiles.
7400 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7401 (is_64bit_tdesc): New function.
7402 (aarch64_linux_read_description): New function.
7403 (aarch64_arch_setup): Call aarch64_linux_read_description.
7404 (regs_info): Rename to regs_info_aarch64.
7405 (aarch64_regs_info): Return right regs_info.
7406 (initialize_low_arch): Call initialize_low_arch_aarch32.
7407
bd9e6534
YQ
74082015-08-04 Yao Qi <yao.qi@linaro.org>
7409
7410 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7411 * linux-aarch32-low.c: New file.
7412 * linux-aarch32-low.h: New file.
7413 * linux-arm-low.c (arm_fill_gregset): Move it to
7414 linux-aarch32-low.c.
7415 (arm_store_gregset): Likewise.
7416 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7417 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7418 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7419 (regs_info): Rename to regs_info_arm.
7420 (arm_regs_info): Return regs_info_aarch32 if
7421 have_ptrace_getregset is 1 and target description is
7422 arm_with_neon or arm_with_vfpv3.
7423 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7424 Call initialize_low_arch_aarch32 instead.
7425
ded48a5e
YQ
74262015-08-04 Yao Qi <yao.qi@linaro.org>
7427
7428 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7429 * linux-low.c: ... here.
7430 * linux-low.h (have_ptrace_getregset): Declare it.
7431
96e9210f
PA
74322015-08-04 Pedro Alves <palves@redhat.com>
7433
7434 * thread-db.c (struct thread_db): Use new typedefs.
7435 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7436 CHK calls.
7437 (disable_thread_event_reporting): Cast result of dlsym to
7438 destination function pointer type.
7439 (thread_db_mourn): Use td_ta_delete_ftype.
7440
af60a1ef
SL
74412015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7442
7443 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7444 arch variant.
7445 (CDX_BREAKPOINT): Define for R2.
7446 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7447 (the_low_target): Add comments.
7448
e8b41681
YQ
74492015-07-30 Yao Qi <yao.qi@linaro.org>
7450
7451 * linux-arm-low.c (arm_hwcap): Remove it.
7452 (arm_read_description): New local variable arm_hwcap. Don't
7453 set arm_hwcap to zero.
7454
89abb039
YQ
74552015-07-30 Yao Qi <yao.qi@linaro.org>
7456
7457 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7458 Use regcache->tdesc instead.
7459 (arm_store_wmmxregset): Likewise.
7460 (arm_fill_vfpregset): Likewise.
7461 (arm_store_vfpregset): Likewise.
7462
deca266c
YQ
74632015-07-30 Yao Qi <yao.qi@linaro.org>
7464
7465 * linux-arm-low.c: Include arch/arm.h.
7466 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7467 (arm_store_gregset): Likewise.
7468
aa58a496
SM
74692015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7470
7471 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7472 ptrace's 4th parameter.
7473
50904b25
YQ
74742015-07-27 Yao Qi <yao.qi@linaro.org>
7475
7476 * configure.srv (case aarch64*-*-linux*): Don't set
7477 srv_linux_usrregs.
7478
5826e159
PA
74792015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7480
7481 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7482 sys/ptrace.h.
7483 * linux-arm-low.c: Likewise.
7484 * linux-cris-low.c: Likewise.
7485 * linux-crisv32-low.c: Likewise.
7486 * linux-low.c: Likewise.
7487 * linux-m68k-low.c: Likewise.
7488 * linux-mips-low.c: Likewise.
7489 * linux-nios2-low.c: Likewise.
7490 * linux-s390-low.c: Likewise.
7491 * linux-sparc-low.c: Likewise.
7492 * linux-tic6x-low.c: Likewise.
7493 * linux-tile-low.c: Likewise.
7494 * linux-x86-low.c: Likewise.
7495
54019719
PA
74962015-07-24 Pedro Alves <palves@redhat.com>
7497
7498 * config.in: Regenerate.
7499 * configure: Regenerate.
7500
eb7aa561
PA
75012015-07-24 Pedro Alves <palves@redhat.com>
7502
7503 * acinclude.m4: Include ../ptrace.m4.
7504 * configure.ac: Call GDB_AC_PTRACE.
7505 * config.in, configure: Regenerate.
7506
55d7b841
YQ
75072015-07-24 Yao Qi <yao.qi@linaro.org>
7508
7509 * linux-low.c (linux_create_inferior): Remove setting to
7510 proc->priv->new_inferior.
7511 (linux_attach): Likewise.
7512 (linux_low_filter_event): Likewise.
7513 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7514
c06cbd92
YQ
75152015-07-24 Yao Qi <yao.qi@linaro.org>
7516
7517 * linux-low.c (linux_arch_setup): New function.
7518 (linux_low_filter_event): If proc->tdesc is NULL and
7519 proc->attached is true, call the_low_target.arch_setup.
7520 Otherwise, keep status pending, and return.
7521 (linux_resume_one_lwp_throw): Don't call get_pc if
7522 thread->while_stepping isn't NULL. Don't call
7523 get_thread_regcache if proc->tdesc is NULL.
7524 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7525 (linux_target_ops): Install arch_setup.
7526 * server.c (start_inferior): Call the_target->arch_setup.
7527 * target.h (struct target_ops) <arch_setup>: New field.
7528 (target_arch_setup): New marco.
7529 * lynx-low.c (lynx_target_ops): Update.
7530 * nto-low.c (nto_target_ops): Update.
7531 * spu-low.c (spu_target_ops): Update.
7532 * win32-low.c (win32_target_ops): Update.
7533
5ae3ebba
YQ
75342015-07-24 Yao Qi <yao.qi@linaro.org>
7535
7536 * linux-low.c (linux_add_process): Don't set
7537 proc->priv->new_inferior.
7538 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7539 (linux_attach): Likewise.
7540
eb97750b
YQ
75412015-07-24 Yao Qi <yao.qi@linaro.org>
7542
7543 * server.c (start_inferior): Code refactor.
7544
51aee833
YQ
75452015-07-24 Yao Qi <yao.qi@linaro.org>
7546
7547 * server.c (process_serial_event): Set general_thread.
7548
af1b22f3
YQ
75492015-07-21 Yao Qi <yao.qi@linaro.org>
7550
7551 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7552 aarch64_linux_get_debug_reg_capacity.
7553
554717a3
YQ
75542015-07-17 Yao Qi <yao.qi@linaro.org>
7555
7556 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7557 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7558 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7559 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7560 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7561 (AARCH64_HWP_ALIGNMENT): Likewise.
7562 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7563 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7564 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7565 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7566 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7567 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7568 (struct aarch64_debug_reg_state): Likewise.
7569 (struct arch_lwp_info): Likewise.
7570 (aarch64_align_watchpoint): Likewise.
7571 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7572 (aarch64_watchpoint_length): Likewise.
7573 (aarch64_point_encode_ctrl_reg): Likewise
7574 (aarch64_point_is_aligned): Likewise.
7575 (aarch64_align_watchpoint): Likewise.
7576 (aarch64_linux_set_debug_regs):
7577 (aarch64_dr_state_insert_one_point): Likewise.
7578 (aarch64_dr_state_remove_one_point): Likewise.
7579 (aarch64_handle_breakpoint): Likewise.
7580 (aarch64_handle_aligned_watchpoint): Likewise.
7581 (aarch64_handle_unaligned_watchpoint): Likewise.
7582 (aarch64_handle_watchpoint): Likewise.
7583
c67ca4de
YQ
75842015-07-17 Yao Qi <yao.qi@linaro.org>
7585
7586 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7587 and don't aarch64_get_debug_reg_state. All callers update.
7588 (aarch64_handle_aligned_watchpoint): Likewise.
7589 (aarch64_handle_unaligned_watchpoint): Likewise.
7590 (aarch64_handle_watchpoint): Likewise.
7591 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7592 (aarch64_remove_point): Likewise.
7593
25abf979
YQ
75942015-07-17 Yao Qi <yao.qi@linaro.org>
7595
7596 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7597 debug_printf.
7598 (aarch64_handle_unaligned_watchpoint): Likewise.
7599
db1ff28b
JK
76002015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7601
7602 Revert the previous 3 commits:
7603 Move gdb_regex* to common/
7604 Move linux_find_memory_regions_full & co.
7605 gdbserver build-id attribute generator
7606
700ca40f
JK
76072015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7608 Jan Kratochvil <jan.kratochvil@redhat.com>
7609
7610 gdbserver build-id attribute generator.
7611 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7612 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7613 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7614 (find_phdr): New.
7615 (get_dynamic): Use find_pdhr to traverse program headers.
7616 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7617 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7618 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7619 (get_hex_build_id): New.
7620 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7621 to reply XML document.
7622
9904185c
JK
76232015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7624 Jan Kratochvil <jan.kratochvil@redhat.com>
7625
7626 * target.c: Include target/target-utils.h and fcntl.h.
7627 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7628 (target_fileio_read_stralloc): New functions.
7629
6e5b4429
JK
76302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7631
7632 * Makefile.in (OBS): Add gdb_regex.o.
7633 (gdb_regex.o): New.
7634 * config.in: Rebuilt.
7635 * configure: Rebuilt.
7636
ddc98fbf
JK
76372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7638 Jan Kratochvil <jan.kratochvil@redhat.com>
7639
7640 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7641 * Makefile.in (OBS): Add target-utils.o.
7642 (linux-maps.o, target-utils.o): New.
7643 * configure.srv (srv_linux_obj): Add linux-maps.o.
7644
e57bb7a0
PL
76452015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7646
7647 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7648 function, return 1.
7649 (the_low_target): Install it.
7650
586b02a9
PA
76512015-07-14 Pedro Alves <palves@redhat.com>
7652
7653 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7654 Instead, ignore ECHILD, and throw an error for other errnos.
7655
58c1b36c
PA
76562015-07-10 Pedro Alves <palves@redhat.com>
7657
7658 * event-loop.c (struct callback_event) <data>: Change type to
7659 gdb_client_data instance instead of gdb_client_data pointer.
7660 (append_callback_event): Adjust.
7661
421530db
PL
76622015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7663
7664 * linux-aarch64-low.c: Add comments for each linux_target_ops
7665 method. Remove comments already covered in target_ops and
7666 linux_target_ops definitions.
7667 (the_low_target): Add comments for each unimplemented method.
7668
c2d65f38
YQ
76692015-07-09 Yao Qi <yao.qi@linaro.org>
7670
7671 * linux-aarch64-low.c (aarch64_regmap): Remove.
7672 (aarch64_usrregs_info): Remove.
7673 (regs_info): Set field usrregs to NULL.
7674
b20a6524
MM
76752015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7676
7677 * linux-low.c: Include "rsp-low.h"
7678 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7679 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7680 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7681 (handle_btrace_enable_pt): New.
7682 (handle_btrace_general_set): Support "pt".
7683 (handle_btrace_conf_general_set): Support "pt:size".
7684
96c97461
PL
76852015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7686
7687 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7688 Z_PACKET_SW_BP.
7689
37d66942
PL
76902015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7691
7692 * linux-aarch64-low.c: Remove comment about endianness.
7693 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7694 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7695 memcmp.
7696
dc06243f
GB
76972015-06-24 Gary Benson <gbenson@redhat.com>
7698
7699 * linux-i386-ipa.c (stdint.h): Do not include.
7700 * lynx-i386-low.c (stdint.h): Likewise.
7701 * lynx-ppc-low.c (stdint.h): Likewise.
7702 * mem-break.c (stdint.h): Likewise.
7703 * thread-db.c (stdint.h): Likewise.
7704 * tracepoint.c (stdint.h): Likewise.
7705 * win32-low.c (stdint.h): Likewise.
7706
124e13d9
SM
77072015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7708
7709 * server.c (write_qxfer_response): Update call to
7710 remote_escape_output.
7711
909c2cda
JK
77122015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7713 Jan Kratochvil <jan.kratochvil@redhat.com>
7714
7715 Merge multiple hex conversions.
7716 * gdbreplay.c (tohex): Rename to 'fromhex'.
7717 (logchar): Use fromhex.
7718
24c05f46
JK
77192015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7720
7721 * server.c (handle_qxfer_libraries): Set `version' attribute for
7722 <library-list>.
7723
14d2069a
GB
77242015-06-10 Gary Benson <gbenson@redhat.com>
7725
7726 * target.h (struct target_ops) <multifs_open>: New field.
7727 <multifs_unlink>: Likewise.
7728 <multifs_readlink>: Likewise.
7729 * linux-low.c (nat/linux-namespaces.h): New include.
7730 (linux_target_ops): Initialize the_target->multifs_open,
7731 the_target->multifs_unlink and the_target->multifs_readlink.
7732 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7733 * hostio.c (hostio_fs_pid): New static variable.
7734 (hostio_handle_new_gdb_connection): New function.
7735 (handle_setfs): Likewise.
7736 (handle_open): Use the_target->multifs_open as appropriate.
7737 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7738 (handle_readlink): Use the_target->multifs_readlink as
7739 appropriate.
7740 (handle_vFile): Handle vFile:setfs packets.
7741 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7742 after target_handle_new_gdb_connection.
7743
4b8b5e72
GB
77442015-06-10 Gary Benson <gbenson@redhat.com>
7745
7746 * configure.ac (AC_CHECK_FUNCS): Add setns.
7747 * config.in: Regenerate.
7748 * configure: Likewise.
7749 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7750 (linux-namespaces.o): New rule.
7751 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7752
3ac2e371
GB
77532015-06-09 Gary Benson <gbenson@redhat.com>
7754
7755 * hostio.c (handle_open): Process mode argument with
7756 fileio_to_host_mode.
7757
ca9b78ce
YQ
77582015-06-01 Yao Qi <yao.qi@linaro.org>
7759
7760 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7761 * linux-x86-low.c: Likewise.
7762
bfacd19d
DB
77632015-05-28 Don Breazeal <donb@codesourcery.com>
7764
7765 * linux-low.c (handle_extended_wait): Initialize
7766 thread_info.last_resume_kind for new fork children.
7767
452003ef
PA
77682015-05-15 Pedro Alves <palves@redhat.com>
7769
7770 * target.h (target_handle_new_gdb_connection): Rewrite using if
7771 wrapped in do/while.
7772
1041a03c
JB
77732015-05-14 Joel Brobecker <brobecker@adacore.com>
7774
7775 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7776 * configure, config.in: Regenerate.
7777 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7778 Declare typedef.
7779
c269dbdb
DB
77802015-05-12 Don Breazeal <donb@codesourcery.com>
7781
7782 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7783 PTRACE_EVENT_VFORK_DONE.
7784 (linux_low_ptrace_options, extended_event_reported): Add vfork
7785 events.
7786 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7787 and "vforkdone" for RSP 'T' Stop Reply Packet.
7788 * server.h (report_vfork_events): Declare
7789 global variable.
7790
3a8a0396
DB
77912015-05-12 Don Breazeal <donb@codesourcery.com>
7792
7793 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7794 (the_low_target) <new_fork>: Initialize new member.
7795 * linux-arm-low.c (arm_new_fork): New function.
7796 (the_low_target) <new_fork>: Initialize new member.
7797 * linux-low.c (handle_extended_wait): Call new target function
7798 new_fork.
7799 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7800 * linux-mips-low.c (mips_add_watchpoint): New function
7801 extracted from mips_insert_point.
7802 (the_low_target) <new_fork>: Initialize new member.
7803 (mips_linux_new_fork): New function.
7804 (mips_insert_point): Call mips_add_watchpoint.
7805 * linux-x86-low.c (x86_linux_new_fork): New function.
7806 (the_low_target) <new_fork>: Initialize new member.
7807
de0d863e
DB
78082015-05-12 Don Breazeal <donb@codesourcery.com>
7809
7810 * linux-low.c (handle_extended_wait): Implement return value,
7811 rename argument 'event_child' to 'event_lwp', handle
7812 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7813 (linux_low_ptrace_options): New function.
7814 (linux_low_filter_event): Call linux_low_ptrace_options,
7815 use different argument fo linux_enable_event_reporting,
7816 use return value from handle_extended_wait.
7817 (extended_event_reported): New function.
7818 (linux_wait_1): Call extended_event_reported and set
7819 status to report fork events.
7820 (linux_write_memory): Add pid to debug message.
7821 (reset_lwp_ptrace_options_callback): New function.
7822 (linux_handle_new_gdb_connection): New function.
7823 (linux_target_ops): Initialize new structure member.
7824 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7825 * lynx-low.c: Initialize new structure member.
7826 * remote-utils.c (prepare_resume_reply): Implement stop reason
7827 "fork" for "T" stop message.
7828 * server.c (handle_query): Call handle_new_gdb_connection.
7829 * server.h (report_fork_events): Declare global flag.
7830 * target.h (struct target_ops) <handle_new_gdb_connection>:
7831 New member.
7832 (target_handle_new_gdb_connection): New macro.
7833 * win32-low.c: Initialize new structure member.
7834
ddcbc397
DB
78352015-05-12 Don Breazeal <donb@codesourcery.com>
7836
7837 * mem-break.c (APPEND_TO_LIST): Define macro.
7838 (clone_agent_expr): New function.
7839 (clone_one_breakpoint): New function.
7840 (clone_all_breakpoints): New function.
7841 * mem-break.h: Declare new functions.
7842
89245bc0
DB
78432015-05-12 Don Breazeal <donb@codesourcery.com>
7844
7845 * linux-low.c (linux_supports_fork_events): New function.
7846 (linux_supports_vfork_events): New function.
7847 (linux_target_ops): Initialize new structure members.
7848 (initialize_low): Call linux_check_ptrace_features.
7849 * lynx-low.c (lynx_target_ops): Initialize new structure
7850 members.
7851 * server.c (report_fork_events, report_vfork_events):
7852 New global flags.
7853 (handle_query): Add new features to qSupported packet and
7854 response.
7855 (captured_main): Initialize new global variables.
7856 * target.h (struct target_ops) <supports_fork_events>:
7857 New member.
7858 <supports_vfork_events>: New member.
7859 (target_supports_fork_events): New macro.
7860 (target_supports_vfork_events): New macro.
7861 * win32-low.c (win32_target_ops): Initialize new structure
7862 members.
7863
835205d0
GB
78642015-05-12 Gary Benson <gbenson@redhat.com>
7865
7866 * server.c (handle_qxfer_exec_file): Use current process
7867 if annex is empty.
7868
21e94bd9
SL
78692015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7870
7871 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7872 Remove HAVE_PTRACE_GETREGS conditionals.
7873 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7874 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7875
45614f15
YQ
78762015-05-08 Yao Qi <yao.qi@linaro.org>
7877
7878 * linux-low.c (linux_supports_conditional_breakpoints): New
7879 function.
7880 (linux_target_ops): Install new target method.
7881 * lynx-low.c (lynx_target_ops): Install NULL hook for
7882 supports_conditional_breakpoints.
7883 * nto-low.c (nto_target_ops): Likewise.
7884 * spu-low.c (spu_target_ops): Likewise.
7885 * win32-low.c (win32_target_ops): Likewise.
7886 * server.c (handle_query): Check
7887 target_supports_conditional_breakpoints.
7888 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7889 New field.
7890 (target_supports_conditional_breakpoints): New macro.
7891
80ad801e
PA
78922015-05-06 Pedro Alves <palves@redhat.com>
7893
7894 PR server/18081
7895 * server.c (start_inferior): If the process exits, mourn it.
7896
819843c7
GB
78972015-04-21 Gary Benson <gbenson@redhat.com>
7898
7899 * hostio.c (fileio_open_flags_to_host): Factored out to
7900 fileio_to_host_openflags in common/fileio.c. Single use
7901 updated.
7902
a2d5a9d7
MF
79032015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7904
7905 * linux-xtensa-low.c (xtensa_fill_gregset)
7906 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7907 XCHAL_HAVE_LOOP.
7908
deb44829
MF
79092015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7910
7911 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7912 (regs_info): Replace usrregs pointer with NULL.
7913
e57f1de3
GB
79142015-04-17 Gary Benson <gbenson@redhat.com>
7915
7916 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7917 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7918 * server.c (handle_qxfer_exec_file): New function.
7919 (qxfer_packets): Add exec-file entry.
7920 (handle_query): Report qXfer:exec-file:read as supported packet.
7921
62828379
RN
79222015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7923
7924 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7925
b88bb450
GB
79262015-04-09 Gary Benson <gbenson@redhat.com>
7927
7928 * hostio-errno.c (errno_to_fileio_error): Remove function.
7929 Update caller to use remote_fileio_to_fio_error.
7930
c8f4bfdd
YQ
79312015-04-09 Yao Qi <yao.qi@linaro.org>
7932
7933 * linux-low.c (linux_insert_point): Call
7934 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7935 (linux_remove_point): Call remove_memory_breakpoint if type is
7936 raw_bkpt_type_sw.
7937 * linux-x86-low.c (x86_insert_point): Don't call
7938 insert_memory_breakpoint.
7939 (x86_remove_point): Don't call remove_memory_breakpoint.
7940
41f98f02
PA
79412015-04-01 Pedro Alves <palves@redhat.com>
7942 Cleber Rosa <crosa@redhat.com>
7943
7944 * server.c (gdbserver_usage): Reorganize and extend the usage
7945 message.
7946
2bf6fb9d
PA
79472015-03-24 Pedro Alves <palves@redhat.com>
7948
7949 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7950 output. Also dump TRAP_TRACE.
7951 (linux_low_filter_event): In debug output, distinguish a
7952 resume_stop SIGSTOP from a delayed SIGSTOP.
7953
369f6daa
GB
79542015-03-24 Gary Benson <gbenson@redhat.com>
7955
7956 * linux-x86-low.c (x86_linux_new_thread): Moved to
7957 nat/x86-linux.c.
7958 (x86_linux_prepare_to_resume): Likewise.
7959
8e5d4070
GB
79602015-03-24 Gary Benson <gbenson@redhat.com>
7961
7962 * Makefile.in (x86-linux-dregs.o): New rule.
7963 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7964 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7965 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7966 (x86_linux_dr_get): Likewise.
7967 (x86_linux_dr_set): Likewise.
7968 (update_debug_registers_callback): Likewise.
7969 (x86_linux_dr_set_addr): Likewise.
7970 (x86_linux_dr_get_addr): Likewise.
7971 (x86_linux_dr_set_control): Likewise.
7972 (x86_linux_dr_get_control): Likewise.
7973 (x86_linux_dr_get_status): Likewise.
7974 (x86_linux_update_debug_registers): Likewise.
7975
2b95d440
GB
79762015-03-24 Gary Benson <gbenson@redhat.com>
7977
7978 * linux-x86-low.c (x86_linux_update_debug_registers):
7979 New function, factored out from...
7980 (x86_linux_prepare_to_resume): ...this.
7981
14b0bc68
GB
79822015-03-24 Gary Benson <gbenson@redhat.com>
7983
7984 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7985 (x86_linux_dr_set): Likewise.
7986 (update_debug_registers_callback): Likewise.
7987 (x86_linux_dr_set_addr): Likewise.
7988 (x86_linux_dr_get_addr): Likewise.
7989 (x86_linux_dr_set_control): Likewise.
7990 (x86_linux_dr_get_control): Likewise.
7991 (x86_linux_dr_get_status): Likewise.
7992 (x86_linux_prepare_to_resume): Likewise.
7993
5dfe6ca8
GB
79942015-03-24 Gary Benson <gbenson@redhat.com>
7995
7996 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7997 Use perror_with_name. Pass string through gettext.
7998 (x86_linux_dr_set): Likewise.
7999
d33472ad
GB
80002015-03-24 Gary Benson <gbenson@redhat.com>
8001
8002 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8003 (x86_linux_dr_set_addr): ...this.
8004 (x86_dr_low_get_addr): Rename to...
8005 (x86_linux_dr_get_addr): ...this.
8006 (x86_dr_low_set_control): Rename to...
8007 (x86_linux_dr_set_control): ...this.
8008 (x86_dr_low_get_control): Rename to...
8009 (x86_linux_dr_get_control): ...this.
8010 (x86_dr_low_get_status): Rename to...
8011 (x86_linux_dr_get_status): ...this.
8012 (x86_dr_low): Update with new function names.
8013
4b134ca1
GB
80142015-03-24 Gary Benson <gbenson@redhat.com>
8015
8016 * Makefile.in (x86-linux.o): New rule.
8017 * configure.srv: Add x86-linux.o to relevant targets.
8018 * linux-low.c (lwp_set_arch_private_info): New function.
8019 (lwp_arch_private_info): Likewise.
8020 * linux-x86-low.c: Include nat/x86-linux.h.
8021 (arch_lwp_info): Removed structure.
8022 (update_debug_registers_callback):
8023 Use lwp_set_debug_registers_changed.
8024 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8025 and lwp_set_debug_registers_changed.
8026 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8027
34c703da
GB
80282015-03-24 Gary Benson <gbenson@redhat.com>
8029
8030 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8031 * linux-arm-low.c (arm_new_thread): Likewise.
8032 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8033 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8034 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8035 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8036
cff068da
GB
80372015-03-24 Gary Benson <gbenson@redhat.com>
8038
8039 * linux-low.c (ptid_of_lwp): New function.
8040 (lwp_is_stopped): Likewise.
8041 (lwp_stop_reason): Likewise.
8042 * linux-x86-low.c (update_debug_registers_callback):
8043 Use lwp_is_stopped.
8044 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8045 lwp_stop_reason.
8046
b2f7c7e8
GB
80472015-03-24 Gary Benson <gbenson@redhat.com>
8048
8049 * linux-low.h (linux_stop_lwp): Remove declaration.
8050
6d4ee8c6
GB
80512015-03-24 Gary Benson <gbenson@redhat.com>
8052
8053 * linux-low.h: Include nat/linux-nat.h.
8054 * linux-low.c (iterate_over_lwps_args): New structure.
8055 (iterate_over_lwps_filter): New function.
8056 (iterate_over_lwps): Likewise.
8057 * linux-x86-low.c (update_debug_registers_callback):
8058 Update signature to what iterate_over_lwps expects.
8059 Remove PID check that iterate_over_lwps now performs.
8060 (x86_dr_low_set_addr): Use iterate_over_lwps.
8061 (x86_dr_low_set_control): Likewise.
8062
70a0bb6b
GB
80632015-03-24 Gary Benson <gbenson@redhat.com>
8064
8065 * linux-x86-low.c (x86_debug_reg_state): New function.
8066 (x86_linux_prepare_to_resume): Use the above.
8067
7b669087
GB
80682015-03-24 Gary Benson <gbenson@redhat.com>
8069
8070 * linux-low.c (current_lwp_ptid): New function.
8071 * linux-x86-low.c: Include nat/linux-nat.h.
8072 (x86_dr_low_get_addr): Use current_lwp_ptid.
8073 (x86_dr_low_get_control): Likewise.
8074 (x86_dr_low_get_status): Likewise.
8075
eef49a3d
PA
80762015-03-20 Pedro Alves <palves@redhat.com>
8077
8078 * tracepoint.c (cmd_qtstatus): Make "str" const.
8079
b2333d22
PA
80802015-03-20 Pedro Alves <palves@redhat.com>
8081
8082 * server.c (handle_general_set): Make "req_str" const.
8083
23f238d3
PA
80842015-03-19 Pedro Alves <palves@redhat.com>
8085
8086 * linux-low.c (linux_resume_one_lwp): Rename to ...
8087 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8088 instead call perror_with_name.
8089 (check_ptrace_stopped_lwp_gone): New function.
8090 (linux_resume_one_lwp): Reimplement as wrapper around
8091 linux_resume_one_lwp_throw that swallows errors if the LWP is
8092 gone.
8093
91baf43f
PA
80942015-03-19 Pedro Alves <palves@redhat.com>
8095
8096 * linux-low.c (count_events_callback, select_event_lwp_callback):
8097 No longer check whether the thread has resume_stop as last resume
8098 kind.
8099
8bf3b159
PA
81002015-03-19 Pedro Alves <palves@redhat.com>
8101
8102 * linux-low.c (count_events_callback, select_event_lwp_callback):
8103 Use the lwp's status_pending_p field, not the thread's.
8104
b90fc188
PA
81052015-03-19 Pedro Alves <palves@redhat.com>
8106
8107 * linux-low.c (select_event_lwp_callback): Update comments to
8108 no longer mention SIGTRAP.
8109
464b0089
GB
81102015-03-18 Gary Benson <gbenson@redhat.com>
8111
8112 * server.c (handle_query): Do not report vFile:fstat as supported.
8113
aa9e327f
GB
81142015-03-11 Gary Benson <gbenson@redhat.com>
8115
8116 * hostio.c (sys/types.h): New include.
8117 (sys/stat.h): Likewise.
8118 (common-remote-fileio.h): Likewise.
8119 (handle_fstat): New function.
8120 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 8121
791c0056
GB
81222015-03-11 Gary Benson <gbenson@redhat.com>
8123
8124 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8125 struct stat.st_blocks and struct stat.st_blksize.
8126 * configure: Regenerate.
8127 * config.in: Likewise.
8128 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8129 (OBS): Add common-remote-fileio.o.
8130 (common-remote-fileio.o): New rule.
8131
9a9df970
PA
81322015-03-09 Pedro Alves <palves@redhat.com>
8133
8134 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8135 'struct sockaddr' pointer in 'accept' call.
8136
9eb1356e
PA
81372015-03-09 Pedro Alves <palves@redhat.com>
8138
8139 Revert:
8140 2015-03-07 Pedro Alves <palves@redhat.com>
8141 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8142 or <winsock2.h> here. Instead include "gdb_socket.h".
8143 (remote_open): Use union gdb_sockaddr_u.
8144 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8145 or <winsock2.h> here. Instead include "gdb_socket.h".
8146 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8147 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8148 or <sys/un.h>.
8149 (init_named_socket, gdb_agent_helper_thread): Use union
8150 gdb_sockaddr_u.
8151
aac331e4
PA
81522015-03-07 Pedro Alves <palves@redhat.com>
8153
8154 * configure.ac (build_warnings): Move
8155 -Wdeclaration-after-statement to the C-specific set.
8156 * configure: Regenerate.
8157
366c75fc
PA
81582015-03-07 Pedro Alves <palves@redhat.com>
8159
8160 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8161 or <winsock2.h> here. Instead include "gdb_socket.h".
8162 (remote_open): Use union gdb_sockaddr_u.
8163 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8164 or <winsock2.h> here. Instead include "gdb_socket.h".
8165 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8166 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8167 or <sys/un.h>.
8168 (init_named_socket, gdb_agent_helper_thread): Use union
8169 gdb_sockaddr_u.
8170
492d29ea
PA
81712015-03-07 Pedro Alves <palves@redhat.com>
8172
8173 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8174 instead.
8175
60a191ed
YQ
81762015-03-06 Yao Qi <yao.qi@linaro.org>
8177
8178 * linux-aarch64-low.c (aarch64_insert_point): Use
8179 show_debug_regs as a boolean.
8180 (aarch64_remove_point): Likewise.
8181
f5771b1d
PA
81822015-03-05 Pedro Alves <palves@redhat.com>
8183
8184 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8185 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8186 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8187 * nto-low.c (nto_target_ops): Likewise.
8188 * spu-low.c (spu_target_ops): Likewise.
8189 * win32-low.c (win32_target_ops): Likewise.
8190
3e572f71
PA
81912015-03-04 Pedro Alves <palves@redhat.com>
8192
72f4393d 8193 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
8194 Decide whether a breakpoint triggered based on the SIGTRAP's
8195 siginfo.si_code.
72f4393d
L
8196 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8197 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
8198 (linux_low_filter_event): Check for breakpoints before checking
8199 watchpoints.
8200 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8201 siginfo.si_code.
72f4393d
L
8202 (linux_stopped_by_sw_breakpoint)
8203 (linux_supports_stopped_by_sw_breakpoint)
8204 (linux_stopped_by_hw_breakpoint)
8205 (linux_supports_stopped_by_hw_breakpoint): New functions.
8206 (linux_target_ops): Install new target methods.
3e572f71 8207
1ec68e26
PA
82082015-03-04 Pedro Alves <palves@redhat.com>
8209
8210 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8211 * server.c (swbreak_feature, hwbreak_feature): New globals.
8212 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8213 (captured_main): Clear swbreak_feature and hwbreak_feature.
8214 * server.h (swbreak_feature, hwbreak_feature): Declare.
8215 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8216 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8217 supports_stopped_by_hw_breakpoint>: New fields.
8218 (target_supports_stopped_by_sw_breakpoint)
8219 (target_stopped_by_sw_breakpoint)
8220 (target_supports_stopped_by_hw_breakpoint)
8221 (target_stopped_by_hw_breakpoint): Declare.
8222
15c66dd6
PA
82232015-03-04 Pedro Alves <palves@redhat.com>
8224
8225 enum lwp_stop_reason -> enum target_stop_reason
8226 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8227 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8228 (linux_wait_1, stuck_in_jump_pad_callback)
8229 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8230 (linux_stopped_by_watchpoint):
8231 * linux-low.h (enum lwp_stop_reason): Delete.
8232 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8233 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8234
98fc70d6
YQ
82352015-03-04 Yao Qi <yao.qi@linaro.org>
8236
8237 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8238
dd2ac174
GB
82392015-03-03 Gary Benson <gbenson@redhat.com>
8240
8241 * hostio.c (handle_vFile): Fix prefix lengths.
8242
d68e53f4
MM
82432015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8244
8245 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8246 ptr_bits.
8247
bf2d68ab
AA
82482015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8249
8250 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8251 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8252 (clean): Add "rm -f" for above C files.
8253 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8254 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8255 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8256 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8257 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8258 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8259 (init_registers_s390x_vx_linux64)
8260 (init_registers_s390x_tevx_linux64)
8261 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8262 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8263 declarations.
8264 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8265 (s390_store_vxrs_high): New functions.
8266 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8267 NT_S390_VXRS_HIGH.
8268 (s390_arch_setup): Add logic for selecting one of the new target
8269 descriptions. Activate the new vector regsets if applicable.
8270 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8271 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8272 and init_registers_s390x_tevx_linux64.
8273
c966a859
PA
82742015-03-01 Pedro Alves <palves@redhat.com>
8275
8276 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8277 parameter.
8278
4180215b
PA
82792015-02-27 Pedro Alves <palves@redhat.com>
8280
8281 * linux-x86-low.c (u_debugreg_offset): New function.
8282 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8283
749bab01
PA
82842015-02-27 Pedro Alves <palves@redhat.com>
8285
8286 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8287 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8288 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8289 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8290 (ps_lsetfpregs, ps_getpid)
8291 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8292 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8293 (ps_lsetxregs, ps_plog): Declare.
8294
3c14e5a3
PA
82952015-02-27 Pedro Alves <palves@redhat.com>
8296
8297 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8298 IP_AGENT_EXPORT_FUNC.
8299 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8300 IP_AGENT_EXPORT_FUNC.
8301 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8302 (IP_AGENT_EXPORT): Delete.
8303 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8304 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8305 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8306 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8307 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8308 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8309 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8310 (traceframe_read_count, traceframe_write_count)
8311 (traceframes_created, trace_state_variables, get_raw_reg)
8312 (get_trace_state_variable_value, set_trace_state_variable_value)
8313 (ust_loaded, helper_thread_id, cmd_buf): Use
8314 IPA_SYM_EXPORTED_NAME.
8315 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8316 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8317 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8318 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8319 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8320 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8321 EXTERN_C_PUSH/EXTERN_C_POP.
8322 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8323 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8324 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8325 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8326 (traceframe_write_count, traceframe_read_count)
8327 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8328 (about_to_request_buffer_space, get_trace_state_variable_value)
8329 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8330 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8331 EXTERN_C_PUSH/EXTERN_C_POP.
8332 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8333 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8334 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8335 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8336 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8337 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8338 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8339 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8340 Define.
8341 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8342 (IP_AGENT_EXPORT_VAR_DECL): Define.
8343 (tracing): Declare.
8344 (gdb_agent_get_raw_reg): Declare.
8345
fe978cb0
PA
83462015-02-27 Tom Tromey <tromey@redhat.com>
8347 Pedro Alves <palves@redhat.com>
8348
8349 Rename symbols whose names are reserved C++ keywords throughout.
8350
3bc3d82a
PA
83512015-02-27 Pedro Alves <palves@redhat.com>
8352
8353 * Makefile.in (COMPILER): New, get it from autoconf.
8354 (CXX): Get from autoconf instead.
8355 (COMPILE.pre): Use COMPILER.
8356 (CC-LD): Rename to ...
8357 (CC_LD): ... this. Use COMPILER.
8358 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8359 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8360 * acinclude.m4: Include build-with-cxx.m4.
8361 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8362 Disable -Werror by default if building in C++ mode.
8363 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8364 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8365 the C++ compiler. Save/restore CXXFLAGS too.
8366 * configure: Regenerate.
8367
07697489
PA
83682015-02-27 Pedro Alves <palves@redhat.com>
8369
8370 * acinclude.m4: Include libiberty.m4.
8371 * configure.ac: Call libiberty_INIT.
8372 * config.in, configure: Regenerate.
8373
9beb7c4e
PA
83742015-02-26 Pedro Alves <palves@redhat.com>
8375
8376 * linux-low.c (linux_wait_1): When incrementing the PC past a
8377 program breakpoint always use the_low_target.breakpoint_len as
8378 increment, rather than the maximum between that and
8379 the_low_target.decr_pc_after_break.
8380
8090aef2
PA
83812015-02-23 Pedro Alves <palves@redhat.com>
8382
8383 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8384 thread was doing a step-over; always adjust the PC if
8385 we stepped over a permanent breakpoint.
8386 (linux_wait_1): If we stepped over breakpoint that was on top of a
8387 permanent breakpoint, manually advance the PC past it.
8388
bc9540e8
PA
83892015-02-23 Pedro Alves <palves@redhat.com>
8390
8391 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8392 modes.
8393 (x86_fill_gregset, x86_store_gregset): Use it when handling
8394 $orig_eax.
8395
2db9a427
PA
83962015-02-20 Pedro Alves <palves@redhat.com>
8397
8398 * thread-db.c: Include "nat/linux-procfs.h".
8399 (thread_db_init): Skip listing new threads if the kernel supports
8400 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8401
afa8d396
PA
84022015-02-20 Pedro Alves <palves@redhat.com>
8403
8404 * linux-low.c (status_pending_p_callback): Use ptid_match.
8405
c9587f88
AT
84062015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8407
8408 PR breakpoints/16812
8409 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8410 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8411 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8412
b05ec7a5
AT
84132015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8414
8415 PR breakpoints/15956
8416 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8417
d33501a5
MM
84182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8419
8420 * linux-low.c (linux_low_btrace_conf): Print size.
8421 * server.c (handle_btrace_conf_general_set): New.
8422 (hanle_general_set): Call handle_btrace_conf_general_set.
8423 (handle_query): Report Qbtrace-conf:bts:size as supported.
8424
f4abbc16
MM
84252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8426
8427 * linux-low.c (linux_low_enable_btrace): Update parameters.
8428 (linux_low_btrace_conf): New.
8429 (linux_target_ops)<to_btrace_conf>: Initialize.
8430 * server.c (current_btrace_conf): New.
8431 (handle_btrace_enable): Rename to ...
8432 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8433 to target_enable_btrace. Update comment. Update users.
8434 (handle_qxfer_btrace_conf): New.
8435 (qxfer_packets): Add btrace-conf entry.
8436 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8437 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8438 (target_ops)<read_btrace_conf>: New.
8439 (target_enable_btrace): Update parameters.
8440 (target_read_btrace_conf): New.
8441
043c3577
MM
84422015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8443
8444 * server.c (handle_btrace_general_set): Remove call to
8445 target_supports_btrace.
8446 (supported_btrace_packets): New.
8447 (handle_query): Call supported_btrace_packets.
8448 * target.h: include btrace-common.h.
8449 (btrace_target_info): Removed.
8450 (supports_btrace, target_supports_btrace): Update parameters.
8451
734b0e4b
MM
84522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8453
8454 * Makefile.in (SFILES): Add common/btrace-common.c.
8455 (OBS): Add common/btrace-common.o.
8456 (btrace-common.o): Add build rules.
8457 * linux-low: Include btrace-common.h.
8458 (linux_low_read_btrace): Use struct btrace_data. Call
8459 btrace_data_init and btrace_data_fini.
8460
d6c146e9
PA
84612015-02-06 Pedro Alves <palves@redhat.com>
8462
8463 * thread-db.c (find_new_threads_callback): Add debug output.
8464
20ba1ce6
PA
84652015-02-04 Pedro Alves <palves@redhat.com>
8466
8467 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8468 (resume_stopped_resumed_lwps): New function.
8469 (linux_wait_for_event_filtered): Use it.
8470
8cc73a39
SDJ
84712015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8472
8473 * Makefile.in (SFILES): Add linux-personality.c.
8474 (linux-personality.o): New rule.
8475 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8476 list of objects to be built.
8477 * linux-low.c: Include nat/linux-personality.h.
8478 (linux_create_inferior): Remove code to disable address space
8479 randomization (moved to ../nat/linux-personality.c). Create
8480 cleanup to disable address space randomization.
8481
fb23d554
SDJ
84822015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8483
8484 * Makefile.in (posix-strerror.o): New rule.
8485 (mingw-strerror.o): Likewise.
8486 * configure: Regenerated.
8487 * configure.ac: Source file ../common/common.host. Initialize new
8488 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8489
cdf43629
YQ
84902015-01-14 Yao Qi <yao@codesourcery.com>
8491
8492 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8493 (ppc-linux.o): New rule.
8494 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8495 * configure.ac: AC_CHECK_FUNCS(getauxval).
8496 * config.in: Re-generated.
8497 * configure: Re-generated.
8498 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8499 ppc64_64bit_inferior_p
8500
514c5338
YQ
85012015-01-14 Yao Qi <yao@codesourcery.com>
8502
8503 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8504 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8505 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8506 (PT_ORIG_R3, PT_TRAP): Likewise.
8507 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8508 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8509 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8510
3368c1e5
JB
85112015-01-10 Joel Brobecker <brobecker@adacore.com>
8512
8513 * i387-fp.c (i387_cache_to_xsave): In look over
8514 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8515 zmmh_low_space field by use of zmmh_high_space.
8516
582511be
PA
85172015-01-09 Pedro Alves <palves@redhat.com>
8518
8519 * linux-low.c (step_over_bkpt): Move higher up in the file.
8520 (handle_extended_wait): Don't store the stop_pc here.
8521 (get_stop_pc): Adjust comments and rename to ...
8522 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8523 stopped for a software breakpoint or hardware breakpoint.
8524 (thread_still_has_status_pending_p): New function.
8525 (status_pending_p_callback): Use
8526 thread_still_has_status_pending_p. If the event is no longer
8527 interesting, resume the LWP.
8528 (handle_tracepoints): Add assert.
8529 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8530 (wstatus_maybe_breakpoint): New function.
8531 (cancel_breakpoint): Delete function.
8532 (check_stopped_by_watchpoint): New function, factored out from
8533 linux_low_filter_event.
8534 (lp_status_maybe_breakpoint): Delete function.
8535 (linux_low_filter_event): Remove filter_ptid argument.
8536 Leave thread group exits pending here. Store the LWP's stop PC.
8537 Always leave events pending.
8538 (linux_wait_for_event_filtered): Pull all events out of the
8539 kernel, and leave them all pending.
8540 (count_events_callback, select_event_lwp_callback): Consider all
8541 events.
8542 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8543 (select_event_lwp): Only give preference to the stepping LWP in
8544 all-stop mode. Adjust comments.
8545 (ignore_event): New function.
8546 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8547 references to cancel_breakpoints. Adjust to renames. Also give
8548 equal priority to all LWPs that have had events in non-stop mode.
8549 If reporting a software breakpoint event, unadjust the LWP's PC.
8550 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8551 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8552 Adjust.
8553 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8554 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8555 (linux_stopped_by_watchpoint): Adjust.
8556 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8557 * linux-low.h (enum lwp_stop_reason): New.
8558 (struct lwp_info) <stop_pc>: Adjust comment.
8559 <stopped_by_watchpoint>: Delete field.
8560 <stop_reason>: New field.
8561 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8562 * mem-break.c (software_breakpoint_inserted_here)
8563 (hardware_breakpoint_inserted_here): New function.
8564 * mem-break.h (software_breakpoint_inserted_here)
8565 (hardware_breakpoint_inserted_here): Declare.
8566 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8567 (cancel_breakpoints): Delete.
8568 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8569 (upload_fast_traceframes): Remove references to
8570 cancel_breakpoints.
8571
a33e3959
PA
85722015-01-09 Pedro Alves <palves@redhat.com>
8573
8574 * thread-db.c (find_new_threads_callback): Ignore thread if the
8575 kernel thread ID is -1.
8576
8784d563
PA
85772015-01-09 Pedro Alves <palves@redhat.com>
8578
8579 * linux-low.c (linux_attach_fail_reason_string): Move to
8580 nat/linux-ptrace.c, and rename.
8581 (linux_attach_lwp): Update comment.
8582 (attach_proc_task_lwp_callback): New function.
8583 (linux_attach): Adjust to rename and use
8584 linux_proc_attach_tgid_threads.
8585 (linux_attach_fail_reason_string): Delete declaration.
8586
76f2b779
JB
85872015-01-01 Joel Brobecker <brobecker@adacore.com>
8588
8589 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8590 * server.c (gdbserver_version): Likewise.
8591
fafcc06a
SDJ
85922014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8593
8594 * remote-utils.c: Include ctype.h.
8595 (input_interrupt): Explicitly handle the case when the char
8596 received is the NUL byte. Improve the printing of non-ASCII
8597 characters.
8598
beed38b8
JB
85992014-12-16 Joel Brobecker <brobecker@adacore.com>
8600
8601 * linux-low.c (linux_low_filter_event): Update call to
8602 linux_enable_event_reporting following the addition of
8603 a new parameter to that function.
8604
bf330350
CU
86052014-12-16 Catalin Udma <catalin.udma@freescale.com>
8606
8607 PR server/17457
8608 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8609 (AARCH64_FPCR_REGNO): Likewise.
8610 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8611 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8612 (aarch64_store_fpregset): Likewise.
8613
5227d625
JB
86142014-12-15 Joel Brobecker <brobecker@adacore.com>
8615
8616 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8617 Remove FIXME comment about assumption about N.
8618
f93b65a0
JB
86192014-12-13 Joel Brobecker <brobecker@adacore.com>
8620
8621 * configure.ac: If large-file support is disabled in GDBserver,
8622 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8623 * configure: Regenerate.
8624
e5a9158d
AA
86252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8626
8627 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8628 warning upon ENODATA from ptrace.
8629 * linux-s390-low.c (s390_store_tdb): New.
8630 (s390_regsets): Add regset for NT_S390_TDB.
8631
feea5f36
AA
86322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8633
8634 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8635 without a fill_function.
8636 * linux-s390-low.c (s390_fill_last_break): Remove.
8637 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8638 (s390_arch_setup): Use regset's size instead of fill_function for
8639 loop end condition.
8640
098dbe61
AA
86412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8642
8643 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8644 the regset's store function when ptrace returned an error.
8645 * regcache.c (get_thread_regcache): Invalidate register cache
8646 before fetching inferior's registers.
8647
28eef672
AA
86482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8649
8650 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8651 while-loop as for-loop.
8652 (regsets_store_inferior_registers): Likewise.
8653
bdca27a2
YQ
86542014-11-28 Yao Qi <yao@codesourcery.com>
8655
8656 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8657 * config.in, configure: Re-generate.
8658 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8659 is defined.
8660
9c232dda
YQ
86612014-11-21 Yao Qi <yao@codesourcery.com>
8662
8663 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8664 (AC_CHECK_HEADERS): Remove malloc.h.
8665 * configure: Re-generated.
8666 * config.in: Re-generated.
8667 * server.h: Don't include alloca.h and malloc.h.
8668 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8669 Don't include malloc.h.
8670
43968415
JB
86712014-11-17 Joel Brobecker <brobecker@adacore.com>
8672
8673 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8674 corresponding ERRNO check in same block.
8675
40e91bc7
PA
86762014-11-12 Pedro Alves <palves@redhat.com>
8677
8678 * server.c (cont_thread): Update comment.
8679 (start_inferior, attach_inferior): No longer clear cont_thread.
8680 (handle_v_cont): No longer set cont_thread.
8681 (captured_main): Clear cont_thread each time a GDB connects.
8682
c2c118cf
PA
86832014-11-12 Pedro Alves <palves@redhat.com>
8684
8685 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8686 thread, and don't resume all threads if the Hc thread has exited.
8687
78708b7c
PA
86882014-11-12 Pedro Alves <palves@redhat.com>
8689
8690 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8691 the process group instead of to a specific LWP.
8692
a2abc7de
PA
86932014-10-15 Pedro Alves <palves@redhat.com>
8694
8695 PR server/17487
8696 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8697 parameter.
8698 (arm_set_thread_context): Delete.
8699 (the_low_target): Adjust.
8700 * win32-i386-low.c (debug_registers_changed)
8701 (debug_registers_used): Delete.
8702 (update_debug_registers_callback): New function.
8703 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8704 needing to update their debug registers.
8705 (win32_get_current_dr): New function.
8706 (x86_dr_low_get_addr, x86_dr_low_get_control)
8707 (x86_dr_low_get_status): Fetch the debug register from the thread
8708 record's context.
8709 (i386_initial_stuff): Adjust.
8710 (i386_get_thread_context): Remove current_event parameter. Don't
8711 clear debug_registers_changed nor copy DR values to
8712 debug_reg_state.
8713 (i386_set_thread_context): Delete.
8714 (i386_prepare_to_resume): New function.
8715 (i386_thread_added): Mark the thread as needing to update irs
8716 debug registers.
8717 (the_low_target): Remove i386_set_thread_context and install
8718 i386_prepare_to_resume.
8719 * win32-low.c (win32_get_thread_context): Adjust.
8720 (win32_set_thread_context): Use SetThreadContext
8721 directly.
8722 (win32_prepare_to_resume): New function.
8723 (win32_require_context): New function, factored out from ...
8724 (thread_rec): ... this.
8725 (continue_one_thread): Call win32_prepare_to_resume on each thread
8726 we're about to continue.
8727 (win32_resume): Call win32_prepare_to_resume on the event thread.
8728 * win32-low.h (struct win32_thread_info)
8729 <debug_registers_changed>: New field.
8730 (struct win32_target_ops): Change prototype of set_thread_context,
8731 delete set_thread_context and add prepare_to_resume.
8732 (win32_require_context): New declaration.
8733
a442d071
GB
87342014-10-08 Gary Benson <gbenson@redhat.com>
8735
8736 * server.h: Do not include common-exceptions.h.
8737
6f1947e8
GB
87382014-10-08 Gary Benson <gbenson@redhat.com>
8739
8740 * server.h: Do not include cleanups.h.
8741
63b434a4
JH
87422014-09-30 James Hogan <james.hogan@imgtec.com>
8743
8744 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8745 mips64-dsp-linux.c.
8746
c4d9ceb6
YQ
87472014-09-23 Yao Qi <yao@codesourcery.com>
8748
8749 * linux-low.c (lp_status_maybe_breakpoint): New function.
8750 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8751 (count_events_callback): Likewise.
8752 (select_event_lwp_callback): Likewise.
8753 (cancel_breakpoints_callback): Likewise.
8754
89a5711c
DB
87552014-09-19 Don Breazeal <donb@codesourcery.com>
8756
8757 * linux-low.c (handle_extended_wait): Call
8758 linux_ptrace_get_extended_event.
8759 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8760 linux_is_extended_waitstatus.
8761
bffc0964
JB
87622014-09-16 Joel Brobecker <brobecker@adacore.com>
8763
8764 * Makefile.in (CPPFLAGS): Define.
8765 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8766 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8767
0bfdf32f
GB
87682014-09-16 Gary Benson <gbenson@redhat.com>
8769
8770 * inferiors.h (current_inferior): Renamed as...
8771 (current_thread): New variable. All uses updated.
8772 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8773 (maybe_move_out_of_jump_pad): Likewise.
8774 (cancel_breakpoint): Likewise.
8775 (linux_low_filter_event): Likewise.
8776 (wait_for_sigstop): Likewise.
8777 (linux_resume_one_lwp): Likewise.
8778 (need_step_over_p): Likewise.
8779 (start_step_over): Likewise.
8780 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8781 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8782 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8783 and save_inferior as saved_thread.
8784 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8785 saved_thread.
8786 (regcache_invalidate_thread): Likewise.
8787 * remote-utils.c (prepare_resume_reply): Likewise.
8788 * thread-db.c (thread_db_get_tls_address): Likewise.
8789 (disable_thread_event_reporting): Likewise.
8790 (remove_thread_event_breakpoints): Likewise.
8791 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8792 as saved_thread.
8793 * target.h (set_desired_inferior): Renamed as...
8794 (set_desired_thread): New declaration. All uses updated.
8795 * server.c (myresume): Updated comment to reference thread instead
8796 of inferior.
8797 (handle_serial_event): Likewise.
8798 (handle_target_event): Likewise.
8799
361c8ade
GB
88002014-09-12 Tom Tromey <tromey@redhat.com>
8801 Gary Benson <gbenson@redhat.com>
8802
8803 * regcache.h: Include common-regcache.h.
8804 (regcache_read_pc): Don't declare.
8805 * regcache.c (get_thread_regcache_for_ptid): New function.
8806
bd9269f7
GB
88072014-09-11 Tom Tromey <tromey@redhat.com>
8808 Gary Benson <gbenson@redhat.com>
8809
8810 * symbol.c: New file.
8811 * Makefile.in (SFILES): Add symbol.c.
8812 (OBS): Add symbol.o.
8813
f8c1d06b
GB
88142014-09-11 Gary Benson <gbenson@redhat.com>
8815
8816 * target.c (target_stop_ptid, target_continue_ptid): New
8817 functions.
8818
721ec300
GB
88192014-09-11 Tom Tromey <tromey@redhat.com>
8820 Gary Benson <gbenson@redhat.com>
8821
8822 * target.h: Include target/target.h.
8823 * target.c (target_read_memory, target_read_uint32)
8824 (target_write_memory): New functions.
8825
c5e92cca
GB
88262014-09-11 Gary Benson <gbenson@redhat.com>
8827
8828 * server.h (debug_hw_points): Don't declare.
8829 * server.c (debug_hw_points): Don't define. Replace all uses
8830 with show_debug_regs.
8831 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8832 all uses with show_debug_regs.
8833
2e4bb98a
EBM
88342014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8835
8836 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8837 endianness into account.
8838 (ppc_supply_ptrace_register): Likewise.
8839
ac740bc7
JH
88402014-09-03 James Hogan <james.hogan@imgtec.com>
8841
8842 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8843 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8844
97ea6506
GB
88452014-09-03 Gary Benson <gbenson@redhat.com>
8846
8847 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8848 ALL_DEBUG_ADDRESS_REGISTERS.
8849
df7e5265
GB
88502014-09-02 Gary Benson <gbenson@redhat.com>
8851
8852 * i386-low.h: Renamed as...
8853 * x86-low.h: New file. All type, function and variable name
8854 prefixes changed from "i386_" to "x86_". All references updated.
8855 * i386-low.c: Renamed as...
8856 * x86-low.c: New file. All type, function and variable name
8857 prefixes changed from "i386_" to "x86_". All references updated.
8858
ed859da7
GB
88592014-09-02 Gary Benson <gbenson@redhat.com>
8860
8861 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8862 (x86_linux_new_thread): Likewise.
8863
860789c7
GB
88642014-08-29 Gary Benson <gbenson@redhat.com>
8865
8866 * server.h (setjmp.h): Do not include.
8867 (toplevel): Do not declare.
8868 (common-exceptions.h): Include.
8869 (cleanups.h): Likewise.
8870 * server.c (toplevel): Do not define.
8871 (exit_code): New static global.
8872 (detach_or_kill_for_exit_cleanup): New function.
8873 (main): New function. Original main renamed to...
8874 (captured_main): New function.
8875 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8876
ff55e1b5
GB
88772014-08-29 Gary Benson <gbenson@redhat.com>
8878
8879 * Makefile.in (SFILES): Add common/common-exceptions.c.
8880 (OBS): Add common-exceptions.o.
8881 (common-exceptions.o): New rule.
8882 * utils.c (prepare_to_throw_exception): New function.
8883
e9bcb658
GB
88842014-08-29 Gary Benson <gbenson@redhat.com>
8885
8886 * config.in: Regenerate.
8887 * configure: Likewise.
8888
e3180625
GB
88892014-08-29 Gary Benson <gbenson@redhat.com>
8890
8891 * Makefile.in (SFILES): Add common/cleanups.c.
8892 (OBS): cleanups.o.
8893 (cleanups.o): New rule.
8894
e3d6ba5d
GB
88952014-08-29 Gary Benson <gbenson@redhat.com>
8896
8897 * utils.c (internal_vwarning): New function.
8898
7096e886
GB
88992014-08-28 Gary Benson <gbenson@redhat.com>
8900
8901 * utils.h (fatal): Remove declaration.
8902 * utils.c (fatal): Remove function.
8903
14ce3192
GB
89042014-08-28 Gary Benson <gbenson@redhat.com>
8905
8906 * tracepoint.c (gdb_agent_init): Replace fatal with
8907 perror_with_name.
8908 (initialize_tracepoint): Likewise.
8909
50278d59
GB
89102014-08-28 Gary Benson <gbenson@redhat.com>
8911
8912 * remote-utils.c (remote_prepare): Replace fatal with error.
8913
aa96c426
GB
89142014-08-28 Gary Benson <gbenson@redhat.com>
8915
8916 * linux-low.c (linux_async): Replace fatal with warning.
8917 Tidy up and return.
8918 (linux_start_non_stop): Return -1 if linux_async failed.
8919
f7160e97
GB
89202014-08-28 Gary Benson <gbenson@redhat.com>
8921
8922 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8923 gdb_assert.
8924 (i386_dr_low_get_addr): Remove vague comment.
8925 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8926 gdb_assert.
8927
38e08fca
GB
89282014-08-28 Gary Benson <gbenson@redhat.com>
8929
8930 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8931 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8932 internal_error.
8933 (linux_resume_one_lwp): Likewise.
8934 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8935 gdb_assert.
8936 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8937 with internal_error.
8938 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8939 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8940 (find_register_by_name): Replace fatal with internal_error.
8941 (find_regno): Likewise.
8942 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8943 * thread-db.c (thread_db_create_event): Likewise.
8944 (thread_db_load_search): Likewise.
8945 (try_thread_db_load_1): Likewise.
8946 * tracepoint.c (get_jump_space_head): Replace fatal with
8947 internal_error.
8948 (claim_trampoline_space): Likewise.
8949 (have_fast_tracepoint_trampoline_buffer): Likewise.
8950 (cmd_qtstart): Likewise.
8951 (stop_tracing): Likewise.
8952 (fast_tracepoint_collecting): Likewise.
8953 (target_malloc): Likewise.
8954 (download_tracepoint): Likewise.
8955 (download_trace_state_variables): Replace check with gdb_assert.
8956 (upload_fast_traceframes): Replace fatal with internal_error.
8957
34abf635
GB
89582014-08-19 Tom Tromey <tromey@redhat.com>
8959 Gary Benson <gbenson@redhat.com>
8960
8961 * Makefile.in (SFILES): Add common/common-debug.c.
8962 (OBS): Add common-debug.o.
8963 (common-debug.o): New rule.
8964 * debug.h (debug_printf): Don't declare.
8965 * debug.c (debug_printf): Renamed and rewritten as...
8966 (debug_vprintf): New function.
8967
f6e94d78
GB
89682014-08-19 Gary Benson <gbenson@redhat.com>
8969
8970 * utils.h: Do not include print-utils.h.
8971
9239eeab
GB
89722014-08-19 Tom Tromey <tromey@redhat.com>
8973 Gary Benson <gbenson@redhat.com>
8974
8975 * server.h: Add static assertion.
8976 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8977
ef87c8bb
GB
89782014-08-19 Tom Tromey <tromey@redhat.com>
8979 Gary Benson <gbenson@redhat.com>
8980
8981 * Makefile.in (SFILES): Add common/errors.c.
8982 (OBS): Add errors.o.
8983 (IPA_OBS): Add errors-ipa.o.
8984 (errors.o): New rule.
8985 (errors-ipa.o): Likewise.
8986 * utils.h (perror_with_name, error, warning): Don't declare.
8987 * utils.c (warning): Renamed and rewritten as...
8988 (vwarning): New function.
8989 (error): Renamed and rewritten as...
8990 (verror): New function.
8991 (internal_error): Renamed and rewritten as...
8992 (internal_verror): New function.
8993
bb974a24
GB
89942014-08-07 Gary Benson <gbenson@redhat.com>
8995
8996 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8997 * configure: Regenerate.
8998 * config.in: Likewise.
8999 * server.h: Do not include errno.h.
9000 * event-loop.c: Likewise.
9001 * hostio-errno.c: Likewise.
9002 * linux-low.c: Likewise.
9003 * remote-utils.c: Likewise.
9004 * spu-low.c: Likewise.
9005 * utils.c: Likewise.
9006 * gdbreplay.c: Unconditionally include errno.h.
9007
6d3d12eb
GB
90082014-08-07 Gary Benson <gbenson@redhat.com>
9009
9010 * server.h: Do not include string.h.
9011 * event-loop.c: Likewise.
9012 * linux-low.c: Likewise.
9013 * regcache.c: Likewise.
9014 * remote-utils.c: Likewise.
9015 * spu-low.c: Likewise.
9016 * utils.c: Likewise.
9017
dccbb609
GB
90182014-08-07 Gary Benson <gbenson@redhat.com>
9019
9020 * server.h: Do not include gdb_assert.h.
9021
e76df0d0
GB
90222014-08-07 Gary Benson <gbenson@redhat.com>
9023
9024 * server.h: Do not include common-utils.h.
9025
4cb9c816
GB
90262014-08-07 Gary Benson <gbenson@redhat.com>
9027
9028 * server.h: Do not include ptid.h.
9029 * notif.h: Likewise.
9030
3995eeee
GB
90312014-08-07 Gary Benson <gbenson@redhat.com>
9032
9033 * server.h: Do not include gdb_locale.h.
9034
cb9f1a9b
GB
90352014-08-07 Gary Benson <gbenson@redhat.com>
9036
9037 * server.h: Do not include gdb/signals.h.
9038 * win32-low.c: Likewise.
9039
a5fceff8
GB
90402014-08-07 Gary Benson <gbenson@redhat.com>
9041
9042 * server.h: Do not include pathmax.h.
9043
b9391142
GB
90442014-08-07 Gary Benson <gbenson@redhat.com>
9045
9046 * server.h: Do not include libiberty.h.
9047 * linux-bfin-low.c: Likewise.
9048
0e443c87
GB
90492014-08-07 Gary Benson <gbenson@redhat.com>
9050
9051 * server.h: Do not include ansidecl.h.
9052
8ebb3f56
GB
90532014-08-07 Gary Benson <gbenson@redhat.com>
9054
9055 * linux-x86-low.c: Do not include stddef.h.
9056 * lynx-ppc-low.c: Likewise.
9057 * tracepoint.c: Likewise.
9058
8980bdf6
GB
90592014-08-07 Gary Benson <gbenson@redhat.com>
9060
9061 * server.h: Do not include stdarg.h.
9062 * nto-low.c: Likewise.
9063
d7096f71
GB
90642014-08-07 Gary Benson <gbenson@redhat.com>
9065
9066 * server.h: Do not include stdlib.h.
9067 * inferiors.c: Likewise.
9068 * linux-low.c: Likewise.
9069 * regcache.c: Likewise.
9070 * spu-low.c: Likewise.
9071 * tracepoint.c: Likewise.
9072 * utils.c: Likewise.
9073
d02f550d
GB
90742014-08-07 Gary Benson <gbenson@redhat.com>
9075
9076 * server.h: Do not include stdio.h.
9077 * linux-low.c: Likewise.
9078 * remote-utils.c: Likewise.
9079 * spu-low.c: Likewise.
9080 * utils.c: Likewise.
9081 * wincecompat.c: Likewise.
9082
87f6c4e3
GB
90832014-08-06 Gary Benson <gbenson@redhat.com>
9084
9085 * regcache.c (init_register_cache): Move conditionals inside if.
9086
7089dca4
GB
90872014-08-06 Gary Benson <gbenson@redhat.com>
9088
9089 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9090
462f517e
GB
90912014-07-31 Gary Benson <gbenson@redhat.com>
9092
9093 * ax.h: Do not include server.h.
9094 * gdbthread.h: Likewise.
9095 * lynx-low.h: Likewise.
9096 * notif.h: Likewise.
9097
976411d6
GB
90982014-07-30 Gary Benson <gbenson@redhat.com>
9099
9100 * server.h: Include common-defs.h.
9101 Do not include config.h or build-gnulib-gdbserver/config.h.
9102
d41f6d8e
GB
91032014-07-30 Gary Benson <gbenson@redhat.com>
9104
9105 * hostio-errno.c: Move server.h to top of includes list.
9106 * inferiors.c: Likewise.
9107 * linux-x86-low.c: Likewise.
9108 * notif.c: Include server.h.
9109
314c6a35
TT
91102014-07-24 Tom Tromey <tromey@redhat.com>
9111 Gary Benson <gbenson@redhat.com>
9112
9113 * server.h (CORE_ADDR): Now unsigned.
9114
69ff6be5
PA
91152014-07-16 Pedro Alves <palves@redhat.com>
9116
9117 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9118
ce9e3fe7
PA
91192014-07-15 Pedro Alves <palves@redhat.com>
9120
9121 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9122 copy.
9123
e76126e8
PA
91242014-07-11 Pedro Alves <palves@redhat.com>
9125
9126 * linux-low.c (kill_wait_lwp): New function, based on
9127 kill_one_lwp_callback, but use my_waitpid directly.
9128 (kill_one_lwp_callback, linux_kill): Use it.
9129
8e9db26e
PA
91302014-06-23 Pedro Alves <palves@redhat.com>
9131
9132 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9133 before setting DR0..DR3.
9134
698b3e08
GB
91352014-06-20 Gary Benson <gbenson@redhat.com>
9136
9137 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9138 * configure: Regenerated.
9139 * config.in: Likewise.
9140
125f8a3d
GB
91412014-06-20 Gary Benson <gbenson@redhat.com>
9142
9143 * Makefile.in (SFILES): Update locations for files moved
9144 from common to nat.
9145 (object file files): Reordered.
9146
42995dbd
GB
91472014-06-20 Gary Benson <gbenson@redhat.com>
9148
9149 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9150 (i386_dr_low_set_addr): Likewise.
9151 (i386_dr_low_get_addr): Likewise.
9152 (i386_dr_low_can_set_control): Likewise.
9153 (i386_dr_low_set_control): Likewise.
9154 (i386_dr_low_get_control): Likewise.
9155 (i386_dr_low_get_status): Likewise.
9156 (i386_get_debug_register_length): Likewise.
9157 * linux-x86-low.c (i386_dr_low_set_addr):
9158 Changed signature. Made static.
9159 (i386_dr_low_get_addr): Likewise.
9160 (i386_dr_low_set_control): Likewise.
9161 (i386_dr_low_get_control): Likewise.
9162 (i386_dr_low_get_status): Likewise.
9163 (i386_dr_low): New global variable.
9164 * win32-i386-low.c (i386_dr_low_set_addr):
9165 Changed signature. Made static.
9166 (i386_dr_low_get_addr): Likewise.
9167 (i386_dr_low_set_control): Likewise.
9168 (i386_dr_low_get_control): Likewise.
9169 (i386_dr_low_get_status): Likewise.
9170 (i386_dr_low): New global variable.
9171
e1d2394b
MS
91722014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9173
9174 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9175 * Makefile.in (AR, AR_FLAGS): Define.
9176 * configure: Regenerate.
9177
3a8ee006
GB
91782014-06-19 Gary Benson <gbenson@redhat.com>
9179
9180 * Makefile.in (i386-dregs.o): New rule.
9181 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9182 * i386-low.c (target.h): Remove include.
9183 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9184 (DR_CONTROL_SHIFT): Likewise.
9185 (DR_CONTROL_SIZE): Likewise.
9186 (DR_RW_EXECUTE): Likewise.
9187 (DR_RW_WRITE): Likewise.
9188 (DR_RW_READ): Likewise.
9189 (DR_RW_IORW): Likewise.
9190 (DR_LEN_1): Likewise.
9191 (DR_LEN_2): Likewise.
9192 (DR_LEN_4): Likewise.
9193 (DR_LEN_8): Likewise.
9194 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9195 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9196 (DR_ENABLE_SIZE): Likewise.
9197 (DR_LOCAL_SLOWDOWN): Likewise.
9198 (DR_GLOBAL_SLOWDOWN): Likewise.
9199 (DR_CONTROL_RESERVED): Likewise.
9200 (I386_DR_CONTROL_MASK): Likewise.
9201 (I386_DR_VACANT): Likewise.
9202 (I386_DR_LOCAL_ENABLE): Likewise.
9203 (I386_DR_GLOBAL_ENABLE): Likewise.
9204 (I386_DR_DISABLE): Likewise.
9205 (I386_DR_SET_RW_LEN): Likewise.
9206 (I386_DR_GET_RW_LEN): Likewise.
9207 (I386_DR_WATCH_HIT): Likewise.
9208 (i386_wp_op_t): Likewise.
9209 (i386_show_dr): Likewise.
9210 (i386_length_and_rw_bits): Likewise.
9211 (i386_insert_aligned_watchpoint): Likewise.
9212 (i386_remove_aligned_watchpoint): Likewise.
9213 (i386_handle_nonaligned_watchpoint): Likewise.
9214 i386_update_inferior_debug_regs(): Likewise.
9215 (i386_dr_insert_watchpoint): Likewise.
9216 (i386_dr_remove_watchpoint): Likewise.
9217 (i386_dr_region_ok_for_watchpoint): Likewise.
9218 (i386_dr_stopped_data_address): Likewise.
9219 (i386_dr_stopped_by_watchpoint): Likewise.
9220
8f26655c
GB
92212014-06-19 Gary Benson <gbenson@redhat.com>
9222
9223 * i386-low.c (i386_dr_show): Renamed to
9224 i386_show_dr and made static. All uses updated.
9225 (i386_dr_length_and_rw_bits): Renamed to
9226 i386_length_and_rw_bits and made static.
9227 All uses updated.
9228 (i386_dr_insert_aligned_watchpoint): Renamed to
9229 i386_insert_aligned_watchpoint and made static.
9230 All uses updated.
9231 (i386_dr_remove_aligned_watchpoint): Renamed to
9232 i386_remove_aligned_watchpoint and made static.
9233 All uses updated.
9234 (i386_dr_update_inferior_debug_regs): Renamed to
9235 i386_update_inferior_debug_regs and made static.
9236 All uses updated.
9237
b9228891
GB
92382014-06-18 Gary Benson <gbenson@redhat.com>
9239
5171def3
GB
9240 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9241 (i386_dr_low_can_set_control): Likewise.
9242 (i386_get_debug_register_length): Likewise.
9243 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9244 (i386_dr_low_can_set_control): Likewise.
9245 (i386_get_debug_register_length): Likewise.
9246
92472014-06-17 Gary Benson <gbenson@redhat.com>
9248
b9228891
GB
9249 * i386-low.h (i386-dregs.h): New include.
9250 (DR_FIRSTADDR): Now in i386-dregs.h.
9251 (DR_LASTADDR): Likewise.
9252 (DR_NADDR): Likewise.
9253 (DR_STATUS): Likewise.
9254 (DR_CONTROL): Likewise.
9255 (i386_debug_reg_state): Likewise.
9256 (i386_dr_insert_watchpoint): Likewise.
9257 (i386_dr_remove_watchpoint): Likewise.
9258 (i386_dr_region_ok_for_watchpoint): Likewise.
9259 (i386_dr_stopped_data_address): Likewise.
9260 (i386_dr_stopped_by_watchpoint): Likewise.
9261 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9262
4be83cc2
GB
92632014-06-18 Gary Benson <gbenson@redhat.com>
9264
9265 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9266 i386_dr_insert_watchpoint.
9267 (i386_low_remove_watchpoint): Renamed to
9268 i386_dr_remove_watchpoint.
9269 (i386_low_region_ok_for_watchpoint): Renamed to
9270 i386_dr_region_ok_for_watchpoint.
9271 (i386_low_stopped_data_address): Renamed to
9272 i386_dr_stopped_data_address.
9273 (i386_low_stopped_by_watchpoint): Renamed to
9274 i386_dr_stopped_by_watchpoint.
9275 * i386-low.c (i386_show_dr): Renamed to
9276 i386_dr_show and made nonstatic. All uses updated.
9277 (i386_length_and_rw_bits): Renamed to
9278 i386_dr_length_and_rw_bits and made nonstatic.
9279 All uses updated.
9280 (i386_insert_aligned_watchpoint): Renamed to
9281 i386_dr_insert_aligned_watchpoint and made nonstatic.
9282 All uses updated.
9283 (i386_remove_aligned_watchpoint): Renamed to
9284 i386_dr_remove_aligned_watchpoint and made nonstatic.
9285 All uses updated.
9286 (i386_update_inferior_debug_regs): Renamed to
9287 i386_dr_update_inferior_debug_regs and made nonstatic.
9288 All uses updated.
9289 (i386_low_insert_watchpoint): Renamed to
9290 i386_dr_insert_watchpoint. All uses updated.
9291 (i386_low_remove_watchpoint): Renamed to
9292 i386_dr_remove_watchpoint. All uses updated.
9293 (i386_low_region_ok_for_watchpoint): Renamed to
9294 i386_dr_region_ok_for_watchpoint. All uses updated.
9295 (i386_low_stopped_data_address): Renamed to
9296 i386_dr_stopped_data_address. All uses updated.
9297 (i386_low_stopped_by_watchpoint): Renamed to
9298 i386_dr_stopped_by_watchpoint. All uses updated.
9299
131aa0d4
GB
93002014-06-18 Gary Benson <gbenson@redhat.com>
9301
9302 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9303 (i386_dr_low_can_set_control): Likewise.
9304 (i386_insert_aligned_watchpoint): New check.
9305
d9305f7f
GB
93062014-06-18 Gary Benson <gbenson@redhat.com>
9307
9308 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9309 Renamed to state.
9310
e927c9fc
GB
93112014-06-18 Gary Benson <gbenson@redhat.com>
9312
9313 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9314 instead of fatal and error.
9315 (i386_handle_nonaligned_watchpoint): Likewise.
9316
1b6d4134
GB
93172014-06-18 Gary Benson <gbenson@redhat.com>
9318
9319 * i386-low.c (i386_get_debug_register_length): New macro.
9320 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9321 (i386_show_dr): Use debug_printf instead of fprintf. Use
9322 phex to format values.
9323
6e62758f
GB
93242014-06-18 Gary Benson <gbenson@redhat.com>
9325
9326 * i386-low.h: Comment changes.
9327 * i386-low.c: Likewise.
9328
fc6e2f03
GB
93292014-06-18 Gary Benson <gbenson@redhat.com>
9330
9331 * i386-low.c: Whitespace changes.
9332
f9d1eeed
TT
93332014-06-12 Tom Tromey <tromey@redhat.com>
9334
9335 * utils.c (freeargv): Remove.
9336
0b04e523
TT
93372014-06-12 Tom Tromey <tromey@redhat.com>
9338
9339 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9340 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9341 (parse_debug_format_options): Likewise.
9342 (gdbserver_usage): Likewise.
9343 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9344 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9345 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9346 against libiberty.
9347 ($(LIBGNU)): Depend on libiberty.
9348 (all-lib): Recurse into all subdirs.
9349 (install-only): Invoke "install" target in subdirs.
9350 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9351 targets.
9352 * configure: Rebuild.
9353 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9354 for vasprintf, vsnprintf, or gettimeofday.
9355 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9356 srv_tgtobj.
9357
270c9937
JB
93582014-06-05 Joel Brobecker <brobecker@adacore.com>
9359
9360 * development.sh: Delete.
9361 * Makefile.in (config.status): Adjust dependency on development.sh.
9362 * configure.ac: Adjust development.sh source call.
9363 * configure: Regenerate.
9364
0a261ed8
PA
93652014-06-02 Pedro Alves <palves@redhat.com>
9366
9367 * ax.c (gdb_free_agent_expr): New function.
9368 * ax.h (gdb_free_agent_expr): New declaration.
9369 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9370 list.
9371 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9372 static.
9373 (clear_breakpoint_conditions_and_commands): New function.
9374 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9375 (clear_breakpoint_conditions_and_commands): New declaration.
9376
e9dae05e
RR
93772014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9378
9379 * linux-aarch64-low.c (asm/ptrace.h): Include.
9380
5876f503
JK
93812014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9382
9383 Fix TLS access for -static -pthread.
9384 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9385 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9386 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9387
802e8e6d
PA
93882014-05-20 Pedro Alves <palves@redhat.com>
9389
9390 * linux-aarch64-low.c (aarch64_insert_point)
9391 (aarch64_remove_point): No longer check whether the type is
9392 supported here. Adjust to new interface.
9393 (the_low_target): Install aarch64_supports_z_point_type as
9394 supports_z_point_type method.
9395 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9396 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9397 instead of a Z packet char. Adjust.
9398 (arm_supports_z_point_type): New function.
9399 (arm_insert_point, arm_remove_point): Adjust to new interface.
9400 (the_low_target): Install arm_supports_z_point_type.
9401 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9402 (cris_insert_point, cris_remove_point): Adjust to new interface.
9403 Don't check whether the type is supported here.
9404 (the_low_target): Install cris_supports_z_point_type.
9405 * linux-low.c (linux_supports_z_point_type): New function.
9406 (linux_insert_point, linux_remove_point): Adjust to new interface.
9407 * linux-low.h (struct linux_target_ops) <insert_point,
9408 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9409 raw_breakpoint pointer parameter.
9410 <supports_z_point_type>: New method.
9411 * linux-mips-low.c (mips_supports_z_point_type): New function.
9412 (mips_insert_point, mips_remove_point): Adjust to new interface.
9413 Use mips_supports_z_point_type.
9414 (the_low_target): Install mips_supports_z_point_type.
9415 * linux-ppc-low.c (the_low_target): Install NULL as
9416 supports_z_point_type method.
9417 * linux-s390-low.c (the_low_target): Install NULL as
9418 supports_z_point_type method.
9419 * linux-sparc-low.c (the_low_target): Install NULL as
9420 supports_z_point_type method.
9421 * linux-x86-low.c (x86_supports_z_point_type): New function.
9422 (x86_insert_point): Adjust to new insert_point interface. Use
9423 insert_memory_breakpoint. Adjust to new
9424 i386_low_insert_watchpoint interface.
9425 (x86_remove_point): Adjust to remove_point interface. Use
9426 remove_memory_breakpoint. Adjust to new
9427 i386_low_remove_watchpoint interface.
9428 (the_low_target): Install x86_supports_z_point_type.
9429 * lynx-low.c (lynx_target_ops): Install NULL as
9430 supports_z_point_type callback.
9431 * nto-low.c (nto_supports_z_point_type): New.
9432 (nto_insert_point, nto_remove_point): Adjust to new interface.
9433 (nto_target_ops): Install nto_supports_z_point_type.
9434 * mem-break.c: Adjust intro comment.
9435 (struct raw_breakpoint) <raw_type, size>: New fields.
9436 <inserted>: Update comment.
9437 <shlib_disabled>: Delete field.
9438 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9439 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9440 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9441 (raw_bkpt_type_to_target_hw_bp_type): New function.
9442 (find_enabled_raw_code_breakpoint_at): New function.
9443 (find_raw_breakpoint_at): New type and size parameters. Use them.
9444 (insert_memory_breakpoint): New function, based off
9445 set_raw_breakpoint_at.
9446 (remove_memory_breakpoint): New function.
9447 (set_raw_breakpoint_at): Reimplement.
9448 (set_breakpoint): New, based on set_breakpoint_at.
9449 (set_breakpoint_at): Reimplement.
9450 (delete_raw_breakpoint): Go through the_target->remove_point
9451 instead of assuming memory breakpoints.
9452 (find_gdb_breakpoint_at): Delete.
9453 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9454 (find_gdb_breakpoint): New function.
9455 (set_gdb_breakpoint_at): Delete.
9456 (z_type_supported): New function.
9457 (set_gdb_breakpoint_1): New function, loosely based off
9458 set_gdb_breakpoint_at.
9459 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9460 (delete_gdb_breakpoint_at): Delete.
9461 (delete_gdb_breakpoint_1): New function, loosely based off
9462 delete_gdb_breakpoint_at.
9463 (delete_gdb_breakpoint): New function.
9464 (clear_gdb_breakpoint_conditions): Rename to ...
9465 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9466 breakpoint.
9467 (add_condition_to_breakpoint): Make static.
9468 (add_breakpoint_condition): Take a struct breakpoint pointer
9469 instead of an address. Adjust.
9470 (gdb_condition_true_at_breakpoint): Rename to ...
9471 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9472 z_type parameter.
9473 (gdb_condition_true_at_breakpoint): Reimplement.
9474 (add_breakpoint_commands): Take a struct breakpoint pointer
9475 instead of an address. Adjust.
9476 (gdb_no_commands_at_breakpoint): Rename to ...
9477 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9478 parameter. Return true if no breakpoint was found. Change debug
9479 output.
9480 (gdb_no_commands_at_breakpoint): Reimplement.
9481 (run_breakpoint_commands): Rename to ...
9482 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9483 and change return type to boolean.
9484 (run_breakpoint_commands): New function.
9485 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9486 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9487 breakpoint. Go through the_target->remove_point instead of
9488 assuming memory breakpoint.
9489 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9490 software and hardware breakpoints.
9491 (reinsert_raw_breakpoint): Go through the_target->insert_point
9492 instead of assuming memory breakpoint.
9493 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9494 software and hardware breakpoints.
9495 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9496 Check both software and hardware breakpoints.
9497 (validate_inserted_breakpoint): Assert the breakpoint is a
9498 software breakpoint. Set the inserted flag to -1 instead of
9499 setting shlib_disabled.
9500 (delete_disabled_breakpoints): Adjust.
9501 (validate_breakpoints): Only validate software breakpoints.
9502 Adjust to inserted flag change.
9503 (check_mem_read, check_mem_write): Skip breakpoint types other
9504 than software breakpoints. Adjust to inserted flag change.
9505 * mem-break.h (enum raw_bkpt_type): New enum.
9506 (raw_breakpoint, struct process_info): Forward declare.
9507 (Z_packet_to_target_hw_bp_type): Delete declaration.
9508 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9509 (set_gdb_breakpoint, delete_gdb_breakpoint)
9510 (clear_breakpoint_conditions): New declarations.
9511 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9512 (breakpoint_inserted_here): Update comment.
9513 (add_breakpoint_condition, add_breakpoint_commands): Replace
9514 address parameter with a breakpoint pointer parameter.
9515 (gdb_breakpoint_here): Update comment.
9516 (delete_gdb_breakpoint_at): Delete.
9517 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9518 * server.c (process_point_options): Take a struct breakpoint
9519 pointer instead of an address. Adjust.
9520 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9521 delete_gdb_breakpoint.
9522 * spu-low.c (spu_target_ops): Install NULL as
9523 supports_z_point_type method.
9524 * target.h: Include mem-break.h.
9525 (struct target_ops) <prepare_to_access_memory>: Update comment.
9526 <supports_z_point_type>: New field.
9527 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9528 instead of a char. Also take a raw breakpoint pointer.
9529 * win32-arm-low.c (the_low_target): Install NULL as
9530 supports_z_point_type.
9531 * win32-i386-low.c (i386_supports_z_point_type): New function.
9532 (i386_insert_point, i386_remove_point): Adjust to new interface.
9533 (the_low_target): Install i386_supports_z_point_type.
9534 * win32-low.c (win32_supports_z_point_type): New function.
9535 (win32_insert_point, win32_remove_point): Adjust to new interface.
9536 (win32_target_ops): Install win32_supports_z_point_type.
9537 * win32-low.h (struct win32_target_ops):
9538 <supports_z_point_type>: New method.
9539 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9540 instead of a char. Also take a raw breakpoint pointer.
9541
932539e3
PA
95422014-05-20 Pedro Alves <palves@redhat.com>
9543
9544 * mem-break.h: Include break-common.h.
9545 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9546 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9547 (Z_packet_to_target_hw_bp_type): New declaration.
9548 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9549 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9550 (Z_PACKET_ACCESS_WP): Delete macros.
9551 (Z_packet_to_hw_type): Delete function.
9552 * i386-low.h: Don't include break-common.h here.
9553 (Z_packet_to_hw_type): Delete declaration.
9554 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9555 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9556 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9557 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9558 * linux-aarch64-low.c: Don't include break-common.h here.
9559 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9560 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9561 (Z_packet_to_target_hw_bp_type): Delete function.
9562 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9563 function.
9564 (mips_insert_point, mips_remove_point): Use
9565 Z_packet_to_target_hw_bp_type.
9566
4ff0d3d8
PA
95672014-05-20 Pedro Alves <palves@redhat.com>
9568
9569 * linux-aarch64-low.c: Include break-common.h.
9570 (enum target_point_type): Delete.
9571 (Z_packet_to_point_type): Rename to ...
9572 (Z_packet_to_target_hw_bp_type): ... this, and return a
9573 target_hw_bp_type instead.
9574 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9575 instead of an enum target_point_type.
9576 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9577 breakpoint type.
9578 (aarch64_dr_state_insert_one_point)
9579 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9580 (aarch64_handle_aligned_watchpoint)
9581 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9582 Take an enum target_hw_bp_type instead of an enum
9583 target_point_type.
9584 (aarch64_supports_z_point_type): New function.
9585 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9586 use Z_packet_to_target_hw_bp_type.
9587
786dc519
JB
95882014-05-20 Joel Brobecker <brobecker@adacore.com>
9589
9590 * configure.ac: Only use -Werror by default when DEVELOPMENT
9591 is true.
9592 * configure: Regenerate.
9593
9e0aa64f
JK
95942014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9595
9596 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9597 * linux-x86-low.c (X86_64_USER_REGS): New.
9598 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9599
2b577b92
YQ
96002014-04-28 Yao Qi <yao@codesourcery.com>
9601
9602 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9603 name.
9604
94611da2
PA
96052014-04-25 Pedro Alves <palves@redhat.com>
9606
9607 PR server/16255
9608 * linux-low.c (linux_attach_fail_reason_string): New function.
9609 (linux_attach_lwp): Delete.
9610 (linux_attach_lwp_1): Rename to ...
9611 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9612 argument. Remove "initial" parameter. Return int instead of
9613 void. Don't error or warn here.
9614 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9615 failure to attach to the tgid. Call warning when failing to
9616 attach to an lwp.
9617 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9618 argument. Remove "initial" parameter. Return int instead of
9619 void. Don't error or warn here.
9620 (linux_attach_fail_reason_string): New declaration.
9621 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9622 interface change. Use linux_attach_fail_reason_string.
9623
01f9f808
MS
96242014-04-24 Michael Sturm <michael.sturm@mintel.com>
9625 Walfred Tedeschi <walfred.tedeschi@intel.com>
9626
9627 * Makefile.in: Added rules to handle new files
9628 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9629 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9630 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9631 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9632 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9633 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9634 x32-avx512-linux.o.
9635 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9636 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9637 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9638 i386/x32-avx512.xml.
9639 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9640 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9641 i386/x32-avx512-linux.xml.
9642 * i387-fp.c (num_avx512_k_registers): New constant for number
9643 of K registers.
9644 (num_avx512_zmmh_low_registers): New constant for number of
9645 lower ZMM registers (0-15).
9646 (num_avx512_zmmh_high_registers): New constant for number of
9647 higher ZMM registers (16-31).
9648 (num_avx512_ymmh_registers): New contant for number of higher
9649 YMM registers (ymm16-31 added by avx521 on x86_64).
9650 (num_avx512_xmm_registers): New constant for number of higher
9651 XMM registers (xmm16-31 added by AVX512 on x86_64).
9652 (struct i387_xsave): Add space for AVX512 registers.
9653 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9654 Add code to handle AVX512 registers.
9655 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9656 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9657 prototypei from generated file.
9658 (tdesc_amd64_avx512_linux): Likewise.
9659 (init_registers_x32_avx512_linux): Likewise.
9660 (tdesc_x32_avx512_linux): Likewise.
9661 (init_registers_i386_avx512_linux): Likewise.
9662 (tdesc_i386_avx512_linux): Likewise.
9663 (x86_64_regmap): Add AVX512 registers.
9664 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9665 mask.
9666 (initialize_low_arch): Add code to initialize AVX512 registers.
9667
51aa91f9
PA
96682014-04-23 Pedro Alves <palves@redhat.com>
9669
9670 * mem-break.c (find_gdb_breakpoint_at): Make static.
9671 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9672
a4165e94
PA
96732014-04-23 Pedro Alves <palves@redhat.com>
9674
9675 * i386-low.c: Don't include break-common.h here.
9676 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9677 prototype to take target_hw_bp_type as argument instead of a Z
9678 packet char.
9679 * i386-low.h: Include break-common.h here.
9680 (Z_packet_to_hw_type): Declare.
9681 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9682 prototypes.
9683 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9684 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9685 (x86_remove_point): Convert the packet number to a
9686 target_hw_bp_type before calling i386_low_remove_watchpoint.
9687 * win32-i386-low.c (i386_insert_point): Convert the packet number
9688 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9689 (i386_remove_point): Convert the packet number to a
9690 target_hw_bp_type before calling i386_low_remove_watchpoint.
9691
b8acf843
PA
96922014-04-23 Pedro Alves <palves@redhat.com>
9693
9694 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9695
d708bcd1
PA
96962014-04-10 Pedro Alves <palves@redhat.com>
9697
9698 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9699 Check if the condition or command is NULL before checking if the
9700 breakpoint is known. On success, return true.
9701 * mem-break.h (add_breakpoint_condition): Document return.
9702 (add_breakpoint_commands): Add describing comment.
9703 * server.c (skip_to_semicolon): New function.
9704 (process_point_options): Use it.
9705
2eec7d5b
PA
97062014-04-09 Pedro Alves <palves@redhat.com>
9707
9708 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9709 to lwpid_of.
9710
fa96cb38
PA
97112014-02-27 Pedro Alves <palves@redhat.com>
9712
9713 PR 12702
9714 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9715 macros.
9716 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9717 output.
9718 (last_thread_of_process_p): Take a PID argument instead of a
9719 thread pointer.
9720 (linux_wait_for_lwp): Delete.
9721 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9722 functions.
9723 (linux_low_filter_event): New function, party factored out from
9724 linux_wait_for_event.
9725 (linux_wait_for_event): Rename to ...
9726 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9727 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9728 sigsuspend. Check for zombie leaders.
9729 (linux_wait_for_event): Reimplement as wrapper around
9730 linux_wait_for_event_filtered.
9731 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9732 a normal or signal exit is seen, it's the whole process exiting.
9733 (wait_for_sigstop): No longer a for_each_inferior callback.
9734 Rewrite on top of linux_wait_for_event_filtered.
9735 (stop_all_lwps): Call wait_for_sigstop directly.
9736 * server.c (resume, handle_target_event): Handle
9737 TARGET_WAITKIND_NO_RESUMED.
9738
d763de10
JB
97392014-02-26 Joel Brobecker <brobecker@adacore.com>
9740
9741 * win32-low.c (psapi_get_dll_name,
9742 * win32_CreateToolhelp32Snapshot): Delete.
9743 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9744 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9745 Delete.
9746 (handle_load_dll): Add function description.
9747 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9748
850a0f76
JB
97492014-02-26 Joel Brobecker <brobecker@adacore.com>
9750
9751 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9752 Add comment.
9753 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9754 base address when calling win32_add_one_solib.
9755 (handle_load_dll): Delete local variable load_addr.
9756 Remove 0x1000 offset applied to DLL base address when calling
9757 win32_add_one_solib.
9758 (handle_unload_dll): Add comment.
9759
f25b3fc3
JB
97602014-02-26 Joel Brobecker <brobecker@adacore.com>
9761
9762 * win32-low.c (win32_add_all_dlls): Renames
9763 win32_ensure_ntdll_loaded. Rewrite function documentation.
9764 Adjust implementation to always load all DLLs.
9765 Add 0x1000 offset to DLL base address when calling
9766 win32_add_one_solib.
9767 (child_initialization_done): New static global.
9768 (do_initial_child_stuff): Set child_initialization_done to
9769 zero during child initialization, and 1 after. Replace call
9770 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9771 Add comment.
9772 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9773 (handle_unload_dll): Add function documentation.
9774 (get_child_debug_event): Ignore load and unload DLL events
9775 during child initialization.
9776
d86d4aaf
DE
97772014-02-20 Doug Evans <dje@google.com>
9778
3bc32da3 9779 Remove global all_lwps.
d86d4aaf
DE
9780 * inferiors.h (ptid_of): Move here from linux-low.h.
9781 (pid_of, lwpid_of): Ditto.
9782 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9783 parameter is a struct thread_info * now.
9784 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9785 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9786 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9787 directly.
9788 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9789 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9790 * linux-arm-low.c (update_registers_callback): Update, "entry"
9791 parameter is a struct thread_info * now.
9792 Fetch lwpid from current_inferior directly.
9793 (arm_insert_point): Pass &all_threads to find_inferior instead of
9794 &all_lwps.
9795 (arm_remove_point): Ditto.
9796 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9797 (arm_prepare_to_resume): Fetch pid from thread.
9798 (arm_read_description): Fetch lwpid from current_inferior directly.
9799 * linux-low.c (all_lwps): Delete.
9800 (delete_lwp): Delete call to remove_inferior.
9801 (handle_extended_wait): Fetch lwpid from thread.
9802 (add_lwp): Don't set lwp->entry.id. Remove call to
9803 add_inferior_to_list.
9804 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9805 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9806 (kill_one_lwp_callback): Ditto.
9807 (linux_kill): Don't dereference NULL pointer.
9808 Fetch ptid,lwpid from thread.
9809 (get_detach_signal): Fetch ptid from thread.
9810 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9811 Simplify call to regcache_invalidate_thread.
9812 (delete_lwp_callback): Update, "entry" parameter is a
9813 struct thread_info * now. Fetch pid from thread.
9814 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9815 (status_pending_p_callback): Update, "entry" parameter is a
9816 struct thread_info * now. Fetch ptid from thread.
9817 (find_lwp_pid): Update, "entry" parameter is a
9818 struct thread_info * now.
9819 (linux_wait_for_lwp): Fetch pid from thread.
9820 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9821 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9822 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9823 (dequeue_one_deferred_signal): Ditto.
9824 (cancel_breakpoint): Fetch ptid from current_inferior.
9825 (linux_wait_for_event): Pass &all_threads to find_inferior,
9826 not &all_lwps. Fetch ptid, lwpid from thread.
9827 (count_events_callback): Update, "entry" parameter is a
9828 struct thread_info * now.
9829 (select_singlestep_lwp_callback): Ditto.
9830 (select_event_lwp_callback): Ditto.
9831 (cancel_breakpoints_callback): Ditto.
9832 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9833 not &all_lwps.
9834 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9835 (unsuspend_one_lwp): Update, "entry" parameter is a
9836 struct thread_info * now.
9837 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9838 not &all_lwps.
9839 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9840 Fetch lwpid from thread, not lwp.
9841 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9842 Pass &all_threads to find_inferior, not &all_lwps.
9843 (send_sigstop): Fetch lwpid from thread, not lwp.
9844 (send_sigstop_callback): Update, "entry" parameter is a
9845 struct thread_info * now.
9846 (suspend_and_send_sigstop_callback): Ditto.
9847 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9848 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9849 struct thread_info * now.
9850 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9851 from thread, lwp.
9852 (lwp_running): Update, "entry" parameter is a
9853 struct thread_info * now.
9854 (stop_all_lwps): Fetch ptid from thread.
9855 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9856 (linux_resume_one_lwp): Fetch lwpid from thread.
9857 (linux_set_resume_request): Update, "entry" parameter is a
9858 struct thread_info * now. Fetch pid, lwpid from thread.
9859 (resume_status_pending_p): Update, "entry" parameter is a
9860 struct thread_info * now.
9861 (need_step_over_p): Ditto. Fetch lwpid from thread.
9862 (start_step_over): Fetch lwpid from thread.
9863 (linux_resume_one_thread): Update, "entry" parameter is a
9864 struct thread_info * now. Fetch lwpid from thread.
9865 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9866 (proceed_one_lwp): Update, "entry" parameter is a
9867 struct thread_info * now. Fetch lwpid from thread.
9868 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9869 struct thread_info * now.
9870 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9871 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9872 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9873 directly.
9874 (regsets_store_inferior_registers): Ditto.
9875 (fetch_register, store_register): Ditto.
9876 (linux_read_memory, linux_write_memory): Ditto.
9877 (linux_request_interrupt): Ditto.
9878 (linux_read_auxv): Ditto.
9879 (linux_xfer_siginfo): Ditto.
9880 (linux_qxfer_spu): Ditto.
9881 (linux_qxfer_libraries_svr4): Ditto.
9882 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9883 moved to inferiors.h.
9884 (get_lwp): Delete.
9885 (get_thread_lwp): Update.
9886 (struct lwp_info): Delete member "entry". Simplify comment for
9887 member "thread".
9888 (all_lwps): Delete.
9889 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9890 current_inferior directly.
9891 (update_watch_registers_callback): Update, "entry" parameter is a
9892 struct thread_info * now. Fetch pid from thread.
9893 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9894 (mips_insert_point): Fetch lwpid from current_inferior.
9895 Pass &all_threads to find_inferior, not &all_lwps.
9896 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9897 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9898 directly.
9899 (mips_stopped_data_address): Ditto.
9900 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9901 directly.
9902 * linux-tile-low.c (tile_arch_setup): Ditto.
9903 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9904 (update_debug_registers_callback): Update, "entry" parameter is a
9905 struct thread_info * now. Fetch pid from thread.
9906 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9907 Pass &all_threads to find_inferior, not &all_lwps.
9908 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9909 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9910 Pass &all_threads to find_inferior, not &all_lwps.
9911 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9912 (i386_dr_low_get_status): Ditto.
9913 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9914 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9915 (x86_linux_read_description): Ditto.
9916 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9917
3b8361aa
DE
99182014-02-20 Doug Evans <dje@google.com>
9919
9920 * inferiors.c (get_first_inferior): Fix buglet.
9921
f7667f0d
DE
99222014-02-19 Doug Evans <dje@google.com>
9923
9924 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9925 * inferiors.c (add_thread): Change result type to struct thread_info *.
9926 All callers updated.
9927 (add_lwp): Call add_thread here instead of in callers.
9928 All callers updated.
9929 * linux-low.h (get_lwp_thread): Rewrite.
9930 (struct lwp_info): New member "thread".
9931
b3312d80
DE
99322014-02-19 Doug Evans <dje@google.com>
9933
9934 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9935 All callers updated.
9936
ecc6f45c
DE
99372014-02-19 Doug Evans <dje@google.com>
9938
9939 * inferiors.c (add_thread): Fix whitespace.
9940
649ebbca
DE
99412014-02-19 Doug Evans <dje@google.com>
9942
9943 * dll.c (clear_dlls): Replace accessing list implemention details
9944 with API function.
9945 * gdbthread.h (get_first_thread): Declare.
9946 * inferiors.c (for_each_inferior_with_data): New function.
9947 (get_first_thread): New function.
9948 (find_thread_ptid): Simplify.
9949 (get_first_inferior): New function.
9950 (clear_list): Delete.
9951 (one_inferior_p): New function.
9952 (clear_inferior_list): New function.
9953 (clear_inferiors): Update.
9954 * inferiors.h (for_each_inferior_with_data): Declare.
9955 (clear_inferior_list): Declare.
9956 (one_inferior_p): Declare.
9957 (get_first_inferior): Declare.
9958 * linux-low.c (linux_wait_for_event): Replace accessing list
9959 implemention details with API function.
9960 * server.c (target_running): Ditto.
9961 (accumulate_file_name_length): New function.
9962 (emit_dll_description): New function.
9963 (handle_qxfer_libraries): Replace accessing list implemention
9964 details with API function.
9965 (handle_qxfer_threads_worker): New function.
9966 (handle_qxfer_threads_proper): Replace accessing list implemention
9967 details with API function.
9968 (handle_query): Ditto.
9969 (visit_actioned_threads_callback_ftype): New typedef.
9970 (visit_actioned_threads_data): New struct.
9971 (visit_actioned_threads): Rewrite to be find_inferior callback.
9972 (resume): Call find_inferior.
9973 (handle_status): Replace accessing list implemention
9974 details with API function.
9975 (process_serial_event): Replace accessing list implemention details
9976 with API function.
9977 * target.c (set_desired_inferior): Replace accessing list implemention
9978 details with API function.
9979 * tracepoint.c (same_process_p): New function.
9980 (gdb_agent_about_to_close): Replace accessing list implemention
9981 details with API function.
9982 * win32-low.c (child_delete_thread): Replace accessing list
9983 implemention details with API function.
9984 (match_dll_by_basename): New function.
9985 (dll_is_loaded_by_basename): New function.
9986 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9987 details call to dll_is_loaded_by_basename.
9988
80894984
DE
99892014-02-19 Doug Evans <dje@google.com>
9990
9991 * dll.h (struct dll_info): Add comment.
9992 * gdbthread.h (struct thread_info): Add comment.
9993 (current_ptid): Simplify.
9994 * inferiors.c (add_process): Update.
9995 (remove_process): Update.
9996 * inferiors.h (struct process_info): Rename member "head" to "entry".
9997 * linux-low.c (delete_lwp): Update.
9998 (add_lwp): Update.
9999 (last_thread_of_process_p): Update.
10000 (kill_one_lwp_callback, linux_kill): Update.
10001 (status_pending_p_callback): Update.
10002 (wait_for_sigstop): Update. Simplify read of ptid.
10003 (start_step_over): Update.
10004 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10005 (get_lwp_thread): Update.
10006 (struct lwp_info): Rename member "head" to "entry".
10007 * regcache.h (inferior_list_entry): Delete.
10008 * server.c (kill_inferior_callback): Update.
10009 (detach_or_kill_inferior_callback): Update.
10010 (print_started_pid): Update.
10011 (print_attached_pid): Update.
10012 (process_serial_event): Simplify read of ptid.
10013 * thread-db.c (thread_db_create_event): Update.
10014 (thread_db_get_tls_address): Update.
10015 * win32-low.c (current_inferior_ptid): Simplify.
10016
46917d26
TT
100172014-02-19 Tom Tromey <tromey@redhat.com>
10018
10019 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10020 argument.
10021 (target_supports_btrace): Update.
10022
0759a81e
YQ
100232014-02-14 Yao Qi <yao@codesourcery.com>
10024
10025 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10026 (rsp-low-ipa.o): New target.
10027
a7191e8b
TT
100282014-02-12 Tom Tromey <tromey@redhat.com>
10029
10030 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10031 convert_ascii_to_int.
10032 * regcache.c (registers_to_string): Likewise.
10033 * remote-utils.c (decode_M_packet): Likewise.
10034 * server.c (process_serial_event): Likewise.
10035
ff0e980e
TT
100362014-02-12 Tom Tromey <tromey@redhat.com>
10037
10038 * server.c (handle_query, handle_v_run): Use hex2bin, not
10039 unhexify.
10040 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10041
e9371aff
TT
100422014-02-12 Tom Tromey <tromey@redhat.com>
10043
10044 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10045 convert_int_to_ascii.
10046 * regcache.c (registers_to_string, collect_register_as_string):
10047 Likewise.
10048 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10049 Likewise.
10050 * server.c (process_serial_event): Likewise.
10051 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10052 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10053
971dc0b8
TT
100542014-02-12 Tom Tromey <tromey@redhat.com>
10055
10056 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10057 bin2hex, not hexify.
10058 * tracepoint.c (cmd_qtstatus): Likewise.
10059
0a822afb
TT
100602014-02-12 Tom Tromey <tromey@redhat.com>
10061
10062 * remote-utils.c (monitor_output): Pass explicit length to
10063 hexify.
10064
9c3d6531
TT
100652014-02-12 Tom Tromey <tromey@redhat.com>
10066
10067 * tracepoint.c: Include rsp-low.h.
10068 * server.c: Include rsp-low.h.
10069 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10070 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10071 declare.
10072 * remote-utils.c: Include rsp-low.h.
10073 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10074 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10075 (convert_int_to_ascii, convert_ascii_to_int): Move to
10076 common/rsp-low.c.
10077 * regcache.c: Include rsp-low.h.
10078 * ax.c: Include rsp-low.h.
10079 * Makefile.in (SFILES): Add common/rsp-low.c.
10080 (OBS): Add rsp-low.o.
10081 (rsp-low.o): New target.
10082
01fd3ea5
TT
100832014-02-12 Tom Tromey <tromey@redhat.com>
10084
10085 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10086 Include print-utils.h.
10087 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10088 (plongest, thirty_two, phex_nz): Remove.
10089 * Makefile.in (SFILES): Add common/print-utils.c.
10090 (OBS): Add print-utils.o.
10091 (print-utils-ipa.o): New target.
10092 (print-utils.o): New target.
10093 (IPA_OBJS): Add print-utils-ipa.o.
10094
e99dc820
TT
100952014-02-06 Tom Tromey <tromey@redhat.com>
10096
10097 * Makefile.in (SFILES): Fix indentation.
10098
ee1e2d4f
DE
100992014-02-05 Doug Evans <dje@google.com>
10100
10101 * linux-low.c (linux_wait_for_event): Improve comment.
10102 (linux_wait_1): Keep current_inferior in sync with event_child.
10103
f5a02773
DE
101042014-01-22 Doug Evans <dje@google.com>
10105
10106 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10107
87ce2a04
DE
101082014-01-22 Doug Evans <dje@google.com>
10109
10110 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10111 * configure: Regenerate.
10112 * config.in: Regenerate.
10113 * Makefile.in (SFILES): Add debug.c.
10114 (OBS): Add debug.o.
10115 * debug.c: New file.
10116 * debug.h: New file.
10117 * linux-aarch64-low.c (*): Update all debugging printfs to use
10118 debug_printf instead of fprintf.
10119 * linux-arm-low.c (*): Ditto.
10120 * linux-cris-low.c (*): Ditto.
10121 * linux-crisv32-low.c (*): Ditto.
10122 * linux-m32r-low.c (*): Ditto.
10123 * linux-sparc-low.c (*): Ditto.
10124 * linux-x86.c (*): Ditto.
10125 * linux-low.c (*): Ditto.
10126 (linux_wait_1): Add calls to debug_enter, debug_exit.
10127 (linux_wait): Remove redundant debugging printf.
10128 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10129 (linux_resume, unstop_all_lwps): Ditto.
10130 * mem-break.c (*): Update all debugging printfs to use
10131 debug_printf instead of fprintf.
10132 * remote-utils.c (*): Ditto.
10133 * thread-db.c (*): Ditto.
10134 * server.c #include <ctype.h>, "gdb_vecs.h".
10135 (debug_threads): Moved to debug.c.
10136 (*): Update all debugging printfs to use debug_printf instead of
10137 fprintf.
10138 (start_inferior): Replace call to fflush with call to debug_flush.
10139 (monitor_show_help): Mention set debug-format.
10140 (parse_debug_format_options): New function.
10141 (handle_monitor_command): Handle "monitor set debug-format".
10142 (gdbserver_usage): Mention --debug-format.
10143 (main): Parse --debug-format.
10144 * server.h (debug_threads): Declaration moved to debug.h.
10145 #include "debug.h".
10146 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10147 trace_debug_1 that uses debug_printf.
10148 (tracepoint_look_up_symbols): Update all debugging printfs to use
10149 debug_printf instead of fprintf.
10150
e671835b
BS
101512014-01-20 Baruch Siach <baruch@tkos.co.il>
10152
10153 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10154 sys/ptrace.h.
10155
b5737fa9
PA
101562014-01-17 Pedro Alves <palves@redhat.com>
10157
ea38d2a9 10158 PR build/16445
c7faa97a
PA
10159 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10160 defined after including gdb_proc_service.h.
b5737fa9 10161
40ed484e
DE
101622014-01-16 Doug Evans <dje@google.com>
10163
10164 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10165 (match_dll): Use it.
10166
969c39fb
MM
101672014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10168
10169 * target.h (target_ops) <read_btrace>: Change parameters and
10170 return type to allow error reporting.
10171 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10172 trace reading errors on.
10173 * linux-low.c (linux_low_read_btrace): Pass trace reading
10174 errors on.
10175 (linux_low_disable_btrace): New.
10176
ab7f45ba
DE
101772014-01-15 Doug Evans <dje@google.com>
10178
10179 * inferiors.c (thread_id_to_gdb_id): Delete.
10180 * inferiors.h (thread_id_to_gdb_id): Delete.
10181
66af0f44
EZ
101822014-01-13 Eli Zaretskii <eliz@gnu.org>
10183
10184 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10185 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10186 versions.
10187
9939e131
PA
101882014-01-08 Pedro Alves <palves@redhat.com>
10189
10190 * server.c (handle_status): Don't discard previous queued stop
10191 replies or thread's pending status here.
10192 (main) <disconnection>: Do it here instead.
10193
b7ea362b
PA
101942014-01-08 Pedro Alves <palves@redhat.com>
10195
10196 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10197 * server.c (visit_actioned_threads, handle_pending_status): New
10198 function.
10199 (handle_v_cont): Factor out parts to ...
10200 (resume): ... this new function. If in all-stop, and a thread
10201 being resumed has a pending status, report it without actually
10202 resuming.
10203 (myresume): Adjust to use the new 'resume' function.
10204 (clear_pending_status_callback, set_pending_status_callback)
10205 (find_status_pending_thread_callback): New functions.
10206 (handle_status): Handle the case of multiple threads having
10207 interesting statuses to report. Report threads' real last signal
10208 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10209 with an interesting thread to report the status for, instead of
10210 always reporting the status of the first thread.
10211
28498c42
JB
102122014-01-01 Joel Brobecker <brobecker@adacore.com>
10213
10214 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10215 * gdbreplay.c (gdbreplay_version): Likewise.
10216
f45c82da
YZ
102172013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10218
10219 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10220 iov.iov_len with the real length in use.
10221
379a5e2d
JB
102222013-12-13 Joel Brobecker <brobecker@adacore.com>
10223
10224 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10225 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10226 for all targets that use win32-low.c.
10227 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10228 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10229
4210d83e
PA
102302013-12-13 Pedro Alves <palves@redhat.com>
10231
10232 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10233 if equal to TARGET_WAITKIND_LOADED.
10234 * win32-low.c (cached_status): New static global.
10235 (win32_wait): Add declaration.
10236 (do_initial_child_stuff): Flush all initial pending debug events
10237 up to the initial breakpoint.
10238 (win32_wait): If CACHED_STATUS was set, return that instead
10239 of doing a real wait. Remove the code resuming the execution
10240 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10241 during the initial phase. Also remove the code changing
10242 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10243 TARGET_WAITKIND_STOPPED.
10244
e7f0d979
YQ
102452013-12-11 Yao Qi <yao@codesourcery.com>
10246
10247 * notif.c (handle_notif_ack): Return 0 if no notification
10248 matches.
10249
ebcf782c
DE
102502013-11-20 Doug Evans <dje@google.com>
10251
10252 * linux-low.c (linux_set_resume_request): Fix comment.
10253
20ad9378
DE
102542013-11-20 Doug Evans <dje@google.com>
10255
10256 * linux-low.c (resume_status_pending_p): Tweak comment.
10257
a196ebeb
WT
102582013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10259
10260 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10261 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10262 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10263 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10264 (srv_amd64_regobj): Add amd64-mpx.o.
10265 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10266 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10267 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10268 * i387-fp.c (num_pl_bnd_register) Added constant.
10269 (num_pl_bnd_cfg_registers) Added constant.
10270 (struct i387_xsave) Added reserved area and MPX fields.
10271 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10272 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10273 function.
10274 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10275 (init_registers_amd64_mpx_linux): Declare new function.
10276 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10277 (x86_64_regmap): Add MPX registers.
10278 (x86_linux_read_description): Add MPX case.
10279 (initialize_low_arch): Initialize MPX targets.
10280
0080a2f6
TT
102812013-11-18 Tom Tromey <tromey@redhat.com>
10282
10283 * configure: Rebuild.
10284 * configure.ac: Don't check for stdlib.h.
10285 * gdbreplay.c: Unconditionally include stdlib.h.
10286
2978b111
TT
102872013-11-18 Tom Tromey <tromey@redhat.com>
10288
10289 * config.in: Rebuild.
10290 * configure: Rebuild.
10291 * configure.ac: Don't use AC_HEADER_DIRENT.
10292
a3d08894
TT
102932013-11-18 Tom Tromey <tromey@redhat.com>
10294
10295 * server.h: Don't check HAVE_STRING_H.
10296 * gdbreplay.c: Don't check HAVE_STRING_H.
10297 * configure: Rebuild.
10298
0a5dd17d
TT
102992013-11-18 Tom Tromey <tromey@redhat.com>
10300
10301 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10302 LIBGNU.
10303
1bd2f0ba
TT
103042013-11-08 Tom Tromey <tromey@redhat.com>
10305
10306 * configure, config.in: Rebuild.
10307 * configure.ac: Remove unused configury.
10308
3266f10b
TT
103092013-11-08 Tom Tromey <tromey@redhat.com>
10310
10311 * acinclude.m4: Include common.m4, codeset.m4.
10312 * configure, config.in: Rebuild.
10313 * configure.ac: Use GDB_AC_COMMON.
10314
6682d959
AA
103152013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10316
10317 * linux-s390-low.c (HWCAP_S390_TE): New define.
10318 (s390_arch_setup): Consider the TE field in the HWCAP for
10319 determining 'have_regset_tdb'.
10320
fd0a4d76
SDJ
103212013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10322
10323 PR gdb/16014
10324 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10325 call to sizeof.
10326
1a3d890b
PA
103272013-10-02 Pedro Alves <palves@redhat.com>
10328
10329 * server.c (process_serial_event): Don't output "GDBserver
10330 exiting" if GDB is connected through stdio.
10331 * target.c (mywait): Likewise, be silent if GDB is connected
10332 through stdio.
10333
97ad4581
JB
103342013-10-01 Joel Brobecker <brobecker@adacore.com>
10335
10336 * lynx-low.c (lynx_add_threads_after_attach): New function.
10337 (lynx_attach): Remove call to add_thread. Add call to
10338 lynx_add_threads_after_attach instead.
10339
5b4e221c
MF
103402013-09-28 Mike Frysinger <vapier@gentoo.org>
10341
10342 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10343 * config.in, configure: Regenerated.
10344
ee47b2f8
YQ
103452013-09-18 Yao Qi <yao@codesourcery.com>
10346
10347 PR server/15959
10348 * server.c (start_inferior): Clear 'resume_info'.
10349
d6707650 103502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10351
d6707650
JW
10352 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10353 for each register.
10354
9243dd0e 103552013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10356
9243dd0e
JW
10357 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10358 linux-tile-low.o to srv_tgtobj.
10359
c623a6ef
WN
103602013-09-16 Will Newton <will.newton@linaro.org>
10361
10362 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10363 out regs.
10364
fb71d39e
PA
103652013-09-06 Pedro Alves <palves@redhat.com>
10366
10367 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10368 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10369 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10370 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10371 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10372 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10373
8e7e9910
PA
103742013-09-06 Pedro Alves <palves@redhat.com>
10375
10376 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10377 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10378
7c3a12ca
PA
103792013-09-06 Pedro Alves <palves@redhat.com>
10380
10381 * linux-amd64-ipa.c: Include tracepoint.h.
10382 * linux-i386-ipa.c: Include tracepoint.h.
10383
8eb3d7b6
RW
103842013-09-06 Ricard Wanderlof <ricardw@axis.com>
10385
10386 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10387 (ps_get_thread_area): New function.
10388
eddddb9d
RW
103892013-09-06 Ricard Wanderlof <ricardw@axis.com>
10390
10391 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10392 (initialize_low_arch): Call init_registers_crisv32 rather than
10393 init_register_crisv32.
10394
533b0600
PA
103952013-09-05 Pedro Alves <palves@redhat.com>
10396
10397 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10398 to ...
10399 * hostio.h: ... this new file.
10400 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10401 win32-low.c: Include hostio.h.
10402
0ce3d3b5
PA
104032013-09-05 Pedro Alves <palves@redhat.com>
10404
10405 * server.h (gdb_client_data, handler_func, callback_handler_func)
10406 (delete_file_handler, add_file_handler, append_callback_event)
10407 (delete_callback_event, start_event_loop, initialize_event_loop):
10408 Move to event-loop.h and include it.
10409 * event-loop.h: New file.
10410
799cdc37
PA
104112013-09-05 Pedro Alves <palves@redhat.com>
10412
10413 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10414 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10415 (loaded_dll, unloaded_dll): Move to ...
10416 * dll.h: ... this new file.
10417 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10418
6a6bbd9d
PA
104192013-09-05 Pedro Alves <palves@redhat.com>
10420
10421 * server.h (current_process, get_thread_process, all_processes)
10422 (add_inferior_to_list, for_each_inferior, current_inferior)
10423 (remove_inferior, add_process, remove_process, find_process_pid)
10424 (have_started_inferiors_p, have_attached_inferiors_p)
10425 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10426 (clear_inferiors, find_inferior, find_inferior_id)
10427 (inferior_target_data, set_inferior_target_data)
10428 (inferior_regcache_data, set_inferior_regcache_data): Move to
10429 inferiors.h, and include it.
10430 * inferiors.h: New file.
10431
f699aaba
PA
104322013-09-05 Pedro Alves <palves@redhat.com>
10433
10434 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10435 Move ...
72f4393d 10436 * ax.h: ... here.
f699aaba 10437
c144c7a0
PA
104382013-09-05 Pedro Alves <palves@redhat.com>
10439
10440 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10441 tracepoint.h.
10442 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10443 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10444 (handle_tracepoint_general_set, handle_tracepoint_query)
10445 (tracepoint_finished_step, tracepoint_was_hit)
10446 (release_while_stepping_state_list, current_traceframe)
10447 (in_readonly_region, traceframe_read_mem)
10448 (fetch_traceframe_registers, traceframe_read_sdata)
10449 (traceframe_read_info, struct fast_tpoint_collect_status)
10450 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10451 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10452 (supply_fast_tracepoint_registers)
10453 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10454 (ipa_tdesc, claim_trampoline_space)
10455 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10456 (agent_mem_read, agent_get_trace_state_variable_value)
10457 (agent_set_trace_state_variable_value, agent_tsv_read)
10458 (agent_mem_read_string, get_raw_reg_func_addr)
10459 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10460 * tracepoint.h: ... this new file.
10461
ff42e6ab
PA
104622013-09-05 Pedro Alves <palves@redhat.com>
10463
10464 * server.h (perror_with_name, error, fatal, warning, paddress)
10465 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10466 include it.
10467 * utils.h: New file.
10468
541af0f4
PA
104692013-09-05 Pedro Alves <palves@redhat.com>
10470
10471 * server.h (remote_debug, noack_mode, transport_is_reliable)
10472 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10473 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10474 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10475 (write_enn, initialize_async_io, enable_async_io)
10476 (disable_async_io, check_remote_input_interrupt_request)
10477 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10478 (dead_thread_notify, prepare_resume_reply)
10479 (decode_address_to_semicolon, decode_address, decode_m_packet)
10480 (decode_M_packet, decode_X_packet, decode_xfer_write)
10481 (decode_search_memory_packet, unhexify, hexify)
10482 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10483 (look_up_one_symbol, relocate_instruction)
10484 (monitor_output): Move to remote-utils.h, and include it.
10485 * remote-utils.h: New file.
10486
eebdf26b
PA
104872013-09-05 Pedro Alves <palves@redhat.com>
10488
10489 * server.h (_): Delete.
10490
3aafd2ff
PA
104912013-09-02 Pedro Alves <palves@redhat.com>
10492
10493 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10494 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10495 allocated.
10496 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10497
cee83bcb
PM
104982013-09-02 Pierre Muller <muller@sourceware.org>
10499
10500 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10501 or WriteProcessMemory complete successfully and handle
10502 ERROR_PARTIAL_COPY error.
10503
9a13b2fa
PA
105042013-09-02 Pedro Alves <palves@redhat.com>
10505
10506 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10507 error instead of EIO.
10508
602e3198
JK
105092013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10510
10511 PR server/15604
10512 * linux-low.c: Include filestuff.h.
10513 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10514 * lynx-low.c: Include filestuff.h.
10515 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10516 * server.c: Include filestuff.h.
10517 (main): Call notice_open_fds.
10518 * spu-low.c: Include filestuff.h.
10519 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10520
96d7229d
LM
105212013-08-22 Luis Machado <lgustavo@codesourcery.com>
10522
10523 * Makefile.in: Explain why ../target and ../nat are not
10524 listed as include file search paths.
10525 (linux-waitpid.o): New object file rule.
10526 * configure.srv (srv_native_linux_obj): New variable.
10527 Replace all occurrences of linux native object files with
10528 $srv_native_linux_obj.
10529 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10530 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10531 (linux_enable_event_reporting): Remove declaration.
10532 (my_waitpid): Moved to common/linux-waitpid.c.
10533 (linux_wait_for_event): Pass ptid when calling
10534 linux_enable_event_reporting.
10535 (linux_supports_tracefork_flag): Remove.
10536 (linux_enable_event_reporting): Likewise.
10537 (linux_tracefork_grandchild): Remove.
10538 (STACK_SIZE): Moved to common/linux-ptrace.c.
10539 (linux_tracefork_child): Remove.
10540 (linux_test_for_tracefork): Remove.
10541 (linux_look_up_symbols): Call linux_supports_traceclone.
10542 (initialize_low): Remove call to linux_test_for_tracefork.
10543 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10544 common/linux-ptrace.h.
10545 (PTRACE_TYPE_ARG4): Likewise.
10546 Include linux-ptrace.h.
10547
32940073
PA
105482013-08-21 Pedro Alves <palves@redhat.com>
10549
10550 * config.in: Renegerate.
10551
33b60d58 105522013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 10553
33b60d58
LM
10554 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10555 (SFILES): Remove $(srcdir)/common/target-common.c and
10556 add $(srcdir)/target/waitstatus.c.
10557 (OBS): Remove target-common.o and add waitstatus.o.
10558 (server_h): Remove $(srcdir)/../common/target-common.h and
10559 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10560 and $(srcdir)/../target/waitstatus.h.
10561 (target-common.o): Remove.
10562 (waitstatus.o): New target object file.
10563 * target.h: Do not include target-common.h and
10564 include target/resume.h, target/wait.h and
10565 target/waitstatus.h.
10566
b8e1b30e
LM
105672013-08-13 Luis Machado <lgustavo@codesourcery.com>
10568
10569 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10570 to PTRACE_TYPE_ARG3.
10571 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10572 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10573 PTRACE_TYPE_ARG4.
10574 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10575 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10576
7a60ad40
YQ
105772013-07-27 Jie Zhang <jie@codesourcery.com>
10578 Daniel Jacobowitz <dan@codesourcery.com>
10579 Yao Qi <yao@codesourcery.com>
10580
10581 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10582 (mips-linux-watch.o): New rule.
10583 (mips_linux_watch_h): New variable.
10584 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10585 srv_tgtobj.
10586 * linux-mips-low.c: Include mips-linux-watch.h.
10587 (struct arch_process_info, struct arch_lwp_info): New.
10588 (update_watch_registers_callback): New function.
10589 (mips_linux_new_process, mips_linux_new_thread) New functions.
10590 (mips_linux_prepare_to_resume, mips_insert_point): New
10591 functions.
10592 (mips_remove_point, mips_stopped_by_watchpoint): New
10593 functions.
10594 (rsp_bp_type_to_target_hw_bp_type): New function.
10595 (mips_stopped_data_address): New function.
10596 (the_low_target): Add watchpoint support functions.
10597
de6f69ad
YQ
105982013-07-27 Yao Qi <yao@codesourcery.com>
10599
10600 * i386-low.c: Include break-common.h.
10601 (enum target_hw_bp_type): Remove.
10602
3360c0bf
LM
106032013-07-24 Luis Machado <lgustavo@codesourcery.com>
10604
10605 * Makefile.in (SFILES): /common/target-common.c.
10606 (OBS): Add target-common.o.
10607 (server_h): Add $(srcdir)/../common/target-common.h.
10608 (target-common.o): New target.
10609 * server.c (queue_stop_reply_callback): Free
10610 status string after use.
10611 * target.c (target_waitstatus_to_string): Remove.
10612 * target.h: Include target-common.h.
10613 (resume_kind): Likewise.
10614 (target_waitkind): Likewise.
10615 (target_waitstatus): Likewise.
10616 (TARGET_WNOHANG): Likewise.
10617
bd885420
YQ
106182013-07-04 Yao Qi <yao@codesourcery.com>
10619
10620 * Makefile.in (host_alias): Use @host_noncanonical@.
10621 (target_alias): Use @target_noncanonical@.
10622 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10623 ACX_NONCANONICAL_HOST.
10624 * configure: Regenerated.
10625
10626 Revert:
10627 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10628
10629 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10630 * configure: Rebuild.
10631 * Makefile.in (version_host, version_target): Get from configure.
10632 (version.c): Use $(version_host) and $(version_target).
10633
17ef446e
PA
106342013-07-03 Pedro Alves <palves@redhat.com>
10635
10636 * Makefile.in (config.status): Depend on development.sh.
10637 * acinclude.m4: Include libmcheck.m4.
10638 * configure: Regenerate.
10639
7a9a7487
MG
106402013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10641
10642 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10643 attribute inside the parentheses.
10644 (winapi_DebugSetProcessKillOnExit): Ditto.
10645 (winapi_DebugBreakProcess): Ditto.
10646 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 10647
49b64de6
MG
106482013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10649
10650 * notif.h (notif_event): Add a dummy member to avoid compiler
10651 errors.
10652
d5749ee7
PA
106532013-07-01 Pedro Alves <palves@redhat.com>
10654
10655 * hostio.c (HOSTIO_PATH_MAX): Define.
10656 (require_filename, handle_open, handle_unlink, handle_readlink):
10657 Use it.
10658
d8d2a3ee
PA
106592013-07-01 Pedro Alves <palves@redhat.com>
10660
10661 * server.h: Include "pathmax.h".
10662 * linux-low.c: Don't include sys/param.h.
10663 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10664 MAXPATHLEN.
10665 * win32-low.c: Don't include sys/param.h.
10666 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10667
bc7dea8d
PA
106682013-07-01 Pedro Alves <palves@redhat.com>
10669
10670 * event-loop.c: Don't check HAVE_UNISTD_H before including
10671 <unistd.h>.
10672 * gdbreplay.c: Likewise.
10673 * remote-utils.c: Likewise.
10674 * server.c: Likewise.
10675 * configure.ac: Don't check for unistd.h.
10676 * configure: Regenerate.
10677
d6c2da54
TT
106782013-06-28 Tom Tromey <tromey@redhat.com>
10679
10680 * Makefile.in (version.c): Use version.in, not
10681 common/version.in.
10682
257b6bec
MG
106832013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10684
10685 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10686 * configure: Rebuild.
10687 * Makefile.in (version_host, version_target): Get from configure.
10688 (version.c): Use $(version_host) and $(version_target).
10689
86ebe149
DK
106902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10691
10692 Fix trace-status to output user name without trailing colon.
10693 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10694
f30aa5af
DK
106952013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10696
10697 Fix trace-status to output proper start-time and stop-time.
10698 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10699 output start time and stop time in hex as gdb expects.
10700
28a93511
YQ
107012013-06-26 Pedro Alves <pedro@codesourcery.com>
10702
10703 * tracepoint.c (build_traceframe_info_xml): Output trace state
10704 variables present in the trace buffer.
10705
01208463
TT
107062013-06-24 Tom Tromey <tromey@redhat.com>
10707
10708 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10709 create-version.sh.
10710 (version.o): Remove.
10711 * gdbreplay.c: Include version.h.
10712 (version, host_name): Don't declare.
10713 * server.h: Include version.h.
10714 (version, host_name): Don't declare.
10715
760256f9
PA
107162013-06-12 Pedro Alves <palves@redhat.com>
10717
10718 * linux-x86-low.c (linux_is_elf64): Delete global.
10719 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10720 with local linux_pid_exe_is_elf_64_file use.
10721
030031ee
PA
107222013-06-11 Pedro Alves <palves@redhat.com>
10723
10724 * linux-low.c (regset_disabled, disable_regset): New functions.
10725 (regsets_fetch_inferior_registers)
10726 (regsets_store_inferior_registers): Use them.
10727 (initialize_regsets_info); Don't allocate the disabled_regsets
10728 array here.
10729 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10730 comment.
10731
5da6eb0a
PA
107322013-06-11 Pedro Alves <palves@redhat.com>
10733
10734 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10735 xmalloc.
10736
7e5aaa09
PA
107372013-06-11 Pedro Alves <palves@redhat.com>
10738
10739 * linux-x86-low.c (initialize_low_arch): Call
10740 init_registers_x32_avx_linux.
10741
d878444c
JK
107422013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10743
10744 Fix compatibility with Android Bionic.
10745 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10746 it is not empty.
10747
3aee8918
PA
107482013-06-07 Pedro Alves <palves@redhat.com>
10749
5f2b57b5 10750 PR server/14823
3aee8918
PA
10751 * Makefile.in (OBS): Add tdesc.o.
10752 (IPA_OBJS): Add tdesc-ipa.o.
10753 (tdesc-ipa.o): New rule.
10754 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10755 interface.
10756 * linux-low.c (new_inferior): Delete.
10757 (disabled_regsets, num_regsets): Delete.
10758 (linux_add_process): Adjust to set the new per-process
10759 new_inferior flag.
10760 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10761 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10762 was a stop. When calling arch_setup, switch the current inferior
10763 to the thread that got an event.
10764 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10765 (regsets_fetch_inferior_registers)
10766 (regsets_store_inferior_registers): New regsets_info parameter.
10767 Adjust to use it.
10768 (linux_register_in_regsets): New regs_info parameter. Adjust to
10769 use it.
10770 (register_addr, fetch_register, store_register): New usrregs_info
10771 parameter. Adjust to use it.
10772 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10773 parameter regs_info. Adjust to use it.
10774 (linux_fetch_registers): Get the current inferior's regs_info, and
10775 adjust to use it.
10776 (linux_store_registers): Ditto.
10777 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10778 (initialize_low): Don't initialize the target_regsets here. Call
10779 initialize_low_arch.
10780 * linux-low.h (target_regsets): Delete declaration.
10781 (struct regsets_info): New.
10782 (struct usrregs_info): New.
10783 (struct regs_info): New.
10784 (struct process_info_private) <new_inferior>: New field.
10785 (struct linux_target_ops): Delete the num_regs, regmap, and
10786 regset_bitmap fields. New field regs_info.
10787 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10788 * i387-fp.c (num_xmm_registers): Delete.
10789 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10790 calls to new interface.
10791 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10792 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10793 Infer the number of xmm registers from the regcache's target
10794 description.
10795 * i387-fp.h (num_xmm_registers): Delete.
10796 * inferiors.c (add_thread): Don't install the thread's regcache
10797 here.
10798 * proc-service.c (gregset_info): Fetch the current inferior's
10799 regs_info. Adjust to use it.
10800 * regcache.c: Include tdesc.h.
10801 (register_bytes, reg_defs, num_registers)
10802 (gdbserver_expedite_regs): Delete.
10803 (get_thread_regcache): If the thread doesn't have a regcache yet,
10804 create one, instead of aborting gdbserver.
10805 (regcache_invalidate_one): Rename to ...
10806 (regcache_invalidate_thread): ... this.
10807 (regcache_invalidate_one): New.
10808 (regcache_invalidate): Only invalidate registers of the current
10809 process.
10810 (init_register_cache): Add target_desc parameter, and use it.
10811 (new_register_cache): Ditto. Assert the target description has a
10812 non zero registers_size.
10813 (regcache_cpy): Add assertions. Adjust.
10814 (realloc_register_cache, set_register_cache): Delete.
10815 (registers_to_string, registers_from_string): Adjust.
10816 (find_register_by_name, find_regno, find_register_by_number)
10817 (register_cache_size): Add target_desc parameter, and use it.
10818 (free_register_cache_thread, free_register_cache_thread_one)
10819 (regcache_release, register_cache_size): New.
10820 (register_size): Add target_desc parameter, and use it.
10821 (register_data, supply_register, supply_register_zeroed)
10822 (supply_regblock, supply_register_by_name, collect_register)
10823 (collect_register_as_string, collect_register_by_name): Adjust.
10824 * regcache.h (struct target_desc): Forward declare.
10825 (struct regcache) <tdesc>: New field.
10826 (init_register_cache, new_register_cache): Add target_desc
10827 parameter.
10828 (regcache_invalidate_thread): Declare.
10829 (regcache_invalidate_one): Delete declaration.
10830 (regcache_release): Declare.
10831 (find_register_by_number, register_cache_size, register_size)
10832 (find_regno): Add target_desc parameter.
10833 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10834 declarations.
10835 * remote-utils.c: Include tdesc.h.
10836 (outreg, prepare_resume_reply): Adjust.
10837 * server.c: Include tdesc.h.
10838 (gdbserver_xmltarget): Delete declaration.
10839 (get_features_xml, process_serial_event): Adjust.
10840 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10841 declare.
10842 (struct process_info) <tdesc>: New field.
10843 (ipa_tdesc): Declare.
10844 * tdesc.c: New file.
10845 * tdesc.h: New file.
10846 * tracepoint.c: Include tdesc.h.
10847 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10848 (get_context_regcache): Adjust to pass ipa_tdesc down.
10849 (do_action_at_tracepoint): Adjust to get the register cache size
10850 from the context regcache's description.
10851 (traceframe_walk_blocks): Adjust to get the register cache size
10852 from the current trace frame's description.
10853 (traceframe_get_pc): Adjust to get current trace frame's
10854 description and pass it down.
10855 (gdb_collect): Adjust to get the register cache size from the
10856 IPA's description.
10857 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10858 (gdbserver_xmltarget): Delete.
10859 (initialize_low_tracepoint): Set the ipa's target description.
10860 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10861 (initialize_low_tracepoint): Set the ipa's target description.
10862 * linux-x86-low.c: Include tdesc.h.
10863 [__x86_64__] (is_64bit_tdesc): New.
10864 (ps_get_thread_area, x86_get_thread_area): Use it.
10865 (i386_cannot_store_register): Rename to ...
10866 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10867 (i386_cannot_fetch_register): Rename to ...
10868 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10869 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10870 to new interface.
10871 (target_regsets): Rename to ...
10872 (x86_regsets): ... this.
10873 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10874 interface.
10875 (x86_siginfo_fixup): Use is_64bit_tdesc.
10876 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10877 (tdesc_x32_avx_linux, tdesc_x32_linux)
10878 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10879 Declare.
10880 (x86_linux_update_xmltarget): Delete.
10881 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10882 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10883 (AMD64_LINUX_USER64_CS): New.
10884 (x86_linux_read_description): New, based on
10885 x86_linux_update_xmltarget.
10886 (same_process_callback): New.
10887 (x86_arch_setup_process_callback): New.
10888 (x86_linux_update_xmltarget): New.
10889 (x86_regsets_info): New.
10890 (amd64_linux_regs_info): New.
10891 (i386_linux_usrregs_info): New.
10892 (i386_linux_regs_info): New.
10893 (x86_linux_regs_info): New.
10894 (x86_arch_setup): Reimplement.
10895 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10896 (x86_emit_ops): Ditto.
10897 (the_low_target): Adjust. Install x86_linux_regs_info,
10898 x86_cannot_fetch_register, and x86_cannot_store_register.
10899 (initialize_low_arch): New.
10900 * linux-ia64-low.c (tdesc_ia64): Declare.
10901 (ia64_fetch_register): Adjust.
10902 (ia64_usrregs_info, regs_info): New globals.
10903 (ia64_regs_info): New function.
10904 (the_low_target): Adjust.
10905 (initialize_low_arch): New function.
10906 * linux-sparc-low.c (tdesc_sparc64): Declare.
10907 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10908 Adjust.
10909 (sparc_arch_setup): New function.
10910 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10911 (the_low_target): Adjust.
10912 (initialize_low_arch): New function.
10913 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10914 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10915 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10916 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10917 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10918 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10919 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10920 (tdesc_powerpc_isa205_vsx64l): Declare.
10921 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10922 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10923 (ppc_set_pc, ppc_get_hwcap): Adjust.
10924 (ppc_usrregs_info): Forward declare.
10925 (!__powerpc64__) ppc_regmap_adjusted: New global.
10926 (ppc_arch_setup): Adjust to the current process'es target
10927 description.
10928 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10929 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10930 (ppc_store_evrregset): Adjust.
10931 (target_regsets): Rename to ...
10932 (ppc_regsets): ... this, and make static.
10933 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10934 (ppc_regs_info): New function.
10935 (the_low_target): Adjust.
10936 (initialize_low_arch): New function.
10937 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10938 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10939 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10940 (tdesc_s390x_linux64v2): Declare.
10941 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10942 (s390_fill_gregset, s390_store_last_break): Adjust.
10943 (target_regsets): Rename to ...
10944 (s390_regsets): ... this, and make static.
10945 (s390_get_pc, s390_set_pc): Adjust.
10946 (s390_get_hwcap): New target_desc parameter, and use it.
10947 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10948 (s390_arch_setup): Adjust to set the current process'es target
10949 description. Don't adjust the regmap.
10950 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10951 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10952 (regs_info_3264): New globals.
10953 (s390_regs_info): New function.
10954 (the_low_target): Adjust.
10955 (initialize_low_arch): New function.
10956 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10957 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10958 [__mips64] (init_registers_mips_linux)
10959 (init_registers_mips_dsp_linux): Delete defines.
10960 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10961 (have_dsp): New global.
10962 (mips_read_description): New, based on mips_arch_setup.
10963 (mips_arch_setup): Reimplement.
10964 (get_usrregs_info): New function.
10965 (mips_cannot_fetch_register, mips_cannot_store_register)
10966 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10967 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10968 (target_regsets): Rename to ...
10969 (mips_regsets): ... this, and make static.
10970 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10971 (dsp_regs_info, regs_info): New globals.
10972 (mips_regs_info): New function.
10973 (the_low_target): Adjust.
10974 (initialize_low_arch): New function.
10975 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10976 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10977 Declare.
10978 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10979 (arm_read_description): New, with bits factored from
10980 arm_arch_setup.
10981 (arm_arch_setup): Reimplement.
10982 (target_regsets): Rename to ...
10983 (arm_regsets): ... this, and make static.
10984 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10985 (arm_regs_info): New function.
10986 (the_low_target): Adjust.
10987 (initialize_low_arch): New function.
10988 * linux-m68k-low.c (tdesc_m68k): Declare.
10989 (target_regsets): Rename to ...
10990 (m68k_regsets): ... this, and make static.
10991 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10992 (m68k_regs_info): New function.
10993 (m68k_arch_setup): New function.
10994 (the_low_target): Adjust.
10995 (initialize_low_arch): New function.
10996 * linux-sh-low.c (tdesc_sharch): Declare.
10997 (target_regsets): Rename to ...
10998 (sh_regsets): ... this, and make static.
10999 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11000 (sh_regs_info, sh_arch_setup): New functions.
11001 (the_low_target): Adjust.
11002 (initialize_low_arch): New function.
11003 * linux-bfin-low.c (tdesc_bfin): Declare.
11004 (bfin_arch_setup): New function.
11005 (bfin_usrregs_info, regs_info): New globals.
11006 (bfin_regs_info): New function.
11007 (the_low_target): Adjust.
11008 (initialize_low_arch): New function.
11009 * linux-cris-low.c (tdesc_cris): Declare.
11010 (cris_arch_setup): New function.
11011 (cris_usrregs_info, regs_info): New globals.
11012 (cris_regs_info): New function.
11013 (the_low_target): Adjust.
11014 (initialize_low_arch): New function.
11015 * linux-cris-low.c (tdesc_crisv32): Declare.
11016 (cris_arch_setup): New function.
11017 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11018 (cris_regs_info): New function.
11019 (the_low_target): Adjust.
11020 (initialize_low_arch): New function.
11021 * linux-m32r-low.c (tdesc_m32r): Declare.
11022 (m32r_arch_setup): New function.
11023 (m32r_usrregs_info, regs_info): New globals.
11024 (m32r_regs_info): Adjust.
11025 (initialize_low_arch): New function.
11026 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11027 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11028 (tic6x_usrregs_info): Forward declare.
11029 (tic6x_read_description): New function, based on ...
11030 (tic6x_arch_setup): ... this. Reimplement.
11031 (target_regsets): Rename to ...
11032 (tic6x_regsets): ... this, and make static.
11033 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11034 (tic6x_regs_info): New function.
11035 (the_low_target): Adjust.
11036 (initialize_low_arch): New function.
11037 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11038 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11039 (target_regsets): Rename to ...
11040 (xtensa_regsets): ... this, and make static.
11041 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11042 globals.
11043 (xtensa_arch_setup, xtensa_regs_info): New functions.
11044 (the_low_target): Adjust.
11045 (initialize_low_arch): New function.
11046 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11047 (nios2_arch_setup): Set the current process'es tdesc.
11048 (target_regsets): Rename to ...
11049 (nios2_regsets): ... this.
11050 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11051 (nios2_regs_info): New function.
11052 (the_low_target): Adjust.
11053 (initialize_low_arch): New function.
a261b8f5
PA
11054 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11055 (aarch64_arch_setup): Set the current process'es tdesc.
11056 (target_regsets): Rename to ...
11057 (aarch64_regsets): ... this.
11058 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11059 (aarch64_regs_info): New function.
11060 (the_low_target): Adjust.
11061 (initialize_low_arch): New function.
3aee8918
PA
11062 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11063 globals.
11064 (target_regsets): Rename to ...
11065 (tile_regsets): ... this.
11066 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11067 (tile_regs_info): New function.
11068 (tile_arch_setup): Set the current process'es tdesc.
11069 (the_low_target): Adjust.
11070 (initialize_low_arch): New function.
11071 * spu-low.c (tdesc_spu): Declare.
11072 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11073 * win32-arm-low.c (tdesc_arm): Declare.
11074 (arm_arch_setup): New function.
11075 (the_low_target): Install arm_arch_setup instead of
11076 init_registers_arm.
11077 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11078 (init_windows_x86): Rename to ...
11079 (i386_arch_setup): ... this. Set `win32_tdesc'.
11080 (the_low_target): Adjust.
11081 * win32-low.c (win32_tdesc): New global.
11082 (child_add_thread): Don't create the thread cache here.
11083 (do_initial_child_stuff): Set the new process'es tdesc.
11084 * win32-low.h (struct target_desc): Forward declare.
11085 (win32_tdesc): Declare.
11086 * lynx-i386-low.c (tdesc_i386): Declare global.
11087 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11088 * lynx-low.c (lynx_tdesc): New global.
11089 (lynx_add_process): Set the new process'es tdesc.
11090 * lynx-low.h (struct target_desc): Forward declare.
11091 (lynx_tdesc): Declare global.
11092 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11093 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11094 * nto-low.c (nto_tdesc): New global.
11095 (do_attach): Set the new process'es tdesc.
11096 * nto-low.h (struct target_desc): Forward declare.
11097 (nto_tdesc): Declare.
11098 * nto-x86-low.c (tdesc_i386): Declare.
11099 (nto_x86_arch_setup): Set `nto_tdesc'.
11100
b1fbec62
GB
111012013-06-04 Gary Benson <gbenson@redhat.com>
11102
11103 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11104 to qSupported response when appropriate.
11105 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11106 with nonzero-length annex.
11107 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11108 arguments supplied in annex.
11109
d1ec4ce7
DE
111102013-05-31 Doug Evans <dje@google.com>
11111
ac44adcb 11112 PR server/15594
d1ec4ce7
DE
11113 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11114 64 bits in 64-cross-32 environment.
11115
9b25f2d3
PA
111162013-05-28 Pedro Alves <palves@redhat.com>
11117
11118 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11119 (aarch64-without-fpu.c): Delete rule.
11120 * configure.srv (aarch64*-*-linux*): Remove references to
11121 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11122 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11123 declaration.
11124
6740dc9c
PA
111252013-05-24 Pedro Alves <palves@redhat.com>
11126
11127 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11128 instead of strchr/decode_address. Error if the range isn't split
11129 with a ','. Don't assume there's be a ':' in the action.
11130
c2d6af84
PA
111312013-05-23 Yao Qi <yao@codesourcery.com>
11132 Pedro Alves <palves@redhat.com>
11133
11134 * linux-low.c (lwp_in_step_range): New function.
11135 (linux_wait_1): If the thread was range stepping and stopped
11136 outside the stepping range, report the stop to GDB. Otherwise,
11137 continue stepping. Add range stepping debug output.
11138 (linux_set_resume_request): Copy the step range from the resume
11139 request to the lwp.
11140 (linux_supports_range_stepping): New.
11141 (linux_target_ops) <supports_range_stepping>: Set to
11142 linux_supports_range_stepping.
11143 * linux-low.h (struct linux_target_ops)
11144 <supports_range_stepping>: New field.
11145 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11146 * linux-x86-low.c (x86_supports_range_stepping): New.
11147 (the_low_target) <supports_range_stepping>: Set to
11148 x86_supports_range_stepping.
11149 * server.c (handle_v_cont): Handle 'r' action.
11150 (handle_v_requests): Append ";r" if the target supports range
11151 stepping.
11152 * target.h (struct thread_resume) <step_range_start,
11153 step_range_end>: New fields.
11154 (struct target_ops) <supports_range_stepping>:
11155 New field.
11156 (target_supports_range_stepping): New macro.
11157
58794e1a
JB
111582013-05-17 Joel Brobecker <brobecker@adacore.com>
11159
11160 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11161 confusion in comment.
11162
d631c5a7
JB
111632013-05-17 Joel Brobecker <brobecker@adacore.com>
11164
11165 * lynx-low.c (struct process_info_private): New type.
11166 (lynx_add_process): New function.
11167 (lynx_create_inferior, lynx_attach): Replace calls to
11168 add_process by calls to lynx_add_process.
11169 (lynx_resume): If PTID is null, then try using
11170 current_process()->private->last_wait_event_ptid.
11171 Add comments.
11172 (lynx_clear_inferiors): Delete. The contents of that function
11173 has been inlined in lynx_mourn;
11174 (lynx_wait_1): Save the ptid in the process's private data.
11175 (lynx_mourn): Free the process' private data. Replace call
11176 to lynx_clear_inferiors by call to clear_inferiors.
11177
96f7a20f
YQ
111782013-05-17 Yao Qi <yao@codesourcery.com>
11179
11180 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11181 the right place.
11182
db0dfaa0
LM
111832013-05-16 Luis Machado <lgustavo@codesourcery.com>
11184
11185 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11186 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11187 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11188 PT_TEXT_END_ADDR guards. Update comments.
11189 (linux_target_op) <read_offsets>: Conditionally define to
11190 linux_read_offsets if the target is UCLIBC and if it defines
11191 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11192
68f5f838
SL
111932013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11194 Andrew Jenner <andrew@codesourcery.com>
11195
11196 * Makefile.in (SFILES): Add linux-nios2-low.c.
11197 (clean): Add action to delete nios2-linux.c.
11198 (nios2-linux.c): New rule.
11199 * configure.srv: Add nios2*-*-linux*.
11200 * linux-nios2-low.c: New.
11201
1ebff1fd
HAQ
112022013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11203
11204 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11205
f6150862
HZ
112062013-04-25 Hui Zhu <hui@codesourcery.com>
11207
11208 PR gdb/15186
f6150862
HZ
11209 * ax.c (ax_printf): Add fflush.
11210
614c279d
TT
112112013-04-22 Tom Tromey <tromey@redhat.com>
11212
11213 * Makefile.in (SFILES): Add filestuff.c.
11214 (OBS): Add filestuff.o.
11215 (filestuff.o): New target.
11216 * config.in, configure: Rebuild.
11217 * configure.ac: Check for fdwalk, pipe2.
11218
7d4e5717
PA
112192013-04-17 Pedro Alves <palves@redhat.com>
11220
11221 * configure.ac (USE_THREAD_DB): Delete variable.
11222 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11223 Don't AC_SUBST USE_THREAD_DB.
11224 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11225 * config.in, configure: Regenerate.
11226
d5c93e41
PA
112272013-04-16 Pedro Alves <palves@redhat.com>
11228
11229 * linux-low.h (struct lwp_info) <thread_known>: Move under
11230 the USE_THREAD_DB #ifdef.
11231
04f5fe89
PA
112322013-04-16 Pedro Alves <palves@redhat.com>
11233
11234 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11235 (linux-low.o): Delete rule.
11236 * linux-low.h: Always include "gdb_thread_db.h" instead of
11237 conditionally including thread_db.h.
11238 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11239 HAVE_THREAD_DB_H.
11240
480b27bf
JK
112412013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11242
11243 * Makefile.in (install-only): Fix make install regression.
11244
43662968
JK
112452013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11246
11247 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11248 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11249 installation.
11250 * gdbserver.1: Remove.
11251
3e74e146
PA
112522013-03-22 Pedro Alves <palves@redhat.com>
11253
11254 * linux-low.c (handle_extended_wait): Don't call
11255 linux_enable_event_reporting.
11256
a8347a2a
TT
112572013-03-15 Tony Theodore <tonyt@logyst.com>
11258
11259 PR build/9098:
11260 * Makefile.in (SHELL): Use @SHELL@.
11261
eeb56fa7
SDJ
112622013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11263
11264 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11265 compiler warning.
11266
4fa7e2ff
JB
112672013-03-13 Joel Brobecker <brobecker@adacore.com>
11268
11269 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11270 Remove extraneous NULL element.
11271
8ddb1965
YQ
112722013-03-13 Yao Qi <yao@codesourcery.com>
11273
11274 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11275 'V' block in trace frame.
11276
9accd112
MM
112772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11278
11279 * target.h (struct target_ops): Add btrace ops.
11280 (target_supports_btrace): New macro.
11281 (target_enable_btrace): New macro.
11282 (target_disable_btrace): New macro.
11283 (target_read_btrace): New macro.
11284 * gdbthread.h (struct thread_info): Add btrace field.
11285 * server.c: Include btrace-common.h.
11286 (handle_btrace_general_set): New function.
11287 (handle_btrace_enable): New function.
11288 (handle_btrace_disable): New function.
11289 (handle_general_set): Call handle_btrace_general_set.
11290 (handle_qxfer_btrace): New function.
11291 (struct qxfer qxfer_packets[]): Add btrace entry.
11292 * inferiors.c (remove_thread): Disable btrace.
11293 * linux-low: Include linux-btrace.h.
11294 (linux_low_enable_btrace): New function.
11295 (linux_low_read_btrace): New function.
11296 (linux_target_ops): Add btrace ops.
11297 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11298 Add srv_linux_btrace=yes.
11299 (x86_64-*-linux*): Add linux-btrace.o.
11300 Add srv_linux_btrace=yes.
11301 * configure.ac: Define HAVE_LINUX_BTRACE.
11302 * config.in: Regenerated.
11303 * configure: Regenerated.
11304
5cc22e4c
MM
113052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11306
11307 * server.c (handle_qxfer): Preserve error message if -3 is
11308 returned.
11309 (qxfer): Document the -3 return value.
11310
7c97f91e
MM
113112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11312
11313 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11314 (linux_btrace_h): New variable.
11315 (linux-btrace.o): New rule.
11316
be9a119c 113172013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
11318 Hafiz Abid Qadeer <abidh@codesourcery.com>
11319
11320 * tracepoint.c (trace_buffer_size): New global.
11321 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11322 (init_trace_buffer): Change to one-argument function. Allocate
11323 trace buffer memory.
11324 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11325 handle QTBuffer:size packet.
11326 (cmd_bigqtbuffer_size): New function.
11327 (initialize_tracepoint): Call init_trace_buffer with
11328 DEFAULT_TRACE_BUFFER_SIZE.
11329 * server.c (handle_query): Add QTBuffer:size in the
11330 supported packets.
11331
e64f7499
YQ
113322013-03-07 Yao Qi <yao@codesourcery.com>
11333
11334 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11335 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11336 of -1.
11337 (cmd_qtsp): Adjust condition. Do post increment.
11338 Set cur_action and cur_step_action back to 0.
11339
f0ae6fc3
PA
113402013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11341
11342 PR server/15236
11343 * linux-low.c (linux_write_memory): Return early success if LEN is
11344 zero.
11345
b5b0b0af
CV
113462013-03-05 Corinna Vinschen <vinschen@redhat.de>
11347
334ad4a8 11348 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 11349
589bc927
TT
113502013-02-28 Tom Tromey <tromey@redhat.com>
11351
11352 * configure.ac: Invoke AC_SYS_LARGEFILE.
11353 * configure, config.in: Rebuild.
11354
dfe07582
CV
113552013-02-28 Corinna Vinschen <vinschen@redhat.com>
11356
11357 * win32-low.c: Throughout, fix format strings and casts of
11358 printf-like functions to avoid type related warnings on all
11359 platforms.
11360 (get_child_debug_event): Print dwDebugEventCode as hex since
11361 that's how it's usually documented.
11362
736cd585
YQ
113632013-02-28 Yao Qi <yao@codesourcery.com>
11364
11365 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11366 pulongest.
11367
e1f58301
JW
113682013-02-27 Jiong Wang <jiwang@tilera.com>
11369
11370 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11371 (reg-tilegx32.c): New rule.
11372 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11373 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11374 different register info initializer according to elf class.
11375 (init_registers_tilgx32): New function. The tilegx32 register info
11376 initializer.
11377 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11378 (tile_store_gregset): Likewise.
11379
d171ca78
YQ
113802013-02-27 Yao Qi <yao@codesourcery.com>
11381
11382 * server.c (process_point_options): Print debug message when
11383 debug_threads is true.
11384
282bbdf3
YQ
113852013-02-26 Yao Qi <yao@codesourcery.com>
11386
11387 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11388
aca22551
PA
113892013-02-19 Pedro Alves <palves@redhat.com>
11390 Kai Tietz <ktietz@redhat.com>
11391
11392 PR gdb/15161
11393
11394 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11395 instead of strtoul to extract address from packet.
11396 (process_serial_event) <'z'>: Likewise.
11397
4f3cee1c
YQ
113982013-02-18 Yao Qi <yao@codesourcery.com>
11399
11400 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11401
8e1d55a3
PA
114022013-02-14 Pedro Alves <palves@redhat.com>
11403
11404 Plug memory leak.
11405
11406 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11407 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11408
458820da
PA
114092013-02-14 Pedro Alves <palves@redhat.com>
11410
11411 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11412
baea0dae
PA
114132013-02-14 Pedro Alves <palves@redhat.com>
11414
11415 * tracepoint.c (save_string): Delete.
11416 (add_tracepoint_action): Use savestring instead of save_string.
11417
0b1afbb3
PA
114182013-02-12 Pedro Alves <palves@redhat.com>
11419
11420 * linux-xtensa-low.c: Ditto.
11421 * xtensa-xtregs.c: Ditto.
11422
8a4ac37e
PA
114232013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11424
11425 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11426 thread_db.
11427
148de6bb
MS
114282013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11429
11430 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11431 aarch64_num_wp_regs and aarch64_num_bp_regs to
11432 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11433
55fac6e0
MS
114342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11435
11436 * linux-aarch64-low.c (ps_get_thread_area): Replace
11437 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11438
176eb98c
MS
114392013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11440 Marcus Shawcroft <marcus.shawcroft@arm.com>
11441 Nigel Stephens <nigel.stephens@arm.com>
11442 Yufeng Zhang <yufeng.zhang@arm.com>
11443
11444 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11445 (aarch64.c, aarch64-without-fpu.c): New targets.
11446 * configure.srv (aarch64*-*-linux*): New.
11447 * linux-aarch64-low.c: New file.
11448
56f7af9c
MS
114492013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11450
43aaf8b6 11451 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
11452 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11453 (dequeue_one_deferred_signal, linux_resume_one_thread)
11454 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11455 (linux_tracefork_grandchild, linux_test_for_tracefork)
11456 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11457 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11458 where the argument is 0.
11459
60f662b0
YQ
114602013-01-25 Yao Qi <yao@codesourcery.com>
11461
11462 * event-loop.c: Include "queue.h".
11463 (gdb_event_p): New typedef.
11464 (struct gdb_event) <next_event>: Remove.
11465 (event_queue): Change to QUEUE(gdb_event_p).
11466 (async_queue_event): Remove.
11467 (gdb_event_xfree): New.
11468 (initialize_event_loop): New.
11469 (process_event): Use API from QUEUE.
11470 (wait_for_event): Likewise.
11471 * server.c (main): Call initialize_event_loop.
11472 * server.h (initialize_event_loop): Declare.
11473
5ae4861a
YQ
114742013-01-18 Yao Qi <yao@codesourcery.com>
11475
11476 * ax.h (struct eval_agent_expr_context): New.
11477 (gdb_eval_agent_expr): Update declaration.
11478 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11479 TFRAME. Add new argument CTX.
11480 * server.h (struct eval_agent_expr_context): Declare.
11481 (agent_mem_read, agent_tsv_read): Update declaration.
11482 (agent_mem_read_string): Likewise.
11483 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11484 (add_traceframe_block): Add new argument TPOINT.
11485 Increase TPOINT->traceframe_usage.
11486 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11487 eval_tracepoint_agent_expr.
11488 (condition_true_at_tracepoint): Likewise.
11489 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11490 (agent_mem_read_string, agent_tsv_read): Likewise.
11491
85e00e85
YQ
114922013-01-16 Yao Qi <yao@codesourcery.com>
11493
11494 * linux-low.c (linux_resume_one_lwp): Don't check
11495 'lwp->bp_reinsert != 0'.
11496
4039cf45
JB
114972013-01-07 Joel Brobecker <brobecker@adacore.com>
11498 Pedro Alves <palves@redhat.com>
11499
11500 * lynx-low.c (ptrace_request_to_str): Define a temporary
11501 macro and use it to simplify this function's implementation.
11502
9044dee2
JB
115032013-01-07 Joel Brobecker <brobecker@adacore.com>
11504
11505 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11506 sets errno.
11507
e6352c8f
JB
115082013-01-07 Joel Brobecker <brobecker@adacore.com>
11509
11510 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11511
50681a27
JB
115122013-01-07 Joel Brobecker <brobecker@adacore.com>
11513
11514 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11515
3f6e77ef
JB
115162013-01-07 Joel Brobecker <brobecker@adacore.com>
11517
11518 * lynx-low.c (lynx_resume): Use the resume_info parameter
11519 to determine the ptid for the lynx_ptrace call, unless
11520 it is equal to minus_one_ptid, in which case we use the
11521 ptid of the current_inferior.
11522 (lynx_wait_1): After having received a thread create/exit
11523 event, resume the inferior's execution using the signaling
11524 thread's ptid, rather than the old ptid.
11525
7fda33ae
JB
115262013-01-07 Joel Brobecker <brobecker@adacore.com>
11527
11528 * lynx-low.c (lynx_resume): Delete variable ret.
11529
b9786c74
JB
115302013-01-01 Joel Brobecker <brobecker@adacore.com>
11531
11532 * gdbreplay.c (gdbreplay_version): Update copyright year.
11533 * server.c (gdbserver_version): Likewise.
11534
8b93d60f
JB
115352012-12-17 Joel Brobecker <brobecker@adacore.com>
11536
11537 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11538 new thread.
11539
037335a7
JB
115402012-12-17 Joel Brobecker <brobecker@adacore.com>
11541
11542 * lynx-low.c (ptrace_request_to_str): Add handling for
11543 PTRACE_GETTRACESIG.
11544
52d4cbd8
JB
115452012-12-17 Joel Brobecker <brobecker@adacore.com>
11546
11547 * lynx-low.c (lynx_attach): Delete variable new_process.
11548
ab8f6ca9
JB
115492012-12-17 Joel Brobecker <brobecker@adacore.com>
11550
11551 * lynx-low.c (lynx_create_inferior): Delete variable
11552 new_process.
11553
78cbc024
JB
115542012-12-17 Joel Brobecker <brobecker@adacore.com>
11555
11556 * lynx-low.c (ptrace_request_to_str): Do not handle
11557 PTRACE_GETTHREADLIST if this macro does not exist.
11558
14a00470
YQ
115592012-12-15 Yao Qi <yao@codesourcery.com>
11560
11561 * Makefile.in (OBS): Add notif.o.
11562 * notif.c, notif.h: New.
11563 * server.c: Include "notif.h".
11564 (struct vstop_notif) <next>: Remove.
11565 <base>: New field.
11566 (queue_stop_reply): Update.
11567 (push_event, send_next_stop_reply): Remove.
11568 (discard_queued_stop_replies): Update.
11569 (notif_stop): New variable.
11570 (handle_v_stopped): Remove.
11571 (handle_v_requests): Don't call handle_v_stopped. Call
11572 handle_ack_notif instead.
11573 (queue_stop_reply_callback): Call notif_event_enque instead
11574 of queue_stop_reply.
11575 (handle_status): Don't call send_next_stop_reply, call
11576 notif_write_event instead.
11577 (kill_inferior_callback): Likewise.
11578 (detach_or_kill_inferior_callback): Likewise.
11579 (main): Call initialize_notif.
11580 (process_serial_event): Call QUEUE_is_empty.
11581 (handle_target_event): Call notif_push instead of push event.
11582 * server.h (push_event): Remove declaration.
11583
61c125b9
TT
115842012-12-10 Tom Tromey <tromey@redhat.com>
11585
11586 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11587 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11588 macros.
11589 (.c.o): Rewrite.
11590 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11591 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11592 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11593 (amd64-linux-ipa.o, ax.o): Rewrite.
11594 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11595 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11596 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11597 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11598 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11599 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11600 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11601 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11602 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11603 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11604 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11605 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11606 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11607 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11608 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11609 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11610 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11611 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11612 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11613 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11614 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11615 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11616 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11617 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11618 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11619 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11620 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11621 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11622 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11623 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11624 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11625 (reg-tilegx.o): Remove.
11626 (all_object_files): New macro.
11627 Include .deps files.
11628 * aclocal.m4, configure: Rebuild.
11629 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11630 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11631 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11632
e90e9ad9
TT
116332012-12-05 Tom Tromey <tromey@redhat.com>
11634
11635 PR gdb/14917:
11636 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11637
02d403bf 116382012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
11639
11640 * configure.ac: Check for linux/perf_event.h.
11641 * config.in: Regenerated.
11642 * configure: Regenerated.
11643
0270a750
PA
116442012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11645
11646 * hostio.c (handle_readlink): Decrease buffer size
11647 parameter passed to readlink by one byte.
11648
8c29b58e
YQ
116492012-11-26 Yao Qi <yao@codesourcery.com>
11650
11651 * configure.ac (build_warnings): Append '-Wempty-body'.
11652 * configure: Regenerated.
11653 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11654 body.
11655
8bdce1ff
PM
116562012-11-15 Pierre Muller <muller@sourceware.org>
11657
11658 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11659 * config.in: Regenerate.
11660 * configure: Regenerate.
11661 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11662 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11663 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11664 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11665 header.
11666 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11667 instead of <sys/wait.h> header.
11668 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11669
02d403bf 116702012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11671
11672 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11673 (various make rules): Remove -DGDBSERVER
11674
fbd5db48
YQ
116752012-11-09 Yao Qi <yao@codesourcery.com>
11676
11677 * spu-low.c (current_ptid): Move it to ..
11678 * gdbthread.h: ... here. New.
11679 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11680 * server.c (myresume, process_serial_event): Likewise.
11681 * thread-db.c (thread_db_find_new_threads): Likewise.
11682 * tracepoint.c (run_inferior_command): Likewise.
11683
b3dc46ff
AB
116842012-10-01 Andrew Burgess <aburgess@broadcom.com>
11685
11686 * server.c (handle_search_memory_1): Include access length in
11687 warning message.
11688
07c04788
HPN
116892012-09-05 Michael Brandt <michael.brandt@axis.com>
11690
11691 * linux-crisv32-low.c: Fix compile errors.
11692
918d227b
YQ
116932012-09-04 Yao Qi <yao@codesourcery.com>
11694
11695 * tracepoint.c (cmd_qtsv): Adjust debug message.
11696 Don't check CUR_TPOINT.
11697
18c1b81a
YQ
116982012-08-28 Yao Qi <yao@codesourcery.com>
11699
11700 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11701 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11702 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11703 Remove declarations of xmalloc, xreallloc, xstrdup and
11704 freeargv.
11705 * Makefile.in (libiberty_h): New.
11706 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11707 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11708
dc82f37b
YQ
117092012-08-23 Yao Qi <yao@codesourcery.com>
11710
11711 * server.h: Remove declaration of 'xsnprintf'.
11712
406b1477
KS
117132012-08-22 Keith Seitz <keiths@redhat.com>
11714
11715 * server.h: Include build-gnulib-gbserver/config.h.
11716 * gdbreplay.c: Likewise.
11717
e6712ff1
DE
117182012-08-08 Doug Evans <dje@google.com>
11719
11720 * Makefile.in (SFILES): Add gdb_vecs.c.
11721 (OBS): Add gdb_vecs.o.
11722 (gdb_vecs_h, host_defs_h): New variables.
11723 (thread-db.o): Add $(gdb_vecs_h) dependency.
11724 (gdb_vecs.o): New rule.
11725 * thread-db.c: #include "gdb_vecs.h".
11726 (thread_db_load_search): Use a vector to iterate over path elements.
11727 Handle text appearing after "$pdir".
11728
11729 * configure.ac: Add check for strstr.
11730 * config.in: Regenerate.
11731 * configure: Regenerate.
11732
7c3270ae
UW
117332012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11734
11735 * hostio.c (handle_pread): If pread fails, fall back to attempting
11736 lseek/read.
11737 (handle_pwrite): Likewise for pwrite.
11738
b62e2b27
UW
117392012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11740
11741 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11742 between unsupported TYPE and unimplementable ADDR/LEN combination.
11743 (arm_insert_point): Act on new return value.
11744
78a99e91
PA
117452012-07-31 Pedro Alves <palves@redhat.com>
11746
11747 * server.c (process_point_options): Only skip tokens if we find
11748 one that is unrecognized. Don't treat 'X' specially while
11749 skipping unrecognized tokens.
11750
fcf303ab
UW
117512012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11752
11753 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11754 to 4-byte-align HW breakpoint addresses for Thumb.
11755
7255706c
YQ
117562012-07-27 Yao Qi <yao@codesourcery.com>
11757
11758 PR remote/14161.
11759
11760 * server.h: Declare gdb_agent_about_to_close.
11761 * target.c (kill_inferior): Include "agent.h".
11762 New. Send command 'kill'.
11763 * target.h (kill_inferior): Removed macro.
11764 * tracepoint.c (gdb_agent_about_to_close): New.
11765 (gdb_agent_helper_thread): Handle command 'close'.
11766 Wait endlessly until the inferior stops.
11767 Install gdb_agent_remove_socket to atexit hook.
11768 (agent_socket_name): New static variable.
11769 (gdb_agent_socket_init): Replace local variable 'name' with
11770 'agent_socket_name'.
11771 (gdb_agent_remove_socket): New.
11772
5a3f286f
YQ
117732012-07-27 Yao Qi <yao@codesourcery.com>
11774
11775 * server.c (process_point_options): Stop at 'X' when parsing.
11776
961bd387
ME
117772012-07-19 Michael Eager <eager@eagercon.com>
11778
a261b8f5 11779 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
11780 to hw_execute.
11781 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11782 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11783 hardware breakpoint.
11784
aa7c7447
JK
117852012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11786
11787 * gdbserver/linux-low.c (initialize_low): Call
11788 linux_ptrace_init_warnings.
11789
7f216e7c
DE
117902012-07-02 Doug Evans <dje@google.com>
11791
11792 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11793 pointer to int.
11794
d3ce09f5
SS
117952012-07-02 Stan Shebs <stan@codesourcery.com>
11796
11797 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11798 (ax.o): Add it to build rule.
11799 (ax-ipa.o): Ditto.
11800 (OBS): Add format.o.
11801 (IPA_OBS): Add format.o.
11802 * server.c (handle_query): Claim support for breakpoint commands.
11803 (process_point_options): Add command case.
11804 (process_serial_event): Leave running if there are printfs in
11805 effect.
11806 * mem-break.h (any_persistent_commands): Declare.
11807 (add_breakpoint_commands): Declare.
11808 (gdb_no_commands_at_breakpoint): Declare.
11809 (run_breakpoint_commands): Declare.
11810 * mem-break.c (struct point_command_list): New struct.
11811 (struct breakpoint): New field command_list.
11812 (any_persistent_commands): New function.
11813 (add_commands_to_breakpoint): New function.
11814 (add_breakpoint_commands): New function.
11815 (gdb_no_commands_at_breakpoint): New function.
11816 (run_breakpoint_commands): New function.
11817 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11818 locally.
11819 * ax.c: Include format.h.
11820 (ax_printf): New function.
11821 (gdb_eval_agent_expr): Add printf opcode.
11822
2f8f6aed
YQ
118232012-06-13 Yao Qi <yao@codesourcery.com>
11824
11825 * server.c (start_inferior): Remove duplicated writes to fields
11826 'last_resume_kind' and 'last_status' of 'current_inferior'.
11827
0c9070b3
YQ
118282012-06-12 Yao Qi <yao@codesourcery.com>
11829 Pedro Alves <palves@redhat.com>
11830
11831 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11832 comment.
11833 * server.c (handle_v_cont): Extend comment.
11834
c52daf70
YQ
118352012-06-11 Yao Qi <yao@codesourcery.com>
11836
11837 * linux-low.c (linux_attach): Add 'static'.
11838
d38bbb0a
YQ
118392012-06-06 Yao Qi <yao@codesourcery.com>
11840
11841 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11842
89dc0afd
JK
118432012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11844
11845 Fix gcc -flto compilation warning.
11846 * server.c (main): Make variable multi_mode and attach volatile.
11847
75f62ce7
TJB
118482012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11849
11850 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11851 if the platform doesn't know about it.
11852
65f479b6
PA
118532012-05-30 Jeff Kenton <jkenton@tilera.com>
11854
11855 * Makefile.in (SFILES): Add linux-tile-low.c.
11856 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11857 * configure.srv: Handle tilegx-*-linux*.
11858 * linux-tile-low.c: New file.
11859
0c5bf5a9
JK
118602012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11861
11862 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11863
a493e3e2
PA
118642012-05-24 Pedro Alves <palves@redhat.com>
11865
11866 PR gdb/7205
11867
43aaf8b6 11868 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11869
2ea28649
PA
118702012-05-24 Pedro Alves <palves@redhat.com>
11871
11872 PR gdb/7205
11873
11874 Replace target_signal with gdb_signal throughout.
11875
8d409d16
MR
118762012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11877
11878 * linux-low.c (linux_store_registers): Avoid the copying sequence
11879 when no data has been retrieved by ptrace.
11880
23512c01
MGD
118812012-05-22 Will Deacon <will.deacon@arm.com>
11882
11883 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11884 Include asm/ptrace.h.
11885 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11886 already defined.
11887
4934b29e
MR
118882012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11889
11890 * linux-low.c (linux_store_registers): Don't re-retrieve data
11891 with ptrace that has already been obtained from /proc. Always
11892 copy any data retrieved with ptrace to the buffer supplied.
11893
bde24c0a
PA
118942012-05-11 Yao Qi <yao@codesourcery.com>
11895 Pedro Alves <palves@redhat.com>
11896
11897 * linux-low.c (enum stopping_threads_kind): New.
11898 (stopping_threads): Change type to `enum stopping_threads_kind'.
11899 (handle_extended_wait): If stopping and suspending threads, leave
11900 the new_lwp suspended too.
11901 (linux_wait_for_event): Adjust.
11902 (stop_all_lwps): Set `stopping_threads' to
11903 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11904 whether we're suspending threads or just stopping them. Assert no
11905 recursion happens.
11906
623b6bdf
YQ
119072012-04-29 Yao Qi <yao@codesourcery.com>
11908
11909 * server.h: Move some code to ...
11910 * gdbthread.h: ... here. New.
11911 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11912 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11913 (nto-low.o, win32-low.o): Likewise.
11914 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11915 * regcache.c, remote-utils.c, server.c: Likewise.
11916 * target.c, tracepoint.c, win32-low.c: Likewise.
11917
f15f9948
TJB
119182012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11919
11920 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11921 (PTRACE_ARG4_TYPE): Likewise.
11922 (PTRACE_XFER_TYPE): Likewise.
11923 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11924 ptrace to PTRACE_ARG3_TYPE.
11925 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11926 (PTRACE_ARG4_TYPE): Likewise.
11927 (PTRACE_XFER_TYPE): Likewise.
11928 (linux_detach_one_lwp): Cast fourth argument of
11929 ptrace to long then PTRACE_ARG4_TYPE.
11930 (regsets_fetch_inferior_registers): Cast third argument of
11931 ptrace to long then PTRACE_ARG3_TYPE.
11932 (regsets_store_inferior_registers): Likewise.
11933
38ea300a
PA
119342012-04-20 Pedro Alves <palves@redhat.com>
11935
11936 * configure: Regenerate.
11937
c971b7fa
PA
119382012-04-19 Pedro Alves <palves@redhat.com>
11939
43aaf8b6 11940 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11941 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11942 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11943 (all, install-only, uninstall, clean-info, all-lib, clean): No
11944 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11945 (maintainer-clean realclean distclean): Use subdir_do.
11946 (subdir_do): New.
11947 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11948 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11949 * acinclude.m4: Include acx_configure_dir.m4.
11950 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11951 calls. Call AC_PROG_RANLIB. Configure gnulib using
11952 ACX_CONFIGURE_DIR.
11953 (GNULIB): New.
11954 (GNULIB_STDINT_H): Adjust.
11955 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11956 * gdbreplay.c: Include build-gnulib/config.h.
11957 * server.h: Likewise.
11958 * aclocal.m4: Regenerate.
11959 * config.in: Regenerate.
11960 * configure: Regenerate.
c971b7fa 11961
809277f8
PA
119622012-04-19 Pedro Alves <palves@redhat.com>
11963
11964 * Makefile.in (LIBGNU, INCGNU): Adjust.
11965 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11966 (all, install-only, uninstall, clean-info, all-lib, clean)
11967 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11968 * configure.ac: Adjust AC_OUTPUT output.
11969 * aclocal.m4: Regenerate.
11970 * configure: Regenerate.
11971
fd9bb8b8
PA
119722012-04-19 Pedro Alves <palves@redhat.com>
11973
11974 * Makefile.in (generated_files): New.
11975 (server_h): Remove the explicit dependency on config.h, and depend
11976 on $generated_files.
11977
1c298c66
PA
119782012-04-19 Pedro Alves <palves@redhat.com>
11979
11980 * Makefile.in (INCGNU): Add -Ignulib.
11981
57c4b50b
PA
119822012-04-19 Pedro Alves <palves@redhat.com>
11983
11984 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11985 (INCGNU): ... this, and spell out -I here.
11986 (GNULIB_LIB): Rename to ...
11987 (LIBGNU): ... this.
11988 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11989
1030e047
PA
119902012-04-19 Pedro Alves <palves@redhat.com>
11991
11992 * config.in: Regenerate.
11993
447d4319
PA
119942012-04-19 Pedro Alves <palves@redhat.com>
11995
11996 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11997 * server.h (memmem): Remove declaration.
11998 * config.in: Regenerate.
11999 * configure: Regenerate.
12000
aad9eab9
YQ
120012012-04-19 Yao Qi <yao@codesourcery.com>
12002
12003 * Makefile.in (SFILES): Add common/vec.c.
12004 (OBS): Add vec.o.
12005 (vec.o): New rule.
12006
3e10640f
YQ
120072012-04-19 Yao Qi <yao@codesourcery.com>
12008
12009 * remote-utils.c (prepare_resume_reply): Replace with macro
12010 target_core_of_thread.
12011 * server.c (handle_qxfer_threads_proper): Likewise.
12012 * target.h (traget_core_of_thread): New macro.
12013
71622373
PA
120142012-04-18 Pedro Alves <palves@redhat.com>
12015
12016 * aclocal.m4: Regenerate.
12017 * configure: Regenerate.
12018
80d26939
YQ
120192012-04-16 Yao Qi <yao@codesourcery.com>
12020
12021 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12022 duplicated on address.
12023
42476b70
YQ
120242012-04-16 Yao Qi <yao@codesourcery.com>
12025
12026 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12027 (struct tracepoint_action_ops) <send>: New field.
12028 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12029 (agent_expr_send, x_tracepoint_action_send): New.
12030 (l_tracepoint_action_send): New.
12031 (cmd_qtdp): Download and install tracepoint
12032 according to `use_agent'.
12033 (run_inferior_command): Add one more parameter `len'.
12034 Update callers.
12035 (tracepoint_send_agent): New.
12036 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12037
7bc83639
YQ
120382012-04-16 Yao Qi <yao@codesourcery.com>
12039
12040 * tracepoint.c (download_tracepoints): Moved to ...
12041 (cmd_qtstart): ... here.
12042
5f18041e
YQ
120432012-04-14 Yao Qi <yao@codesourcery.com>
12044
12045 * tracepoint.c: Include inttypes.h.
12046 (struct collect_memory_action): Use sized types.
12047 (struct tracepoint): Likewise.
12048 (cmd_qtdp, stop_tracing): Update print specifiers.
12049 (cmd_qtp, response_tracepoint): Likewise.
12050 (collect_data_at_tracepoint): Likewise.
12051 (collect_data_at_step): Likewise.
12052
55a8c076
YQ
120532012-04-14 Yao Qi <yao@codesourcery.com>
12054
12055 Import gnulib module inttypes.
12056 * aclocal.m4, config.in, configure: Regenerated.
12057
dc750257
YQ
120582012-04-14 Yao Qi <yao@codesourcery.com>
12059
12060 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12061 Makefile and config.status at last.
12062
0ab5faf9
YQ
120632012-04-13 Yao Qi <yao@codesourcery.com>
12064
12065 * tracepoint.c: Include stdint.h unconditionally.
12066
18f5fd81
TJB
120672012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12068
12069 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12070 on BFD_HAVE_SYS_PROCFS_TYPE.
12071 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12072 * configure: Regenerate.
12073 * config.in: Likewise.
12074
4d47af5c
L
120752012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12076
12077 * Makefile.in (clean): Also remove x32.c x32-linux.c
12078 x32-avx.c x32-avx-linux.c.
12079 (x32.o): New target.
12080 (x32.c): Likewise.
12081 (x32-linux.o): Likewise.
12082 (x32-linux.c): Likewise.
12083 (x32-avx.o): Likewise.
12084 (x32-avx.c): Likewise.
12085 (x32-avx-linux.o): Likewise.
12086 (x32-avx-linux.c): Likewise.
12087
12088 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12089 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12090 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12091 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12092 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12093 i386/x32-avx-linux.xml.
12094
12095 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12096 (init_registers_x32_avx_linux): Likwise.
12097 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12098 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12099
ecedbe58
PA
121002012-04-13 Pedro Alves <palves@redhat.com>
12101
12102 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12103 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12104 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12105 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12106 the sub-make.
12107
c92b5177
L
121082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12109
12110 * linux-x86-low.c (compat_x32_clock_t): New.
12111 (compat_x32_siginfo_t): Likewise.
12112 (compat_x32_siginfo_from_siginfo): Likewise.
12113 (siginfo_from_compat_x32_siginfo): Likewise.
12114 (linux_is_elf64): Likewise.
12115 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12116 and siginfo_from_compat_x32_siginfo for x32.
12117 (x86_arch_setup): Set linux_is_elf64.
12118
214d508e
L
121192012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12120
12121 PR gdb/13969
12122 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12123 e_machine field.
12124 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12125 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12126 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12127 compatible with process.
12128
c9a1864a
YQ
121292012-04-12 Yao Qi <yao@codesourcery.com>
12130
12131 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12132 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12133 (install-only, install-info, clean): Handle sub dir gnulib.
12134 (all-lib, am--refresh): New targets.
12135 (memmem.o): Remove target.
12136 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12137 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12138 (AC_REPLACE_FUNCS): Remove memmem.
12139 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12140 (AC_OUTPUT): Generate Makefile in gnulib/.
12141 * aclocal.m4, config.in, configure: Regenerated.
12142
367ba2c2
MR
121432012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12144
12145 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12146
9d236627
PA
121472012-04-05 Pedro Alves <palves@redhat.com>
12148
12149 -Werror=strict-aliasing
12150
12151 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12152 pointer.
12153
111217b3
PA
121542012-04-04 Pedro Alves <palves@redhat.com>
12155
12156 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12157 (sparc_store_gregset_from_stack, sparc_store_gregset)
12158 (sparc_breakpoint_at): Fix formatting.
12159
8365dcf5
TJB
121602012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12161
12162 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12163 are available.
12164 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12165 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12166 * config.in: Regenerate.
12167 * configure: Likewise.
12168
689cc2ae
PA
121692012-03-29 Pedro Alves <palves@redhat.com>
12170
12171 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12172 Correct ptrace arguments.
12173
c14dfd32
PA
121742012-03-28 Pedro Alves <palves@redhat.com>
12175
12176 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12177 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12178 (IA64_FR1_REGNUM): New defines.
12179 (ia64_fetch_register): New.
12180 (the_low_target): Install it.
12181 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12182 field.
12183 * linux-low.c (linux_fetch_registers): Try the
12184 the_low_target.fetch_register hook first.
12185
12186 * linux-arm-low.c (the_low_target): Adjust.
12187 * linux-bfin-low.c (the_low_target): Adjust.
12188 * linux-cris-low.c (the_low_target): Adjust.
12189 * linux-crisv32-low.c (the_low_target): Adjust.
12190 * linux-m32r-low.c (the_low_target): Adjust.
12191 * linux-m68k-low.c (the_low_target): Adjust.
12192 * linux-mips-low.c (the_low_target): Adjust.
12193 * linux-ppc-low.c (the_low_target): Adjust.
12194 * linux-s390-low.c (the_low_target): Adjust.
12195 * linux-sh-low.c (the_low_target): Adjust.
12196 * linux-sparc-low.c (the_low_target): Adjust.
12197 * linux-tic6x-low.c (the_low_target): Adjust.
12198 * linux-x86-low.c (the_low_target): Adjust.
12199 * linux-xtensa-low.c (the_low_target): Adjust.
12200
63c88e13
PA
122012012-03-26 Pedro Alves <palves@redhat.com>
12202
12203 * server.c (handle_qxfer_libraries): Don't bail early if
12204 the_target->qxfer_libraries_svr4 is not NULL.
12205
fb723180
PA
122062012-03-26 Pedro Alves <palves@redhat.com>
12207
12208 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12209
0afae3cf
PA
122102012-03-23 Pedro Alves <palves@redhat.com>
12211
12212 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12213 "library-list-svr4" element's start tag when the the DSO list is
12214 empty.
12215
485f1ee4
PA
122162012-03-23 Pedro Alves <palves@redhat.com>
12217
12218 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12219 a variable whose type size is the same as the inferior's pointer
12220 size.
12221
a5362b9a
TS
122222012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12223
12224 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12225 struct siginfo.
12226 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12227 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12228 * linux-low.h: Include <signal.h>.
12229 (struct siginfo): Remove forward declaration.
12230 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12231 struct siginfo.
12232
d226c142
MF
122332012-03-21 Mike Frysinger <vapier@gentoo.org>
12234
12235 * .gitignore: Ignore more files.
12236
122f36ef
PA
122372012-03-19 Pedro Alves <palves@redhat.com>
12238 Jan Kratochvil <jan.kratochvil@redhat.com>
12239
12240 * server.c (cont_thread, general_thread): Add describing comments.
12241 (start_inferior): Clear `cont_thread'.
12242 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12243 of a process.
12244
fc3e5175
YQ
122452012-03-15 Yao Qi <yao@codesourcery.com>
12246
12247 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12248 handling to ...
12249 (cmd_qtdp): ... here.
12250
8d0d92cd
YQ
122512012-03-15 Yao Qi <yao@codesourcery.com>
12252
12253 * tracepoint.c (struct tracepoint_action_ops): New.
12254 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12255 (m_tracepoint_action_download): New.
12256 (r_tracepoint_action_download): New.
12257 (x_tracepoint_action_download): New.
12258 (l_tracepoint_action_download): New.
12259 (add_tracepoint_action): Install `action->ops' according type.
12260 (download_tracepoint_1): Move code `download' function pointer
12261 of various tracepoint_action_ops.
12262
87b0bb13
JK
122632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12264
12265 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12266 linux_ptrace_attach_warnings.
12267
5f572dec
JK
122682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12269
12270 * Makefile.in (linux-ptrace.o): New.
12271 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12272 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12273 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12274 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12275 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12276 of these targets.
12277 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12278
f4647387
YQ
122792012-03-08 Yao Qi <yao@codesourcery.com>
12280 Pedro Alves <palves@redhat.com>
12281
12282 Fix PR server/13392.
12283 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12284 offset of JMP insn.
12285 * tracepoint.c (remove_tracepoint): New.
12286 (cmd_qtdp): Call remove_tracepoint when failed to install.
12287
9b224c5e
PA
122882012-03-07 Pedro Alves <palves@redhat.com>
12289
12290 * linux-low.c (get_detach_signal): New.
12291 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12292 Pass on pending signals to PTRACE_DETACH. Check the result of the
12293 ptrace call.
12294 * server.c (program_signals, program_signals_p): New.
12295 (handle_general_set): Handle QProgramSignals.
12296 * server.h (program_signals, program_signals_p): Declare.
12297
e237a7e2
JK
122982012-03-05 Pedro Alves <palves@redhat.com>
12299 Jan Kratochvil <jan.kratochvil@redhat.com>
12300
12301 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12302 New comment why.
12303
5808517f
YQ
123042012-03-03 Yao Qi <yao@codesourcery.com>
12305
12306 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12307 agent_look_up_symbols.
12308
58b4daa5
YQ
123092012-03-03 Yao Qi <yao@codesourcery.com>
12310
12311 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12312 (linux-x86-low.o): Likewise.
12313 * server.h: Remove in_process_agent_loaded.
12314 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12315 common/agent.c.
12316 Update callers.
12317
8ffcbaaf
YQ
123182012-03-03 Yao Qi <yao@codesourcery.com>
12319
12320 * tracepoint.c (gdb_agent_capability): New global.
12321 (in_process_agent_loaded_ust): Renamed to
12322 `in_process_agent_supports_ust'.
12323 Update callers.
12324 (in_process_agent_supports_ust): Call agent_capability_check.
12325 (clear_installed_tracepoints): Assert that agent supports
12326 agent.
12327
d1feda86
YQ
123282012-03-03 Yao Qi <yao@codesourcery.com>
12329
12330 * linux-low.c (linux_supports_agent): New.
12331 (linux_target_ops): Initialize field `supports_agent' with
12332 linux_supports_agent.
12333 * target.h (struct target_ops) <supports_agent>: New.
12334 (target_supports_agent): New macro.
12335 * server.c (handle_general_set): Handle packet 'QAgent'.
12336 (handle_query): Send `QAgent+'.
12337 * Makefile.in (server.o): Depends on agent.h.
12338
2fa291ac
YQ
123392012-03-03 Yao Qi <yao@codesourcery.com>
12340
12341 * Makefile.in (OBS): Add agent.o.
12342 Add new rule for agent.o.
12343 Track dependence of tracepoint.c on agent.h.
12344 * tracepoint.c (run_inferior_command_1):
12345 (run_inferior_command): Call agent_run_command.
12346 (gdb_ust_connect_sync_socket): Deleted. Move it to
12347 common/agent.c.
12348 (resume_thread, stop_thread): Likewise.
12349 (gdb_ust_socket_init): Renamed to ...
12350 (gdb_agent_socket_init): ... New.
12351 (gdb_ust_thread): Renamed to ...
12352 (gdb_agent_helper_thread): ... New.
12353 (gdb_ust_init): Move some code to ...
12354 (gdb_agent_init): ... here. New.
12355 [HAVE_UST]: Call gdb_ust_init.
12356 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12357 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12358 * config.in, configure: Regenerated.
12359
05044653
PA
123602012-03-02 Pedro Alves <palves@redhat.com>
12361
12362 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12363 * linux-low.c (struct simple_pid_list): New.
12364 (stopped_pids): New a struct simple_pid_list pointer.
12365 (add_to_pid_list, pull_pid_from_list): New.
12366 (handle_extended_wait): Don't assume the first signal new children
12367 report is SIGSTOP. Adjust call to pull_pid_from_list.
12368 (linux_wait_for_lwp): Adjust.
12369
8d00225b
YQ
123702012-03-02 Yao Qi <yao@codesourcery.com>
12371
12372 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12373 debug log.
12374
19560ba5
YQ
123752012-03-02 Yao Qi <yao@codesourcery.com>
12376
12377 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12378 `stop_pc' and `tpoint'. Update caller.
12379
1faeff08
MR
123802012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12381
12382 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12383 * linux-low.c (use_linux_regsets): New macro.
12384 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12385 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12386 (linux_register_in_regsets): New function.
12387 (usr_fetch_inferior_registers): Skip registers covered by
12388 regsets.
12389 (usr_store_inferior_registers): Likewise.
12390 (usr_fetch_inferior_registers): New macro.
12391 (usr_store_inferior_registers): Likewise.
12392 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12393 (linux_store_registers): Likewise.
12394 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12395 prototype.
12396 (init_registers_mips64_dsp_linux): Likewise.
12397 (init_registers_mips_linux): New macro.
12398 (init_registers_mips_dsp_linux): Likewise.
12399 (mips_dsp_num_regs): Likewise.
12400 (DSP_BASE, DSP_CONTROL): New fallback macros.
12401 (mips_base_regs): New macro.
12402 (mips_regmap): Use it. Fix the size.
12403 (mips_dsp_regmap): New variable.
12404 (mips_dsp_regset_bitmap): Likewise.
12405 (mips_arch_setup): New function.
12406 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12407 than mips_regmap.
12408 (mips_cannot_store_register): Likewise.
12409 (the_low_target): Update .arch_setup, .num_regs and .regmap
12410 initializers. Add .regset_bitmap initializer.
12411 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12412 initializer.
12413 * linux-bfin-low.c (the_low_target): Likewise.
12414 * linux-cris-low.c (the_low_target): Likewise.
12415 * linux-crisv32-low.c (the_low_target): Likewise.
12416 * linux-ia64-low.c (the_low_target): Likewise.
12417 * linux-m32r-low.c (the_low_target): Likewise.
12418 * linux-m68k-low.c (the_low_target): Likewise.
12419 * linux-ppc-low.c (the_low_target): Likewise.
12420 * linux-s390-low.c (the_low_target): Likewise.
12421 * linux-sh-low.c (the_low_target): Likewise.
12422 * linux-sparc-low.c (the_low_target): Likewise.
12423 * linux-tic6x-low.c (the_low_target): Likewise.
12424 * linux-x86-low.c (the_low_target): Likewise.
12425 * linux-xtensa-low.c (the_low_target): Likewise.
12426 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12427 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12428 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12429 srv_xmlfiles.
12430 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12431 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12432
c03e6ccc
YQ
124332012-02-29 Yao Qi <yao@codesourcery.com>
12434 Pedro Alves <palves@redhat.com>
12435
12436 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12437 `step_over_finished' is true.
12438
644cebc9
PA
124392012-02-27 Pedro Alves <palves@redhat.com>
12440
12441 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12442 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12443
c14d7ab2
PA
124442012-02-27 Pedro Alves <palves@redhat.com>
12445
12446 PR server/9684
12447 * linux-low.c (pid_is_stopped): New.
12448 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12449
412c89dd
LM
124502012-02-25 Luis Machado <lgustavo@codesourcery.com>
12451
12452 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12453 of conditions.
12454
b745defe
MR
124552012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12456
12457 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12458
9f3a5c85
LM
124592012-02-24 Luis Machado <lgustavo@codesourcery>
12460
12461 * server.c (handle_query): Advertise support for target-side
12462 breakpoint condition evaluation.
12463 (process_point_options): New function.
12464 (process_serial_event): When inserting a breakpoint, check for
12465 a target-side condition that should be evaluated.
12466
12467 * mem-break.c: Include regcache.h and ax.h.
12468 (point_cond_list_t): New data structure.
12469 (breakpoint) <cond_list>: New field.
12470 (find_gdb_breakpoint_at): Make non-static.
12471 (delete_gdb_breakpoint_at): Clear any target-side
12472 conditions.
12473 (clear_gdb_breakpoint_conditions): New function.
12474 (add_condition_to_breakpoint): Likewise.
12475 (add_breakpoint_condition): Likewise.
12476 (gdb_condition_true_at_breakpoint): Likewise.
12477 (gdb_breakpoint_here): Return result directly instead
12478 of going through a local variable.
12479
12480 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12481 (clear_gdb_breakpoint_conditions): Likewise.
12482 (add_breakpoint_condition): Likewise.
12483 (gdb_condition_true_at_breakpoint): Likewise.
12484
12485 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12486 (need_step_over_p): Take target-side breakpoint condition into
12487 consideration.
12488
5e1dc496
LM
124892012-02-24 Luis Machado <lgustavo@codesourcery>
12490
12491 * server.h: Include tracepoint.h.
12492 (agent_mem_read, agent_get_trace_state_variable_value,
12493 agent_set_trace_state_variable_value,
12494 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12495 get_set_tsv_func_addr): New prototypes.
12496
12497 * ax.h: New include file.
12498 * ax.c: New source file.
12499
12500 * tracepoint.c: Include ax.h.
12501 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12502 agent_expr, eval_result_type): Move to ax.h.
12503 (parse_agent_expr): Rename to ...
12504 (gdb_parse_agent_expr): ... this, make it non-static and move
12505 to ax.h.
12506 (unparse_agent_expr) Rename to ...
12507 (gdb_unparse_agent_expr): ... this, make it non-static and move
12508 to ax.h.
12509 (eval_agent_expr): Rename to ...
12510 (eval_tracepoint_agent_expr): ... this.
12511 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12512 forward declarations.
12513 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12514 (agent_get_trace_state_variable_value): New function.
12515 (agent_set_trace_state_variable_value): New function.
12516 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12517 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12518 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12519 (condition_true_at_tracepoint): Likewise.
12520 (parse_agent_expr): Rename to ...
12521 (gdb_parse_agent_expr): ... this and move to ax.c.
12522 (unparse_agent_expr): Rename to ...
12523 (gdb_unparse_agent_expr): ... this and move to ax.c.
12524 (gdb_agent_op_name): Move to ax.c.
12525 (eval_agent_expr): Rename to ...
12526 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12527 and move to ax.c.
12528 (eval_tracepoint_agent_expr): New function.
12529 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 12530 non-static.
5e1dc496
LM
12531 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12532 ax.c.
12533 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12534 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12535 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12536 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12537 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12538 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12539 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12540 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12541 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12542 (compile_bytecodes): Remove forward declaration.
12543 (is_goto_target): Move to ax.c.
12544 (compile_bytecodes): Move to ax.c and call
12545 agent_get_trace_state_variable_value (...) and
12546 agent_set_trace_state_variable_value (...).
12547
12548 * Makefile.in: Update ax.c and IPA dependencies.
12549
277e4e52
PA
125502012-02-24 Pedro Alves <palves@redhat.com>
12551
12552 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12553 (cmd_bigqtbuffer_circular): ... this. Only handle
12554 'QTBuffer:circular:'.
12555 (handle_tracepoint_general_set): Adjust.
12556
bf4c19f7
YQ
125572012-02-16 Yao Qi <yao@codesourcery.com>
12558
12559 * inferiors.c: Move code to ...
12560 * dll.c: .... here. New.
12561 * server.h: Declare clear_dlls.
12562 * Makefile.in (SFILES): Add dll.c.
12563 (OBS): Add dll.o
12564 (dll.o): New rule.
12565
d73f2619
YQ
125662012-02-11 Yao Qi <yao@codesourcery.com>
12567
12568 * server.c: (handle_monitor_command): Add a new parameter
12569 `own_buf'.
12570 (handle_query): Update caller.
12571
f8255c2a
JB
125722012-02-09 Joel Brobecker <brobecker@adacore.com>
12573
12574 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12575 * configure, config.in: Regenerate.
12576 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12577 is not defined.
12578
da84f473
PA
125792012-02-02 Pedro Alves <palves@redhat.com>
12580
12581 Try SIGKILL first, then PTRACE_KILL.
12582 * linux-low.c (linux_kill_one_lwp): New.
12583 (linux_kill_one_lwp): Rename to ...
12584 (kill_one_lwp_callback): ... this. Use the new
12585 linux_kill_one_lwp.
12586
e886a173
PA
125872012-02-02 Pedro Alves <palves@redhat.com>
12588
12589 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12590 inferior.
12591
be07f1a2
PA
125922012-01-27 Pedro Alves <palves@redhat.com>
12593
12594 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12595 (elf_64_file_p): Make static.
12596 (linux_pid_exe_is_elf_64_file): New.
12597 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12598 Delete declarations.
12599 (linux_pid_exe_is_elf_64_file): Declare.
12600 * linux-x86-low.c (x86_arch_setup): Use
12601 linux_pid_exe_is_elf_64_file.
12602
d8301ad1
JK
126032012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12604
12605 * linux-low.c (linux_wait_for_event_1): Rename to ...
12606 (linux_wait_for_event): ... here and merge it with former
12607 linux_wait_for_event - new variable wait_ptid, use it.
12608 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12609
01b17894
PA
126102012-01-23 Pedro Alves <palves@redhat.com>
12611
12612 * server.c (main): Avoid yet another case of infinite loop while
12613 detaching/killing after a longjmp.
12614
e825046f
JK
126152012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12616
12617 Code cleanup.
12618 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12619
b9e7b9c3
UW
126202012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12621
12622 * hostio.c (handle_readlink): New function.
12623 (handle_vFile): Call it to handle "vFile:readlink" packets.
12624
901f9912
UW
126252012-01-20 Pedro Alves <palves@redhat.com>
12626 Ulrich Weigand <ulrich.weigand@linaro.org>
12627
12628 * server.c (handle_v_requests): Only support vAttach and vRun to
12629 start multiple processes when in extended protocol mode.
12630
fc1ab1a0
PA
126312012-01-17 Pedro Alves <palves@redhat.com>
12632
12633 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12634 memalign plus mprotect to allocate the scratch buffer.
12635
7d5d4e98
PA
126362012-01-13 Pedro Alves <palves@redhat.com>
12637
12638 * server.c (attach_inferior): Clear `cont_thread'.
12639
f128d5e9
PA
126402012-01-13 Pedro Alves <palves@redhat.com>
12641
12642 * server.c (main): Avoid infinite loop while detaching/killing
12643 after a longjmp.
12644
06db92f0
DE
126452012-01-09 Doug Evans <dje@google.com>
12646
12647 * server.c (start_inferior): Set last_ptid in --wrapper case.
12648
32d92999
YQ
126492012-01-06 Yao Qi <yao@codesourcery.com>
12650
12651 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12652 defined.
12653 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12654
5e0a92a9
YQ
126552012-01-04 Yao Qi <yao@codesourcery.com>
12656
12657 * tracepoint.c (cmd_qtdp): Print debug message
12658 for static tracepoint.
12659
ae639e8c
YQ
126602012-01-04 Yao Qi <yao@codesourcery.com>
12661
12662 * tracepoint.c (trace_vdebug): Differentiate debug message
12663 between gdbserver and IPA.
12664
f72429c5
YQ
126652012-01-03 Yao Qi <yao@codesourcery.com>
12666
12667 * tracepoint.c (tracepoint_was_hit): Don't collect for
12668 static tracepoint.
12669
12c3e59c
JB
126702012-01-02 Joel Brobecker <brobecker@adacore.com>
12671
12672 * terminal.h: Reformat copyright header.
12673
67827812
JB
126742012-01-02 Joel Brobecker <brobecker@adacore.com>
12675
12676 * server.c (gdbserver_version): Update copyright year.
12677 * gdbreplay.c (gdbreplay_version): Likewise.
12678
3e52c33d
JK
126792011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12680
12681 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12682
12683 Revert:
12684 2011-12-18 Hui Zhu <teawater@gmail.com>
12685 * linux-low.c (linux_create_inferior): Save return value to ret.
12686
66f1260e
HZ
126872011-12-18 Hui Zhu <teawater@gmail.com>
12688
12689 * linux-low.c (linux_create_inferior): Save return value to ret.
12690
e77616d7
DE
126912011-12-16 Doug Evans <dje@google.com>
12692
e7b06c57
DE
12693 * linux-low.c (linux_create_inferior): If stdio connection,
12694 redirect stdin from /dev/null, stdout to stderr.
12695 * remote-utils.c (remote_is_stdio): New static global.
12696 (remote_connection_is_stdio): New function.
12697 (remote_prepare): Handle stdio connection.
12698 (remote_open): Ditto.
12699 (remote_close): Don't close stdin for stdio connections.
12700 (read_prim,write_prim): New functions. Replace all calls to
12701 read/write to these.
12702 * server.c (main): Watch for "-" argument. Move call to
12703 remote_prepare before start_inferior.
12704 * server.h (STDIO_CONNECTION_NAME): New macro.
12705 (remote_connection_is_stdio): Declare.
12706
e77616d7
DE
12707 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12708 in debugging output.
12709
82067193
YQ
127102011-12-15 Yao Qi <yao@codesourcery.com>
12711
12712 * tracepoint.c: Include sys/syscall.h.
12713 (gdb_ust_thread): Remove preprocessor conditional.
12714
82bfbe7e
PA
127152011-12-14 Pedro Alves <pedro@codesourcery.com>
12716
12717 * linux-low.c (linux_detach_one_lwp): Call
12718 the_low_target.prepare_to_resume before detaching.
12719
712c6575
YQ
127202011-12-14 Yao Qi <yao@codesourcery.com>
12721
12722 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12723 of write.
12724
d54d1edf
YQ
127252011-12-14 Yao Qi <yao@codesourcery.com>
12726
12727 * i386-low.c (i386_low_stopped_data_address): Initialize local
12728 variable `control'.
12729
6210a125
PA
127302011-12-13 Pedro Alves <pedro@codesourcery.com>
12731
12732 PR remote/13492
12733
12734 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12735 DR_CONTROL unless necessary. Extend comments.
12736 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12737 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12738
2ece8244
YQ
127392011-12-13 Yao Qi <yao@codesourcery.com>
12740
12741 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12742 macros.
12743 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12744
784867a5
JK
127452011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12746
12747 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12748 Print new debug message for such case.
12749
6bf36717
JK
127502011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12751
12752 Fix overlapping memcpy.
12753 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12754 the read_inferior_memory transfer.
12755 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12756 write_inferior_memory transfer.
12757 (set_fast_tracepoint_jump): New variable buf. Use it for the
12758 read_inferior_memory and write_inferior_memory transfers.
12759 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12760 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12761 Use it for the write_inferior_memory transfer.
12762 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12763 buffers.
12764
50275556
MR
127652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12766
12767 * linux-low.c (fetch_register, store_register): Make code
12768 consistent, fix formatting.
12769
7325beb4
MR
127702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12771
12772 * linux-low.c (usr_store_inferior_registers): Factor out code
12773 to handle individual registers into...
12774 (store_register): ... this new function.
12775
c642a434
UW
127762011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12777
12778 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12779 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12780 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12781 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12782 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12783 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12784 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12785 (srv_xmlfiles): Add new XML files.
12786
12787 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12788 and <sys/uio.h>.
12789 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12790 (init_registers_s390_linux32v1): Add prototype.
12791 (init_registers_s390_linux32v2): Likewise.
12792 (init_registers_s390_linux64v1): Likewise.
12793 (init_registers_s390_linux64v2): Likewise.
12794 (init_registers_s390x_linux64v1): Likewise.
12795 (init_registers_s390x_linux64v2): Likewise.
12796 (s390_num_regs): Increment to 52.
12797 (s390_regmap): Add orig_r2 register.
12798 (s390_num_regs_3264): Increment to 68.
12799 (s390_regmap_3264): Add orig_r2 register.
12800 (s390_collect_ptrace_register): Handle orig_r2 register.
12801 (s390_supply_ptrace_register): Likewise.
12802 (s390_fill_last_break): New function.
12803 (s390_store_last_break): Likewise.
12804 (s390_fill_system_call): New function.
12805 (s390_store_system_call): Likewise.
12806 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12807 register sets.
12808 (s390_check_regset): New function.
12809 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12810 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12811 Update target_regsets for available register sets.
12812
2268b414
JK
128132011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12814 Jan Kratochvil <jan.kratochvil@redhat.com>
12815
12816 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12817 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12818 New.
12819 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12820 * linux-low.h (struct process_info_private): New member r_debug.
12821 * server.c (handle_qxfer_libraries): Call
12822 the_target->qxfer_libraries_svr4.
12823 (handle_qxfer_libraries_svr4): New function.
12824 (qxfer_packets): New entry "libraries-svr4".
12825 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12826 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12827 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12828 PACKET_qXfer_libraries_svr4.
12829
d6db1fab
UW
128302011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12831
12832 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12833 PSW address/mask between 8-byte and 16-byte formats.
12834 (s390_supply_ptrace_register): Likewise.
12835 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12836 basic addressing mode bit.
12837
242f5f1c
SS
128382011-11-24 Stan Shebs <stan@codesourcery.com>
12839
12840 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12841
f196051f
SS
128422011-11-17 Stan Shebs <stan@codesourcery.com>
12843
12844 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12845 (tracing_start_time): New global.
12846 (tracing_stop_time): New global.
12847 (tracing_user_name): New global.
12848 (tracing_notes): New global.
12849 (tracing_stop_note): New global.
12850 (cmd_qtstart): Set traceframe_usage, start_time.
12851 (stop_tracing): Set stop_time.
12852 (cmd_qtstatus): Report additional status.
12853 (cmd_qtp): New function.
12854 (handle_tracepoint_query): Call it.
12855 (cmd_qtnotes): New function.
12856 (handle_tracepoint_general_set): Call it.
12857 (get_timestamp): Rename from tsv_get_timestamp.
12858
405f8e94
SS
128592011-11-14 Stan Shebs <stan@codesourcery.com>
12860 Kwok Cheung Yeung <kcy@codesourcery.com>
12861
12862 * linux-x86-low.c (small_jump_insn): New.
12863 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12864 trampoline and error message, build a trampoline and issue a small
12865 jump instruction to it.
12866 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12867 trampoline and error message.
12868 (x86_get_min_fast_tracepoint_insn_len): New.
12869 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12870 * linux-low.h (struct linux_target_ops): Add arguments to
12871 install_fast_tracepoint_jump_pad operation, add new operation.
12872 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12873 arguments.
12874 (linux_get_min_fast_tracepoint_insn_len): New function.
12875 (linux_target_op): Add new operation.
12876 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12877 (gdb_trampoline_buffer_end): Ditto.
12878 (gdb_trampoline_buffer_error): Ditto.
12879 (struct ipa_sym_addresses): Add fields for new IPA variables.
12880 (symbol_list): Add entries for new IPA variables.
12881 (struct tracepoint): Add fields to hold the address range of the
12882 trampoline used by the tracepoint.
12883 (trampoline_buffer_head): New static variable.
12884 (trampoline_buffer_tail): Ditto.
12885 (claim_trampoline_space): New function.
12886 (have_fast_tracepoint_trampoline_buffer): New function.
12887 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12888 structure.
12889 (install_fast_tracepoint): Ditto, also add error buffer argument.
12890 (cmd_qtminftpilen): New function.
12891 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12892 (fast_tracepoint_from_trampoline_address): New function.
12893 (fast_tracepoint_collecting): Handle trampoline as part of jump
12894 pad space.
12895 (set_trampoline_buffer_space): New function.
12896 (initialize_tracepoint): Initialize new IPA variables.
12897 * target.h (struct target_ops): Add arguments to
12898 install_fast_tracepoint_jump_pad operation, add new
12899 get_min_fast_tracepoint_insn_len operation.
12900 (target_get_min_fast_tracepoint_insn_len): New.
12901 (install_fast_tracepoint_jump_pad): Add arguments.
12902 * server.h (IPA_BUFSIZ): Define.
12903 * linux-i386-ipa.c: Include extra header files.
12904 (initialize_fast_tracepoint_trampoline_buffer): New function.
12905 (initialize_low_tracepoint): Call it.
12906 * server.h (set_trampoline_buffer_space): Declare.
12907 (claim_trampoline_space): Ditto.
12908 (have_fast_tracepoint_trampoline_buffer): Ditto.
12909
1e4d1764
YQ
129102011-11-14 Yao Qi <yao@codesourcery.com>
12911
12912 * server.c (handle_query): Handle InstallInTrace for qSupported.
12913 * tracepoint.c (add_tracepoint): Sort list.
12914 (install_tracepoint, download_tracepoint): New.
12915 (cmd_qtdp): Call them to install and download tracepoints.
12916 (sort_tracepoints): Removed.
12917 (cmd_qtstart): Update.
12918
5c73ff4e
YQ
129192011-11-14 Yao Qi <yao@codesourcery.com>
12920
12921 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12922 * mem-break.h: Declare.
12923 * tracepoint.c (cmd_qtstart): Move some code to ...
12924 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12925 New.
12926 (download_tracepoints): Move some code to ...
12927 (download_tracepoint_1): ... here. New.
12928
86a30030
YQ
129292011-11-08 Yao Qi <yao@codesourcery.com>
12930
12931 * remote-utils.c (relocate_instruction): A comment fix.
12932
8d26e50c
JB
129332011-11-07 Joel Brobecker <brobecker@adacore.com>
12934
12935 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12936 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12937 dr_status_mirror and dr_control_mirror from debug_reg_state.
12938 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12939 (i386_initial_stuff): Remove use of deleted globals.
12940 (i386_get_thread_context, i386_set_thread_context,
12941 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12942 from debug_reg_state.
12943
a59306a3
YQ
129442011-11-05 Yao Qi <yao@codesourcery.com>
12945
12946 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12947 address as TPOINT's.
12948
3065dfb6
SS
129492011-11-02 Stan Shebs <stan@codesourcery.com>
12950
12951 * tracepoint.c (agent_mem_read_string): New function.
12952 (eval_agent_expr): Call it for tracenz.
12953 * server.c (handle_query): Report support for tracenz.
12954
fd0d8c7c
YQ
129552011-11-02 Yao Qi <yao@codesourcery.com>
12956
12957 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12958
609086b1
YQ
129592011-11-02 Yao Qi <yao@codesourcery.com>
12960
12961 * target.h: Fix a typo in comment.
12962
b9fd1791
PA
129632011-10-31 Pedro Alves <pedro@codesourcery.com>
12964
12965 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12966 clobber the breakpoints' shadows with fast tracepoint jumps.
12967 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12968 * target.c (write_inferior_memory): Also pass MYADDR down to
12969 check_mem_write.
12970
03583c20
UW
129712011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12972
12973 * configure.ac: Check support for personality routine.
12974 * configure: Regenerate.
12975 * config.in: Likewise.
12976 * linux-low.c: Include <sys/personality.h>.
12977 Define ADDR_NO_RANDOMIZE if necessary.
12978 (linux_create_inferior): Disable address space randomization when
12979 forking inferior, if requested.
12980 (linux_supports_disable_randomization): New function.
12981 (linux_target_ops): Install it.
12982 * server.h (disable_randomization): Declare.
12983 * server.c (disable_randomization): New global variable.
12984 (handle_general_set): Handle QDisableRandomization.
12985 (handle_query): Likewise for qSupported.
12986 (main): Support --disable-randomization and --no-disable-randomization
12987 command line arguments.
12988 * target.h (struct target_ops): Add supports_disable_randomization.
12989 (target_supports_disable_randomization): New macro.
12990
723b724b
MF
129912011-09-29 Mike Frysinger <vapier@gentoo.org>
12992
12993 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12994 ifdef check.
12995 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12996 [!PT_GETDSBT] (target_loadmap): New definition.
12997 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12998 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12999 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13000 and PT_GETDSBT to LINUX_LOADMAP.
13001 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13002 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13003
55329a5c 130042011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
13005
13006 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13007 (arm_linux_hwbp_cap): New static variable.
13008 (arm_linux_get_hwbp_cap): Replace by ...
13009 (arm_linux_init_hwbp_cap): ... this new function.
13010 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13011 (arm_linux_get_hw_watchpoint_count): Likewise.
13012 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13013 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13014 (arm_prepare_to_resume): Use perror_with_name instead of error.
13015
55329a5c 130162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
13017
13018 * linux-arm-low.c: Include <signal.h>.
13019 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13020 (struct arm_linux_hwbp_cap): New data type.
13021 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13022 (struct arm_linux_hw_breakpoint): New data type.
13023 (MAX_BPTS, MAX_WPTS): Define.
13024 (struct arch_process_info, struct arch_lwp_info): New data types.
13025 (arm_linux_get_hwbp_cap): New function.
13026 (arm_linux_get_hw_breakpoint_count): Likewise.
13027 (arm_linux_get_hw_watchpoint_count): Likewise.
13028 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13029 (arm_hwbp_control_initialize): Likewise.
13030 (arm_hwbp_control_is_enabled): Likewise.
13031 (arm_hwbp_control_is_initialized): Likewise.
13032 (arm_hwbp_control_disable): Likewise.
13033 (arm_linux_hw_breakpoint_equal): Likewise.
13034 (arm_linux_hw_point_initialize): Likewise.
13035 (struct update_registers_data): New data structure.
13036 (update_registers_callback: New function.
13037 (arm_insert_point): Likewise.
13038 (arm_remove_point): Likewise.
13039 (arm_stopped_by_watchpoint): Likewise.
13040 (arm_stopped_data_address): Likewise.
13041 (arm_new_process): Likewise.
13042 (arm_new_thread): Likewise.
13043 (arm_prepare_to_resume): Likewise.
13044 (the_low_target): Register arm_insert_point, arm_remove_point,
13045 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13046 arm_new_thread, and arm_prepare_to_resume.
13047
6b9801d4
SS
130482011-09-15 Stan Shebs <stan@codesourcery.com>
13049
13050 * server.h (struct emit_ops): Add compare-goto fields.
13051 * tracepoint.c (gdb_agent_op_sizes): New table.
13052 (emit_eq_goto): New function.
13053 (emit_ne_goto): New function.
13054 (emit_lt_goto): New function.
13055 (emit_le_goto): New function.
13056 (emit_gt_goto): New function.
13057 (emit_ge_goto): New function.
13058 (is_goto_target): New function.
13059 (compile_bytecodes): Recognize special cases of compare-goto
13060 combinations and call specialized emitters for them.
13061 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13062 (amd64_emit_ne_goto): New function.
13063 (amd64_emit_lt_goto): New function.
13064 (amd64_emit_le_goto): New function.
13065 (amd64_emit_gt_goto): New function.
13066 (amd64_emit_ge_goto): New function.
13067 (amd64_emit_ops): Add the new functions.
13068 (i386_emit_eq_goto): New function.
13069 (i386_emit_ne_goto): New function.
13070 (i386_emit_lt_goto): New function.
13071 (i386_emit_le_goto): New function.
13072 (i386_emit_gt_goto): New function.
13073 (i386_emit_ge_goto): New function.
13074 (i386_emit_ops): Add the new functions.
13075
bf15cbda
SS
130762011-09-08 Stan Shebs <stan@codesourcery.com>
13077
13078 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13079 (i386_emit_epilogue): Restore %ebx.
13080
943ca1dd
JZ
130812011-08-31 Jie Zhang <jzhang918@gmail.com>
13082
13083 * server.c (step_thread): Remove definition.
13084 (process_serial_event): Don't handle Hs.
13085 * server.h (step_thread): Remove declaration.
13086 * target.c (set_desired_inferior): Remove use of step_thread.
13087
e3deef73
LM
130882011-08-24 Luis Machado <lgustavo@codesourcery.com>
13089
13090 * linux-low.c: Include linux-procfs.h.
13091 (linux_attach_lwp_1): Update comments.
13092 (linux_attach): Scan for existing threads when attaching to a
13093 process that is the tgid.
13094 * Makefile.in: Update dependencies.
13095
13da1c97
LM
130962011-08-24 Luis Machado <lgustavo@codesourcery.com>
13097
13098 * configure.srv: Add linux-procfs.o dependencies.
13099
881127c9
YQ
131002011-08-14 Yao Qi <yao@codesourcery.com>
13101
13102 * target.h (struct target_ops): Fix indent.
13103 * win32-low.c (win32_target_ops): Fix comment.
13104
58dbd541
YQ
131052011-08-14 Andrew Jenner <andrew@codesourcery.com>
13106 Yao Qi <yao@codesourcery.com>
13107
13108 * Makefile.in (clean): Remove tic6x-*.c files.
13109 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13110 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13111 (tic6x-c64xp-linux.c): Likewise.
13112 * configure.srv: Add support for tic6x-*-uclinux.
13113 * linux-tic6x-low.c: New.
13114 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13115
78d85199
YQ
131162011-08-14 Andrew Stubbs <ams@codesourcery.com>
13117 Yao Qi <yao@codesourcery.com>
13118
13119 * target.h (struct target_ops): Add read_loadmap.
13120 * linux-low.c (struct target_loadseg): New type.
13121 (struct target_loadmap): New type.
13122 (linux_read_loadmap): New function.
13123 (linux_target_ops): Add linux_read_loadmap.
13124 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
13125 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13126 to NULL.
78d85199 13127
a959a88d
EZ
131282011-08-05 Eli Zaretskii <eliz@gnu.org>
13129
13130 * win32-low.c: Include <stdint.h>.
13131
1ced966e
PA
131322011-07-22 Pedro Alves <pedro@codesourcery.com>
13133
13134 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13135 to the inferior here.
13136 (i386_remove_aligned_watchpoint): Ditto.
13137 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13138 fit part of the watchpoint in the debug registers.
13139 (i386_update_inferior_debug_regs): New.
13140 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13141 registers, and only update the inferior on success.
13142 (i386_low_remove_watchpoint): Ditto.
13143
d26e3629
KY
131442011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13145
13146 * linux-low.c (compare_ints, unique, list_threads, show_process,
13147 linux_core_of_thread): Delete.
13148 (linux_target_ops): Change linux_core_of_thread to
13149 linux_common_core_of_thread.
13150 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13151 * utils.c (malloc_failure): Change type of argument.
13152 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13153 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13154 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13155 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13156 (IPA_OBJS): Add common-utils-ipa.o.
13157 (ptid_h, linux_osdata_h): New macros.
13158 (server_h): Add common/common-utils.h, common/xml-utils.h,
13159 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13160 common/ptid.h.
13161 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13162 ptid.o, buffer.o): New rules.
13163 (linux-low.o): Add common/linux-osdata.h as a dependency.
13164 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13165 * configure.ac: Add AC_HEADER_DIRENT check.
13166 * config.in: Regenerate.
13167 * configure: Regenerate.
13168 * remote-utils.c (xml_escape_text): Delete.
13169 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13170 buffer_xml_printf): Move to common/buffer.c.
13171 * server.c (main): Remove call to initialize_inferiors.
13172 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13173 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13174 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13175 internal_error, gdb_assert, gdb_assert_fail): Delete.
13176 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13177 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13178 common/buffer.h.
13179 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13180 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13181 initialize_inferiors): Delete.
13182
2275a1a7
PA
131832011-07-20 Pedro Alves <pedro@codesourcery.com>
13184
13185 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13186 symbol error.
13187
0a5b1e09
PA
131882011-05-31 Pedro Alves <pedro@codesourcery.com>
13189
13190 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13191 assertion.
13192 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13193
6938fd34
YQ
131942011-05-26 Yao Qi <yao@codesourcery.com>
13195
13196 * Makefile.in (thread-db.o): Track dependence to
13197 common/gdb_thread_db.h.
13198 * thread-db.c: include gdb_thread_db.h from right place.
13199
b481f9e0
TT
132002011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13201
13202 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13203 __FILE__ and __LINE__ to internal_error.
13204
98a5dd13
DE
132052011-05-13 Doug Evans <dje@google.com>
13206
13207 * thread-db.c (try_thread_db_load_from_sdir): New function.
13208 (try_thread_db_load_from_dir): New function.
13209 (thread_db_load_search): Handle $sdir, ignore $pdir.
13210 Remove trying of system directories if search of
13211 libthread-db-search-path fails, that is now done via $sdir.
13212
d248b706
KY
132132011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13214
13215 * server.c (handle_query): Add EnableDisableTracepoints to the list
13216 of supported features.
43aaf8b6 13217 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 13218 tracepoints.
43aaf8b6
PA
13219 (cmd_qtenable_disable): New.
13220 (cmd_qtstart): Install tracepoints even if disabled.
13221 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13222 receiving a QTEnable or QTDisable packet.
13223 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13224 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13225 tracepoints.
13226 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 13227
84e578fb
DE
132282011-05-10 Doug Evans <dje@google.com>
13229
13230 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13231
71f55dd8
DE
132322011-05-04 Doug Evans <dje@google.com>
13233
13234 * linux-low.c (linux_join): Skip process lookup.
13235 * spu-low.c (spu_join): Ditto.
13236 * server.c (join_inferiors_callback): Delete.
13237 (process_serial_event): For 'D' packet (detach) call join_inferior
13238 directly.
13239
4d393d60
JM
132402011-05-04 Joseph Myers <joseph@codesourcery.com>
13241
13242 * README: Don't mention xscale*-*-linux*.
13243 * configure.srv (xscale*-*-linux*): Don't handle target.
13244
b00ad6ff
NF
132452011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13246
13247 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13248 casting pointers.
13249 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13250 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13251 (i386_emit_void_call_2): Likewise.
13252
af96c192
YQ
132532011-04-26 Yao Qi <yao@codesourcery.com>
13254
43aaf8b6
PA
13255 * linux-low.c: Move common macros to linux-ptrace.h.
13256 Include linux-ptrace.h.
af96c192
YQ
13257 * Makefile.in (linux_ptrace_h): New.
13258 (linux-low.o): Depends on linux-ptrace.h.
13259
03f2bd59
JK
132602011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13261
13262 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13263 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13264 (remote_prepare): New function with most of the TCP code from ...
13265 (remote_open): ... here. Detect PORT here unconditionally. Move also
13266 setting transport_is_reliable.
13267 * server.c (run_once): New variable.
13268 (gdbserver_usage): Document it.
13269 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13270 the first run if RUN_ONCE.
13271 * server.h (run_once, remote_prepare): New declarations.
13272
7a9dd1b2
TT
132732011-04-19 Tom Tromey <tromey@redhat.com>
13274
13275 * win32-low.c (handle_load_dll): Remove duplicate "the".
13276
81239425
PM
132772011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13278
13279 Remove support for old Cygwin 1.5 versions.
13280 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13281 function to avoid warning.
13282 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13283 warning.
13284
9e0627f1
PM
132852011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13286
13287 * gdbserver/server.h (Macro _): Define it if not available.
13288
588eebee
MS
132892011-03-14 Michael Snyder <msnyder@vmware.com>
13290
348af9f7 13291 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 13292
43f70d4c
JB
132932011-03-10 Joel Brobecker <brobecker@adacore.com>
13294
13295 * Makefile.in (maintainer-clean realclean distclean): Remove
13296 "make ... subdir_do" command.
13297
348af9f7
MS
132982011-03-10 Michael Snyder <msnyder@vmware.com>
13299
13300 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13301
13302 * server.c (handle_v_run): Free alloced buffer on early return.
13303
e637a4f5
YQ
133042011-03-09 Yao Qi <yao@codesourcery.com>
13305
13306 Revert:
13307 2011-03-04 Yao Qi <yao@codesourcery.com>
13308
13309 * Makefile.in: Remove GNU make feature --directory.
13310
13311 2011-03-05 Yao Qi <yao@codesourcery.com>
13312
13313 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13314 (subdir_do): New make target. Copied from gdb/Makefile.
13315 (maintainer-clean, realclean, distclean, clean): Call corresponding
13316 make targets in common/Makefile.
13317
13318 2011-02-11 Yao Qi <yao@codesourcery.com>
13319
13320 * configure.ac: Call AC_PROG_RANLIB.
13321 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13322 * configure: Regenerate.
13323
e6edda56
JK
133242011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13325
13326 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13327
e5141119
JB
133282011-03-06 Yao Qi <yao@codesourcery.com>
13329
13330 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13331
64794aa4
JB
133322011-03-05 Yao Qi <yao@codesourcery.com>
13333
13334 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13335 (subdir_do): New make target. Copied from gdb/Makefile.
13336 (maintainer-clean, realclean, distclean, clean): Call corresponding
13337 make targets in common/Makefile.
13338
7a762829
YQ
133392011-03-04 Yao Qi <yao@codesourcery.com>
13340
13341 * Makefile.in: Remove GNU make feature --directory.
13342
348af9f7
MS
133432011-03-04 Michael Snyder <msnyder@vmware.com>
13344
13345 * server.c (queue_stop_reply): Call xmalloc not malloc.
13346
133472011-03-02 Michael Snyder <msnyder@vmware.com>
13348
13349 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13350
9f72fee2
MS
133512011-02-28 Michael Snyder <msnyder@vmware.com>
13352
588eebee
MS
13353 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13354 (cmd_qtframe): Ditto.
13355 (cmd_qtbuffer): Ditto.
13356 (cmd_bigqtbuffer): Ditto.
13357
9f72fee2
MS
13358 * utils.c (decimal2str): Initialize 'width' to nine, then
13359 don't mess with it.
13360
8040bd49
UW
133612011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13362
13363 * hostio.c (require_data): Free *data, not data.
13364
7e52cbd0
JK
133652011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13366
13367 * hostio.c (require_data): Use free, not xfree.
13368
9130f83e
MS
133692011-02-27 Michael Snyder <msnyder@vmware.com>
13370
4b812f4e
MS
13371 * server.c (handle_query): Discard unused value.
13372
9130f83e
MS
13373 * hostio.c (require_data): Free malloc memory before returning
13374 error.
13375
69d37113
MS
133762011-02-26 Michael Snyder <msnyder@vmware.com>
13377
13378 * linux-low.c (list_threads): Call closedir for dirent.
13379
35f5825a
MS
133802011-02-27 Michael Snyder <msnyder@vmware.com>
13381
2a589cef
MS
13382 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13383 a case statement falls through.
13384
0adea5f7
MS
13385 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13386
35f5825a
MS
13387 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13388 in comparison.
13389
238f1c74
MS
133902011-02-26 Michael Snyder <msnyder@vmware.com>
13391
13392 * utils.c (decimal2str): Eliminate dead code and dead param.
13393 (pulongest): Drop dead param from call to decimal2str.
13394 (plongest): Ditto.
13395
633ff500
JB
133962011-02-24 Joel Brobecker <brobecker@adacore.com>
13397
13398 Revert the following patch (not approved yet):
13399 2011-02-21 Hui Zhu <teawater@gmail.com>
13400 * tracepoint.c (tp_printf): New function.
13401 (eval_agent_expr): Handle gdb_agent_op_printf.
13402
f9c6ff72
HZ
134032011-02-21 Hui Zhu <teawater@gmail.com>
13404
13405 * tracepoint.c (tp_printf): New function.
13406 (eval_agent_expr): Handle gdb_agent_op_printf.
13407
94d5e490
TT
134082011-02-18 Tom Tromey <tromey@redhat.com>
13409
13410 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13411 (tracepoint.o): Likewise.
13412 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13413 (gdb_agent_op_names): Likewise.
13414
c7f96d2b
TT
134152011-02-18 Tom Tromey <tromey@redhat.com>
13416
13417 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13418 gdb_agent_op_rot>: New constants.
13419 (gdb_agent_op_names): Add pick and roll.
13420 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13421 cases.
13422
0feedb2c
JK
134232011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13424
13425 * aclocal.m4: Regenerated with aclocal-1.11.1.
13426
b3b9301e
PA
134272011-02-14 Pedro Alves <pedro@codesourcery.com>
13428
13429 * server.c (handle_qxfer_traceframe_info): New.
13430 (qxfer_packets): Register "traceframe-info".
13431 (handle_query): Report support for qXfer:traceframe-info:read+.
13432 * tracepoint.c (match_blocktype): New.
13433 (traceframe_find_block_type): Rename to ...
13434 (traceframe_walk_blocks): ... this. Add callback filter argument,
13435 and use it.
13436 (traceframe_find_block_type): New, reimplemented on top of
13437 traceframe_walk_blocks.
13438 (build_traceframe_info_xml): New.
13439 (traceframe_read_info): New.
13440 * server.h (traceframe_read_info): Declare.
13441
4f3e6fb7
YQ
134422011-02-11 Yao Qi <yao@codesourcery.com>
13443
13444 * configure.ac: Call AC_PROG_RANLIB.
13445 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13446 * configure: Regenerate.
13447
764880b7
PA
134482011-02-07 Pedro Alves <pedro@codesourcery.com>
13449
13450 * server.c (gdb_read_memory): Change return semantics to allow
13451 partial transfers.
13452 (handle_search_memory_1): Adjust.
13453 (process_serial_event) <'m' packet>: Handle partial transfers.
13454 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13455
1c79eb8a
PA
134562011-01-28 Pedro Alves <pedro@codesourcery.com>
13457
13458 * regcache.c (init_register_cache): Initialize
13459 regcache->register_status.
13460 (free_register_cache): Release regcache->register_status.
13461 (regcache_cpy): Copy register_status.
13462 (registers_to_string): Print 'x's for unavailable registers.
13463 (supply_register): Mark the register's status valid or
13464 unavailable, depending on whether a buffer was passed in or not.
13465 (supply_register_zeroed): New.
13466 (supply_regblock): Mark the registers' status valid or
13467 unavailable, depending on whether a buffer was passed in or not.
13468 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13469 (struct regcache): New `register_status' field.
13470 (supply_register_zeroed): Declare.
13471 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13472 supply_register_zeroed, rather than passing a NULL buffer to
13473 supply_register.
13474 * tracepoint.c (fetch_traceframe_registers): Update comment.
13475
85724a0e
PA
134762011-01-28 Pedro Alves <pedro@codesourcery.com>
13477
13478 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13479 buffer explicit.
13480
d08aafef
PA
134812011-01-25 Pedro Alves <pedro@codesourcery.com>
13482
13483 * server.h (decode_xfer_write): Change prototype.
13484 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13485 and don't extract the annex here.
13486 * server.c (decode_xfer_read): Remove `annex' parameter,
13487 and don't extract the annex here.
13488 (decode_xfer): New.
13489 (struct qxfer): New.
13490 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13491 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13492 (handle_qxfer_statictrace): New functions, abstracted out from
13493 handle_query, and made to use the struct qxfer interface.
13494 (handle_threads_qxfer_proper): Rename to ...
13495 (handle_qxfer_threads_proper): ... this.
13496 (handle_threads_qxfer): Rename to ...
13497 (handle_qxfer_threads): ... this. Adjust.
13498 (qxfer_packets): New array.
13499 (handle_qxfer): New function.
13500 (handle_query): Use handle_qxfer.
13501
493e2a69
MS
135022011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13503
13504 * gdbreplay.c: Shorten lines of >= 80 columns.
13505 * linux-low.c: Ditto.
13506 * linux-ppc-low.c: Ditto.
13507 * linux-s390-low.c: Ditto.
13508 * linux-sparc-low.c: Ditto.
13509 * linux-x86-low.c: Ditto.
13510 * linux-xtensa-low.c: Ditto.
13511 * mem-break.c: Ditto.
13512 * nto-low.c: Ditto.
13513 * regcache.h: Ditto.
13514 * remote-utils.c: Ditto.
13515 * server.c: Ditto.
13516 * server.h: Ditto.
13517 * thread-db.c: Ditto.
13518 * tracepoint.c: Ditto.
13519 * utils.c: Ditto.
13520 * win32-low.h: Ditto.
13521
44944448
JB
135222011-01-05 Joel Brobecker <brobecker@adacore.com>
13523
13524 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13525 update.
13526
71ce852c
JB
135272011-01-01 Joel Brobecker <brobecker@adacore.com>
13528
13529 * server.c (gdbserver_version): Update copyright year in version
13530 output.
13531 * gdbreplay.c (gdbreplay_version): Ditto.
13532
eb826dc6
MF
135332010-12-29 Jie Zhang <jie.zhang@analog.com>
13534
13535 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13536 * linux-bfin-low.c: New file.
13537 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13538 PT_DATA_ADDR for BFIN targets.
13539 * Makefile.in (SFILES): Add linux-bfin-low.c.
13540 (clean): Remove reg-bfin.c.
13541 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13542 * README: Mention supported Blackfin targets.
13543
39ab222a
MF
135442010-12-23 Mike Frysinger <vapier@gentoo.org>
13545
13546 * .gitignore: New file.
13547
a1f2ce7d
MF
135482010-11-16 Mike Frysinger <vapier@gentoo.org>
13549
13550 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13551
f474844c
JZ
135522010-10-22 Jie Zhang <jie@codesourcery.com>
13553
13554 * Makefile.in: Add FLAGS_TO_PASS variable.
13555 (install): Remove dependency of install-only and recursively
13556 invoke make for install-only.
13557
f1048712
DE
135582010-10-04 Doug Evans <dje@google.com>
13559
13560 * Makefile.in (uninstall): Use $(DESTDIR).
13561
b53a1623
PA
135622010-09-24 Pedro Alves <pedro@codesourcery.com>
13563
e6ee044d
PA
13564 PR gdb/11842
13565
b53a1623
PA
13566 * linux-x86-low.c (compat_siginfo_from_siginfo)
13567 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13568 si_code is < 0. Check for si_code == SI_TIMER before checking for
13569 si_code < 0.
13570
fa1bd1e4
JB
135712010-09-13 Joel Brobecker <brobecker@adacore.com>
13572
13573 * lynx-i386-low.c: New file.
13574 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13575
47fac8f8
JB
135762010-09-13 Joel Brobecker <brobecker@adacore.com>
13577
13578 * lynx-low.c (ptrace_request_to_str): Remove handling for
13579 request values that have been removed in LynxOS 5.x.
13580
1adfc54d
JB
135812010-09-13 Joel Brobecker <brobecker@adacore.com>
13582
13583 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13584 <ptrace.h>
13585
c2a66c29
NS
135862010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13587
13588 * configure.ac: Add --enable-inprocess-agent option.
13589 * configure: Rebuilt.
13590
32fcada3
YQ
135912010-09-06 Yao Qi <yao@codesourcery.com>
13592
13593 * linux-low.c (linux_kill): Remove unused variable.
13594 (linux_stabilize_threads): Likewise.
13595 * server.c (start_inferior): Likewise.
13596 (queue_stop_reply_callback): Likewise.
13597 * tracepoint.c (do_action_at_tracepoint): Likewise.
13598
0cccb683
YQ
135992010-09-06 Yao Qi <yao@codesourcery.com>
13600
13601 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13602 on return.
13603
423ec54c
JK
136042010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13605
13606 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13607
12ac6819
PA
136082010-09-06 Pedro Alves <pedro@codesourcery.com>
13609
13610 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13611 "$(IPA_DEPFILES)".
13612
8ed54b31
JB
136132010-09-01 Joel Brobecker <brobecker@adacore.com>
13614
13615 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13616 gdbserver/lynx-ppc-low.c: New files.
13617 * Makefile.in (lynx_low_h): New variable.
13618 (lynx-low.o, lynx-ppc-low.o): New rules.
13619 * configure.ac: On LynxOS, link with -lnetinet.
13620 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13621 * configure: regenerate.
13622
bb0116a4
JB
136232010-09-01 Joel Brobecker <brobecker@adacore.com>
13624
13625 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13626 * configure.ac: Add check for vasprintf and vsnprintf.
13627 * configure, config.in: Regenerate.
13628 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13629
a778ab81 136302010-09-01 Joel Brobecker <brobecker@adacore.com>
13631
13632 * gdbreplay.c: Move include of alloca.h up, next to include of
13633 malloc.h.
13634 * server.h: Add include of malloc.h.
13635 * mem-break.c: Remove include of malloc.h.
13636 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13637
8b034a19 136382010-09-01 Joel Brobecker <brobecker@adacore.com>
13639
13640 * Makefile.in (memmem.o): Build with -Wno-error.
13641
136422010-09-01 Joel Brobecker <brobecker@adacore.com>
13643
13644 * utils.c (xsnprintf): Make non-static.
13645 * server.h: Add xsnprintf declaration.
13646 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13647 replace calls to snprintf by calls to xsnprintf throughout.
13648
136492010-09-01 Joel Brobecker <brobecker@adacore.com>
13650
13651 * configure.ac: Add configure check for alloca.
13652 * configure, config.in: Regenerate.
13653 * server.h: Include alloca.h if it exists.
13654 * gdbreplay.c: Include alloca.h if it exists.
13655
1a981360
PA
136562010-08-28 Pedro Alves <pedro@codesourcery.com>
13657
13658 * linux-low.c (__SIGRTMIN): Define if not already defined.
13659 (linux_create_inferior): Check for __ANDROID__ rather than
13660 __SIGRTMIN.
13661 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13662 are already deferred.
13663 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13664 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13665 stopped and already has a pending signal to report.
13666 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13667 a pending signal to report or is moving out of a jump pad.
13668 (linux_init_signals): Check for __ANDROID__ rather than
13669 __SIGRTMIN.
13670
b4d51a55
PA
136712010-08-28 Pedro Alves <pedro@codesourcery.com>
13672
13673 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13674 debug_threads check. Avoid a linear search when not doing debug
13675 output.
13676
ec48365d
PA
136772010-08-27 Pedro Alves <pedro@codesourcery.com>
13678
13679 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13680 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13681 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13682 (process_event): Change local fd's type to gdb_fildes_t.
13683 (create_file_handler): Adjust prototype.
13684 (delete_file_handler): Adjust prototype.
13685 (handle_file_event): Adjust prototype. Use pfildes.
13686 (create_file_event): Adjsut prototype.
13687 * remote-utils.c (remote_desc, listen_desc): Change type to
13688 gdb_fildes_t.
13689 * server.h: New gdb_fildes_t typedef.
13690 [USE_WIN32API]: Include winsock2.h.
13691 (delete_file_handler, add_file_handler): Adjust prototypes.
13692 (pfildes): Declare.
13693 * utils.c (pfildes): New.
13694
854d88f0
PA
136952010-08-27 Pedro Alves <pedro@codesourcery.com>
13696
13697 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13698 * configure: Regenerate.
13699
0146f85b
PA
137002010-08-27 Pedro Alves <pedro@codesourcery.com>
13701
13702 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13703 (linux_done_accessing_memory): ... this.
13704 (linux_target_ops): Adjust.
13705 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13706 * nto-low.c (nto_target_ops): Adjust comment.
13707 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13708 * spu-low.c (spu_target_ops): Adjust comment.
13709 * target.h (target_ops): Rename unprepare_to_access_memory field
13710 to done_accessing_memory.
13711 (unprepare_to_access_memory): Rename to ...
13712 (done_accessing_memory): ... this.
13713
90d74c30
PA
137142010-08-26 Pedro Alves <pedro@codesourcery.com>
13715
13716 * linux-low.c (linux_prepare_to_access_memory): New.
13717 (linux_unprepare_to_access_memory): New.
13718 (linux_target_ops): Install them.
13719 * server.c (read_memory): Rename to ...
13720 (gdb_read_memory): ... this. Use
13721 prepare_to_access_memory/prepare_to_access_memory.
13722 (write_memory): Rename to ...
13723 (gdb_write_memory): ... this. Use
13724 prepare_to_access_memory/prepare_to_access_memory.
13725 (handle_search_memory_1): Adjust.
13726 (process_serial_event): Adjust.
13727 * target.h (struct target_ops): New fields
13728 prepare_to_access_memory and unprepare_to_access_memory.
13729 (prepare_to_access_memory, unprepare_to_access_memory): New.
13730 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13731 prepare_to_access_memory/prepare_to_access_memory.
13732 * nto-low.c (nto_target_ops): Adjust.
13733 * spu-low.c (spu_target_ops): Adjust.
13734 * win32-low.c (win32_target_ops): Adjust.
13735
fd467969
PA
137362010-08-26 Pedro Alves <pedro@codesourcery.com>
13737
13738 * Makefile.in (WARN_CFLAGS): Get it from configure.
13739 (WERROR_CFLAGS): New.
13740 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13741 * configure.ac: Introduce --enable-werror, which adds -Werror to
13742 the compiler command line. Enabled by default. Disable with
13743 --disable-werror. Add -Wdeclaration-after-statement
13744 Wpointer-arith and -Wformat-nonliteral to warning flags.
13745 * configure: Regenerate.
13746
331e2f5f
PA
137472010-08-26 Pedro Alves <pedro@codesourcery.com>
13748
13749 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13750
e581f2b4
PA
137512010-08-26 Pedro Alves <pedro@codesourcery.com>
13752
13753 * gdbreplay.c (remote_error): New.
13754 (gdbchar): New.
13755 (expect): Use gdbchar. Check for error reading from GDB.
13756 Clarify sync error output.
13757 (play): Check for errors writing to GDB.
13758 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13759 * remote-utils.c (getpkt): Check for errors writing to the remote
13760 descriptor.
13761
3c11dd79
PA
137622010-08-25 Pedro Alves <pedro@codesourcery.com>
13763
13764 * linux-low.c (linux_wait_1): Move non-debugging code out of
13765 `debug_threads' control.
13766
d20a8ad9
PA
137672010-08-25 Pedro Alves <pedro@codesourcery.com>
13768
13769 * linux-low.c (linux_wait_1): Don't set last_status here.
13770 * server.c (push_event, queue_stop_reply_callback): Assert we're
13771 not pushing a TARGET_WAITKIND_IGNORE event.
13772 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13773 (myresume, handle_target_event): Set the thread's last_resume_kind
13774 and last_status from the target returned status.
13775
964e4306
PA
137762010-08-25 Pedro Alves <pedro@codesourcery.com>
13777
13778 PR threads/10729
13779
13780 * linux-x86-low.c (update_debug_registers_callback): New.
13781 (i386_dr_low_set_addr): Use it.
13782 (i386_dr_low_get_addr): New.
13783 (i386_dr_low_set_control): Use update_debug_registers_callback.
13784 (i386_dr_low_get_control): New.
13785 (i386_dr_low_get_status): Adjust.
13786 * linux-low.c (linux_stop_lwp): New.
13787 * linux-low.h (linux_stop_lwp): Declare.
13788
13789 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13790 argument instead of a i386_debug_reg_state.
13791 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13792 a i386_debug_reg_state.
13793 (i386_insert_aligned_watchpoint): Adjust.
13794 (i386_remove_aligned_watchpoint): Adjust.
13795 (i386_low_stopped_data_address): Read the debug registers from the
13796 inferior instead of from the mirrors.
13797 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13798 (i386_dr_low_get_addr): Declare.
13799 (i386_dr_low_get_control): Declare.
13800 (i386_dr_low_get_status): Change prototype.
13801
13802 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13803 (i386_dr_low_get_addr): New.
13804 (i386_dr_low_get_control): New.
13805 (i386_dr_low_get_status): Adjust prototype. Return
13806 dr_status_mirror.
13807 (i386_initial_stuff): Clear dr_status_mirror and
13808 dr_control_mirror.
13809 (i386_get_thread_context): Adjust.
13810 (i386_set_thread_context): Adjust.
13811 (i386_thread_added): Adjust.
13812
5f21a75b
PA
138132010-08-24 Pedro Alves <pedro@codesourcery.com>
13814
13815 * linux-low.h (linux_thread_area): Delete declaration.
13816
3e4c1235
TS
138172010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13818
13819 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13820 after its termination.
13821
1971b033
PA
138222010-08-09 Pedro Alves <pedro@codesourcery.com>
13823
13824 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13825 (gdb_wants_all_stopped): Delete.
13826 (linux_wait_1): Don't call them.
13827 * server.c (handle_v_cont): Tag all threads as want-stopped.
13828 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13829 stopped as "client-wants-stopped".
13830
310444ac
PA
138312010-07-31 Pedro Alves <pedro@codesourcery.com>
13832
13833 * Makefile.in (signals_h): New.
13834 (server_h): Depend on it.
13835 (server.o): Don't depend on $(signals_def).
13836 (signals.o): Depend on $(signals_def).
13837
a19cae16
JK
138382010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13839
13840 * Makefile.in (signals_def): New.
13841 (server_h): Append include/gdb/signals.h and signals_def.
13842 (server.o): Append signals_def.
13843
30d50328
JK
138442010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13845
13846 * server.c (handle_target_event): Use target_signal_to_host for
13847 resume_info.sig initialization.
13848 * target.h (struct thread_resume) <sig>: New comment.
13849
5c3216e2
OS
138502010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13851
c6f46ca0
OS
13852 * server.c (handle_query): strcpy() the returned string from paddress()
13853 instead of sprintf().
5c3216e2
OS
13854 * utils.c (paddress): Return phex_nz().
13855
6bd31874
JB
138562010-07-07 Joel Brobecker <brobecker@adacore.com>
13857
13858 * server.c (handle_v_cont): Call mourn_inferior if process
13859 just exited.
13860 (myresume): Likewise.
13861
0fb4aa4b
PA
138622010-07-01 Pedro Alves <pedro@codesourcery.com>
13863
13864 Static tracepoints, and integration with UST.
13865
13866 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13867 * mem-break.c (uninsert_all_breakpoints)
13868 (reinsert_all_breakpoints): New.
13869 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13870 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13871 (gdb_agent_ust_loaded, helper_thread_id)
13872 (gdb_agent_helper_thread_id): New macros.
13873 (struct ipa_sym_addresses): Add addr_ust_loaded,
13874 addr_helper_thread_id, addr_cmd_buf.
13875 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13876 (in_process_agent_loaded_ust): New.
13877 (write_e_ust_not_loaded): New.
13878 (maybe_write_ipa_ust_not_loaded): New.
13879 (struct collect_static_trace_data_action): New.
13880 (enum tracepoint_type) <static_tracepoint>: New.
13881 (struct tracepoint) <handle>: Mention static tracepoints.
13882 (struct static_tracepoint_ctx): New.
13883 (CMD_BUF_SIZE): New.
13884 (add_tracepoint_action): Handle static tracepoint actions.
13885 (unprobe_marker_at): New.
13886 (clear_installed_tracepoints): Handle static tracepoints.
13887 (cmd_qtdp): Handle static tracepoints.
13888 (probe_marker_at): New.
13889 (cmd_qtstart): Handle static tracepoints.
13890 (response_tracepoint): Handle static tracepoints.
13891 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13892 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13893 (get_context_regcache): Handle static tracepoints.
13894 (do_action_at_tracepoint): Handle static tracepoint actions.
13895 (traceframe_find_block_type): Handle static trace data blocks.
13896 (traceframe_read_sdata): New.
13897 (download_tracepoints): Download static tracepoint actions.
13898 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13899 (GDB_PROBE_NAME): New.
13900 (ust_ops): New.
13901 (GET_UST_SYM): New.
13902 (USTF): New.
13903 (dlsym_ust): New.
13904 (ust_marker_to_static_tracepoint): New.
13905 (gdb_probe): New.
13906 (collect_ust_data_at_tracepoint): New.
13907 (gdb_ust_probe): New.
13908 (UNIX_PATH_MAX, SOCK_DIR): New.
13909 (gdb_ust_connect_sync_socket): New.
13910 (resume_thread, stop_thread): New.
13911 (run_inferior_command): New.
13912 (init_named_socket): New.
13913 (gdb_ust_socket_init): New.
13914 (cstr_to_hexstr): New.
13915 (next_st): New.
13916 (first_marker, next_marker): New.
13917 (response_ust_marker): New.
13918 (cmd_qtfstm, cmd_qtsstm): New.
13919 (unprobe_marker_at, probe_marker_at): New.
13920 (cmd_qtstmat, gdb_ust_thread): New.
13921 (gdb_ust_init): New.
13922 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13923 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13924 (ST_REGENTRY): New.
13925 (x86_64_st_collect_regmap): New.
13926 (X86_64_NUM_ST_COLLECT_GREGS): New.
13927 (AMD64_RIP_REGNUM): New.
13928 (supply_static_tracepoint_registers): New.
13929 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13930 (ST_REGENTRY): New.
13931 (i386_st_collect_regmap): New.
13932 (i386_NUM_ST_COLLECT_GREGS): New.
13933 (supply_static_tracepoint_registers): New.
13934 * server.c (handle_query): Handle qXfer:statictrace:read.
13935 <qSupported>: Report support for StaticTracepoints, and
13936 qXfer:statictrace:read features.
13937 * server.h (traceframe_read_sdata)
13938 (supply_static_tracepoint_registers): Declare.
13939 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13940 (unpack_varlen_hex): Include in IPA build.
13941 * Makefile.in (ustlibs, ustinc): New.
13942 (IPA_OBJS): Add remote-utils-ipa.o.
13943 ($(IPA_LIB)): Link -ldl and -lpthread.
13944 (UST_CFLAGS): New.
13945 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13946 * config.in, configure: Regenerate.
13947
9e4344e5
PA
139482010-06-20 Ian Lance Taylor <iant@google.com>
13949 Pedro Alves <pedro@codesourcery.com>
13950
13951 * linux-x86-low.c (always_true): Delete.
13952 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13953 trying to fool the compiler with always_true.
13954
c6beb2cb
PA
139552010-06-20 Pedro Alves <pedro@codesourcery.com>
13956
13957 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13958 conditions in gdbserver.
13959
d2ed6730
UW
139602010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13961
13962 * spu-low.c (spu_read_memory): Wrap around local store limit.
13963 (spu_write_memory): Likewise.
13964
4e29fb54
PA
139652010-06-15 Pedro Alves <pedro@codesourcery.com>
13966
13967 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13968 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13969 LONGEST uses.
13970 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13971 uses.
13972 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13973 uses with LONGEST uses.
13974
6a271cae
PA
139752010-06-14 Stan Shebs <stan@codesourcery.com>
13976 Pedro Alves <pedro@codesourcery.com>
13977
13978 Bytecode compiler.
13979
13980 * linux-x86-low.c: Include limits.h.
13981 (add_insns): New.
13982 (always_true): New.
13983 (EMIT_ASM): New.
13984 (EMIT_ASM32): New.
13985 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13986 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13987 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13988 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13989 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13990 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13991 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13992 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13993 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13994 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13995 (amd64_emit_void_call_2): New.
13996 (amd64_emit_ops): New.
13997 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13998 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13999 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14000 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14001 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14002 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14003 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14004 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14005 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14006 (i386_emit_stack_adjust, i386_emit_int_call_1)
14007 (i386_emit_void_call_2): New.
14008 (i386_emit_ops): New.
14009 (x86_emit_ops): New.
14010 (the_low_target): Install x86_emit_ops.
14011 * server.h (struct emit_ops): New.
14012 (get_raw_reg_func_addr): Declare.
14013 (current_insn_ptr, emit_error): Declare.
14014 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14015 (set_trace_state_variable_value): New defines.
14016 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14017 addr_get_trace_state_variable_value and
14018 addr_set_trace_state_variable_value.
14019 (symbol_list): New fields for get_raw_reg,
14020 get_trace_state_variable_value and set_trace_state_variable_value.
14021 (condfn): New typedef.
14022 (struct tracepoint): New field `compiled_cond'.
14023 (do_action_at_tracepoint): Clear compiled_cond.
14024 (get_trace_state_variable_value, set_trace_state_variable_value):
14025 Export in the IPA.
14026 (condition_true_at_tracepoint): If there's a compiled condition,
14027 run that.
14028 (current_insn_ptr, emit_error): New globals.
14029 (struct bytecode_address): New.
14030 (get_raw_reg_func_addr): New.
14031 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14032 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14033 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14034 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14035 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14036 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14037 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14038 (compile_tracepoint_condition, compile_bytecodes): New.
14039 * target.h (emit_ops): Forward declare.
14040 (struct target_ops): New field emit_ops.
14041 (target_emit_ops): New.
14042 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14043 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14044 * linux-low.c (linux_emit_ops): New.
14045 (linux_target_ops): Install it.
14046 * linux-low.h (struct linux_target_ops): New field emit_ops.
14047
92b72907
UW
140482010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14049
14050 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14051 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14052
fa593d66
PA
140532010-06-01 Pedro Alves <pedro@codesourcery.com>
14054 Stan Shebs <stan@codesourcery.com>
14055
14056 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14057 (all): Depend on $(extra_libraries).
14058 (install-only): Install the IPA.
14059 (IPA_OBJS, IPA_LIB): New.
14060 (clean): Remove the IPA lib.
14061 (IPAGENT_CFLAGS): New.
14062 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14063 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14064 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14065 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14066 * configure.ac: Check for atomic builtins support in the compiler.
14067 (IPA_DEPFILES, extra_libraries): Define.
14068 * configure.srv (ipa_obj): Add description.
14069 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14070 (i[34567]86-*-linux*): Set ipa_obj.
14071 (x86_64-*-linux*): Set ipa_obj.
14072 * linux-low.c (stabilizing_threads): New.
14073 (supports_fast_tracepoints): New.
14074 (linux_detach): Stabilize threads before detaching.
14075 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14076 the lwp is either not stabilizing, or is moving out of a jump pad.
14077 (linux_fast_tracepoint_collecting): New.
14078 (maybe_move_out_of_jump_pad): New.
14079 (enqueue_one_deferred_signal): New.
14080 (dequeue_one_deferred_signal): New.
14081 (linux_wait_for_event_1): If moving out of a jump pad, defer
14082 pending signals to later.
14083 (linux_stabilize_threads): New.
14084 (linux_wait_1): Check if threads need moving out of jump pads, and
14085 do it if so.
14086 (stuck_in_jump_pad_callback): New.
14087 (move_out_of_jump_pad_callback): New.
14088 (lwp_running): New.
14089 (linux_resume_one_lwp): Handle moving out of jump pads.
14090 (linux_set_resume_request): Dequeue deferred signals.
14091 (need_step_over_p): Also step over fast tracepoint jumps.
14092 (start_step_over): Also uninsert fast tracepoint jumps.
14093 (finish_step_over): Also reinsert fast tracepoint jumps.
14094 (linux_install_fast_tracepoint_jump): New.
14095 (linux_target_ops): Install linux_stabilize_threads and
14096 linux_install_fast_tracepoint_jump_pad.
14097 * linux-low.h (linux_target_ops) <get_thread_area,
14098 install_fast_tracepoint_jump_pad>: New fields.
14099 (struct lwp_info) <collecting_fast_tracepoint,
14100 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14101 (linux_get_thread_area): Declare.
14102 * linux-x86-low.c (jump_insn): New.
14103 (x86_get_thread_area): New.
14104 (append_insns): New.
14105 (push_opcode): New.
14106 (amd64_install_fast_tracepoint_jump_pad): New.
14107 (i386_install_fast_tracepoint_jump_pad): New.
14108 (x86_install_fast_tracepoint_jump_pad): New.
14109 (the_low_target): Install x86_get_thread_area and
14110 x86_install_fast_tracepoint_jump_pad.
14111 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14112 (struct fast_tracepoint_jump): New.
14113 (fast_tracepoint_jump_insn): New.
14114 (fast_tracepoint_jump_shadow): New.
14115 (find_fast_tracepoint_jump_at): New.
14116 (fast_tracepoint_jump_here): New.
14117 (delete_fast_tracepoint_jump): New.
14118 (set_fast_tracepoint_jump): New.
14119 (uninsert_fast_tracepoint_jumps_at): New.
14120 (reinsert_fast_tracepoint_jumps_at): New.
14121 (set_breakpoint_at): Use write_inferior_memory.
14122 (uninsert_raw_breakpoint): Use write_inferior_memory.
14123 (check_mem_read): Mask out fast tracepoint jumps.
14124 (check_mem_write): Mask out fast tracepoint jumps.
14125 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14126 (set_fast_tracepoint_jump): Declare.
14127 (delete_fast_tracepoint_jump)
14128 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14129 (reinsert_fast_tracepoint_jumps_at): Declare.
14130 * regcache.c: Don't compile many functions when building the
14131 in-process agent library.
14132 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14133 the register buffer in the heap.
14134 (free_register_cache): If the register buffer isn't owned by the
14135 regcache, don't free it.
14136 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14137 pre-existing register caches.
14138 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14139 type.
14140 (convert_ascii_to_int): : Constify `from' parameter type.
14141 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14142 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14143 the needed buffer in-place.
14144 (relocate_instruction): New.
14145 * server.c (handle_query) <qSymbols>: If the target supports
14146 tracepoints, give it a chance of looking up symbols. Report
14147 support for fast tracepoints.
14148 (handle_status): Stabilize threads.
14149 (process_serial_event): Adjust.
14150 * server.h (struct fast_tracepoint_jump): Forward declare.
14151 (struct process_info) <fast_tracepoint_jumps>: New field.
14152 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14153 (decode_X_packet, decode_M_packet): Adjust.
14154 (relocate_instruction): Declare.
14155 (in_process_agent_loaded): Declare.
14156 (tracepoint_look_up_symbols): Declare.
14157 (struct fast_tpoint_collect_status): Declare.
14158 (fast_tracepoint_collecting): Declare.
14159 (force_unlock_trace_buffer): Declare.
14160 (handle_tracepoint_bkpts): Declare.
14161 (initialize_low_tracepoint)
14162 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14163 * target.h (struct target_ops) <stabilize_threads,
14164 install_fast_tracepoint_jump_pad>: New fields.
14165 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14166 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14167 [HAVE_STDINT_H]: Include stdint.h.
14168 (trace_debug_1): Rename to ...
14169 (trace_vdebug): ... this.
14170 (trace_debug): Rename to ...
14171 (trace_debug_1): ... this. Add `level' parameter.
14172 (trace_debug): New.
14173 (ATTR_USED, ATTR_NOINLINE): New.
14174 (IP_AGENT_EXPORT): New.
14175 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14176 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14177 (about_to_request_buffer_space, trace_buffer_is_full)
14178 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14179 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14180 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14181 (traceframe_write_count, traceframes_created)
14182 (trace_state_variables)
14183 New renaming defines.
14184 (struct ipa_sym_addresses): New.
14185 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14186 (symbol_list): New.
14187 (ipa_sym_addrs): New.
14188 (all_tracepoint_symbols_looked_up): New.
14189 (in_process_agent_loaded): New.
14190 (write_e_ipa_not_loaded): New.
14191 (maybe_write_ipa_not_loaded): New.
14192 (tracepoint_look_up_symbols): New.
14193 (debug_threads) [IN_PROCESS_AGENT]: New.
14194 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14195 (UNKNOWN_SIDE_EFFECTS): New.
14196 (stop_tracing): New.
14197 (flush_trace_buffer): New.
14198 (stop_tracing_bkpt): New.
14199 (flush_trace_buffer_bkpt): New.
14200 (read_inferior_integer): New.
14201 (read_inferior_uinteger): New.
14202 (read_inferior_data_pointer): New.
14203 (write_inferior_data_pointer): New.
14204 (write_inferior_integer): New.
14205 (write_inferior_uinteger): New.
14206 (struct collect_static_trace_data_action): Delete.
14207 (enum tracepoint_type): New.
14208 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
14209 <actions_str, step_actions, step_actions_str>: Only include in
14210 GDBserver.
fa593d66
PA
14211 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14212 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14213 (tracepoints): Use IP_AGENT_EXPORT.
14214 (last_tracepoint): Don't include in the IPA.
14215 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14216 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14217 (alloced_trace_state_variables): New.
14218 (trace_state_variables): Use IP_AGENT_EXPORT.
14219 (traceframe_t): Delete unused variable.
14220 (circular_trace_buffer): Don't include in the IPA.
14221 (trace_buffer_start): Delete.
14222 (struct trace_buffer_control): New.
14223 (trace_buffer_free): Delete.
14224 (struct ipa_trace_buffer_control): New.
14225 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14226 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14227 New.
14228 (trace_buffer_ctrl): New.
14229 (TRACE_BUFFER_CTRL_CURR): New.
14230 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14231 Reimplement as macros.
14232 (trace_buffer_wrap): Delete.
14233 (traceframe_write_count, traceframe_read_count)
14234 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14235 (struct tracepoint_hit_ctx) <type>: New field.
14236 (struct fast_tracepoint_ctx): New.
14237 (memory_barrier): New.
14238 (cmpxchg): New.
14239 (record_tracepoint_error): Update atomically in the IPA.
14240 (clear_inferior_trace_buffer): New.
14241 (about_to_request_buffer_space): New.
14242 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14243 updating the same buffer.
14244 (add_tracepoint): Default the tracepoint's type to trap
14245 tracepoint, and orig_size to -1.
14246 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14247 internal variables.
14248 (create_trace_state_variable): New parameter `gdb'. Handle it.
14249 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14250 (cmd_qtdp): Handle fast tracepoints.
14251 (cmd_qtdv): Adjust.
14252 (max_jump_pad_size): New.
14253 (gdb_jump_pad_head): New.
14254 (get_jump_space_head): New.
14255 (claim_jump_space): New.
14256 (sort_tracepoints): New.
14257 (MAX_JUMP_SIZE): New.
14258 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14259 IPA.
14260 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14261 support. Upload fast traceframes, and delete internal IPA
14262 breakpoints.
14263 (stop_tracing_handler): New.
14264 (flush_trace_buffer_handler): New.
14265 (cmd_qtstop): Upload fast tracepoints.
14266 (response_tracepoint): Handle fast tracepoints.
14267 (tracepoint_finished_step): Upload fast traceframes. Set the
14268 tracepoint hit context's tracepoint type.
14269 (handle_tracepoint_bkpts): New.
14270 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14271 type. Add comment about fast tracepoints.
14272 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14273 non-existing action_str field.
14274 (get_context_regcache): Handle fast tracepoints.
14275 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14276 to the regcache.
14277 (fast_tracepoint_from_jump_pad_address): New.
14278 (fast_tracepoint_from_ipa_tpoint_address): New.
14279 (collecting_t): New.
14280 (force_unlock_trace_buffer): New.
14281 (fast_tracepoint_collecting): New.
14282 (collecting): New.
14283 (gdb_collect): New.
14284 (write_inferior_data_ptr): New.
14285 (target_tp_heap): New.
14286 (target_malloc): New.
14287 (download_agent_expr): New.
14288 (UALIGN): New.
14289 (download_tracepoints): New.
14290 (download_trace_state_variables): New.
14291 (upload_fast_traceframes): New.
14292 (IPA_FIRST_TRACEFRAME): New.
14293 (IPA_NEXT_TRACEFRAME_1): New.
14294 (IPA_NEXT_TRACEFRAME): New.
14295 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14296 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14297 (gdb_jump_pad_buffer_end): New.
14298 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14299 (initialize_tracepoint): Adjust.
14300 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14301 buffer. Initialize the low module.
14302 * utils.c (PREFIX, TOOLNAME): New.
14303 (malloc_failure): Use PREFIX.
14304 (error): In the IPA, an error causes an exit.
14305 (fatal, warning): Use PREFIX.
14306 (internal_error): Use TOOLNAME.
14307 (NUMCELLS): Increase to 10.
14308 * configure, config.in: Regenerate.
14309
d149dd1d
PA
143102010-06-01 Pedro Alves <pedro@codesourcery.com>
14311
14312 * server.c (handle_query) <qSupported>: Do two passes over the
14313 qSupported string to avoid nesting strtok.
14314
f6528abd
JK
143152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14316
14317 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14318 (CDEPS): New.
14319 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14320 -Wl,--dynamic-list.
14321 * configure: Regenerate.
14322 * proc-service.list: New.
14323
ca2a87a0
JK
143242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14325
14326 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14327 New comment.
14328
363a6e9f
OS
143292010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14330
14331 * gdbreplay.c (remote_open): Check error return from socket() call by
14332 its equality to -1 not by it being negative.
14333 * remote-utils.c (remote_open): Likewise.
14334
d23b6cb1
PA
143352010-05-23 Pedro Alves <pedro@codesourcery.com>
14336
14337 * config.h: Regenerate.
14338
28d3cf85
MK
143392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14340
14341 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14342 doesn't provide PTRACE_GET_THREAD_AREA.
14343
fea36a59
MK
143442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14345
14346 * linux-m68k-low.c: Include <asm/ptrace.h>
14347 (ps_get_thread_area): Implement.
14348
24b066ba
DE
143492010-05-03 Doug Evans <dje@google.com>
14350
14351 * event-loop.c (struct callback_event): New struct.
14352 (callback_list): New global.
14353 (append_callback_event, delete_callback_event): New functions.
14354 (process_callback): New function.
14355 (start_event_loop): Call it.
14356 * remote-utils.c (NOT_SCHEDULED): Define.
14357 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14358 moved out of readchar.
14359 (readchar): Rewrite. Call reschedule before returning.
14360 (reset_readchar): New function.
14361 (remote_close): Call it.
14362 (process_remaining, reschedule): New functions.
14363 * server.h (callback_handler_func): New typedef.
14364 (append_callback_event, delete_callback_event): Declare.
14365
9836d6ea
PA
143662010-05-03 Pedro Alves <pedro@codesourcery.com>
14367
14368 * proc-service.c (ps_pglobal_lookup): Use
14369 thread_db_look_up_one_symbol.
14370 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14371 parameter. Use it instead of all_symbols_looked_up.
14372 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14373 field.
14374 (all_symbols_looked_up): Don't declare.
14375 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14376 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14377 field.
14378 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14379 Set all_symbols_looked_up here.
14380 (thread_db_look_up_one_symbol): New.
14381 (thread_db_get_tls_address): Adjust.
14382 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14383 thread_db object on the heap, and tentatively set it in the
14384 process structure.
14385 (thread_db_init): Don't set all_symbols_looked_up here.
14386 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14387
7984d532
PA
143882010-05-03 Pedro Alves <pedro@codesourcery.com>
14389
14390 * linux-low.c (linux_kill, linux_detach): Adjust.
14391 (status_pending_p_callback): Remove redundant statement. Check
14392 for !TARGET_WAITIKIND_IGNORE, instead of
14393 TARGET_WAITKIND_STOPPED.
14394 (handle_tracepoints): Make sure LWP is locked. Adjust.
14395 (linux_wait_for_event_1): Adjust.
14396 (linux_cancel_breakpoints): New.
14397 (unsuspend_one_lwp): New.
14398 (unsuspend_all_lwps): New.
14399 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14400 (send_sigstop_callback): Change return type to int, add new
14401 `except' parameter and handle it.
14402 (suspend_and_send_sigstop_callback): New.
14403 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14404 pass them down. If SUSPEND, also increment the lwp's suspend
14405 count.
14406 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14407 (need_step_over_p): Don't consider suspended LWPs.
14408 (start_step_over): Adjust.
14409 (proceed_one_lwp): Change return type to int, add new `except'
14410 parameter and handle it.
14411 (unsuspend_and_proceed_one_lwp): New.
14412 (proceed_all_lwps): Use find_inferior instead of
14413 for_each_inferior.
14414 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14415 also decrement the suspend count of LWPs. Pass `except' down,
14416 instead of hacking its suspend count.
14417 (linux_pause_all): Add `freeze' parameter. Adjust.
14418 (linux_unpause_all): New.
14419 (linux_target_ops): Install linux_unpause_all.
14420 * server.c (handle_status): Adjust.
14421 * target.h (struct target_ops): New fields `unpause_all' and
14422 `cancel_breakpoints'. Add new parameter to `pause_all'.
14423 (pause_all): Add new `freeze' parameter.
14424 (unpause_all): New.
14425 (cancel_breakpoints): New.
14426 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14427 cancel breakpoints.
14428 (cmd_qtstart): Pause threads.
14429 (stop_tracing): Pause threads, and cancel breakpoints.
14430 * win32-low.c (win32_target_ops): Adjust.
14431
e471f25b
PA
144322010-05-03 Pedro Alves <pedro@codesourcery.com>
14433
14434 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14435 the inferior right away from here...
14436 (linux_wait_1): ... to here, and adjust to check the thread's
14437 last_resume_kind instead of the lwp's step or stop_expected flags.
14438
1915ef4f
PA
144392010-05-02 Pedro Alves <pedro@codesourcery.com>
14440
14441 * README: Use consistent `GDB' and `GDBserver' spellings.
14442
f9e39928
PA
144432010-05-02 Pedro Alves <pedro@codesourcery.com>
14444
14445 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14446 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14447 (linux_detach_one_lwp): Assume the lwp is stopped.
14448 (any_thread_of): Delete.
14449 (linux_detach): Stop all lwps here. Don't blindly delete all
14450 breakpoints.
14451 (delete_lwp_callback): New.
14452 (linux_mourn): Delete all lwps of the process that is gone.
14453 (linux_wait_1): Don't delete the last lwp of the process here.
14454 * mem-break.h (mark_breakpoints_out): Declare.
14455 * mem-break.c (mark_breakpoints_out): New.
14456 (free_all_breakpoints): Use it.
14457 * server.c (handle_target_event): If the process is gone, mark
14458 breakpoints out.
14459 * thread-db.c (struct thread_db) <create_bp>: New field.
14460 (thread_db_enable_reporting): Fix prototype. Store a thread event
14461 breakpoint reference in the thread_db struct.
14462 (thread_db_load_search): Clear the thread_db object.
14463 (try_thread_db_load_1): Ditto.
14464 (switch_to_process): New.
14465 (disable_thread_event_reporting): Use it.
14466 (remove_thread_event_breakpoints): New.
14467 (thread_db_detach, thread_db_mourn): Use it.
14468
1e7fc18c
PA
144692010-05-01 Pedro Alves <pedro@codesourcery.com>
14470
14471 * linux-low.c (linux_enable_event_reporting): New.
14472 (linux_wait_for_event_1, handle_extended_wait): Use it.
14473
02fc4de7
PA
144742010-04-30 Pedro Alves <pedro@codesourcery.com>
14475
14476 * linux-low.c (linux_kill_one_lwp, linux_kill)
14477 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14478 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14479 SIGSTOP even if the LWP is stopped.
14480 (send_sigstop_callback): New.
14481 (stop_all_lwps): Use send_sigstop_callback instead.
14482 (linux_resume_one_thread): Adjust.
14483 (proceed_one_lwp): Still proceed an LWP that the client has
14484 requested to stop, if we haven't reported it as stopped yet. Make
14485 sure that LWPs the client want stopped, have a pending SIGSTOP.
14486
bc3b5632
DE
144872010-04-26 Doug Evans <dje@google.com>
14488
ae1ada35
DE
14489 * server.c (handle_general_set): Make static.
14490
bc3b5632
DE
14491 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14492 Print received char after testing for error/eof instead of before.
14493 (input_interrupt): Tweak comment.
14494
65730243
DE
144952010-04-23 Doug Evans <dje@google.com>
14496
14497 * server.c (start_inferior): Print inferior argv if --debug.
14498
a8ae7dc0
AR
144992010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14500
14501 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14502 * nto-x86-low.c: Include server.h
14503
1c07cc19
PM
145042010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14505
14506 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14507 be consistent with other sources of this directory.
14508 (init_registers_amd64): Correct name of source file of this function
14509 in the comment.
14510
e0a61e09
PM
145112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14512
14513 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14514 64-bit executables.
14515
54709339
PM
145162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14517
14518 * win32-i386-low.c: Add 64-bit support.
14519 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14520 (init_registers_amd64): Declare.
14521 (mappings): Add 64-bit version of array.
14522 (init_windows_x86): New function.
14523 (the_low_target): Change init_arch field to init_windows_x86.
14524
e8f0053d
PM
145252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14526
14527 * win32-low.c: Adapt to support also 64-bit architecture.
14528 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14529 (get_image_name): Use SIZE_T type for local variable `done'.
14530 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14531 (toolhelp_get_dll_name): Idem.
14532 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14533 Use uintptr_t typecast to avoid warning.
14534 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14535 (handle_exception): Use phex_nz to avoid warning.
14536 (win32_wait): Remove unused local variable `process'.
14537
c481e77e
PM
145382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14539
14540 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14541 `amd64-avx.o'.
14542
12ea4b69
PM
145432010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14544
14545 * configure.ac: Use `ws2_32' library for srv_mingw.
14546 * configure: Regenerate.
14547 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14548 * remote-utils.c: Likewise.
14549
f6d1620c
L
145502010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14551
14552 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14553 if __x86_64__ is defined.
14554
8e642873
PM
145552010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14556
14557 * configure: Regenerate.
14558
711e434b
PM
145592010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14560
14561 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14562 * target.h (target_ops): New get_tib_address field.
14563 * win32-low.h (win32_thread_info): Add thread_local_base field.
14564 * win32-low.c (child_add_thread): Add tlb argument.
14565 Set thread_local_base field to TLB.
14566 (get_child_debug_event): Adapt to child_add_thread change.
14567 (win32_get_tib_address): New function.
14568 (win32_target_ops): Set get_tib_address field to
14569 win32_get_tib_address.
14570 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14571
505106cd
PA
145722010-04-12 Pedro Alves <pedro@codesourcery.com>
14573
505106cd
PA
14574 * linux-low.c (linux_mourn): Also remove the process.
14575 * server.c (handle_target_event): Don't remove the process here.
14576 * nto-low.c (nto_mourn): New.
14577 (nto_target_ops): Install it.
14578 * spu-low.c (spu_mourn): New.
14579 (spu_target_ops): Install it.
14580 * win32-low.c (win32_mourn): New.
14581 (win32_target_ops): Install it.
14582
e8470a06
PA
145832010-04-12 Pedro Alves <pedro@codesourcery.com>
14584
14585 * server.h (buffer_xml_printf): Remove redundant `;'.
14586
45ba0d02
PA
145872010-04-12 Pedro Alves <pedro@codesourcery.com>
14588
14589 * regcache.c (set_register_cache): Invalidate regcaches before
14590 changing the register cache layout.
14591 (regcache_invalidate_one): Allow a NULL regcache.
14592 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14593 regcaches before changing the register cache layout or the target
14594 regsets.
14595
59e04013
L
145962010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14597
14598 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14599 variable warning on Linux/x86-64.
14600
8336d594
PA
146012010-04-11 Pedro Alves <pedro@codesourcery.com>
14602
14603 GDBserver disconnected tracing support.
14604
14605 * linux-low.c (linux_remove_process): Delete.
14606 (add_lwp): Don't set last_resume_kind here.
14607 (linux_kill): Use `mourn'.
14608 (linux_detach): Use `thread_db_detach', and `mourn'.
14609 (linux_mourn): New.
14610 (linux_attach_lwp_1): Adjust comment.
14611 (linux_attach): last_resume_kind moved the thread_info; adjust.
14612 (status_pending_p_callback): Adjust.
14613 (linux_wait_for_event_1): Adjust.
14614 (count_events_callback, select_singlestep_lwp_callback)
14615 (select_event_lwp_callback, cancel_breakpoints_callback)
14616 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14617 (proceed_one_lwp): Adjust.
14618 (linux_async): Add debug output.
14619 (linux_thread_stopped): New.
14620 (linux_pause_all): New.
14621 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14622 linux_pause_all.
14623 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14624 (thread_db_free): Delete declaration.
14625 (thread_db_detach, thread_db_mourn): Declare.
14626 * thread-db.c (thread_db_init): Use thread_db_mourn.
14627 (thread_db_free): Delete, split in two.
14628 (disable_thread_event_reporting): New.
14629 (thread_db_detach): New.
14630 (thread_db_mourn): New.
14631
14632 * server.h (struct thread_info) <last_resume_kind>: New field.
14633 <attached>: Add comment.
14634 <gdb_detached>: New field.
14635 (handler_func): Change return type to int.
14636 (handle_serial_event, handle_target_event): Ditto.
14637 (gdb_connected): Declare.
14638 (tracing): Delete.
14639 (disconnected_tracing): Declare.
14640 (stop_tracing): Declare.
14641
14642 * server.c (handle_query) <qSupported>: Report support for
14643 disconnected tracing.
14644 (queue_stop_reply_callback): Account for running threads.
14645 (gdb_wants_thread_stopped): New.
14646 (gdb_wants_all_threads_stopped): New.
14647 (gdb_reattached_process): New.
14648 (handle_status): Clear the `gdb_detached' flag of all processes.
14649 In all-stop, stop all threads.
14650 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14651 (process_serial_event): If the remote connection breaks, or if an
14652 exit was forced with "monitor exit", force an event loop exit.
14653 Handle disconnected tracing on detach.
14654 (handle_serial_event): Adjust.
14655 (handle_target_event): If GDB isn't connected, forward events back
14656 to the inferior, unless the last process exited, in which case,
14657 exit gdbserver. Adjust interface.
14658
14659 * remote-utils.c (remote_open): Don't block in accept. Instead
14660 register an event loop source on the listen socket file
14661 descriptor. Refactor bits into ...
14662 (listen_desc): ... this new global.
14663 (gdb_connected): ... this new function.
14664 (enable_async_notification): ... this new function.
14665 (handle_accept_event): ... this new function.
14666 (remote_close): Clear remote_desc.
14667
14668 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14669
14670 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14671 New fields.
14672 (mourn_inferior): Define.
14673 (target_process_qsupported): Avoid the dangling else problem.
14674 (thread_stopped): Define.
14675 (pause_all): Define.
14676 (target_waitstatus_to_string): Declare.
14677 * target.c (target_waitstatus_to_string): New.
14678
14679 * tracepoint.c (tracing): Make extern.
14680 (disconnected_tracing): New.
14681 (stop_tracing): Make extern. Handle tracing stops due to GDB
14682 disconnecting.
14683 (cmd_qtdisconnected): New.
14684 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14685 (handle_tracepoint_general_set): Handle QTDisconnected.
14686
14687 * event-loop.c (event_handler_func): Change return type to int.
14688 (process_event): Bail out if the event handler wants the event
14689 loop to stop.
14690 (handle_file_event): Ditto.
14691 (start_event_loop): Bail out if the event handler wants the event
14692 loop to stop.
14693
14694 * nto-low.c (nto_target_ops): Adjust.
14695 * spu-low.c (spu_wait): Don't remove the process here.
14696 (spu_target_ops): Adjust.
14697 * win32-low.c (win32_wait): Don't remove the process here.
14698 (win32_target_ops): Adjust.
14699
5d267c4c
PA
147002010-04-11 Pedro Alves <pedro@codesourcery.com>
14701
14702 * regcache.c (realloc_register_cache): Invalidate inferior's
14703 regcache before recreating it.
14704
623ccd72
PA
147052010-04-09 Pedro Alves <pedro@codesourcery.com>
14706
14707 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14708
219f2f23
PA
147092010-04-09 Stan Shebs <stan@codesourcery.com>
14710 Pedro Alves <pedro@codesourcery.com>
14711
14712 * server.h (LONGEST): New.
14713 (struct thread_info) <while_stepping>: New field.
14714 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14715 Declare.
14716 (initialize_tracepoint, handle_tracepoint_general_set)
14717 (handle_tracepoint_query, tracepoint_finished_step)
14718 (tracepoint_was_hit, release_while_stepping_state_list):
14719 (current_traceframe): Declare.
14720 * server.c (handle_general_set): Handle tracepoint packets.
14721 (read_memory): New.
14722 (write_memory): New.
14723 (handle_search_memory_1): Use read_memory.
14724 (handle_query): Report support for conditional tracepoints, trace
14725 state variables, and tracepoint sources. Handle tracepoint
14726 queries.
14727 (main): Initialize the tracepoints module.
14728 (process_serial_event): Handle traceframe reads/writes.
14729
14730 * linux-low.c (handle_tracepoints): New.
14731 (linux_wait_1): Call it.
14732 (linux_resume_one_lwp): Handle while-stepping.
14733 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14734 (linux_target_ops): Install them.
14735 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14736 New field.
14737 * linux-x86-low.c (x86_supports_tracepoints): New.
14738 (the_low_target). Install it.
14739
14740 * mem-break.h (delete_breakpoint): Declare.
14741 * mem-break.c (delete_breakpoint): Make external.
14742
14743 * target.h (struct target_ops): Add `supports_tracepoints',
14744 `read_pc', and `write_pc' fields.
14745 (target_supports_tracepoints): Define.
14746 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14747 (phex_nz): New.
14748
14749 * regcache.h (struct regcache) <registers_owned>: New field.
14750 (init_register_cache, regcache_cpy): Declare.
14751 (regcache_read_pc, regcache_write_pc): Declare.
14752 (register_cache_size): Declare.
14753 (supply_regblock): Declare.
14754 * regcache.c (init_register_cache): New.
14755 (new_register_cache): Use it.
14756 (regcache_cpy): New.
14757 (register_cache_size): New.
14758 (supply_regblock): New.
14759 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 14760
219f2f23
PA
14761 * tracepoint.c: New.
14762
14763 * Makefile.in (OBS): Add tracepoint.o.
14764 (tracepoint.o): New rule.
14765
3a13a53b
L
147662010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14767
14768 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14769 (i386-mmx.o): New.
14770 (i386-mmx.c): Likewise.
14771 (i386-mmx-linux.o): Likewise.
14772 (i386-mmx-linux.c): Likewise.
14773
14774 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14775 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14776 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14777 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14778
14779 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14780 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14781 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14782
1570b33e
L
147832010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14784
14785 * Makefile.in (clean): Updated.
14786 (i386-avx.o): New.
14787 (i386-avx.c): Likewise.
14788 (i386-avx-linux.o): Likewise.
14789 (i386-avx-linux.c): Likewise.
14790 (amd64-avx.o): Likewise.
14791 (amd64-avx.c): Likewise.
14792 (amd64-avx-linux.o): Likewise.
14793 (amd64-avx-linux.c): Likewise.
14794
14795 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14796 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14797 (srv_amd64_regobj): Add amd64-avx.o.
14798 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14799 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14800 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14801 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14802 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14803 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14804 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14805
14806 * i387-fp.c: Include "i386-xstate.h".
14807 (i387_xsave): New.
14808 (i387_cache_to_xsave): Likewise.
14809 (i387_xsave_to_cache): Likewise.
14810 (x86_xcr0): Likewise.
14811
14812 * i387-fp.h (i387_cache_to_xsave): Likewise.
14813 (i387_xsave_to_cache): Likewise.
14814 (x86_xcr0): Likewise.
14815
14816 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14817 * linux-crisv32-low.c (target_regsets): Likewise.
14818 * linux-m68k-low.c (target_regsets): Likewise.
14819 * linux-mips-low.c (target_regsets): Likewise.
14820 * linux-ppc-low.c (target_regsets): Likewise.
14821 * linux-s390-low.c (target_regsets): Likewise.
14822 * linux-sh-low.c (target_regsets): Likewise.
14823 * linux-sparc-low.c (target_regsets): Likewise.
14824 * linux-xtensa-low.c (target_regsets): Likewise.
14825
14826 * linux-low.c: Include <sys/uio.h>.
14827 (regsets_fetch_inferior_registers): Support nt_type.
14828 (regsets_store_inferior_registers): Likewise.
14829 (linux_process_qsupported): New.
14830 (linux_target_ops): Add linux_process_qsupported.
14831
14832 * linux-low.h (regset_info): Add nt_type.
14833 (linux_target_ops): Add process_qsupported.
14834
14835 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14836 and <sys/uio.h>.
14837 (init_registers_i386_avx_linux): New.
14838 (init_registers_amd64_avx_linux): Likewise.
14839 (xmltarget_i386_linux_no_xml): Likewise.
14840 (xmltarget_amd64_linux_no_xml): Likewise.
14841 (PTRACE_GETREGSET): Likewise.
14842 (PTRACE_SETREGSET): Likewise.
14843 (x86_fill_xstateregset): Likewise.
14844 (x86_store_xstateregset): Likewise.
14845 (use_xml): Likewise.
14846 (x86_linux_update_xmltarget): Likewise.
14847 (x86_linux_process_qsupported): Likewise.
14848 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14849 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14850 init_registers_i386_linux here. Call
14851 x86_linux_update_xmltarget.
14852 (the_low_target): Add x86_linux_process_qsupported.
14853
14854 * server.c (handle_query): Call target_process_qsupported.
14855
14856 * target.h (target_ops): Add process_qsupported.
14857 (target_process_qsupported): New.
14858
fc7238bb
PA
148592010-04-03 Pedro Alves <pedro@codesourcery.com>
14860
14861 * inferiors.c (add_thread): Set last_status kind to
14862 TARGET_WAITKIND_IGNORE.
14863 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14864 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14865 (linux_wait_1): Move `thread' local definition to block that uses
14866 it. Don't NULL initialize `event_child'.
14867 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14868 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14869 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14870
bdabb078
PA
148712010-04-01 Pedro Alves <pedro@codesourcery.com>
14872
14873 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14874 an extended waitstatus, or by a watchpoint.
14875 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14876 thread was stepping or has been stopped by a watchpoint.
14877
d3bbe7a0
PA
148782010-04-01 Pedro Alves <pedro@codesourcery.com>
14879
14880 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14881 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14882 of another, then delete the previous, and validate all
14883 breakpoints.
14884 (validate_inserted_breakpoint): New.
14885 (delete_disabled_breakpoints): New.
14886 (validate_breakpoints): New.
14887 (check_mem_read): Validate breakpoints before trusting their
14888 shadow. Delete disabled breakpoints.
14889 (check_mem_write): Validate breakpoints before trusting they
14890 should be inserted. Delete disabled breakpoints.
14891 * mem-break.h (validate_breakpoints):
14892 * server.c (handle_query): Validate breakpoints when we see a
14893 qSymbol query.
14894
8b07ae33
PA
148952010-04-01 Pedro Alves <pedro@codesourcery.com>
14896
14897 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14898 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14899 if we could tell there's a GDB breakpoint at stop_pc.
14900 (need_step_over_p): Don't do a step over if we find a GDB
14901 breakpoint at the resume PC.
14902
14903 * mem-break.c (struct raw_breakpoint): New.
14904 (enum bkpt_type): New type `gdb_breakpoint'.
14905 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14906 fields. New field `raw'.
14907 (find_raw_breakpoint_at): New.
14908 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14909 breakpoint instead.
14910 (set_breakpoint_at): Adjust.
14911 (delete_raw_breakpoint): New.
14912 (release_breakpoint): New.
14913 (delete_breakpoint): Rename to...
14914 (delete_breakpoint_1): ... this. Add proc parameter. Use
14915 release_breakpoint. Return ENOENT.
14916 (delete_breakpoint): Reimplement.
14917 (find_breakpoint_at): Delete.
14918 (find_gdb_breakpoint_at): New.
14919 (delete_breakpoint_at): Delete.
14920 (set_gdb_breakpoint_at): New.
14921 (delete_gdb_breakpoint_at): New.
14922 (gdb_breakpoint_here): New.
14923 (set_reinsert_breakpoint): Use release_breakpoint.
14924 (uninsert_breakpoint): Rename to ...
14925 (uninsert_raw_breakpoint): ... this.
14926 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14927 (reinsert_raw_breakpoint): Change parameter type to
14928 raw_breakpoint.
14929 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14930 instead.
14931 (check_breakpoints): Adjust. Use release_breakpoint.
14932 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14933 (breakpoint_inserted_here): Ditto.
14934 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14935 Don't trust the breakpoint's shadow if it is not inserted.
14936 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14937 (delete_all_breakpoints): Adjust.
14938 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14939 use delete_breakpoint_1.
14940
14941 * mem-break.h (breakpoints_supported): Delete declaration.
14942 (set_gdb_breakpoint_at): Declare.
14943 (gdb_breakpoint_here): Declare.
14944 (delete_breakpoint_at): Delete.
14945 (delete_gdb_breakpoint_at): Declare.
14946
14947 * server.h (struct raw_breakpoint): Forward declare.
14948 (struct process_info): New field `raw_breakpoints'.
14949
14950 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14951 breakpoints.
14952
6bf5e0ba
PA
149532010-03-24 Pedro Alves <pedro@codesourcery.com>
14954
14955 * linux-low.c (status_pending_p_callback): Fix comment.
14956 (linux_wait_for_event_1): Move most of the internal breakpoint
14957 handling from here...
14958 (linux_wait_1): ... to here.
14959 (count_events_callback): New.
14960 (select_singlestep_lwp_callback): New.
14961 (select_event_lwp_callback): New.
14962 (cancel_breakpoints_callback): New.
14963 (select_event_lwp): New.
14964 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14965 priority to all LWPs that have had events that should be reported
14966 to the client. Cancel breakpoints when about to reporting the
14967 event to the client, not while stopping lwps. No longer cancel
14968 finished single-steps here.
14969 (cancel_finished_single_step): Delete.
14970 (cancel_finished_single_steps): Delete.
14971
414a389f
PA
149722010-03-24 Pedro Alves <pedro@codesourcery.com>
14973
14974 * mem-break.c (enum bkpt_type): New.
14975 (struct breakpoint): New field `type'.
14976 (set_breakpoint_at): Change return type to struct breakpoint
14977 pointer. Set type to `other_breakpoint' by default.
14978 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14979 in the breakpoint list.
14980 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14981 (reinsert_breakpoint): Rename to ...
14982 (reinsert_raw_breakpoint): ... this.
14983 (reinsert_breakpoints_at): Adjust.
14984 * mem-break.h (struct breakpoint): Declare.
14985 (set_breakpoint_at): Change return type to struct breakpoint
14986 pointer.
14987
2280c721
PA
149882010-03-24 Pedro Alves <pedro@codesourcery.com>
14989
14990 * server.c (handle_query): Assign, not compare.
14991
d50171e4
PA
149922010-03-24 Pedro Alves <pedro@codesourcery.com>
14993
14994 Teach linux gdbserver to step-over-breakpoints.
14995
14996 * linux-low.c (can_hardware_single_step): New.
14997 (supports_breakpoints): New.
14998 (handle_extended_wait): If stopping threads, read the stop pc of
14999 the new cloned LWP.
15000 (get_pc): New.
15001 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15002 low target doesn't support retrieving the PC.
15003 (add_lwp): Set last_resume_kind to resume_continue.
15004 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15005 (linux_attach): Don't clear stop_expected. Set the lwp's
15006 last_resume_kind to resume_stop.
15007 (linux_detach_one_lwp): Don't check for removed breakpoints.
15008 (check_removed_breakpoint): Delete.
15009 (status_pending_p): Rename to ...
15010 (status_pending_p_callback): ... this. Don't check for removed
15011 breakpoints. Don't consider threads that are stopped from GDB's
15012 perspective.
15013 (linux_wait_for_lwp): Always read the stop_pc here.
15014 (cancel_breakpoint): New.
15015 (step_over_bkpt): New global.
15016 (linux_wait_for_event_1): Implement stepping over breakpoints.
15017 (gdb_wants_lwp_stopped): New.
15018 (gdb_wants_all_stopped): New.
15019 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15020 single-step traps here. Store the thread's last reported target
15021 wait status.
15022 (send_sigstop): Don't clear stop_expected. Always set it,
15023 instead.
15024 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15025 (cancel_finished_single_step): New.
15026 (cancel_finished_single_steps): New.
15027 (wait_for_sigstop): Don't cancel finished single-step traps here.
15028 (linux_resume_one_lwp): Don't check for removed breakpoints.
15029 Don't set `step' on non-hardware step archs.
15030 (linux_set_resume_request): Ignore resume_stop requests if already
15031 stopping or stopped. Set the lwp's last_resume_kind.
15032 (resume_status_pending_p): Don't check for removed breakpoints.
15033 (need_step_over_p): New.
15034 (start_step_over): New.
15035 (finish_step_over): New.
15036 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15037 requests. Clear the thread's last reported target waitstatus.
15038 Don't use the `suspended' flag. Don't consider pending breakpoints.
15039 (linux_resume): Start a step-over if necessary.
15040 (proceed_one_lwp): New.
15041 (proceed_all_lwps): New.
15042 (unstop_all_lwps): New.
15043 * linux-low.h (struct lwp_info): Rewrite comment for the
15044 `suspended' flag. Add the `stop_pc' field. Delete the
15045 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15046 Add `'last_resume_kind' and `need_step_over' fields.
15047 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15048 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15049 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15050 (set_raw_breakpoint_at): New.
15051 (set_breakpoint_at): Rewrite to use it.
15052 (reinsert_breakpoint_handler): Delete.
15053 (set_reinsert_breakpoint): New.
15054 (reinsert_breakpoint_by_bp): Delete.
15055 (delete_reinsert_breakpoints): New.
15056 (uninsert_breakpoint): Rewrite.
15057 (uninsert_breakpoints_at): New.
15058 (reinsert_breakpoint): Rewrite.
15059 (reinsert_breakpoints_at): New.
15060 (check_breakpoints): Rewrite.
15061 (breakpoint_here): New.
15062 (breakpoint_inserted_here): New.
15063 (check_mem_read): Adjust.
15064 * mem-break.h (breakpoints_supported, breakpoint_here)
15065 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15066 (reinsert_breakpoint_by_bp): Delete declaration.
15067 (delete_reinsert_breakpoints): Declare.
15068 (reinsert_breakpoint): Delete declaration.
15069 (reinsert_breakpoints_at): Declare.
15070 (uninsert_breakpoint): Delete declaration.
15071 (uninsert_breakpoints_at): Declare.
15072 (check_breakpoints): Adjust prototype.
15073 * server.h: Adjust include order.
15074 (struct thread_info): Declare here. Add a `last_status' field.
15075
30ba68cb
MS
150762010-03-23 Michael Snyder <msnyder@vmware.com>
15077
15078 * server.c (crc32): New function.
15079 (handle_query): Add handling for 'qCRC:' request.
15080
b9a881c2
PA
150812010-03-23 Pedro Alves <pedro@codesourcery.com>
15082
15083 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15084 lwp had been stopped by a watchpoint.
15085
e92d13d5
PA
150862010-03-16 Pedro Alves <pedro@codesourcery.com>
15087
15088 * server.h (internal_error): Declare.
15089 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15090 * utils.c (internal_error): New function.
15091
64daa791
AS
150922010-03-15 Andreas Schwab <schwab@redhat.com>
15093
15094 * configure.srv: Fix typo setting srv_regobj.
15095
f52cd8cd
PA
150962010-03-15 Pedro Alves <pedro@codesourcery.com>
15097
15098 * linux-low.c (fetch_register): Avoid passing a non string literal
15099 format to `error'.
15100 (usr_store_inferior_registers): Ditto.
15101
93ae6fdc
PA
151022010-03-14 Pedro Alves <pedro@codesourcery.com>
15103
15104 * linux-low.c (linux_write_memory): Bail out early if peeking
15105 memory failed.
15106
c3adc08c
PA
151072010-03-14 Pedro Alves <pedro@codesourcery.com>
15108
15109 * linux-low.h (struct lwp_info): New fields
15110 `stopped_by_watchpoint' and `stopped_data_address'.
15111 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15112 here, and cache them in the lwp object.
15113 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15114 directly.
15115 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15116 field.
15117 (linux_stopped_by_watchpoint): Rewrite.
15118 (linux_stopped_data_address): Rewrite.
15119
bce522a2
PA
151202010-03-06 Simo Melenius <simo.melenius@iki.fi>
15121
15122 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15123 switching the current inferior, not before.
15124
90884b2b
L
151252010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15126
15127 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15128 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15129 i386-linux.c and amd64-linux.c.
15130 (reg-i386.o): Removed.
15131 (reg-i386.c): Likewise.
15132 (reg-i386-linux.o): Likewise.
15133 (reg-i386-linux.c): Likewise.
15134 (reg-x86-64.o): Likewise.
15135 (reg-x86-64.c): Likewise.
15136 (reg-x86-64-linux.o): Likewise.
15137 (reg-x86-64-linux.c): Likewise.
15138 (i386.o): New.
15139 (i386.c): Likewise.
15140 (i386-linux.o): Likewise.
15141 (i386-linux.c): Likewise.
15142 (amd64.o): Likewise.
15143 (amd64.c): Likewise.
15144 (amd64-linux.o): Likewise.
15145 (amd64-linux.c): Likewise.
15146
15147 * configure.srv (srv_i386_regobj): New.
15148 (srv_i386_linux_regobj): Likewise.
15149 (srv_amd64_regobj): Likewise.
15150 (srv_amd64_linux_regobj): Likewise.
15151 (srv_i386_32bit_xmlfiles): Likewise.
15152 (srv_i386_64bit_xmlfiles): Likewise.
15153 (srv_i386_xmlfiles): Likewise.
15154 (srv_amd64_xmlfiles): Likewise.
15155 (srv_i386_linux_xmlfiles): Likewise.
15156 (srv_amd64_linux_xmlfiles): Likewise.
15157 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15158 srv_xmlfiles to $srv_i386_xmlfiles.
15159 (i[34567]86-*-mingw32ce*): Likewise.
15160 (i[34567]86-*-mingw*): Likewise.
15161 (i[34567]86-*-nto*): Likewise.
15162 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15163 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15164 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15165 (x86_64-*-linux*): Likewise.
15166
15167 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15168 (init_registers_amd64_linux): New.
15169 (x86_arch_setup): Replace init_registers_x86_64_linux with
15170 init_registers_amd64_linux.
15171
193f13e6
MK
151722010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15173
15174 * configure.ac: Check for libdl. If it is not available link against
15175 static libthread_db.
15176 * configure: Regenerate.
15177
85d721b8
PA
151782010-02-22 Pedro Alves <pedro@codesourcery.com>
15179
15180 PR9605
15181
15182 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15183 handing a read watchpoint.
15184 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15185
6076632b
DE
151862010-02-12 Doug Evans <dje@google.com>
15187
15188 * linux-low.c (linux_supports_tracefork_flag): Document.
15189 (linux_look_up_symbols): Add comment.
15190
3327ccf7
L
151912010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15192
15193 * regcache.c (supply_register): Clear regcache if buf is NULL.
15194
0718675c 151952010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 15196 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
15197
15198 * inferiors.c (find_inferior): Add function documentation.
15199 (unloaded_dll): Handle the case where the unloaded dll has not
15200 been previously registered in the dll list.
15201
177321bd
DJ
152022010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15203
15204 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15205 (thumb2_breakpoint): New.
15206 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15207
2b009048
DJ
152082010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15209
15210 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15211 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15212 breakpoints.
15213
3be029c7
PA
152142010-01-21 Pedro Alves <pedro@codesourcery.com>
15215
15216 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15217
18f5de3b
JK
152182010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15219
15220 * linux-s390-low.c (s390_collect_ptrace_register)
15221 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15222
3743bb4f
DE
152232010-01-21 Doug Evans <dje@google.com>
15224
14ce3065
DE
15225 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15226 (PTRACE_ARG4_TYPE): New macro.
15227 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15228 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15229 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15230 (usr_store_inferior_registers): Ditto.
15231 (linux_read_memory, linux_write_memory): Ditto.
15232 (linux_test_for_tracefork): Ditto.
15233
3743bb4f
DE
15234 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15235 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15236
8b315be5
PA
152372010-01-21 Pedro Alves <pedro@codesourcery.com>
15238
15239 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15240 target.
15241
85492558
PA
152422010-01-21 Pedro Alves <pedro@codesourcery.com>
15243
15244 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15245 prototype to take a regcache. Adjust.
15246
442ea881
PA
152472010-01-20 Pedro Alves <pedro@codesourcery.com>
15248
15249 * regcache.h (struct thread_info): Forward declare.
15250 (struct regcache): New.
15251 (new_register_cache): Adjust prototype.
15252 (get_thread_regcache): Declare.
15253 (free_register_cache): Adjust prototype.
15254 (registers_to_string, registers_from_string): Ditto.
15255 (supply_register, supply_register_by_name, collect_register)
15256 (collect_register_as_string, collect_register_by_name): Ditto.
15257 * regcache.c (struct inferior_regcache_data): Delete.
15258 (get_regcache): Rename to ...
15259 (get_thread_regcache): ... this. Adjust. Switch inferior before
15260 fetching registers.
15261 (regcache_invalidate_one): Adjust.
15262 (regcache_invalidate): Fix prototype.
15263 (new_register_cache): Return the new register cache.
15264 (free_register_cache): Change prototype.
15265 (realloc_register_cache): Adjust.
15266 (registers_to_string): Change prototype to take a regcache. Adjust.
15267 (registers_from_string): Ditto.
15268 (register_data): Ditto.
15269 (supply_register): Ditto.
15270 (supply_register_by_name): Ditto.
15271 (collect_register): Ditto.
15272 (collect_register_as_string): Ditto.
15273 (collect_register_by_name): Ditto.
15274 * server.c (process_serial_event): Adjust.
15275 * linux-low.h (regset_fill_func, regset_store_func): Change
15276 prototype.
15277 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15278 Change prototype.
15279 * linux-low.c (get_stop_pc): Adjust.
15280 (check_removed_breakpoint): Adjust.
15281 (linux_wait_for_event): Adjust.
15282 (linux_resume_one_lwp): Adjust.
15283 (fetch_register): Add regcache parameter. Adjust.
15284 (usr_store_inferior_registers): Ditto.
15285 (regsets_fetch_inferior_registers): Ditto.
15286 (regsets_store_inferior_registers): Ditto.
15287 (linux_fetch_registers, linux_store_registers): Ditto.
15288 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15289 regcache. Adjust.
43aaf8b6
PA
15290 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15291 Ditto.
442ea881
PA
15292 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15293 prototype to take a regcache.
15294 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15295 * remote-utils.c (convert_ascii_to_int, outreg)
15296 (prepare_resume_reply): Change prototype to take a regcache.
15297 Adjust.
15298 * target.h (struct target_ops) <fetch_registers, store_registers>:
15299 Change prototype to take a regcache.
15300 (fetch_inferior_registers, store_inferior_registers): Change
15301 prototype to take a regcache. Adjust.
15302 * proc-service.c (ps_lgetregs): Adjust.
15303 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15304 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15305 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15306 take a regcache. Adjust.
15307 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15308 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15309 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15310 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15311 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15312 (cris_cannot_fetch_register):
15313 (cris_breakpoint_at): Change prototype to take a regcache.
15314 Adjust.
15315 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15316 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15317 to take a regcache. Adjust.
15318 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15319 Adjust.
15320 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15321 take a regcache. Adjust.
15322 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15323 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15324 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15325 * linux-mips-low.c (mips_get_pc):
15326 (mips_set_pc): Change prototype to take a regcache. Adjust.
15327 (mips_reinsert_addr): Adjust.
15328 (mips_collect_register): Change prototype to take a regcache.
15329 Adjust.
15330 (mips_supply_register):
15331 (mips_collect_register_32bit, mips_supply_register_32bit)
15332 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15333 (mips_store_fpregset): Ditto.
43aaf8b6
PA
15334 * linux-ppc-low.c (ppc_supply_ptrace_register)
15335 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
15336 (parse_spufs_run): Adjust.
15337 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15338 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15339 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15340 take a regcache. Adjust.
15341 * linux-s390-low.c (s390_collect_ptrace_register)
15342 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15343 (s390_set_pc): Change prototype to take a regcache. Adjust.
15344 (s390_arch_setup): Adjust.
15345 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15346 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15347 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15348 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15349 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15350 regcache. Adjust.
15351 (sparc_breakpoint_at): Adjust.
15352 * linux-xtensa-low.c (xtensa_fill_gregset):
15353 (xtensa_store_gregset):
15354 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15355 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15356 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15357 prototype to take a regcache. Adjust.
15358 * win32-arm-low.c (arm_fetch_inferior_register)
15359 (arm_store_inferior_register): Change prototype to take a
15360 regcache. Adjust.
15361 * win32-i386-low.c (i386_fetch_inferior_register)
15362 (i386_store_inferior_register): Change prototype to take a
15363 regcache. Adjust.
15364 * win32-low.c (child_fetch_inferior_registers)
15365 (child_store_inferior_registers): Change prototype to take a
15366 regcache. Adjust.
15367 (win32_wait): Adjust.
15368 (win32_fetch_inferior_registers): Change prototype to take a
15369 regcache. Adjust.
15370 (win32_store_inferior_registers): Adjust.
15371 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15372 store_inferior_register>: Change prototype to take a regcache.
15373
60c3d7b0
DE
153742010-01-20 Doug Evans <dje@google.com>
15375
15376 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15377 #ifdef.
15378 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 15379 (W_STOPCODE): Provide definition if missing.
60c3d7b0 15380
dc146f7c
VP
153812010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15382
15383 * linux-low.c (linux_core_of_thread): New.
15384 (compare_ints, show_process, list_threads): New.
15385 (linux_qxfer_osdata): Report threads and cores.
15386 (linux_target_op): Register linux_core_of_thread.
15387 * remote-utils.c (prepare_resume_reply): Report the core.
15388 (buffer_xml_printf): Support %d specifier.
15389 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15390 New.
15391 (handle_query): Handle qXfer:threads. Announce availability
15392 thereof.
15393 * target.h (struct target_ops): New field core_of_thread.
15394
7803799a
UW
153952010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15396
15397 * Makefile.in (clean): Remove new generated files.
15398 (reg-s390.o, reg-s390.c): Remove rules.
15399 (reg-s390x.o, reg-s390x.c): Likewise.
15400 (s390-linux32.o, s390-linux32.c): Add rules.
15401 (s390-linux64.o, s390-linux64.c): Likewise.
15402 (s390x-linux64.o, s390x-linux64.c): Likewise.
15403 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15404 * linux-s390-low.c: Include <elf.h>.
15405 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15406 (init_registers_s390): Remove prototype.
15407 (init_registers_s390x): Likewise.
15408 (init_registers_s390_linux32): Add prototype.
15409 (init_registers_s390_linux64): Likewise.
15410 (init_registers_s390x_linux64): Likewise.
15411 (s390_num_regs_3264): New define.
15412 (s390_regmap_3264): New global variable.
15413 (s390_cannot_fetch_register): Remove obsolete check.
15414 (s390_cannot_store_register): Likewise.
15415 (s390_collect_ptrace_register): Handle upper/lower register halves.
15416 (s390_supply_ptrace_register): Likewise.
15417 (s390_fill_gregset): Update to register number changes.
15418 (s390_get_hwcap): New routine.
15419 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15420 Install appropriate regmap and register set.
15421
6e7ffa39
JB
154222010-01-01 Joel Brobecker <brobecker@adacore.com>
15423
15424 * server.c (gdbserver_version): Update copyright year to 2010.
15425 * gdbreplay.c (gdbreplay_version): Likewise.
15426
957f3f49
DE
154272009-12-28 Doug Evans <dje@google.com>
15428
15429 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15430 elf/external.h. Include <elf.h> instead but only if necessary.
15431
ca5c370d
PA
154322009-12-28 Pedro Alves <pedro@codesourcery.com>
15433
15434 * linux-low.c (linux_remove_process): Remove `detaching'
15435 parameter. Don't release/detach from thread_db here.
15436 (linux_kill): Release/detach from thread_db here, ...
15437 (linux_detach): ... and here, before actually detaching.
15438 (linux_wait_1): ... and here, when a process exits.
15439 * thread-db.c (any_thread_of): New.
15440 (thread_db_free): Switch the current inferior to a thread of the
15441 passed in process.
15442
4ee62156
DE
154432009-12-21 Doug Evans <dje@google.com>
15444
d90e6a88
DE
15445 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15446
c5f62d5f
DE
15447 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15448 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15449 warning ifndef __NR_tkill. Move setting of errno there too.
15450 Delete unnecessary resetting of errno after syscall.
15451 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15452
10e86dd7
DE
15453 * configure.ac: Check for dladdr.
15454 * config.in: Regenerate.
15455 * configure: Regenerate.
15456 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15457 (try_thread_db_load): Update.
15458
4ee62156
DE
15459 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15460
00f515da
DE
154612009-12-18 Doug Evans <dje@google.com>
15462
e9464885
DE
15463 * event-loop.c: Include unistd.h if it exists.
15464
07d4f67e
DE
15465 * linux-low.c (my_waitpid): Move definition away from being in
15466 between linux_tracefork_child/linux_test_for_tracefork.
15467
00f515da
DE
15468 * gdb_proc_service.h (psaddr_t): Fix type.
15469 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15470 signature to match glibc.
15471
1de1badb
DE
154722009-12-16 Doug Evans <dje@google.com>
15473
15474 * linux-low.c (linux_read_memory): Fix argument to read.
15475
aeeb81d1
PA
154762009-11-26 Pedro Alves <pedro@codesourcery.com>
15477
15478 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15479 events, don't leave current_inferior pointing at null.
15480
10357975
PA
154812009-11-26 Pedro Alves <pedro@codesourcery.com>
15482
15483 * win32-low.c (LOG): Delete.
15484 (OUTMSG): Output to stderr.
15485 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15486 on compile time LOG macro.
15487 (win32_wait): Fix debug output.
15488
cf6e3471
PA
154892009-11-26 Pedro Alves <pedro@codesourcery.com>
15490
15491 * win32-low.c (win32_add_one_solib): If the dll name is
15492 "ntdll.dll", prepend the system directory to the dll path.
15493
0c85e18e
MK
154942009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15495
15496 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15497
9ac544ce 154982009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 15499 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
15500
15501 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15502 * configure.ac: Check for __mcoldfire__ and set
15503 gdb_cv_m68k_is_coldfire.
15504 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15505 reg-cf.o and reg-m68k.o.
15506 * configure: Regenerated.
15507
fd7dd3e6
PA
155082009-11-16 Pedro Alves <pedro@codesourcery.com>
15509
15510 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15511 Pass it to thread_db_free.
15512 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15513 proper `detaching' argument to linux_remove_process.
15514 * linux-low.h (thread_db_free): Add `detaching' parameter.
15515 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15516 to thread_db_free.
15517 (thread_db_free): Add `detaching' parameter. Only
15518 call td_ta_clear_event if detaching from process.
15519
75aa492e
MK
155202009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15521
15522 * thread-db.c (thread_db_free): Fix typo.
15523
21e1bee4
PP
155242009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15525
15526 PR gdb/10838
15527 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15528
8838b45e
NS
155292009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15530
15531 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15532 with an i686 compiler.
15533 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15534 needed.
15535 * configure: Rebuilt.
15536
8a35fb51
SL
155372009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15538
15539 PR gdb/10783
15540
15541 * server.c (handle_search_memory_1): Correct read_addr initialization
15542 in loop for searching subsequent chunks.
15543
96f15937
PP
155442009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15545
15546 * configure.ac: New --with-libthread-db option.
15547 * thread-db.c: Allow direct dependence on libthread_db.
15548 (thread_db_free): Adjust.
15549 * config.in: Regenerate.
15550 * configure: Likewise.
889bf7c5 15551
5f7d1694
PP
155522009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15553
15554 PR gdb/10757
15555 * thread-db.c (attach_thread): New function.
15556 (maybe_attach_thread): Return success/failure.
15557 (find_new_threads_callback): Adjust.
889bf7c5
PA
15558 (thread_db_find_new_threads): Loop until no new threads.
15559
88e3b899
PA
155602009-10-13 Pedro Alves <pedro@codesourcery.com>
15561
15562 * proc-service.c (ps_lgetregs): Formatting.
15563
cdbfd419
PP
155642009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15565
15566 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15567 * configure.ac: Adjust.
15568 * linux-low.h (struct process_info_private): Move members to struct
15569 thread_db.
15570 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15571 * linux-low.c (linux_remove_process): Adjust.
15572 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15573 * server.c (handle_query): Move code ...
15574 (handle_monitor_command): ... here. New function.
15575 * target.h (struct target_ops): New member.
15576 * thread-db.c (struct thread_db): New.
15577 (libthread_db_search_path): New variable.
15578 (thread_db_create_event, thread_db_enable_reporting)
15579 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15580 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15581 (try_thread_db_load_1, dladdr_to_soname): New functions.
15582 (try_thread_db_load, thread_db_load_search): New functions.
15583 (thread_db_init): Search for libthread_db.
15584 (thread_db_free): New function.
15585 (thread_db_handle_monitor_command): Likewise.
15586 * config.in: Regenerate.
15587 * configure: Regenerate.
889bf7c5 15588
4168d2d6
UW
155892009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15590
15591 * spu-low.c (spu_kill): Wait for inferior to terminate.
15592 Call clear_inferiors.
15593 (spu_detach): Call clear_inferiors.
15594
81ecdfbb
RW
155952009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15596
15597 * aclocal.m4: Regenerate.
15598 * config.in: Likewise.
15599 * configure: Likewise.
15600
0b9ff2c0
UW
156012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15602
15603 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15604 (parse_spufs_run): New function.
15605 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15606 (ppc_breakpoint_at): Handle SPU breakpoints.
15607
efcbbd14
UW
156082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15609
15610 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15611 (SPUFS_MAGIC): Define.
15612 (spu_enumerate_spu_ids): New function.
15613 (linux_qxfer_spu): New function.
15614 (linux_target_ops): Install linux_qxfer_spu.
15615
f4d9bade
UW
156162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15617
15618 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15619 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15620 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15621 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15622 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15623 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15624 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15625 (init_registers_powerpc_cell32l): Add prototype.
15626 (init_registers_powerpc_cell64l): Likewise.
15627 (ppc_arch_setup): Detect Cell/B.E. architecture.
15628
96e946ca
RW
156292009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15630
15631 * Makefile.in (datarootdir): New variable.
15632
58d6951d
DJ
156332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15634
15635 * linux-low.c (linux_write_memory): Update debugging output.
15636 * Makefile.in (clean): Add new descriptions.
15637 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15638 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15639 * configure.srv: Add new files for arm*-*-linux*.
15640 * linux-arm-low.c: Add new declarations.
15641 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15642 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15643 (HWCAP_VFPv3D16): New.
15644 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15645 instead of __IWMMXT__.
15646 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15647 (arm_arch_setup): New.
15648 (target_regsets): Remove #ifdef. Add VFP regset.
15649 (the_low_target): Use arm_arch_setup.
15650
12b42a12
DJ
156512009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15652
15653 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15654 the main thread again.
15655
ac8c974e
AR
156562009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15657
15658 Adding Neutrino gdbserver.
15659 * configure: Regenerated.
15660 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15661 * configure.srv (i[34567]86-*-nto*): New target.
15662 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15663 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15664 (nto_comctrl) [__QNX__]: New function.
15665 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15666
4424e0c3 156672009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
15668
15669 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15670 srv_tgtobj.
15671
912cf4ba
PA
156722009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15673 Pedro Alves <pedro@codesourcery.com>
15674
15675 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15676 don't support CONTEXT_EXTENDED_REGISTERS.
15677 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15678 (the_low_target): Install them.
15679 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15680 failing with ERROR_PIPE_NOT_CONNECTED.
15681
aa5ca48f
DE
156822009-06-30 Doug Evans <dje@google.com>
15683 Pierre Muller <muller@ics.u-strasbg.fr>
15684
15685 Add h/w watchpoint support to x86-linux, win32-i386.
15686 * Makefile.in (SFILES): Add i386-low.c
15687 (i386_low_h): Define.
15688 (i386-low.o): Add dependencies.
15689 (linux-x86-low.o): Add i386-low.h dependency.
15690 (win32-i386-low.o): Ditto.
15691 * i386-low.c: New file.
15692 * i386-low.h: New file.
15693 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15694 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15695 * linux-low.c (linux_add_process): Initialize arch_private.
15696 (linux_remove_process): Free arch_private.
15697 (add_lwp): Initialize arch_private.
15698 (delete_lwp): Free arch_private.
15699 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15700 provided.
15701 * linux-low.h (process_info_private): New member arch_private.
15702 (lwp_info): New member arch_private.
15703 (linux_target_ops): New members new_process, new_thread,
15704 prepare_to_resume.
15705 (ptid_of): New macro.
15706 * linux-x86-low.c: Include stddef.h, i386-low.h.
15707 (arch_process_info): New struct.
15708 (arch_lwp_info): New struct.
15709 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15710 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15711 (i386_dr_low_get_status): New function.
15712 (x86_insert_point, x86_remove_point): New functions.
15713 (x86_stopped_by_watchpoint): New function.
15714 (x86_stopped_data_address): New function.
15715 (x86_linux_new_process, x86_linux_new_thread): New functions.
15716 (x86_linux_prepare_to_resume): New function.
15717 (the_low_target): Add entries for insert_point, remove_point,
15718 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15719 prepare_to_resume.
15720 * server.c (debug_hw_points): New global.
15721 (monitor_show_help): Document set debug-hw-points.
15722 (handle_query): Process "set debug-hw-points".
15723 * server.h (debug_hw_points): Declare.
15724 (paddress): Declare.
15725 * utils.c (NUMCELLS, CELLSIZE): New macros.
15726 (get_sell, xsnprintf, paddress): New functions.
15727 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15728 remove_point, stopped_by_watchpoint, stopped_data_address.
15729 * win32-i386-low.c: Include i386-low.h.
15730 (debug_reg_state): Replaces dr.
15731 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15732 (i386_dr_low_get_status): New function.
15733 (i386_insert_point, i386_remove_point): New functions.
15734 (i386_stopped_by_watchpoint): New function.
15735 (i386_stopped_data_address): New function.
15736 (i386_initial_stuff): Update.
15737 (get_thread_context,set_thread_context,i386_thread_added): Update.
15738 (the_low_target): Add entries for insert_point,
15739 remove_point, stopped_by_watchpoint, stopped_data_address.
15740 * win32-low.c (win32_insert_watchpoint): New function.
15741 (win32_remove_watchpoint): New function.
15742 (win32_stopped_by_watchpoint): New function.
15743 (win32_stopped_data_address): New function.
15744 (win32_target_ops): Add entries for insert_watchpoint,
15745 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15746 * win32-low.h (win32_target_ops): New members insert_point,
15747 remove_point, stopped_by_watchpoint, stopped_data_address.
15748
d993e290
PA
157492009-06-25 Pedro Alves <pedro@codesourcery.com>
15750
15751 * server.c (process_serial_event): Re-return unsupported, not
15752 error, if the type isn't recognized. Re-allow supporting only
15753 insert or remove packets. Also call require_running for
15754 breakpoints. Add missing break statement to default case. Tidy.
15755 * target.h (struct target_ops): Rename insert_watchpoint to
15756 insert_point, and remove_watchpoint to remove_point.
15757
15758 * linux-low.h (struct linux_target_ops): Likewise.
15759 * linux-low.c (linux_insert_watchpoint): Rename to ...
15760 (linux_insert_point): ... this. Adjust.
15761 (linux_remove_watchpoint): Rename to ...
15762 (linux_remove_point): ... this. Adjust.
15763 (linux_target_ops): Adjust.
15764 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15765 (cris_insert_point): ... this.
15766 (cris_remove_watchpoint): Rename to ...
15767 (cris_remove_point): ... this.
15768 (the_low_target): Adjust.
15769
0f54c268
PM
157702009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15771
15772 * server.c (handle_v_kill): Pass signal_pid to
15773 kill_inferior if multi_process is zero.
15774
c6314022
AR
157752009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15776
15777 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15778 * target.h (target_ops): Comment for *_watchpoint to make it clear
15779 the functions can get types '0' and '1'.
15780
4463ce24
AR
157812009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15782
15783 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15784 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15785 * regcache.c (get_regcache): Likewise.
15786 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15787 * win32-low.c (child_fetch_inferior_registers): Remove check for
15788 regno 0.
15789
cf8fd78b
PA
157902009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15791 Pedro Alves <pedro@codesourcery.com>
15792
15793 * target.h (struct target_ops) <supports_multi_process>: New
15794 callback.
15795 (target_supports_multi_process): New.
15796 * server.c (handle_query): Even if GDB reports support, only
15797 enable multi-process if the target also supports it. Report
15798 multi-process support only if the target backend supports it.
15799 * linux-low.c (linux_supports_multi_process): New function.
15800 (linux_target_ops): Install it as target_supports_multi_process
15801 callback.
15802
47c0c975
DE
158032009-05-24 Doug Evans <dje@google.com>
15804
e09875d4
DE
15805 Global renaming of find_thread_pid to find_thread_ptid.
15806 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15807 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15808 All callers updated.
15809
e27d73f6
DE
15810 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15811 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15812 directly.
15813
47c0c975
DE
15814 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15815 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15816 (linux_resume_one_lwp): Ditto.
15817
2acc282a
DE
158182009-05-23 Doug Evans <dje@google.com>
15819
15820 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15821 from struct inferior_list_entry * to struct lwp_info *.
15822 All callers updated.
15823
9f1036c1
DE
158242009-05-13 Doug Evans <dje@google.com>
15825
15826 * linux-x86-low.c: Don't include assert.h.
15827 (x86_siginfo_fixup): Use fatal, not assert.
15828 (x86_arch_setup): Fix comment.
15829
d0722149
DE
158302009-05-12 Doug Evans <dje@google.com>
15831
15832 Biarch support for i386/amd64 gdbserver.
15833 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15834 Add linux-x86-low.c.
15835 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15836 (linux-x86-low.o): Add.
15837 * linux-x86-64-low.c: Delete.
15838 * linux-i386-low.c: Delete.
15839 * linux-x86-low.c: New file.
15840 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15841 linux-x86-low.o.
15842 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15843 linux-x86-low.o.
15844 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15845 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15846 (linux_child_pid_to_exec_file): New function.
15847 (elf_64_header_p, elf_64_file_p): New functions.
15848 (siginfo_fixup): New function.
15849 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15850 give target a chance to convert layout.
15851 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15852 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15853
fdeb2a12
DE
158542009-05-07 Doug Evans <dje@google.com>
15855
15856 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15857 (regsets_store_inferior_registers): Ditto.
15858
a6dbe5df
PA
158592009-05-06 Pedro Alves <pedro@codesourcery.com>
15860
15861 PR server/10048
15862
15863 * linux-low.c (must_set_ptrace_flags): Delete.
15864 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15865 of the global.
15866 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15867 `lwp->must_set_ptrace_flags' instead.
ba42693b 15868 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15869 (linux_wait_1): ... not here.
15870
5091eb23
DE
158712009-04-30 Doug Evans <dje@google.com>
15872
9f767825
DE
15873 * inferiors.c (started_inferior_callback): New function.
15874 (attached_inferior_callback): New function.
15875 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15876 * server.c (print_started_pid, print_attached_pid): New functions.
15877 (detach_or_kill_for_exit): New function.
15878 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15879 * server.h (have_started_inferiors_p): Declare.
15880 (have_attached_inferiors_p): Declare.
15881
5091eb23
DE
15882 * inferiors.c (remove_process): Fix memory leak, free process.
15883 * linux-low.c (linux_remove_process): New function.
15884 (linux_kill): Call it instead of remove_process.
15885 (linux_detach, linux_wait_1): Ditto.
15886
155c8968
PA
158872009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15888
15889 * configure.srv: Add x86 Windows CE target.
15890
7fe519cb
UW
158912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15892
15893 * inferiors.c (get_thread_process): Make global.
15894 * server.h (get_thread_process): Add prototype.
15895 * thread-db.c (find_one_thread): Use get_thread_process
15896 instead of current_process.
15897 (thread_db_get_tls_address): Do not crash if called when
15898 thread layer is not yet initialized.
15899
5472f405
UW
159002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15901
15902 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15903 * spu-low.c (current_tid): Rename to ...
15904 (current_ptid): ... this.
15905 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15906 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15907 ptid_get_lwp (current_ptid) instead of current_tid.
15908 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15909 instead of current_tid. Use find_process_pid to verify pid
15910 argument is valid. Pass proper argument to remove_process.
15911 (spu_thread_alive): Compare current_ptid instead of current_tid.
15912 (spu_resume): Likewise.
15913
55ac2b99
PA
159142009-04-02 Pedro Alves <pedro@codesourcery.com>
15915
15916 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15917 variable.
15918
95954743
PA
159192009-04-01 Pedro Alves <pedro@codesourcery.com>
15920
15921 Implement the multiprocess extensions, and add linux multiprocess
15922 support.
15923
15924 * server.h (ULONGEST): Declare.
15925 (struct ptid, ptid_t): New.
15926 (minus_one_ptid, null_ptid): Declare.
15927 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15928 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15929 (struct inferior_list_entry): Change `id' type from unsigned from
15930 to ptid_t.
15931 (struct sym_cache, struct breakpoint, struct
15932 process_info_private): Forward declare.
15933 (struct process_info): Declare.
15934 (current_process): Declare.
15935 (all_processes): Declare.
15936 (initialize_inferiors): Declare.
15937 (add_thread): Adjust to use ptid_t.
15938 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15939 (add_process, remove_process, find_thread_pid): Declare.
15940 (find_inferior_id): Adjust to use ptid_t.
15941 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15942 (multi_process): Declare.
15943 (push_event): Adjust to use ptid_t.
15944 (read_ptid, write_ptid): Declare.
15945 (prepare_resume_reply): Adjust to use ptid_t.
15946 (clear_symbol_cache): Declare.
15947 * inferiors.c (all_processes): New.
15948 (null_ptid, minus_one_ptid): New.
15949 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15950 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15951 (add_thread): Change unsigned long to ptid. Remove gdb_id
15952 parameter. Adjust.
15953 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15954 (gdb_id_to_thread): Rename to ...
15955 (find_thread_pid): ... this. Change unsigned long to ptid.
15956 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15957 (loaded_dll, pull_pid_from_list): Adjust.
15958 (add_process, remove_process, find_process_pid)
15959 (get_thread_process, current_process, initialize_inferiors): New.
15960 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15961 (struct target_waitstatus) <related_pid>: Ditto.
15962 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15963 return type to int.
15964 (struct target_ops) <join>: Add `pid' argument.
15965 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15966 (struct target_ops) <wait>: Add `ptid' field. Change return type
15967 to ptid.
15968 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15969 (mywait): Add `ptid' argument. Change return type to ptid_t.
15970 (target_pid_to_str): Declare.
15971 * target.c (set_desired_inferior): Adjust to use ptids.
15972 (mywait): Add new `ptid' argument. Adjust.
15973 (target_pid_to_str): New.
15974 * mem-break.h (free_all_breakpoints): Declare.
15975 * mem-break.c (breakpoints): Delelete.
15976 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15977 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15978 to use per-process breakpoint list.
15979 (free_all_breakpoints): New.
15980 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15981 (symbol_cache, all_symbols_looked_up): Delete.
15982 (hexchars): New.
15983 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15984 read_ptid): New.
15985 (prepare_resume_reply): Change ptid argument's type from unsigned
15986 long to ptid_t. Adjust. Implement W;process and X;process.
15987 (free_sym_cache, clear_symbol_cache): New.
15988 (look_up_one_symbol): Adjust to per-process symbol cache. *
15989 * server.c (cont_thread, general_thread, step_thread): Change type
15990 to ptid_t.
15991 (attached): Delete.
15992 (multi_process): New.
15993 (last_ptid): Change type to ptid_t.
15994 (struct vstop_notif) <ptid>: Change type to ptid_t.
15995 (queue_stop_reply, push_event): Change `ptid' argument's type to
15996 ptid_t.
15997 (discard_queued_stop_replies): Add `pid' argument.
15998 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15999 changes. Don't reference the `attached' global.
16000 (attach_inferior): Adjust to mywait interface changes.
16001 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16002 features. Handle and report "multiprocess+". Handle
16003 "qAttached:PID".
16004 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16005 changes.
16006 (handle_v_kill): New.
16007 (handle_v_stopped): Adjust to use target_pid_to_str.
16008 (handle_v_requests): Allow multiple attaches and runs when
16009 multiprocess extensions are in effect. Handle "vKill".
16010 (myresume): Adjust to use ptids.
16011 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16012 (handle_status): Adjust to discard_queued_stop_replies interface
16013 change.
16014 (first_thread_of, kill_inferior_callback)
16015 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16016 (main): Call initialize_inferiors. Adjust to use ptids, killing
16017 and detaching from all inferiors. Handle multiprocess packet
16018 variants.
16019 * linux-low.h: Include gdb_proc_service.h.
16020 (struct process_info_private): New.
16021 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16022 <lwpid_of>: Use ptid_get_lwp.
16023 (get_lwp_thread): Adjust.
16024 (struct lwp_info): Add `dead' member.
16025 (find_lwp_pid): Declare.
16026 * linux-low.c (thread_db_active): Delete.
16027 (new_inferior): Adjust comment.
16028 (inferior_pid): Delete.
16029 (linux_add_process): New.
16030 (handle_extended_wait): Adjust.
16031 (add_lwp): Change unsigned long to ptid.
16032 (linux_create_inferior): Add process to processes table. Adjust
16033 to use ptids. Don't set new_inferior here.
16034 (linux_attach_lwp): Rename to ...
16035 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16036 it. Adjust to use ptids.
16037 (linux_attach_lwp): New.
16038 (linux_attach): Add process to processes table. Don't set
16039 new_inferior here.
16040 (struct counter): New.
16041 (second_thread_of_pid_p, last_thread_of_process_p): New.
16042 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16043 multiple processes.
16044 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16045 processes. Remove process from process table.
16046 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16047 to multiple processes.
16048 (any_thread_of): New.
16049 (linux_detach): Add `pid' argument, and handle it. Remove process
16050 from processes table.
16051 (linux_join): Add `pid' argument. Handle it.
16052 (linux_thread_alive): Change unsighed long argument to ptid_t.
16053 Consider dead lwps as not being alive.
16054 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16055 threads we're not interested in.
16056 (same_lwp, find_lwp_pid): New.
16057 (linux_wait_for_lwp): Change `pid' argument's type from int to
16058 ptid_t. Adjust.
16059 (linux_wait_for_event): Rename to ...
16060 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16061 from int to ptid_t. Adjust.
16062 (linux_wait_for_event): New.
16063 (linux_wait_1): Add `ptid' argument. Change return type to
16064 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16065 that exit from the process table.
16066 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16067 Adjust.
16068 (mark_lwp_dead): New.
16069 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16070 stopping all threads, mark its main lwp as dead.
16071 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16072 ptids.
16073 (fetch_register, usr_store_inferior_registers)
16074 (regsets_fetch_inferior_registers)
16075 (regsets_store_inferior_registers, linux_read_memory)
16076 (linux_write_memory): Inline `inferior_pid'.
16077 (linux_look_up_symbols): Adjust to use per-process
16078 `thread_db_active'.
16079 (linux_request_interrupt): Adjust to use ptids.
16080 (linux_read_auxv): Inline `inferior_pid'.
16081 (initialize_low): Don't reference thread_db_active.
16082 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16083 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16084 (ps_getpid): Return the pid of the current inferior.
16085 * thread-db.c (proc_handle, thread_agent): Delete.
16086 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16087 per-process data.
16088 (find_one_thread): Change argument type to ptid_t. Adjust to
16089 per-process data.
16090 (maybe_attach_thread): Adjust to per-process data and ptids.
16091 (thread_db_find_new_threads): Ditto.
16092 (thread_db_init): Ditto.
16093 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16094 processes table. Adjust to use ptids.
16095 (spu_kill, spu_detach): Adjust interface. Remove process from
16096 processes table.
16097 (spu_join, spu_thread_alive): Adjust interface.
16098 (spu_wait): Adjust interface. Remove process from processes
16099 table. Adjust to use ptids.
16100 * win32-low.c (current_inferior_tid): Delete.
16101 (current_inferior_ptid): New.
16102 (debug_event_ptid): New.
16103 (thread_rec): Take a ptid. Adjust.
16104 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16105 (child_delete_thread): Ditto.
16106 (do_initial_child_stuff): Add `attached' argument. Add process to
16107 processes table.
16108 (child_fetch_inferior_registers, child_store_inferior_registers):
16109 Adjust.
16110 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16111 (win32_attach): Pass 1 to do_initial_child_stuff.
16112 (win32_kill): Adjust interface. Remove process from processes
16113 table.
16114 (win32_detach): Ditto.
16115 (win32_join): Adjust interface.
16116 (win32_thread_alive): Take a ptid.
16117 (win32_resume): Adjust to use ptids.
16118 (get_child_debug_event): Ditto.
16119 (win32_wait): Adjust interface. Remove exiting process from
16120 processes table.
16121
bd99dc85
PA
161222009-04-01 Pedro Alves <pedro@codesourcery.com>
16123
16124 Non-stop mode support.
16125
16126 * server.h (non_stop): Declare.
16127 (gdb_client_data, handler_func): Declare.
16128 (delete_file_handler, add_file_handler, start_event_loop):
16129 Declare.
16130 (handle_serial_event, handle_target_event, push_event)
16131 (putpkt_notif): Declare.
16132 * target.h (enum resume_kind): New.
16133 (struct thread_resume): Replace `step' field by `kind' field.
16134 (TARGET_WNOHANG): Define.
16135 (struct target_ops) <wait>: Add `options' argument.
16136 <supports_non_stop, async, start_non_stop>: New fields.
16137 (target_supports_non_stop, target_async): New.
16138 (start_non_stop): Declare.
16139 (mywait): Add `options' argument.
16140 * target.c (mywait): Add `options' argument. Print child exit
16141 notifications here.
16142 (start_non_stop): New.
16143 * server.c (non_stop, own_buf, mem_buf): New globals.
16144 (struct vstop_notif): New.
16145 (notif_queue): New global.
16146 (queue_stop_reply, push_event, discard_queued_stop_replies)
16147 (send_next_stop_reply): New.
16148 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16149 interface changes.
16150 (attach_inferior): In non-stop mode, don't wait for the target
16151 here.
16152 (handle_general_set): Handle QNonStop.
16153 (handle_query): When handling qC, return the current general
16154 thread, instead of the first thread of the list.
16155 (handle_query): If the backend supports non-stop mode, include
16156 QNonStop+ in the qSupported query response.
16157 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16158 and non-stop mode.
16159 (handle_v_attach, handle_v_run): Handle non-stop mode.
16160 (handle_v_stopped): New.
16161 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16162 (myresume): Adjust to use resume_kind. Handle non-stop.
16163 (queue_stop_reply_callback): New.
16164 (handle_status): Handle non-stop mode.
16165 (main): Clear non_stop flag on reconnection. Use the event-loop.
16166 Refactor serial protocol handling from here ...
16167 (process_serial_event): ... to this new function. When GDB
16168 selects any thread, select one here. In non-stop mode, wait until
16169 GDB acks all pending events before exiting.
16170 (handle_serial_event, handle_target_event): New.
16171 * remote-utils.c (remote_open): Install remote_desc in the event
16172 loop.
16173 (remote_close): Remove remote_desc from the event loop.
16174 (putpkt_binary): Rename to...
16175 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16176 (putpkt_binary): New as wrapper around putpkt_binary_1.
16177 (putpkt_notif): New.
16178 (prepare_resume_reply): In non-stop mode, don't change the
16179 general_thread.
16180 * event-loop.c: New.
16181 * Makefile.in (OBJ): Add event-loop.o.
16182 (event-loop.o): New rule.
16183
16184 * linux-low.h (pid_of): Moved here.
16185 (lwpid_of): New.
16186 (get_lwp_thread): Use lwpid_of.
16187 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16188 * linux-low.c (pid_of): Delete.
16189 (inferior_pid): Use lwpid_of.
16190 (linux_event_pipe): New.
16191 (target_is_async_p): New.
16192 (delete_lwp): New.
16193 (handle_extended_wait): Use lwpid_of.
16194 (add_lwp): Don't set lwpid field.
16195 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16196 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16197 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16198 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16199 first. Adjust to linux_wait_for_event interface changes. Use
16200 lwpid_of.
16201 (linux_detach): Don't delete the main lwp here.
16202 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16203 (status_pending_p): Don't consider explicitly suspended lwps.
16204 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16205 pointer. Add OPTIONS argument. Change return type to int. Use
16206 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16207 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16208 pointer. Add status pointer argument. Return a pid instead of a
16209 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16210 changes. In non-stop mode, don't switch to a random thread.
16211 (linux_wait): Rename to...
16212 (linux_wait_1): ... this. Add target_options argument, and handle
16213 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16214 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16215 clean exit and signal exit code. Don't stop all threads in
16216 non-stop mode. In all-stop mode, only stop all threads when
16217 reporting a stop to GDB. Handle explicit thread stop requests.
16218 (async_file_flush, async_file_mark): New.
16219 (linux_wait): New.
16220 (send_sigstop): Use lwpid_of.
16221 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16222 interface changes. In non-stop mode, don't switch to a random
16223 thread.
16224 (linux_resume_one_lwp): Use lwpid_of.
16225 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16226 (linux_resume_one_thread): ... this. Handle resume_stop. In
16227 non-stop mode, don't look for pending flag in all threads.
16228 (resume_status_pending_p): Don't consider explicitly suspended
16229 threads.
16230 (my_waitpid): Reimplement. Emulate __WALL.
16231 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16232 Use lwpid_of.
16233 (sigchld_handler, linux_supports_non_stop, linux_async)
16234 (linux_start_non_stop): New.
16235 (linux_target_ops): Register linux_supports_non_stop, linux_async
16236 and linux_start_non_stop.
16237 (initialize_low): Install SIGCHLD handler.
16238 * thread-db.c (thread_db_create_event, find_one_thread)
16239 (thread_db_get_tls_address): Use lwpid_of.
16240 * win32-low.c (win32_detach): Adjust to use resume_kind.
16241 (win32_wait): Add `options' argument.
16242 * spu-low.c (spu_resume): Adjust to use resume_kind.
16243 (spu_wait): Add `options' argument.
16244
5b1c542e
PA
162452009-04-01 Pedro Alves <pedro@codesourcery.com>
16246
16247 Decouple target code from remote protocol.
16248
16249 * target.h (enum target_waitkind): New.
16250 (struct target_waitstatus): New.
16251 (struct target_ops) <wait>: Return an unsigned long. Take a
16252 target_waitstatus pointer instead of a char pointer.
16253 (mywait): Likewise.
16254 * target.c (mywait): Change prototype to return an unsigned long.
16255 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16256 * server.h (thread_from_wait, old_thread_from_wait): Delete
16257 declarations.
16258 (prepare_resume_reply): Change prototype to take a
16259 target_waitstatus.
16260 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16261 (last_status, last_ptid): New.
16262 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16263 pid instead of a signal.
16264 (attach_inferior): Remove "status" and "signal" parameters.
16265 Adjust.
16266 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16267 not as an address.
16268 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16269 (handle_v_requests, myresume): Remove "status" and "signal"
16270 parameters. Adjust.
16271 (handle_status): New.
16272 (main): Delete local `status'. Adjust.
16273 * remote-utils.c: Include target.h.
16274 (prepare_resume_reply): Change prototype to take a
16275 target_waitstatus. Adjust.
16276
16277 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16278 interface.
16279 * spu-low.c (spu_wait): Adjust.
16280 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16281 Delete.
16282 (win32_wait): Adjust.
16283
2bd7c093
PA
162842009-04-01 Pedro Alves <pedro@codesourcery.com>
16285
16286 * target.h (struct thread_resume): Delete leave_stopped member.
16287 (struct target_ops): Add a `n' argument to the `resume' callback.
16288 * server.c (start_inferior): Adjust.
16289 (handle_v_cont, myresume): Adjust.
16290 * linux-low.c (check_removed_breakpoint): Adjust to resume
16291 interface change, and to removed leave_stopped field.
16292 (resume_ptr): Delete.
16293 (struct thread_resume_array): New.
16294 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16295 resume interface change.
16296 (linux_continue_one_thread, linux_queue_one_thread)
16297 (resume_status_pending_p): Check if the resume field is NULL
16298 instead of checking the leave_stopped member.
16299 (linux_resume): Adjust to the target resume interface change.
16300 * spu-low.c (spu_resume): Adjust to the target resume interface
16301 change.
16302 * win32-low.c (win32_detach, win32_resume): Ditto.
16303
c35fafde
PA
163042009-04-01 Pedro Alves <pedro@codesourcery.com>
16305
16306 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16307 flag.
16308 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16309 pending.
16310 (linux_continue_one_thread): Only preserve the stepping flag if
16311 there's a pending breakpoint.
16312
0a59d50b
PA
163132009-03-31 Pedro Alves <pedro@codesourcery.com>
16314
16315 * server.c (main): After the inferior having exited, call
16316 remote_close before exiting gdbserver.
16317
f04c6d38
TJB
163182009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16319
16320 Fix size of FPSCR in Power 7 processors.
16321 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16322 (PPC_FEATURE_HAS_DFP): New #define.
16323 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16324 size of the FPSCR.
16325
78e5cee6
PA
163262009-03-23 Pedro Alves <pedro@codesourcery.com>
16327
16328 * server.c (handle_query) Whitespace and formatting.
16329
1b3f6016
PA
163302009-03-22 Pedro Alves <pedro@codesourcery.com>
16331
16332 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16333 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16334 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16335 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16336 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16337 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16338 Makefile.in, configure.ac: Fix whitespace throughout.
16339 * configure: Regenerate.
16340
a07b2135
PA
163412009-03-22 Pedro Alves <pedro@codesourcery.com>
16342
16343 * inferiors.c (find_inferior): Make it safe for the callback
16344 function to delete the currently iterated inferior.
16345
67cc2626
PA
163462009-03-22 Pedro Alves <pedro@codesourcery.com>
16347
16348 * Makefile.in (linuw_low_h): Move higher.
16349 (thread-db.o): Depend on $(linux_low_h).
16350
54a0b537
PA
163512009-03-17 Pedro Alves <pedro@codesourcery.com>
16352
16353 Rename "process" to "lwp" throughout.
16354
16355 * linux-low.c (all_processes): Rename to...
16356 (all_lwps): ... this.
16357 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16358 (add_process): Rename to ...
16359 (add_lwp): ... this. Adjust.
16360 (linux_create_inferior): Adjust.
16361 (linux_attach_lwp): Adjust.
16362 (linux_attach): Adjust.
16363 (linux_kill_one_process): Rename to ...
16364 (linux_kill_one_lwp): ... this. Adjust.
16365 (linux_kill): Adjust.
16366 (linux_detach_one_process): Rename to ...
16367 (linux_detach_one_lwp): ... this. Adjust.
16368 (linux_detach): Adjust.
16369 (check_removed_breakpoint): Adjust.
16370 (status_pending_p): Adjust.
16371 (linux_wait_for_process): Rename to ...
16372 (linux_wait_for_lwp): ... this. Adjust.
16373 (linux_wait_for_event): Adjust.
16374 (send_sigstop): Adjust.
16375 (wait_for_sigstop): Adjust.
16376 (stop_all_processes): Rename to ...
16377 (stop_all_lwps): ... this.
16378 (linux_resume_one_process): Rename to ...
16379 (linux_resume_one_lwp): ... this. Adjust.
16380 (linux_set_resume_request, linux_continue_one_thread)
16381 (linux_queue_one_thread, resume_status_pending_p)
16382 (usr_store_inferior_registers, regsets_store_inferior_registers)
16383 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16384 Adjust.
16385 * linux-low.h (get_process): Rename to ...
16386 (get_lwp): ... this. Adjust.
16387 (get_thread_process): Rename to ...
16388 (get_thread_lwp): ... this. Adjust.
16389 (get_process_thread): Rename to ...
16390 (get_lwp_thread): ... this. Adjust.
16391 (struct process_info): Rename to ...
16392 (struct lwp_info): ... this.
16393 (all_processes): Rename to ...
16394 (all_lwps): ... this.
16395 * proc-service.c (ps_lgetregs): Adjust.
16396 * thread-db.c (thread_db_create_event, find_one_thread)
16397 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16398
0b16c5cf
PA
163992009-03-14 Pedro Alves <pedro@codesourcery.com>
16400
16401 * server.c (handle_query): Handle "qAttached".
16402
32de4b9d
NS
164032009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16404
16405 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16406 GPLv3, update license URL.
16407
2aecd87f
DE
164082009-03-01 Doug Evans <dje@google.com>
16409
93efd302 16410 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
16411 (server_h): Add gdb_signals.h.
16412 (signals.o): Update.
16413 * server.h (target_signal_from_host,target_signal_to_host_p)
16414 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16415
86b1f9c5
PM
164162009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16417
16418 * remote-utils.c (getpkt): Also generate remote-debug
16419 information if noack_mode is set.
16420
4aa995e1
PA
164212009-02-06 Pedro Alves <pedro@codesourcery.com>
16422
16423 * server.c (handle_query): Report qXfer:siginfo:read and
16424 qXfer:siginfo:write as supported and handle them.
16425 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16426 * linux-low.c (linux_xfer_siginfo): New.
16427 (linux_target_ops): Set it.
16428
62709adf
PA
164292009-01-26 Pedro Alves <pedro@codesourcery.com>
16430
16431 * server.c (gdbserver_usage): Mention --remote-debug.
16432 (main): Accept '--remote-debug' switch.
16433
aef93bd7
DE
164342009-01-18 Doug Evans <dje@google.com>
16435
16436 * regcache.c (new_register_cache): No need to check result of xcalloc.
16437 * server.c (handle_search_memory): Back out calls to xmalloc,
16438 result is checked and error is returned to user upon failure.
16439 (handle_query): Ditto. Add more checks for result of malloc.
16440 (handle_v_cont): Check result of malloc, report error back to
16441 user upon failure.
16442 (handle_v_run): Ditto. Call freeargv.
16443 * server.h (freeargv): Declare.
16444 * utils.c (freeargv): New fn.
16445
54363045
DE
164462009-01-15 Doug Evans <dje@google.com>
16447
f626972c
DE
16448 * gdbreplay.c (perror_with_name): Make arg const char *.
16449 * server.h (target_signal_to_name): Make return type const char *.
0842e787 16450 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 16451 * utils.c (perror_with_name): Make arg const char *.
54363045 16452
18aae699
PA
164532009-01-14 Pedro Alves <pedro@codesourcery.com>
16454
16455 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16456 when handling a EXIT_PROCESS_DEBUG_EVENT.
16457
ff703abe
JB
164582009-01-06 Joel Brobecker <brobecker@adacore.com>
16459
16460 * gdbreplay.c (gdbreplay_version): Update copyright year.
16461 * server.c (gdbserver_version): Likewise.
16462
f21cc1a2 164632009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
16464
16465 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 16466 (handle_extended_wait): Improve comment.
0e21c1ec 16467
bca929d3
DE
164682008-12-13 Doug Evans <dje@google.com>
16469
16470 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16471 * server.h (ATTR_MALLOC): New macro.
16472 (xmalloc,xcalloc,xstrdup): Declare.
16473 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16474 * inferiors.c: Ditto.
16475 * linux-low.c: Ditto.
16476 * mem-break.c: Ditto.
16477 * regcache.c: Ditto.
16478 * remote-utils.c: Ditto.
16479 * server.c: Ditto.
16480 * target.c: Ditto.
16481 * win32-low.c: Ditto.
16482
97438e3f
DE
164832008-12-12 Doug Evans <dje@google.com>
16484
896c7fbb
DE
16485 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16486 in debugging printf.
16487
97438e3f
DE
16488 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16489
e3b886f8
DE
164902008-12-09 Doug Evans <dje@google.com>
16491
16492 * linux-low.h (struct process_info): Delete member tid, unused.
16493 * thread-db.c (find_one_thread): Update.
16494 (maybe_attach_thread): Update.
16495
07e059b5
VP
164962008-12-02 Pedro Alves <pedro@codesourcery.com>
16497
889bf7c5
PA
16498 * target.h (struct target_ops): Add qxfer_osdata member.
16499 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16500 and dirent.h.
16501 (linux_qxfer_osdata): New functions.
16502 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16503 callback.
16504 * server.c (handle_query): Handle "qXfer:osdata:read:".
16505 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16506 (buffer_xml_printf): New functions.
16507 * server.h (struct buffer): New.
16508 (buffer_grow_str, buffer_grow_str0): New macros.
16509 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16510 (buffer_xml_printf): Declare.
07e059b5 16511
4cab47ab
DE
165122008-11-24 Doug Evans <dje@google.com>
16513
16514 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16515
f142445f
DJ
165162008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16517
16518 * server.c (handle_v_run): Always use the supplied argument list.
16519
d0107bb6 165202008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 16521
d0107bb6
BW
16522 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16523 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 16524
2c4ad781
TJB
165252008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16526
16527 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16528 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16529 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16530 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16531 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16532 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16533 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16534 XML target descriptions.
16535 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16536 when inferior is running on an ISA 2.05 or later processor. Add
16537 special case to return offset for full 64-bit slot of FPSCR when
16538 in 32-bits.
16539
dfb64f85
DJ
165402008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16541
16542 * Makefile.in (SFILES, clean): Added sparc64 files.
16543 (reg-sparc64.o, reg-sparc64.c): New.
16544 * configure.srv (sparc*-*-linux*): New configuration.
16545 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16546 syscall arguments for SPARC.
16547 (regsets_store_inferior_registers): Likewise.
16548 * linux-sparc-low.c: New file.
16549
66b6e1dd
DE
165502008-10-21 Doug Evans <dje@google.com>
16551
16552 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16553 (READLINE_DIR,READLINE_DEP): Delete.
16554 (INTERNAL_CFLAGS): Update.
16555 (LINTFLAGS): Update.
16556
9b710a42
PA
165572008-10-10 Pedro Alves <pedro@codesourcery.com>
16558
16559 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16560 whole argv from the last run, not just argv[0].
16561
5822d809
PA
165622008-09-08 Pedro Alves <pedro@codesourcery.com>
16563
16564 * regcache.c (new_register_cache): Return NULL if the register
16565 cache size isn't known yet.
16566 (free_register_cache): Avoid dereferencing a NULL regcache.
16567
74aac56f
DJ
165682008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16569
16570 * configure.srv: Merge MIPS and MIPS64.
16571
400b20f5
MR
165722008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16573
16574 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16575
677c5bb1
LM
165762008-08-18 Luis Machado <luisgpm@br.ibm.com>
16577
16578 * Makefile.in: Add required vsx dependencies.
16579
16580 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16581 Declare init_registers_powerpc_vsx32l.
16582 Declare init_registers_powerpc_vsx64l.
16583 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16584 (ppc_arch_setup): Check for VSX in hwcap.
16585 (ppc_fill_vsxregset): New function.
16586 (ppc_store_vsxregset): New function.
16587 Add new VSX entry in regset_info target_regsets.
16588
16589 * configure.srv: Add new VSX dependencies.
16590
a6f3e723
SL
165912008-08-12 Pedro Alves <pedro@codesourcery.com>
16592
16593 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16594 (remote_open): Set or clear transport_is_reliable.
16595 (putpkt_binary): Don't expect acks in noack mode.
16596 (getpkt): Don't send ack/nac in noack mode.
16597 * server.c (handle_general_set): Handle QStartNoAckMode.
16598 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16599 qSupported.
16600 (main): Reset noack_mode on every connection.
16601 * server.h (noack_mode): Declare.
16602
a417dc56
RW
166032008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16604
16605 * Makefile.in (GDBREPLAY_OBS): New variable.
16606 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16607
3221518c
UW
166082008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16609 Daniel Jacobowitz <dan@codesourcery.com>
16610
16611 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16612 (usr_store_inferior_registers): Likewise.
16613 (regsets_store_inferior_registers): Likewise.
16614
ec56be1b
PA
166152008-07-31 Rolf Jansen <rj@surtec.com>
16616 Pedro Alves <pedro@codesourcery.com>
16617
16618 * configure.ac: Check for memmem declaration.
16619 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16620 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16621 (disable_packet_qfThreadInfo): Unconditionally compile.
16622 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16623 * configure, config.in: Regenerate.
16624
2fe5e3ff
DE
166252008-07-28 Doug Kwan <dougkwan@google.com>
16626
16627 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16628 (linux_write_memory): Remove declaration of errno.
16629
836acd6d
UW
166302008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16631
16632 * linux-low.c (handle_extended_wait): Do not use "status"
16633 variable uninitialized.
16634
aeba519e
PA
166352008-07-07 Pedro Alves <pedro@codesourcery.com>
16636
16637 * server.c (handle_v_attach): Inhibit reporting dll changes.
16638
db42f210
PA
166392008-06-27 Pedro Alves <pedro@codesourcery.com>
16640
16641 * remote-utils.c (prepare_resume_reply): If requested, don't
16642 output "thread:TID" in the T stop reply.
16643
16644 * server.c (disable_packet_vCont, disable_packet_Tthread)
16645 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16646 (handle_query): If requested, disable support for qC, qfThreadInfo
16647 and qsThreadInfo.
16648 (handle_v_requests): If requested, disable support for vCont.
16649 (gdbserver_show_disableable): New.
16650 (main): Handle --disable-packet and --disable-packet=LIST.
16651
16652 * server.h (disable_packet_vCont, disable_packet_Tthread)
16653 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16654
8e4c5421
CD
166552008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16656
16657 * server.c (gdbserver_usage): Mention --version.
16658
6e23a804
DJ
166592008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16660
16661 * Makefile.in (gdbreplay.o): New rule.
16662
90aa6a40
JM
166632008-06-06 Joseph Myers <joseph@codesourcery.com>
16664
16665 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16666 message, not gdbserver.
16667
c16158bc 166682008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
16669 Nathan Sidwell <nathan@codesourcery.com>
16670 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16671
16672 * acinclude.m4: Include ../../config/acx.m4.
16673 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16674 * configure, config.in: Regenerate.
16675 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16676 * server.c (gdbserver_version): Print PKGVERSION.
16677 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16678 (main): Adjust gdbserver_usage calls.
16679 * gdbreplay.c (version, host_name): Add declarations.
16680 (gdbreplay_version, gdbreplay_usage): New.
16681 (main): Accept --version and --help options.
16682
aeb75bf5
DJ
166832008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16686 (arm_breakpoint_at): Handle Thumb.
16687 (the_low_target): Add comment.
16688
76b233dd
UW
166892008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16690
16691 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16692
08388c79
DE
166932008-05-09 Doug Evans <dje@google.com>
16694
a3c83fae
DE
16695 * server.h (decode_search_memory_packet): Declare.
16696 * remote-utils.c (decode_search_memory_packet): New fn.
16697 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16698 (handle_search_memory): New fn.
16699 (handle_query): Process qSearch:memory packets.
16700
bb9c3d36
UW
167012008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16702
16703 * regcache.c (registers_length): Remove.
16704 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16705 full register packet.
16706 * regcache.h (registers_length): Remove prototype.
16707 * server.h (PBUFSIZ): Define to 16384.
16708
7284e1be
UW
167092008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16710
16711 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16712 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16713 powerpc-64l.o, and powerpc-altivec64l.o.
16714 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16715 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16716 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16717 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16718 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16719 to srv_xmlfiles.
16720
16721 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16722 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16723 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16724 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16725 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16726 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16727 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16728 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16729 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16730 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16731 (clean): Update.
16732
16733 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16734 (init_registers_powerpc_32l): ... this new prototype.
16735 (init_registers_powerpc_32): Remove, replace by ...
16736 (init_registers_powerpc_altivec32l): ... this new prototype.
16737 (init_registers_powerpc_e500): Remove, replace by ...
16738 (init_registers_powerpc_e500l): ... this new prototype.
16739 (init_registers_ppc64): Remove, replace by ...
16740 (init_registers_powerpc_64l): ... this new prototype.
16741 (init_registers_powerpc_64): Remove, replace by ...
16742 (init_registers_powerpc_altivec64l): ... this new prototype.
16743 (ppc_num_regs): Set to 73.
16744 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16745 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16746 (ppc_cannot_store_register): Handle orig_r3 and trap.
16747 (ppc_arch_setup): Update init_registers_... calls.
16748 (ppc_fill_gregset): Handle orig_r3 and trap.
16749
16750 * inferiors.c (clear_inferiors): Reset current_inferior.
16751
fdc59709
PB
167522008-04-23 Paolo Bonzini <bonzini@gnu.org>
16753
889bf7c5
PA
16754 * acinclude.m4: Add override.m4.
16755 * configure: Regenerate.
fdc59709 16756
c9b2f845
UW
167572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16758
16759 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16760 initial call to init_register_ppc64.
16761
550512b8
UW
167622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16763
43aaf8b6
PA
16764 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16765 single powerpc*-*-linux* case.
550512b8
UW
16766 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16767
b6430ec3
UW
167682008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16769
16770 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 16771 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
16772 from reg_xmlfiles.
16773 * linux-ppc-low.c: Include <elf.h>.
16774 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16775 (ppc_hwcap): New global variable.
16776 (ppc_regmap): Remove __SPE__ #ifdef sections.
16777 (ppc_regmap_e500): New global variable.
16778 (ppc_cannot_store_register): Update __SPE__ special case.
16779 (ppc_get_hwcap): New function.
16780 (ppc_arch_setup): Use it to determine whether inferior supports
16781 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16782 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16783 Do not access registers if target does not support AltiVec.
16784 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16785 Do not access registers if target does not support SPE.
16786 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16787
52fa2412
UW
167882008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16789
16790 * linux-low.c (disabled_regsets, num_regsets): New.
16791 (use_regsets_p): Delete.
16792 (linux_wait_for_process): Clear disabled_regsets.
16793 (regsets_fetch_inferior_registers): Check and set it.
16794 (regsets_store_inferior_registers): Likewise.
16795 (linux_fetch_registers, linux_store_registers): Do not use
16796 use_regsets_p.
16797 (initialize_low): Allocate disabled_regsets.
16798
e28b3332
DJ
167992008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16800
16801 * Makefile.in (LIBOBJS): New.
16802 (OBS): Use LIBOBJS.
16803 (memmem.o): New rule.
16804 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16805 * configure: Regenerated.
16806
4536995d
UW
168072008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16808
16809 * server.c (handle_query): Never return "unsupported" for
16810 qXfer:features:read queries.
16811
221c031f
UW
168122008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16813
16814 * server.c (get_features_xml): Fix inverted condition.
16815 (handle_query): Always support qXfer:feature:read.
16816
ccd213ac
DJ
168172008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16818
16819 * server.c (wrapper_argv): New.
16820 (start_inferior): Handle wrapper_argv. If set, expect an extra
16821 trap.
16822 (gdbserver_usage): Document --wrapper.
16823 (main): Parse --wrapper.
16824
6fe305f7
UW
168252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16826
16827 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16828 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16829 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16830 (ppc_set_pc): Likewise.
16831 (ppc_arch_setup): New function.
16832 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16833 of collect_register.
889bf7c5 16834 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16835
5b0a002e
UW
168362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16837
16838 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16839 instead of linux-ppc64-low.o.
16840 * linux-ppc64-low.c: Remove file.
16841 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16842 (linux-ppc64-low.o): Remove rule.
16843
16844 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16845 (init_registers_powerpc_64): Likewise.
16846 (ppc_regmap): Conditionally define depending on __powerpc64__.
16847 (ppc_cannot_store_register): Do not special-case "fpscr" when
16848 compiled on __powerpc64__.
16849 (ppc_collect_ptrace_register): New function.
16850 (ppc_supply_ptrace_register): New function.
16851 (ppc_breakpoint): Change type to "unsigned int".
16852 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16853 (the_low_target): Conditionally provide initializers for the
889bf7c5 16854 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16855 collect_ptrace_register and supply_ptrace_register members.
16856
9b4b61c8
UW
168572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16858
16859 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16860 * server.c (gdbserver_xmltarget): Define.
16861 (get_features_xml): Use it to replace "target.xml" and arch_string.
16862
16863 * configure.srv: Remove srv_xmltarget. Add XML files that were
16864 mentioned there to srv_xmlfiles instead. Remove conditional tests
16865 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16866 srv_xmlfiles and srv_regobj to include all possible choices.
16867 * configure.ac (srv_xmltarget): Remove.
16868 (srv_xmlfiles): Do not add "target.xml".
16869 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16870 checks for supplementary target information.
16871 * configure: Regenerate.
16872 * Makefile.in (XML_TARGET): Remove.
16873 (target.xml): Remove rule.
16874 (clean): Do not clean up target.xml.
16875 (.PRECIOUS): Do not mention target.xml.
16876
16877 * target.h (struct target_ops): Remove arch_string member.
16878 * linux-low.c (linux_arch_string): Remove.
16879 (linux_target_ops): Remove arch_string initializer.
16880 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16881 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16882 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16883 * spu-low.c (spu_arch_string): Remove.
16884 (spu_target_ops): Remove arch_string initializer.
16885 * win32-low.c (win32_arch_string): Remove.
16886 (win32_target_ops): Remove arch_string initializer.
16887 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16888 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16889 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16890
ee1a7ae4
UW
168912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16892
16893 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16894 by collect_ptrace_register and supply_ptrace_register hooks.
16895 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16896 instead of checking for the_low_target.left_pad_xfer.
16897 (usr_store_inferior_registers): Use collect_ptrace_register callback
16898 instead of checking for the_low_target.left_pad_xfer.
16899
16900 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16901 (s390_supply_ptrace_register): Likewise.
16902 (s390_fill_gregset): Call s390_collect_ptrace_register.
16903 (the_low_target): Update.
16904
16905 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16906 (ppc_supply_ptrace_register): Likewise.
16907 (the_low_target): Update.
16908
16909 * linux-i386-low.c (the_low_target): Update.
16910 * linux-x86-64-low.c (the_low_target): Update.
16911
d61ddec4
UW
169122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16913
16914 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16915 reg-s390.o and reg-s390x.o.
16916
16917 * linux-low.c (new_inferior): New global variable.
16918 (linux_create_inferior, linux_attach): Set it.
16919 (linux_wait_for_process): Call the_low_target.arch_setup after the
16920 target has stopped for the first time.
16921 (initialize_low): Do not call the_low_target.arch_setup.
16922
16923 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16924 (s390_set_pc): Likewise.
16925 (s390_arch_setup): New function.
16926 (the_low_target): Use s390_arch_setup as arch_setup routine.
16927
16928 * regcache.c (realloc_register_cache): New function.
16929 (set_register_cache): Call it for each existing regcache.
16930
d05b4ac3
UW
169312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16932
16933 * server.h (init_registers): Remove prototype.
16934
16935 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16936 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16937 instead of init_registers ().
16938 * linux-arm-low.c (init_registers_arm): Add prototype.
16939 (init_registers_arm_with_iwmmxt): Likewise.
16940 (the_low_target): Add initializer for arch_setup field.
16941 * linux-cris-low.c (init_registers_cris): Add prototype.
16942 (the_low_target): Add initializer for arch_setup field.
16943 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16944 (the_low_target): Add initializer for arch_setup field.
16945 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16946 (the_low_target): Add initializer for arch_setup field.
16947 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16948 (the_low_target): Add initializer for arch_setup field.
16949 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16950 (the_low_target): Add initializer for arch_setup field.
16951 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16952 (the_low_target): Add initializer for arch_setup field.
16953 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16954 (init_registers_mips64_linux): Likewise.
16955 (the_low_target): Add initializer for arch_setup field.
16956 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16957 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16958 (the_low_target): Add initializer for arch_setup field.
16959 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16960 (init_registers_powerpc_64): Likewise.
16961 (the_low_target): Add initializer for arch_setup field.
16962 * linux-s390-low.c (init_registers_s390): Add prototype.
16963 (init_registers_s390x): Likewise.
16964 (the_low_target): Add initializer for arch_setup field.
16965 * linux-sh-low.c (init_registers_sh): Add prototype.
16966 (the_low_target): Add initializer for arch_setup field.
16967 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16968 (the_low_target): Add initializer for arch_setup field.
16969 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16970 (the_low_target): Add initializer for arch_setup field.
16971
16972 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16973 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16974 instead of init_registers ().
16975 * win32-arm-low.c (init_registers_arm): Add prototype.
16976 (the_low_target): Add initializer for arch_setup field.
16977 * win32-i386-low.c (init_registers_i386): Add prototype.
16978 (the_low_target): Add initializer for arch_setup field.
16979
16980 * spu-low.c (init_registers_spu): Add prototype.
16981 (initialize_low): Call initialie_registers_spu () instead of
16982 initialize_registers ().
16983
fd96d250
PA
169842008-02-19 Pedro Alves <pedro@codesourcery.com>
16985
16986 * server.c (handle_v_requests): When handling the vRun and vAttach
16987 packets, if already debugging a process, don't kill it. Return an
16988 error instead.
16989
d41b6bb4
DJ
169902008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16991
16992 * server.c (handle_query): Correct length check.
16993
5ac588cf
PA
169942008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16995
16996 * win32-low.c (do_initial_child_stuff): Add process handle
16997 parameter. Set current_process_handle and current_process_id from the
16998 parameters. Clear globals.
16999 (win32_create_inferior): Don't set current_process_handle and
17000 current_process_id here. Instead pass them on the call to
17001 do_initial_child_stuff.
17002 (win32_attach): Likewise.
17003 (win32_clear_inferiors): New.
17004 (win32_kill): Don't close the current process handle or the
17005 current thread handle here. Instead call win32_clear_inferiors.
17006 (win32_detach): Don't open a new handle to the process. Call
17007 win32_clear_inferiors.
17008 (win32_join): Don't rely on current_process_handle; open a new
17009 handle using the process id.
17010 (win32_wait): Call win32_clear_inferiors when the inferior process
17011 has exited.
17012
ecd7ecbc
DJ
170132008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17014
17015 * server.c (monitor_show_help): Add "exit".
17016
1525d545
MG
170172008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17018
ecd7ecbc 17019 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
17020 (clean): Add reg-xtensa.c.
17021 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
17022 * configure.srv (xtensa*-*-linux*) New target.
17023 * linux-xtensa-low.c: New.
17024 * xtensa-xtregs.c: New.
1525d545 17025
59a016f0
PA
170262008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17027
17028 * hostio.c: Don't include errno.h.
17029 (errno_to_fileio_errno): Move to hostio-errno.
17030 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17031 error number outputting to the target->hostio_last_error callback.
17032 (hostio_packet_error): Use FILEIO_EINVAL directly.
17033 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17034 calls to hostio_error.
17035 * hostio-errno.c: New.
17036 * server.h (hostio_last_error_from_errno): Declare.
17037 * target.h (target_ops): Add hostio_last_error member.
17038 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17039 as hostio_last_error handler.
889bf7c5 17040 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
17041 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17042 (wince_hostio_last_error): New functions.
17043 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17044 as hostio_last_error handler.
17045 (win32_target_ops) [!_WIN32_WCE]: Register
17046 hostio_last_error_from_errno as hostio_last_error handler.
17047 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17048 (hostio-errno.o): New rule.
17049 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17050 * configure.srv (srv_hostio_err_objs): New variable. Default to
17051 hostio-errno.o.
17052 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17053 * configure: Regenerate.
17054
2d717e4f
DJ
170552008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17056
17057 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17058 (linux_kill, linux_detach): Clean up the process list.
17059 * remote-utils.c (remote_open): Improve port number parsing.
17060 (putpkt_binary, input_interrupt): Only send interrupts if the target
17061 is running.
17062 * server.c (extended_protocol): Make static.
17063 (attached): Define earlier.
17064 (exit_requested, response_needed, program_argv): New variables.
17065 (target_running): New.
17066 (start_inferior): Clear attached here.
17067 (attach_inferior): Set attached here.
17068 (require_running): Define.
17069 (handle_query): Use require_running and target_running. Implement
17070 "monitor exit".
17071 (handle_v_attach, handle_v_run): New.
17072 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17073 (gdbserver_usage): Update.
17074 (main): Redo argument parsing. Handle --debug and --multi. Handle
17075 --attach along with other options or after the port. Save
17076 program_argv. Support no initial program. Resynchronize
17077 communication with GDB after an error. Handle "monitor exit".
17078 Use require_running and target_running. Always allow the extended
17079 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17080 restart in extended mode.
17081 * README: Refer to the GDB manual. Update --attach usage.
17082
7407e2de
AS
170832007-12-20 Andreas Schwab <schwab@suse.de>
17084
17085 * linux-low.c (STACK_SIZE): Define.
17086 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17087 (linux_test_for_tracefork): Likewise.
17088
b65d95c5
DJ
170892007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17090
17091 * linux-low.c (linux_wait_for_event): Update messages. Do not
17092 reinsert auto-delete breakpoints.
17093 * mem-break.c (struct breakpoint): Change return type of handler to
17094 int.
17095 (set_breakpoint_at): Update handler type.
17096 (reinsert_breakpoint_handler): Return 1 instead of calling
17097 delete_breakpoint.
17098 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17099 setting a new one.
17100 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17101 * mem-break.h (set_breakpoint_at): Update handler type.
17102 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17103 * win32-low.c (auto_delete_breakpoint): New.
17104 (get_child_debug_event): Use it.
17105
4e799345
DJ
171062007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17107
17108 * configure.ac: Check for pread and pwrite.
17109 * hostio.c (handle_pread): Fall back to lseek and read.
17110 (handle_pwrite): Fall back to lseek and write.
17111 * config.in, configure: Regenerated.
17112
27524b67
DJ
171132007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17114
17115 * server.c (myresume): Add own_buf argument.
17116 (main): Update calls.
17117
a20d5e98
DJ
171182007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17119
17120 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17121 * remote-utils.c (remote_open): Do not call disable_async_io.
17122 (block_async_io): Delete.
17123 (unblock_async_io): Make static.
17124 (initialize_async_io): New.
17125 * server.c (handle_v_cont): Handle async I/O here.
17126 (myresume): Likewise. Move other common resume tasks here...
17127 (main): ... from here. Call initialize_async_io. Disable async
17128 I/O before the main loop.
17129 * server.h (initialize_async_io): Declare.
17130 (block_async_io, unblock_async_io): Delete prototypes.
17131 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17132
b79d787e
DJ
171332007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17134
17135 * remote-utils.c (readchar): Allow binary data in received messages.
17136
d97903b2
PA
171372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17138
17139 * win32-low.c (attaching): New global.
17140 (win32_create_inferior): Clear the `attaching' global.
17141 (win32_attach): Set the `attaching' global.
17142 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17143 attaching. Only set a breakpoint at the entry point if not
17144 attaching.
17145
311de423
PA
171462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17147
17148 * server.c (main): Don't report dll events on the initial
17149 connection on attaches.
17150
6c2d16d2
PA
171512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17152
17153 * server.c (main): Relax numerical bases supported for the pid of
17154 the --attach command line argument.
17155
5ca906e6
PA
171562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17157
17158 * win32-low.c (win32_attach): Call OpenProcess before
17159 DebugActiveProcess, not after. Add last error output to error
17160 call.
17161
9c6c8194
PA
171622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17163
17164 * win32-low.c (win32_get_thread_context)
17165 (win32_set_thread_context): New functions.
17166 (thread_rec): Use win32_get_thread_context.
17167 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17168 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17169 field.
17170
4d5d1aaa
PA
171712007-12-03 Leo Zayas
17172 Pedro Alves <pedro_alves@portugalmail.pt>
17173
17174 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17175 global variables.
17176 (child_add_thread): Minor cleanup.
17177 (child_continue): Resume artificially suspended threads before
17178 calling ContinueDebugEvent.
17179 (suspend_one_thread): New.
17180 (fake_breakpoint_event): New.
17181 (get_child_debug_event): Change return type to int. Check here if
17182 gdb sent an interrupt request. If a soft interrupt was requested,
17183 fake a breakpoint event. Return 0 if there is no event to handle,
17184 and 1 otherwise.
17185 (win32_wait): Don't check here if gdb sent an interrupt request.
17186 Ensure there is a valid event to handle.
17187 (win32_request_interrupt): Add soft interruption method as last
17188 resort.
17189
c436e841
PA
171902007-12-03 Leo Zayas
17191 Pedro Alves <pedro_alves@portugalmail.pt>
17192
17193 * win32-low.h (win32_thread_info): Add descriptions to the
17194 structure members. Replace `suspend_count' counter by a
17195 `suspended' flag.
17196 * win32-low.c (thread_rec): Update condition of when to get the
17197 context from the inferior. Rely on ContextFlags being set if it
17198 has already been retrieved. Only suspend the inferior thread if
17199 we haven't already. Warn if that fails.
17200 (continue_one_thread): s/suspend_count/suspended/. Only call
17201 ResumeThread once. Warn if that fails.
17202
e7b5fa67
PA
172032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17204
17205 * win32-low.c (win32_wait): Don't read from the inferior when it
17206 has already exited.
17207
a385171d
PA
172082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17209
17210 * Makefile.in (win32_low_h): New variable.
17211 (win32-low.o): Add dependency on $(win32_low_h).
17212 (win32-arm-low.o, win32-i386-low.o): New rules.
17213
f80c84b3
DJ
172142007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17215
17216 * hostio.c: Correct copyright year.
17217
a6b151f1
DJ
172182007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17219
17220 * Makefile.in (OBS): Add hostio.o.
17221 (hostio.o): New rule.
17222 * server.h (handle_vFile): Declare.
17223 * hostio.c: New file.
17224 * server.c (handle_v_requests): Take packet_len and new_packet_len
17225 for binary packets. Call handle_vFile.
17226 (main): Update call to handle_v_requests.
17227
f9387fc3
DJ
172282007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17229
17230 * linux-low.c: Include <sched.h>.
17231
51c2684e
DJ
172322007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17233
17234 * linux-low.c (linux_tracefork_grandchild): New.
17235 (linux_tracefork_child): Use clone.
17236 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17237
75f83163
JB
172382007-10-31 Joel Brobecker <brobecker@adacore.com>
17239
17240 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17241
da5898ce
DJ
172422007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17243
17244 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17245
24a09b5f
DJ
172462007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17247
17248 * inferiors.c (change_inferior_id): Delete.
17249 (add_pid_to_list, pull_pid_from_list): New.
17250 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17251 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17252 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17253 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17254 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17255 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17256 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17257 (using_threads): Always set to 1.
17258 (handle_extended_wait): New.
17259 (add_process): Do not set TID.
17260 (linux_create_inferior): Set must_set_ptrace_flags.
17261 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17262 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17263 (linux_thread_alive): Rename TID argument to LWPID.
17264 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17265 (linux_wait_for_event): Do not use TID or check using_threads. Update
17266 call to dead_thread_notify. Call handle_extended_wait.
17267 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17268 (send_sigstop): Delete sigstop_sent.
17269 (wait_for_sigstop): Avoid TID.
17270 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17271 (linux_test_for_tracefork): New.
17272 (linux_lookup_signals): Use thread_db_active and
17273 linux_supports_tracefork_flag.
17274 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17275 * linux-low.h (get_process_thread): Avoid TID.
17276 (struct process_ifo): Move thread_known and tid to the end. Remove
17277 sigstop_sent.
17278 (linux_attach_lwp, thread_db_init): Update prototypes.
17279 * server.h (change_inferior_id): Delete prototype.
17280 (add_pid_to_list, pull_pid_from_list): New prototypes.
17281 * thread-db.c (thread_db_use_events): New.
17282 (find_first_thread): Rename to...
17283 (find_one_thread): ...this. Update callers and messages. Do not
17284 call fatal. Check thread_db_use_events. Do not call
17285 change_inferior_id or new_thread_notify.
17286 (maybe_attach_thread): Update. Do not call new_thread_notify.
17287 (thread_db_init): Set thread_db_use_events. Check use_events.
17288 * utils.c (fatal, warning): Correct message prefix.
17289
30ed0a8f
DJ
172902007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17291
17292 * Makefile.in (clean): Remove new files.
17293 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17294 (powerpc-64.o, powerpc-64.c): New rules.
17295 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17296 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17297 with SPE.
17298 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17299 SPE targets.
17300 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17301 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17302 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17303 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17304 (target_regsets): Add AltiVec and SPE register sets.
17305 * configure.ac: Check for AltiVec and SPE.
17306 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17307 (ppc_fill_vrregset, ppc_store_vrregset): New.
17308 (target_regsets): Add AltiVec register set.
17309 * configure: Regenerated.
17310
fd462a61
DJ
173112007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17312
17313 * linux-low.c (O_LARGEFILE): Define.
17314 (linux_read_memory): Use /proc/PID/mem.
17315 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17316 * configure, config.in: Regenerated.
17317
69f223ed
DJ
173182007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17319
17320 * linux-low.c (linux_wait_for_event): Do not pass signals while
17321 single-stepping.
17322
aec18585
PA
173232007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17324
17325 * win32-low.c (create_process): New.
17326 (win32_create_inferior): Use create_process instead of
17327 CreateProcess. If create_process failed retry appending an ".exe"
17328 suffix. Store the GetLastError result immediatelly after
17329 create_process calls and use it on the call to error.
17330
34d86ddd
PA
173312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17332
17333 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17334
5a0e3bd0
JB
173352007-08-23 Joel Brobecker <brobecker@adacore.com>
17336
17337 * configure.ac: Switch license to GPLv3.
17338
f88c79e6
MS
173392007-08-01 Michael Snyder <msnyder@access-company.com>
17340
17341 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17342
6b3d9b83
PA
173432007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17344
17345 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17346 typedef.
17347 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17348 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17349 CloseToolhelp32Snapshot.
17350 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17351 CloseToolhelp32Snapshot.
17352
c588c53c
MS
173532007-07-27 Michael Snyder <michael.snyder@access-company.com>
17354
17355 * server.c (main): Check for inferior exit before main loop.
17356
aa0403d9
PA
173572007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17358
17359 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17360 instead of on tmp_desc.
17361
255e7678
DJ
173622007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17363 Daniel Jacobowitz <dan@codesourcery.com>
17364
17365 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17366 (add_thread): Minor cleanups.
17367 (clear_inferiors): Move lower in the file. Clear the DLL
17368 list.
17369 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17370 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17371 (xml_escape_text): New.
17372 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17373 for qSupported.
17374 (handle_v_cont): Report errors.
17375 (gdbserver_version): Update.
17376 (main): Correct size of own_buf. Do not report initial DLL events.
17377 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17378 (unloaded_dll, xml_escape_text): New.
17379 * win32-low.c (enum target_waitkind): Update comments.
17380 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17381 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17382 (win32_EnumProcessModules, win32_GetModuleInformation)
17383 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17384 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17385 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17386 (win32_Module32First, win32_Module32Next, load_toolhelp)
17387 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17388 (get_child_debug_event): Handle DLL events.
17389 (win32_wait): Likewise.
17390
0d37add9
DJ
173912007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17392
17393 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17394 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17395
45e2715e
PA
173962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17397
17398 * win32-low.c (handle_output_debug_string): Ignore event if not
17399 waiting.
17400
c5674cf1
PA
174012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17402
17403 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17404
2bbe3cc1
DJ
174052007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17406
17407 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17408
ae13219e
DJ
174092007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17410
17411 * inferiors.c (change_inferior_id): Add comment.
17412 * linux-low.c (check_removed_breakpoint): Add an early
17413 prototype. Improve debug output.
17414 (linux_attach): Doc update.
17415 (linux_detach_one_process, linux_detach): Clean up before releasing
17416 each process.
17417 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17418 * linux-low.h (struct process_info): Doc improvement.
17419 * mem-break.c (delete_all_breakpoints): New.
17420 * mem-break.h (delete_all_breakpoints): New prototype.
17421 * thread-db.c (find_first_thread): New.
17422 (thread_db_create_event): Call it instead of
17423 thread_db_find_new_threads. Clean up unused variables.
17424 (maybe_attach_thread): Remove first thread handling.
17425 (thread_db_find_new_threads): Use find_first_thread.
17426 (thread_db_get_tls_address): Likewise.
17427
4105de34
DJ
174282007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17429
17430 * thread-db.c (thread_db_find_new_threads): Add prototype.
17431 (thread_db_create_event): Check for the main thread before adding
17432 a new thread.
17433 (maybe_attach_thread): Only enable event reporting if TID == 0.
17434 (thread_db_get_tls_address): Check for new threads.
17435
2b876972
DJ
174362007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17437
17438 * linux-low.c (linux_create_inferior): Try execv before execvp.
17439 * spu-low.c (spu_create_inferior): Likewise.
17440
7a245884
DJ
174412007-06-13 Mike Frysinger <vapier@gentoo.org>
17442
17443 * linux-low.c (linux_create_inferior): Change execv to execvp.
17444 * spu-low.c (spu_create_inferior): Likewies.
17445
117ce543
DJ
174462007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17447
17448 * Makefile.in (clean): Clean new files instead of deleted ones.
17449 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17450 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17451 rules.
17452 * configure.srv: Specify XML files and new regformats for MIPS and
17453 MIPS64 GNU/Linux.
17454 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17455 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17456 an entry for the restart register.
17457 (mips_cannot_fetch_register, mips_cannot_store_register)
17458 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17459 register names to match the XML descriptions.
17460 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17461 restart register instead of $0.
17462
0e7f50da
UW
174632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17464 Markus Deuling <deuling@de.ibm.com>
17465
17466 * remote-utils.c (decode_xfer_write): New function.
17467 * server.h (decode_xfer_write): Add prototype.
17468 * server.c (handle_query): Add PACKET_LEN argument. Support
17469 qXfer:spu:read and qXfer:spu:write packets.
17470 (main): Pass packet_len to handle_query.
17471 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17472 * target.h (target_ops): Add qxfer_spu.
17473
374c1d38
UW
174742007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17475
17476 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17477 accessing non-seekable spufs files.
17478
bb63802a
UW
174792007-05-16 Markus Deuling <deuling@de.ibm.com>
17480
889bf7c5 17481 * server.c (handle_query): Add reply for qC packet.
bb63802a 17482
7390519e
PA
174832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17484 Leo Zayas <lerele@champenstudios@com>
17485
17486 * server.h (check_remote_input_interrupt_request): New function.
17487 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17488 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17489 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17490 (check_remote_input_interrupt_request): New function.
17491 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 17492 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
17493 winapi_GenerateConsoleCtrlEvent): New typedefs.
17494 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17495 to 250 ms.
17496 (win32_wait): Check for remote interrupt request
17497 with check_remote_input_interrupt_request.
17498 (win32_request_interrupt): New function.
17499 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17500
34b34921
PA
175012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17502
17503 * win32-low.c (debug_registers_changed,
17504 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17505 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17506 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17507 (thread_rec): Get context using the low target.
17508 (child_add_thread): Call thread_added on the low target,
17509 which does the same thing.
17510 (regptr): Delete.
17511 (do_initial_child_stuff): Remove debug registers references.
17512 Set context using the low target. Resume threads after
17513 setting the contexts.
17514 (child_continue): Remove dead variable. Remove debug
17515 registers references.
17516 (child_fetch_inferior_registers): Go through the low target.
17517 (do_child_store_inferior_registers): Remove.
17518 (child_store_inferior_registers): Go through the low target.
17519 (win32_resume): Remove debug registers references.
17520 Set context using the low target.
17521 (handle_exception): Change return type to void. Don't record
17522 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17523 first chance exception.
889bf7c5 17524 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
17525 goto loop. Always return after waiting for debug event.
17526 (win32_wait): Convert to switch statement. Handle spurious
17527 events.
17528
17529 * win32-i386-low.c (debug_registers_changed,
17530 debug_registers_used): New.
17531 (initial_stuff): Rename to ...
17532 (i386_initial_stuff): ... this. Clear debug registers
17533 state variables.
17534 (store_debug_registers): Delete.
17535 (i386_get_thread_context): New.
17536 (load_debug_registers): Delete.
17537 (i386_set_thread_context): New.
17538 (i386_thread_added): New.
17539 (single_step): Rename to ...
17540 (i386_single_step): ... this.
17541 (do_fetch_inferior_registers): Rename to ...
17542 (i386_fetch_inferior_register): ... this.
17543 (i386_store_inferior_register): New.
17544 (the_low_target): Adapt to new interface.
17545
17546 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17547 (arm_get_thread_context): New.
17548 (arm_set_thread_context): New.
17549 (regptr): New.
17550 (do_fetch_inferior_registers): Rename to ...
17551 (arm_fetch_inferior_register): ... this.
17552 (arm_store_inferior_register): New.
17553 (arm_wince_breakpoint): Reimplement as unsigned long.
17554 (arm_wince_breakpoint_len): Define.
17555 (the_low_target): Adapt to new interface.
17556
17557 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17558 load_debug_registers. Add get_thread_context, set_thread_context,
17559 thread_added and store_inferior_register. Rename
17560 fetch_inferior_registers to fetch_inferior_register.
17561 (regptr): Remove declaration.
17562
dd6953e1
PA
175632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17564
17565 * linux-low.c (linux_detach): Change return type to int. Return 0.
17566 * spu-low.c (spu_detach): Likewise.
17567
444d6139
PA
175682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17569
17570 * target.h (target_ops): Change return type of detach to int.
17571 Add join.
17572 (join_inferior): New.
17573 * server.c (main): Don't skip detach support on mingw32.
17574 If the inferior doesn't support detaching return error.
17575 Call join_inferior instead of using waitpid.
17576 * linux-low.c (linux_join): New.
17577 (linux_target_op): Add linux_join.
17578 * spu-low.c (spu_join): New.
17579 (spu_target_ops): Add spu_join.
17580 * win32-low.c (win32_detach): Adapt to new interface.
17581 Reopen current_process_handle before detaching. Issue a child
17582 resume before detaching.
17583 (win32_join): New.
17584 (win32_target_op): Add win32_join.
17585
1d5315fe
PA
175862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17587
17588 * win32-low.c (win32-attach): Fix return value.
17589 * target.h (target_ops): Describe ATTACH return values.
17590
bf914831
PA
175912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17592
17593 * win32-low.c (GETPROCADDRESS): Define.
17594 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17595 (winapi_DebugSetProcessKillOnExit): Likewise.
17596 (win32_create_inferior): Force usage of ansi CreateProcessA.
17597 (win32_attach): Use GETPROCADDRESS.
17598 (win32_detach): Likewise.
17599
f72f3e60
PA
176002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17601
17602 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17603
ed50f18f
PA
176042007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17605
17606 * win32-low.c: Commit leftover changes from 2007-03-29.
17607
0c2ead7e
DJ
176082007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17609
17610 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17611 fields short instead of int. Add explicit padding.
17612 (i387_cache_to_fsave): Remove unnecessary casts.
17613 (i387_fsave_to_cache): Doc fix.
17614 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17615
73725ff3
DJ
176162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17617
17618 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17619 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17620
d99f33d8
PA
176212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17622
17623 * configure.srv (arm*-*-mingw32ce*): Move near the other
17624 arm targets.
17625
68070c10
PA
176262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17627
2482afc6 17628 * configure.ac: Add errno checking.
68070c10
PA
17629 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17630 sys/file.h and malloc.h.
17631 (AC_CHECK_DECLS): Add perror.
17632 (srv_mingwce): Handle.
2482afc6 17633 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
17634 win32-i386-low.o to srv_tgtobj.
17635 (i[34567]86-*-mingw*): Likewise.
17636 (arm*-*-mingw32ce*): Add case.
17637 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17638 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17639 [__MINGW32CE__] (strerror): New function.
17640 [__MINGW32CE__] (errno): Define to GetLastError.
17641 [__MINGW32CE__] (COUNTOF): New macro.
17642 (remote_open): Remove extra close call.
17643 * mem-break.c (delete_breakpoint_at): New function.
17644 * mem-break.h (delete_breakpoint_at): Declare.
17645 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17646 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17647 [USE_WIN32API] (read, write): Add char* casts.
17648 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17649 * server.h: Include wincecompat.h on Windows CE.
17650 [HAVE_ERRNO_H]: Check.
17651 (perror): Declare if not declared.
17652 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17653 (perror_with_name): Remove errno declaration.
17654 * wincecompat.h: New.
17655 * wincecompat.c: New.
17656 * win32-low.h: New.
17657 * win32-arm-low.c: New.
17658 * win32-i386-low.c: New.
17659 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17660 (OUTMSG2): Make it safe.
17661 (_T): New macro.
17662 (COUNTOF): New macro.
17663 (NUM_REGS): Get it from the low target.
17664 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17665 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17666 (thread_rec): Let low target handle debug registers.
17667 (child_add_thread): Likewise.
17668 (child_init_thread_list): Likewise.
17669 (continue_one_thread): Likewise.
17670 (regptr): New.
17671 (do_child_fetch_inferior_registers): Move to ...
17672 * win32-i386-low.c: ... here, and rename to ...
17673 (do_fetch_inferior_registers): ... this.
889bf7c5 17674 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17675 Go through the low target.
17676 (do_child_store_inferior_registers): Use regptr.
17677 (strwinerror): New function.
17678 (win32_create_inferior): Handle Windows CE.
17679 Use strwinerror instead of strerror on Windows error
17680 codes. Add program to the error output.
17681 Don't close the main thread handle on Windows CE.
17682 (win32_attach): Use coredll.dll on Windows CE.
17683 (win32_kill): Close current process and current
17684 thread handles.
17685 (win32_detach): Use coredll.dll on Windows CE.
17686 (win32_resume): Let low target handle debug registers, and
17687 step request.
17688 (handle_exception): Add/Remove initial breakpoint. Avoid
17689 non-existant WSTOPSIG on Windows CE.
17690 (win32_read_inferior_memory): Cast to remove warning.
17691 (win32_arch_string): Go through the low target.
17692 (initialize_low): Call set_breakpoint_data with the low
17693 target's breakpoint.
17694 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17695 FOP_REGNUM, mappings): Move to ...
17696 * win32-i386-low.c: ... here.
17697 * win32-low.c (win32_thread_info): Move to ...
17698 * win32-low.h: ... here.
17699 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17700 win32-arm-low.c and wincecompat.c.
17701 (all:): Add $EXEEXT.
17702 (install-only:): Likewise.
17703 (gdbserver:): Likewise.
17704 (gdbreplay:): Likewise.
17705 * config.in: Regenerate.
17706 * configure: Regenerate.
17707
41093d81
PA
177082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17709
17710 * win32-low.c: Rename typedef thread_info to
17711 win32_thread_info throughout.
17712
544afa54
PA
177132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17714
17715 * win32-i386-low.c: Rename to ...
17716 * win32-low.c: ... this.
17717 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17718 * Makefile.in: Likewise.
17719
bce7165d
PA
177202007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17721
17722 * remote-utils.c (monitor_output): Constify msg parameter.
17723 * server.h (monitor_output): Likewise.
17724 * win32-i386-low.c (handle_output_debug_string): New.
17725 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17726 handle_output_debug_string.
17727 (get_child_debug_event): Likewise.
17728
506c7aa0
DJ
177292007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17730
17731 * server.c (main): Correct strtoul check.
17732
42c81e2a
DJ
177332007-03-27 Jon Ringle <jon@ringle.org>
17734
17735 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17736
9453113a
DJ
177372007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17738
17739 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17740
64a69107
DJ
177412007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17742
17743 * terminal.h: Check HAVE_SGTTY_H.
17744
177452007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
17746
17747 * remote-utils.c (remote_open): Print out the assigned port number.
17748
c74d0ad8
DJ
177492007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17750
17751 * remote-utils.c (monitor_output): New function.
17752 * server.c (debug_threads): Define here.
17753 (monitor_show_help): New function.
17754 (handle_query): Handle qRcmd.
17755 (main): Do not handle 'd' packet.
17756 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17757 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17758 of debug_threads.
17759
de7c3b4a
PA
177602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17761
17762 * Makefile.in (EXEEXT): New.
17763 (clean): Use $(EXEEXT).
17764
ef57601b
PA
177652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17766
17767 * target.h (target_ops): Rename send_signal to request_interrupt,
17768 and remove enum target_signal parameter.
17769 * linux-low.c (linux_request_interrupt): Rename from
17770 linux_send_signal, and always send SIGINT.
17771 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17772 and always send SIGINT.
17773 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17774 of send_signal.
17775 (input_interrupt): Likewise.
17776
820f2bda
PA
177772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17778
17779 * server.c (get_features_xml): Check if target implemented
17780 arch_string.
17781 * win32-i386-low.c (win32_arch_string): New.
17782 (win32_target_ops): Add win32_arch_string as arch_string member.
17783
ab39bf24
UW
177842007-02-22 Markus Deuling <deuling@de.ibm.com>
17785
17786 * spu-low.c (spu_arch_string): New.
17787 (spu_target_ops): Add spu_arch_string.
17788
61ff6e04
DJ
177892007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17790
17791 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17792 * configure.ac: Do not check for terminal.h.
17793 * configure, config.in: Regenerated.
17794
fb1e4ffc
DJ
177952007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17796
17797 * Makefile.in (OBS): Add $(XML_BUILTIN).
17798 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17799 (clean): Update.
17800 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17801 (arm-with-iwmmxt.c): New.
17802 * config.in, configure: Regenerate.
17803 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17804 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17805 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17806 (arm*-*-linux*): Add iWMMXt and regset support.
17807 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17808 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17809 (arm_store_wmmxregset, target_regsets): New.
17810 * server.c (get_features_xml): Take annex argument. Check builtin
17811 XML documents.
17812 (handle_query): Handle multiple annexes.
17813
0f48aa01
DJ
178142007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17815
17816 * remote-utils.c [USE_WIN32API] (read, write): Define.
17817 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17818 write.
17819
23181151
DJ
178202007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * linux-i386-low.c (the_low_target): Set arch_string.
17823 * linux-x86-64-low.c (the_low_target): Likewise.
17824 * linux-low.c (linux_arch_string): New.
17825 (linux_target_ops): Add it.
17826 * linux-low.h (struct linux_target_ops): Add arch_string.
17827 * server.c (write_qxfer_response): Use const void * for DATA.
17828 (get_features_xml): New.
17829 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17830 * target.h (struct target_ops): Add arch_string method.
17831
9d606399
DJ
178322007-01-03 Denis Pilat <denis.pilat@st.com>
17833 Daniel Jacobowitz <dan@codesourcery.com>
17834
17835 * linux-low.c (linux_kill): Handle being called with no threads.
17836 * win32-i386-low.c (win32_kill): Likewise.
17837 (get_child_debug_event): Clear current_process_handle.
17838
178392006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17840 Daniel Jacobowitz <dan@codesourcery.com>
17841
17842 * remote-utils.c (remote_open): Check the type of specified
17843 serial port devices before opening them.
17844 * server.c (main): Kill the inferior if an error occurs during
17845 the first remote_open.
17846
a5e13d24
DJ
178472006-12-05 Markus Deuling <deuling@de.ibm.com>
17848
17849 * README: Update supported targets.
17850
186947f7
DJ
178512006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17852
17853 * Makefile.in (clean): Remove reg-mips64.c.
17854 (reg-mips64.c, reg-mips64.o): New rules.
17855 * configure.srv: Handle mips64. Include regset support for mips.
17856 * linux-mips-low.c (union mips_register): New.
17857 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17858 (mips_breakpoint, mips_breakpoint_at): Use int.
17859 (mips_collect_register, mips_supply_register)
17860 (mips_collect_register_32bit, mips_supply_register_32bit)
17861 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17862 (mips_store_fpregset, target_regsets): New.
17863 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17864
a13e2c95
UW
178652006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17866
17867 * configure.srv: Add target "spu*-*-*".
17868 * Makefile.in (clean): Remove reg-spu.c.
17869 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17870 * spu-low.c: New file.
17871
cb7283db
DJ
178722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17873
17874 * configure.ac: Correct td_thr_tls_get_addr test.
17875 * configure: Regenerated.
17876
89be2091
DJ
178772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17878
17879 * linux-low.c (linux_wait_for_event): Reformat. Use the
17880 pass_signals array.
17881 * remote-utils.c (decode_address_to_semicolon): New.
17882 * server.c (pass_signals, handle_general_set): New.
17883 (handle_query): Mention QPassSignals for qSupported.
17884 (main): Call handle_general_set.
17885 * server.h (pass_signals, decode_address_to_semicolon): New.
17886
000ef4f0
DJ
178872006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17888
17889 * server.c (handle_query): Correct error handling for read_auxv.
17890
b7149293
UW
178912005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17892
17893 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17894 and srv_linux_thread_db to yes.
17895 * linux-s390-low.c (s390_fill_gregset): New function.
17896 (target_regsets): Define data structure.
17897
dae5f5cf
DJ
178982006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17899
17900 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17901 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17902 * config.in, configure: Regenerated.
17903 * inferiors.c (gdb_id_to_thread): New function.
17904 (gdb_id_to_thread_id): Use it.
17905 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17906 * linux-low.h (struct process_info): Add th member.
17907 (thread_db_get_tls_address): New prototype.
17908 * remote-utils.c (decode_address): Make non-static.
17909 * server.c (handle_query): Handle qGetTLSAddr.
17910 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17911 * target.h (struct target_ops): Add get_tls_address.
17912 * thread-db.c (maybe_attach_thread): Save the thread handle.
17913 (thread_db_get_tls_address): New.
17914
32ca6d61
DJ
179152006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17916
17917 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17918 (linux_resume_one_process): Take a siginfo_t *. Update all
17919 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17920 (struct pending_signals): Add a siginfo_t.
17921 (linux_wait_for_process): Always set last_status.
17922 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17923 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17924 * linux-low.h (struct process_info): Add last_status.
17925
5ffff7c1
DJ
179262006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17927
17928 * remote-utils.c (try_rle): New function.
17929 (putpkt_binary): Use it.
17930
8695c747
DJ
179312006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17932
17933 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17934 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17935 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17936 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17937 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17938 point registers.
17939
290fadea
RS
179402006-08-08 Richard Sandiford <richard@codesourcery.com>
17941
17942 * server.c (terminal_fd): New variable.
17943 (old_foreground_pgrp): Likewise.
17944 (restore_old_foreground_pgrp): New function.
17945 (start_inferior): Record the terminal file descriptor in terminal_fd
17946 and its original foreground group in old_foreground_pgrp. Register
17947 restore_old_foreground_pgrp with atexit().
17948
9f2e1e63
DJ
179492006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17950
17951 * server.c (handle_query): Correct qPart to qXfer.
17952
b80864fb
DJ
179532006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17954
17955 * configure.ac: Check for more headers which are missing on
17956 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17957 * configure.srv: Add Cygwin and mingw32.
17958 * remote-utils.c: Don't include headers unconditionally which
17959 are missing on mingw32. Include <winsock.h> for mingw32.
17960 (remote_open): Adjust for mingw32 support. Flush
17961 standard error after writing to it.
17962 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17963 (unblock_async_io, enable_async_io, disable_async_io)
17964 (readchar, getpkt): Update for Winsock support.
17965 (prepare_resume_reply): Expect a protocol signal number.
17966 * server.c: Disable <sys/wait.h> on mingw32.
17967 (start_inferior): Adjust for mingw32 support. Flush
17968 standard error after writing to it.
17969 (attach_inferior): Likewise. Use protocol signal
17970 numbers.
17971 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17972 and names.
17973 * win32-i386-low.c: New file.
17974 * Makefile.in (XM_CLIBS): Set.
17975 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17976 (win32-i386-low.o): New dependency rule.
17977 * linux-low.c (linux_wait): Use target signal numbers.
17978 * target.h (struct target_ops): Doc fix.
17979 * server.h (target_signal_to_name): New prototype.
17980 * gdbreplay.c: Don't include headers unconditionally which
17981 are missing on mingw32. Include <winsock.h> for mingw32.
17982 (remote_close, remote_open): Adjust for Winsock support.
17983 * configure, config.in: Regenerated.
17984
0876f84a
DJ
179852006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17986
17987 * server.c (decode_xfer_read, write_qxfer_response): New.
17988 (handle_query): Take a packet length argument. Handle
17989 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17990 the qSupported response.
17991 (main): Update call to handle_query.
17992
01f9e8fa
DJ
179932006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17994
17995 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17996 (putpkt_binary): Renamed from putpkt and adjusted for binary
17997 data.
17998 (putpkt): New wrapper for putpkt_binary.
17999 (readchar): Don't mask off the high bit.
18000 (decode_X_packet): New function.
18001 * server.c (main): Call putpkt_binary if a handler sets the packet
18002 length. Save the length of the incoming packet. Handle 'X'.
18003 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18004
be2a5f71
DJ
180052006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18006
18007 * server.c (handle_query): Handle qSupported.
18008
ea025f5f
DJ
180092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18010
18011 * remote-utils.c (all_symbols_looked_up): New variable.
18012 (look_up_one_symbol): Check it.
18013 * server.h (look_up_one_symbol): New declaration.
18014 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18015
9308fc88
DJ
180162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18017
18018 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 18019 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
18020 (PTRACE_GET_THREAD_AREA): Define.
18021 (ps_get_thread_area): New function.
18022
52fb6437
NS
180232006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18024
18025 * configure.srv (m68k*-*-uclinux*): New target.
18026 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18027 (linux_resume_one_process): Remove extraneous cast.
18028 (linux_read_offsets): New.
18029 (linux_target_op): Add linux_read_offsets on mmuless systems.
18030 * server.c (handle_query): Add qOffsets logic.
18031 * target.h (struct target_ops): Add read_offsets.
18032
21b0f40c
DJ
180332006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18034
18035 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18036 (PTRACE_GET_THREAD_AREA): Define.
18037 (ps_get_thread_area): New function.
18038 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18039 (linux-x86-64-low.o): Update.
18040
0050a760
DJ
180412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18042
18043 * configure.ac: Remove checks for prfpregset_t.
18044 * gdb_proc_service.h: New file.
18045 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18046 new "gdb_proc_service.h".
18047 * proc-service.c: Likewise.
18048 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18049 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18050 * Makefile.in (gdb_proc_service_h): Updated.
18051 * configure, config.in: Regenerated.
18052
b92a518e
DJ
180532006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18054
18055 * remote-utils.c (prepare_resume_reply): Move declaration
18056 of gdb_id_from_wait to the top of the block.
18057
545587ee
DJ
180582006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18059
18060 * linux-low.c (regsets_store_inferior_registers): Read the regset
18061 from the target before filling it.
18062
9db87ebd
DJ
180632006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18064
18065 * server.c (attach_inferior): Return SIGTRAP for a successful
18066 attach.
18067
dd24457d
DJ
180682006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18069
18070 * Makefile.in (OBS): Add version.o.
18071 (STAGESTUFF): Delete.
18072 (version.o): Add dependencies.
18073 (version.c): Replace rule.
18074 (clean): Remove version.c.
18075 * server.c (gdbserver_version): New.
18076 (gdbserver_usage): Use printf.
18077 (main): Handle --version and --help.
18078 * server.h (version, host_name): Add declarations.
18079
6f0f660e
EZ
180802005-12-23 Eli Zaretskii <eliz@gnu.org>
18081
889bf7c5
PA
18082 * linux-arm-low.c:
18083 * linux-arm-low.c:
18084 * inferiors.c:
18085 * i387-fp.h:
18086 * i387-fp.c:
18087 * gdbreplay.c:
18088 * regcache.c:
18089 * proc-service.c:
18090 * mem-break.h:
18091 * mem-break.c:
18092 * linux-x86-64-low.c:
18093 * linux-sh-low.c:
18094 * linux-s390-low.c:
18095 * linux-ppc64-low.c:
18096 * linux-ppc-low.c:
18097 * linux-mips-low.c:
18098 * linux-m68k-low.c:
18099 * linux-m32r-low.c:
18100 * linux-low.h:
18101 * linux-low.c:
18102 * linux-ia64-low.c:
18103 * linux-i386-low.c:
18104 * linux-crisv32-low.c:
18105 * thread-db.c:
18106 * terminal.h:
18107 * target.h:
18108 * target.c:
18109 * server.h:
18110 * server.c:
18111 * remote-utils.c:
18112 * regcache.h:
18113 * utils.c:
18114 * Makefile.in:
18115 * configure.ac:
6f0f660e
EZ
18116 * gdbserver.1: Add (C) after Copyright. Update the FSF
18117 address.
18118
9d1fb177
DJ
181192005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18120
18121 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18122 (arm_breakpoint_at): Recognize both breakpoints.
18123 (the_low_target): Use the correct breakpoint instruction.
18124
011a70c2
DJ
181252005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18126
18127 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18128 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18129 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18130 (the_low_target): Update.
18131
7fb85e41
AS
181322005-10-25 Andreas Schwab <schwab@suse.de>
18133
18134 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18135
18136 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18137 (ia64_num_regs): Reduce to 462.
18138
3db0444b
DJ
181392005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18140
18141 * acinclude.m4: Correct quoting.
18142 * aclocal.m4: Regenerated.
18143
18144 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18145 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18146 (thread_db_init): Call thread_db_err_str.
18147 * configure.ac: Check for TD_VERSION.
18148 * config.in, configure: Regenerated.
18149
bee0189a
DJ
181502005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18151
18152 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18153
e9d25b98
DJ
181542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18155
18156 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18157 is not available. Define HAVE_PTRACE_GETREGS if it is.
18158 * config.in, configure: Regenerated.
18159 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18160 * linux-i386-low.c, linux-m68k-low.c: Update to use
18161 HAVE_PTRACE_GETREGS.
18162 * linux-low.c (regsets_fetch_inferior_registers)
18163 (regsets_store_inferior_registers): Only return 0 if we processed
18164 GENERAL_REGS.
18165 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18166 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18167
a06660f7
DJ
181682005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18169
18170 * inferiors.c (struct thread_info): Add gdb_id.
18171 (add_thread): Add gdb_id argument.
18172 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18173 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18174 calls to add_thread.
18175 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18176 * server.c (handle_query): Use thread_to_gdb_id.
18177 (handle_v_cont, main): Use gdb_id_to_thread_id.
18178 * server.h (add_thread): Update prototype.
18179 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18180 prototypes.
18181
5a1f5858
DJ
181822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18183
18184 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18185 left-padded registers.
18186 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18187 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18188
e122f1f5
SE
181892005-07-01 Steve Ellcey <sje@cup.hp.com>
18190
18191 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18192 * configure: Regenerate.
18193 * config.in: Regenerate.
18194 * server.h (NEED_DECLARATION_STRERROR):
18195 Replace with !HAVE_DECL_STRERROR.
18196
d592fa2f
DJ
181972005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18198
18199 * linux-low.c (linux_wait, linux_send_signal): Don't test
18200 an unsigned long variable for > 0 if it could be MAX_ULONG.
18201 * server.c (myresume): Likewise.
18202 * target.c (set_desired_inferior): Likewise.
18203
ccbd4912
MK
182042005-06-13 Mark Kettenis <kettenis@gnu.org>
18205
18206 * configure.ac: Simplify and improve check for socklen_t.
18207 * configure, config.in: Regenerate.
18208
f450004a
DJ
182092005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18210
18211 * acconfig.h: Remove.
18212 * configure.ac: Add a test for socklen_t. Use three-argument
18213 AC_DEFINE throughout.
18214 * config.in: Regenerated using autoheader 2.59.
18215 * configure: Regenerated.
18216
18217 * gdbreplay.c (socklen_t): Provide a default.
18218 (remote_open): Use socklen_t.
18219 * remote-utils.c (socklen_t): Provide a default.
18220 (remote_open): Use socklen_t.
18221 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18222 unsigned char.
18223
18224 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18225 char for buffers.
18226 * linux-low.c (linux_read_memory, linux_write_memory)
18227 (linux_read_auxv): Likewise.
18228 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18229 (check_mem_write): Likewise.
18230 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18231 Likewise.
18232 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18233 (registers_from_string, register_data): Likewise.
18234 * server.c (handle_query, main): Likewise.
18235 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18236 (decode_M_packet): Likewise.
18237 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18238 * target.h (struct target_ops): Update read_memory, write_memory,
18239 and read_auxv.
18240 (read_inferior_memory, write_inferior_memory): Update.
18241 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18242 to unsigned char *.
18243 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18244 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18245 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18246 linux-s390-low.c, linux-sh-low.c: Update for changes in
18247 read_inferior_memory and the_low_target->breakpoint.
18248
eee84df1
DJ
182492005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18250
18251 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18252 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18253 * configure.srv: Add powerpc64-*-linux*.
18254 * linux-ppc64-low.c: New file.
18255
45b134e5
OF
182562005-05-23 Orjan Friberg <orjanf@axis.com>
18257
18258 * linux-cris-low.c: New file with support for CRIS.
18259 * linux-crisv32-low.c: Ditto for CRISv32.
18260 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18261 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 18262 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
18263 reg-crisv32.o, and reg-crisv32.c to make rules.
18264 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18265 recognized targets.
18266
48d93c75
UW
182672005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18268
18269 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18270 of sizeof (PTRACE_XFER_TYPE).
18271 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18272
e013ee27
OF
182732005-05-12 Orjan Friberg <orjanf@axis.com>
18274
889bf7c5 18275 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
18276 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18277 pointers for hardware watchpoint support.
18278 * linux-low.h (struct linux_target_ops): Ditto.
18279 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18280 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18281 to linux_target_ops.
18282 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18283 reply packet.
18284 * server.c (main): Recognize 'Z' and 'z' packets.
18285
b0ded00b
UW
182862005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18287
18288 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18289 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18290 (the_low_target): Add new members.
18291
8643e2ad
DJ
182922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18293
18294 * proc-service.c (ps_lgetregs): Search all_processes instead of
18295 all_threads.
18296
fc620387
DJ
182972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18298
18299 * server.c (start_inferior): Change return type to int.
18300 (attach_inferior): Change sigptr to int *.
18301 (handle_v_cont, handle_v_requests): Change signal to int *.
18302 (main): Change signal to int.
18303
183042005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
18305
18306 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18307 * configure.srv: Add m32r*-*-linux*.
18308 * linux-m32r-low.c: New file.
18309
e0e76420
DJ
183102005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18311
18312 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18313
a1928bad
DJ
183142005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18315
18316 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18317 Take unsigned long arguments for PIDs.
18318 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18319 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18320 (wait_for_sigstop, linux_resume_one_process)
18321 (regsets_fetch_inferior_registers, linux_send_signal)
18322 (linux_read_auxv): Likewise. Update the types of variables holding
18323 PIDs. Update format string specifiers.
18324 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18325 * remote-utils.c (prepare_resume_reply): Likewise.
18326 * server.c (cont_thread, general_thread, step_thread)
18327 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18328 unsigned long.
18329 (handle_query): Update format specifiers.
18330 (handle_v_cont, main): Use strtoul for thread IDs.
18331 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18332 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18333 (general_thread, step_thread, thread_from_wait)
18334 (old_thread_from_wait): Update.
18335 * target.h (struct thread_resume): Use unsigned long for THREAD.
18336 (struct target_ops): Use unsigned long for arguments to attach and
18337 thread_alive.
18338
dcdb98d2
DJ
183392005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18340
18341 * acinclude.m4: Include bfd/bfd.m4 directly.
18342 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18343 <agriffis@toolchain.org>.
18344 * aclocal.m4, configure: Regenerated.
18345
bec39cab
AC
183462005-01-07 Andrew Cagney <cagney@gnu.org>
18347
18348 * configure.ac: Rename configure.in, require autoconf 2.59.
18349 * configure: Re-generate.
18350
434c4c77
DJ
183512004-12-08 Daniel Jacobowitz <dan@debian.org>
18352
18353 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18354 LIBS when finished.
18355 * aclocal.m4: Regenerated.
18356 * configure: Regenerated.
18357
db1d3e1b
AS
183582004-11-21 Andreas Schwab <schwab@suse.de>
18359
18360 * linux-m68k-low.c (m68k_num_gregs): Define.
18361 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18362 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18363 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18364 (m68k_breakpoint_at): New. Add to the_low_target.
18365
18366 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18367 srv_linux_thread_db to yes.
18368
43360365
JB
183692004-10-20 Joel Brobecker <brobecker@gnat.com>
18370
18371 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18372 (ARCH_SET_FS): Likewise.
18373 (ARCH_GET_FS): Likewise.
18374 (ARCH_GET_GS): Likewise.
18375
fd500816
DJ
183762004-10-16 Daniel Jacobowitz <dan@debian.org>
18377
18378 * linux-i386-low.c (ps_get_thread_area): New.
18379 * linux-x86-64-low.c (ps_get_thread_area): New.
18380 * linux-low.c: Include <sys/syscall.h>.
18381 (linux_kill_one_process): Don't kill the first thread here.
18382 (linux_kill): Kill the first thread here.
18383 (kill_lwp): New function.
18384 (send_sigstop, linux_send_signal): Use it.
18385 * proc-service.c: Clean up #ifdefs.
18386 (fpregset_info): Delete.
18387 (ps_lgetregs): Update and enable implementation.
18388 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18389 implementations.
18390 * remote-utils.c (struct sym_cache, symbol_cache): New.
18391 (input_interrupt): Print a clearer message.
18392 (async_io_enabled): New variable.
18393 (enable_async_io, disable_async_io): Use it. Update comments.
18394 (look_up_one_symbol): Use the symbol cache.
18395 * thread-db.c (thread_db_look_up_symbols): New function.
18396 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18397
f6de3c42
DJ
183982004-10-16 Daniel Jacobowitz <dan@debian.org>
18399
18400 * configure.in: Test for -rdynamic.
18401 * configure: Regenerated.
18402 * Makefile (INTERNAL_LDFLAGS): New.
18403 (gdbserver, gdbreplay): Use it.
18404
2c0fc042
AC
184052004-09-02 Andrew Cagney <cagney@gnu.org>
18406
18407 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18408
075b3282
DJ
184092004-03-23 Daniel Jacobowitz <drow@mvista.com>
18410
18411 * linux-low.c (linux_wait): Clear all_processes list also.
18412
fa6a77dc
DJ
184132004-03-12 Daniel Jacobowitz <drow@mvista.com>
18414
18415 * linux-low.c: Include <errno.h>. Remove extern declaration of
18416 errno.
18417
6d782a97
DJ
184182004-03-12 Daniel Jacobowitz <drow@mvista.com>
18419
18420 * gdbreplay.c, server.h, utils.c: Update copyright years.
18421
3a7fb99b
DJ
184222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18423
18424 * server.c (main): Print child status or termination signal from
18425 variable 'signal', not 'sig'.
18426
c3e735a6
DJ
184272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18428
18429 * linux-low.c (linux_read_memory): Change return type to
18430 int. Check for and return error from ptrace().
18431 * target.c (read_inferior_memory): Change return type to int. Pass
18432 back return status from the_target->read_memory().
18433 * target.h (struct target_ops): Adapt *read_memory() prototype.
18434 Update comment.
18435 (read_inferior_memory): Adapt prototype.
18436 * server.c (main): Return an error packet if
18437 read_inferior_memory() returns an error.
18438
a59d1c82
DJ
184392004-03-04 Daniel Jacobowitz <drow@mvista.com>
18440
18441 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18442 Unify with other clean targets.
18443
dc3f8883
DJ
184442004-02-29 Daniel Jacobowitz <drow@mvista.com>
18445
18446 * server.c (handle_v_cont): Call set_desired_inferior.
18447
89a208da
DJ
184482004-02-29 Daniel Jacobowitz <drow@mvista.com>
18449
18450 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18451
62ea82f5
DJ
184522004-02-29 Daniel Jacobowitz <drow@mvista.com>
18453
18454 * linux-low.c (linux_wait): Unblock async I/O.
18455 (linux_resume): Block and enable async I/O.
18456 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18457 * server.h (block_async_io, unblock_async_io): Add prototypes.
18458
6910d122
DJ
184592004-02-29 Daniel Jacobowitz <drow@mvista.com>
18460
18461 * remote-utils.c (remote_open): Print a status notice after
18462 opening a TCP port.
18463 * server.c (attach_inferior): Print a status notice after
18464 attaching.
18465
184662004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
18467
18468 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18469
c89dc5d4
DJ
184702004-02-26 Daniel Jacobowitz <drow@mvista.com>
18471
18472 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18473 error packet.
18474 * server.c, target.h: Update copyright years.
18475
4b8dad4a
RM
184762004-02-25 Roland McGrath <roland@redhat.com>
18477
18478 * target.h (struct target_ops): New member `read_auxv'.
18479 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18480 * linux-low.c (linux_read_auxv): New function.
18481 (linux_target_ops): Initialize `read_auxv' member to that.
18482
d7446758
JB
184832004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18484
18485 Committed by Jim Blandy <jimb@redhat.com>.
18486
18487 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 18488 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
18489 instead of GPR_SIZE to distiguish s390 and s390x targets.
18490
5544ad89
DJ
184912004-01-31 Daniel Jacobowitz <drow@mvista.com>
18492
18493 * linux-low.c: Update copyright year.
18494 (check_removed_breakpoint): Clear pending_is_breakpoint.
18495 (linux_set_resume_request, linux_queue_one_thread)
18496 (resume_status_pending_p): New functions.
18497 (linux_continue_one_thread): Use process->resume.
18498 (linux_resume): Only resume threads if there are no pending events.
18499 * linux-low.h (struct process_info): Add resume request
18500 pointer.
18501
2a68b70e
DJ
185022004-01-30 Daniel Jacobowitz <drow@mvista.com>
18503
18504 * regcache.c (new_register_cache): Clear the allocated register
18505 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18506
64386c31
DJ
185072003-10-13 Daniel Jacobowitz <drow@mvista.com>
18508
18509 * linux-low.c (linux_resume): Take a struct thread_resume *
18510 argument.
18511 (linux_wait): Update call.
18512 (resume_ptr): New static variable.
18513 (linux_continue_one_thread): Renamed from
18514 linux_continue_one_process. Use resume_ptr.
18515 (linux_resume): Use linux_continue_one_thread.
18516 * server.c (handle_v_cont, handle_v_requests): New functions.
18517 (myresume): New function.
18518 (main): Handle 'v' case.
18519 * target.h (struct thread_resume): New type.
18520 (struct target_ops): Change argument of "resume" to struct
18521 thread_resume *.
18522 (myresume): Delete macro.
18523
c938e9b0
L
185242003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18525
18526 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18527 (uninstall): Support DESTDIR.
18528
7f313d07
BC
18529Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18530
18531 * configure.srv: Add xscale*linux copy of arm*linux entry.
18532
3b2fc2ea
DJ
185332003-07-24 Daniel Jacobowitz <drow@mvista.com>
18534
18535 * linux-arm-low.c (arm_reinsert_addr): New function.
18536 (the_low_target): Add arm_reinsert_addr.
18537
1c0a559e
MK
185382003-07-08 Mark Kettenis <kettenis@gnu.org>
18539
18540 * mem-break.c: Remove whitespace at end of file.
18541
43d5792c
DJ
185422003-06-28 Daniel Jacobowitz <drow@mvista.com>
18543
18544 * configure.in: Check whether we need to prototype strerror.
18545 * server.h: Optionally prototype strerror.
18546 * gdbreplay.c (perror_with_name): Use strerror.
18547 * linux-low.c (linux_attach_lwp): Use strerror.
18548 * utils.c (perror_with_name): Use strerror.
18549 * config.in, configure: Regenerated.
18550
c8a86edf
DJ
185512003-06-28 Daniel Jacobowitz <drow@mvista.com>
18552
18553 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18554 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18555
73d37363
DJ
185562003-06-20 Daniel Jacobowitz <drow@mvista.com>
18557
18558 * Makefile.in (SFILES): Update.
18559 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18560 low-sun3.c: Remove files.
18561
6ad8ae5c
DJ
185622003-06-17 Daniel Jacobowitz <drow@mvista.com>
18563
18564 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18565 (linux_detach_one_process, linux_detach): New functions.
18566 (linux_target_ops): Add linux_detach.
18567 * server.c (main): Handle 'D' packet.
18568 * target.h (struct target_ops): Add "detach" member.
18569 (detach_inferior): Define.
18570
1581182a
MK
185712003-06-13 Mark Kettenis <kettenis@gnu.org>
18572
18573 From Kelley Cook <kelleycook@wideopenwest.com>:
18574 * configure.srv: Accept i[34567]86 variants.
18575
e5379b03
DJ
185762003-06-05 Daniel Jacobowitz <drow@mvista.com>
18577
18578 * linux-low.c (linux_wait_for_event): Correct comment typos.
18579 (linux_resume_one_process): Call check_removed_breakpoint.
18580 (linux_send_signal): New function.
18581 (linux_target_ops): Add linux_send_signal.
18582 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18583 of kill.
18584 * target.h (struct target_ops): Add send_signal.
18585
2ff29de4
JB
185862003-05-29 Jim Blandy <jimb@redhat.com>
18587
18588 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18589 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18590 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18591 away part of the register's value.
18592
254787d4
DJ
185932003-03-26 Daniel Jacobowitz <drow@mvista.com>
18594
18595 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18596 (linux_wait_for_event, linux_init_signals): Likewise.
18597
94e10508
DJ
185982003-03-17 Daniel Jacobowitz <drow@mvista.com>
18599
18600 * configure.in: Check for stdlib.h.
18601 * configure: Regenerated.
18602 * config.in: Regenerated.
18603
4c0711e0
DJ
186042003-01-04 Andreas Schwab <schwab@suse.de>
18605
18606 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18607
ef66e766
AC
186082003-01-02 Andrew Cagney <ac131313@redhat.com>
18609
18610 * Makefile.in: Remove obsolete code.
18611
a1358604
DJ
186122002-11-20 Daniel Jacobowitz <drow@mvista.com>
18613
18614 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18615 defined(PT_FPR0_HI).
18616
23ce3b1c
DJ
186172002-11-17 Stuart Hughes <seh@zee2.com>
18618
18619 * linux-arm-low.c (arm_num_regs): Increase.
18620 (arm_regmap): Include status register.
18621
186222002-11-17 Daniel Jacobowitz <drow@mvista.com>
18623
18624 * linux-low.c (register_addr): Remove incorrect -1 check.
18625
a9fa9f7d
DJ
186262002-08-29 Daniel Jacobowitz <drow@mvista.com>
18627
18628 * linux-low.c (linux_create_inferior): Call setpgid. Return
18629 the new PID.
18630 (unstopped_p, linux_signal_pid): Remove.
18631 (linux_target_ops): Remove linux_signal_pid.
18632 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18633 global instead of target method.
18634 * target.h (struct target_ops): Remove signal_pid. Update comment
18635 for create_inferior.
18636 * server.c (signal_pid): New variable.
18637 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 18638 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
18639 (attach_inferior): Set signal_pid.
18640
17574093
DJ
186412002-08-23 Daniel Jacobowitz <drow@mvista.com>
18642
18643 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18644
186452002-08-20 Jim Blandy <jimb@redhat.com>
18646
18647 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18648 default for this.
18649
186502002-08-01 Andrew Cagney <cagney@redhat.com>
18651
18652 * Makefile.in: Make chill references obsolete.
18653
186542002-07-24 Kevin Buettner <kevinb@redhat.com>
18655
18656 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18657 * configure: Regenerate.
18658 * config.in: Regenerate.
18659
186602002-07-09 David O'Brien <obrien@FreeBSD.org>
18661
18662 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18663 (perror_with_name, remote_close, remote_open, expect, play): Static.
18664
186652002-07-04 Michal Ludvig <mludvig@suse.cz>
18666
4b8dad4a 18667 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
18668 byte offsets instead of an array of indexes.
18669 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18670
186712002-06-13 Daniel Jacobowitz <drow@mvista.com>
18672
18673 * regcache.c: Add comment.
18674
186752002-06-11 Daniel Jacobowitz <drow@mvista.com>
18676
18677 * thread-db.c: New file.
18678 * proc-service.c: New file.
18679 * acinclude.m4: New file.
18680 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18681 proc-service.o, and thread-db.o.
18682 (linux-low.o): Add USE_THREAD_DB.
18683 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18684 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18685 * aclocal.m4: Regenerated.
18686 * config.in: Regenerated.
18687 * configure: Regenerated.
18688 * configure.in: Check for proc_service.h, sys/procfs.h,
18689 thread_db.h, and linux/elf.h headrs.
18690 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18691 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18692 Check for -lthread_db and thread support.
18693 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18694 PowerPC, and SuperH.
18695 * i387-fp.c: Constify arguments.
18696 * i387-fp.h: Likewise.
18697 * inferiors.c: (struct thread_info): Renamed from
18698 `struct inferior_info'. Remove PID member. Use generic inferior
18699 list header. All uses updated.
18700 (inferiors, signal_pid): Removed.
18701 (all_threads): New variable.
18702 (get_thread): Define.
18703 (add_inferior_to_list): New function.
18704 (for_each_inferior): New function.
18705 (change_inferior_id): New function.
18706 (add_inferior): Removed.
18707 (remove_inferior): New function.
18708 (add_thread): New function.
18709 (free_one_thread): New function.
18710 (remove_thread): New function.
18711 (clear_inferiors): Use for_each_inferior and free_one_thread.
18712 (find_inferior): New function.
18713 (find_inferior_id): New function.
18714 (inferior_target_data): Update argument type.
18715 (set_inferior_target_data): Likewise.
18716 (inferior_regcache_data): Likewise.
18717 (set_inferior_regcache_data): Likewise.
18718 * linux-low.c (linux_bp_reinsert): Remove.
18719 (all_processes, stopping_threads, using_thrads)
18720 (struct pending_signals, debug_threads, pid_of): New.
18721 (inferior_pid): Replace with macro.
18722 (struct inferior_linux_data): Remove.
18723 (get_stop_pc, add_process): New functions.
18724 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18725 Use add_process and add_thread.
18726 (linux_attach_lwp): New function, based on old linux_attach. Use
18727 add_process and add_thread. Set stop_expected for new threads.
18728 (linux_attach): New function.
18729 (linux_kill_one_process): New function.
18730 (linux_kill): Kill all LWPs.
18731 (linux_thread_alive): Use find_inferior_id.
18732 (check_removed_breakpoints, status_pending_p): New functions.
18733 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18734 Update. Use WNOHANG. Wait for cloned processes also. Update process
18735 struct for the found process.
18736 (linux_wait_for_event): New function.
18737 (linux_wait): Use it. Support LWPs.
18738 (send_sigstop, wait_for_sigstop, stop_all_processes)
18739 (linux_resume_one_process, linux_continue_one_process): New functions.
18740 (linux_resume): Support LWPs.
18741 (REGISTER_RAW_SIZE): Remove.
18742 (fetch_register): Use register_size instead. Call supply_register.
18743 (usr_store_inferior_registers): Likewise. Call collect_register.
18744 Fix recursive case.
18745 (regsets_fetch_inferior_registers): Improve error message.
18746 (regsets_store_inferior_registers): Add debugging.
18747 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18748 (unstopped_p, linux_signal_pid): New functions.
18749 (linux_target_ops): Add linux_signal_pid.
18750 (linux_init_signals): New function.
18751 (initialize_low): Call it. Initialize using_threads.
18752 * regcache.c (inferior_regcache_data): Add valid
18753 flag.
18754 (get_regcache): Fetch registers lazily. Add fetch argument
18755 and update all callers.
18756 (regcache_invalidate_one, regcache_invalidate): New
18757 functions.
18758 (new_register_cache): Renamed from create_register_cache.
18759 Return the new regcache.
18760 (free_register_cache): Change argument to a void *.
18761 (registers_to_string, registers_from_string): Call get_regcache
18762 with fetch flag set.
18763 (register_data): Make static. Pass fetch flag to get_regcache.
18764 (supply_register): Call get_regcache with fetch flag clear.
18765 (collect_register): Call get_regcache with fetch flag set.
18766 (collect_register_as_string): New function.
18767 * regcache.h: Update.
18768 * remote-utils.c (putpkt): Flush after debug output and use
18769 stderr.
18770 Handle input interrupts while waiting for an ACK.
18771 (input_interrupt): Use signal_pid method.
18772 (getpkt): Flush after debug output and use stderr.
18773 (outreg): Use collect_register_as_string.
18774 (new_thread_notify, dead_thread_notify): New functions.
18775 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18776 and general_thread.
18777 (look_up_one_symbol): Flush after debug output.
18778 * server.c (step_thread, server_waiting): New variables.
18779 (start_inferior): Don't use signal_pid. Update call to mywait.
18780 (attach_inferior): Update call to mywait.
18781 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18782 (main): Don't fetch/store registers explicitly. Use
18783 set_desired_inferior. Support proposed ``Hs'' packet. Update
18784 calls to mywait.
18785 * server.h: Update.
18786 (struct inferior_list, struct_inferior_list_entry): New.
18787 * target.c (set_desired_inferior): New.
18788 (write_inferior_memory): Constify.
18789 (mywait): New function.
18790 * target.h: Update.
18791 (struct target_ops): New signal_pid method.
18792 (mywait): Removed macro, added prototype.
18793
18794 * linux-low.h (regset_func): Removed.
18795 (regset_fill_func, regset_store_func): New.
18796 (enum regset_type): New.
18797 (struct regset_info): Add type field. Use new operation types.
18798 (struct linux_target_ops): stop_pc renamed to get_pc.
18799 Add decr_pc_after_break and breakpoint_at.
18800 (get_process, get_thread_proess, get_process_thread)
18801 (strut process_info, all_processes, linux_attach_lwp)
18802 (thread_db_init): New.
18803
18804 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18805 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18806 (the_low_target): Add new members.
18807 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18808 (i386_store_fpxregset): Constify.
18809 (target_regsets): Add new kind identifier.
18810 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18811 (i386_set_pc): Add debugging.
18812 (i386_breakpoint_at): New function.
18813 (the_low_target): Add new members.
18814 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18815 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18816 (mips_breakpoint_at): New.
18817 (the_low_target): Add new members.
18818 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18819 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18820 (the_low_target): Add new members.
18821 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18822 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18823 (the_low_target): Add new members.
18824 * linux-x86-64-low.c (target_regsets): Add new kind
18825 identifier.
18826
188272002-05-15 Daniel Jacobowitz <drow@mvista.com>
18828
18829 From Martin Pool <mbp@samba.org>:
18830 * server.c (gdbserver_usage): New function.
18831 (main): Call it.
18832
188332002-05-14 Daniel Jacobowitz <drow@mvista.com>
18834
18835 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18836 stop_at -> stop_pc.
18837
188382002-05-04 Andrew Cagney <ac131313@redhat.com>
18839
18840 * Makefile.in: Remove obsolete code.
18841
188422002-04-24 Michal Ludvig <mludvig@suse.cz>
18843
18844 * linux-low.c (regsets_fetch_inferior_registers),
18845 (regsets_store_inferior_registers): Removed cast to int from
18846 ptrace() calls.
18847 * regcache.h: Added declaration of struct inferior_info.
18848
188492002-04-20 Daniel Jacobowitz <drow@mvista.com>
18850
18851 * inferiors.c (struct inferior_info): Add regcache_data.
18852 (add_inferior): Call create_register_cache.
18853 (clear_inferiors): Call free_register_cache.
18854 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18855 * regcache.c (struct inferior_regcache_data): New.
18856 (registers): Remove.
18857 (get_regcache): New function.
18858 (create_register_cache, free_register_cache): New functions.
18859 (set_register_cache): Don't initialize the register cache here.
18860 (registers_to_string, registers_from_string, register_data): Call
18861 get_regcache.
18862 * regcache.h: Add prototypes.
18863 * server.h: Likewise.
18864
188652002-04-20 Daniel Jacobowitz <drow@mvista.com>
18866
18867 * mem-break.c: New file.
18868 * mem-break.h: New file.
18869 * Makefile.in: Add mem-break.o rule; update server.h
18870 dependencies.
18871 * inferiors.c (struct inferior_info): Add target_data
18872 member.
18873 (clear_inferiors): Free target_data member if set.
18874 (inferior_target_data, set_inferior_target_data): New functions.
18875 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18876 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18877 * linux-low.c (linux_bp_reinsert): New variable.
18878 (struct inferior_linux_data): New.
18879 (linux_create_inferior): Use set_inferior_target_data.
18880 (linux_attach): Likewise. Call add_inferior.
18881 (linux_wait_for_one_inferior): New function.
18882 (linux_wait): Call it.
18883 (linux_write_memory): Add const.
18884 (initialize_low): Call set_breakpoint_data.
18885 * linux-low.h (struct linux_target_ops): Add breakpoint
18886 handling members.
18887 * server.c (attach_inferior): Remove extra add_inferior
18888 call.
18889 * server.h: Include mem-break.h. Update inferior.c
18890 prototypes.
18891 * target.c (read_inferior_memory)
18892 (write_inferior_memory): New functions.
18893 * target.h (read_inferior_memory)
18894 (write_inferior_memory): Change macros to prototypes.
18895 (struct target_ops): Update comments. Add const to write_memory
18896 definition.
18897
188982002-04-11 Daniel Jacobowitz <drow@mvista.com>
18899
18900 * linux-low.c (usr_store_inferior_registers): Support
18901 registers which are allowed to fail to store.
18902 * linux-low.h (linux_target_ops): Likewise.
18903 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18904 (ppc_cannot_store_register): FPSCR may not be storable.
18905
189062002-04-09 Daniel Jacobowitz <drow@mvista.com>
18907
18908 * server.h: Include <string.h> if HAVE_STRING_H.
18909 * ChangeLog: Correct paths in last ChangeLog entry.
18910
189112002-04-09 Daniel Jacobowitz <drow@mvista.com>
18912
18913 * linux-low.h: Remove obsolete prototypes.
18914 (struct linux_target_ops): New.
18915 (extern the_low_target): New.
18916 * linux-low.c (num_regs, regmap): Remove declarations.
18917 (register_addr): Use the_low_target explicitly.
18918 (fetch_register): Likewise.
18919 (usr_fetch_inferior_registers): Likewise.
18920 (usr_store_inferior_registers): Likewise.
18921 * linux-arm-low.c (num_regs): Remove.
18922 (arm_num_regs): Define.
18923 (arm_regmap): Renamed from regmap, made static.
18924 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18925 made static.
18926 (arm_cannot_store_register): Renamed from cannot_store_register,
18927 made static.
18928 (the_low_target): New.
18929 * linux-i386-low.c (num_regs): Remove.
18930 (i386_num_regs): Define.
18931 (i386_regmap): Renamed from regmap, made static.
18932 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18933 made static.
18934 (i386_cannot_store_register): Renamed from cannot_store_register,
18935 made static.
18936 (the_low_target): New.
18937 * linux-ia64-low.c (num_regs): Remove.
18938 (ia64_num_regs): Define.
18939 (ia64_regmap): Renamed from regmap, made static.
18940 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18941 made static.
18942 (ia64_cannot_store_register): Renamed from cannot_store_register,
18943 made static.
18944 (the_low_target): New.
18945 * linux-m68k-low.c (num_regs): Remove.
18946 (m68k_num_regs): Define.
18947 (m68k_regmap): Renamed from regmap, made static.
18948 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18949 made static.
18950 (m68k_cannot_store_register): Renamed from cannot_store_register,
18951 made static.
18952 (the_low_target): New.
18953 * linux-mips-low.c (num_regs): Remove.
18954 (mips_num_regs): Define.
18955 (mips_regmap): Renamed from regmap, made static.
18956 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18957 made static.
18958 (mips_cannot_store_register): Renamed from cannot_store_register,
18959 made static.
18960 (the_low_target): New.
18961 * linux-ppc-low.c (num_regs): Remove.
18962 (ppc_num_regs): Define.
18963 (ppc_regmap): Renamed from regmap, made static.
18964 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18965 made static.
18966 (ppc_cannot_store_register): Renamed from cannot_store_register,
18967 made static.
18968 (the_low_target): New.
18969 * linux-s390-low.c (num_regs): Remove.
18970 (s390_num_regs): Define.
18971 (s390_regmap): Renamed from regmap, made static.
18972 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18973 made static.
18974 (s390_cannot_store_register): Renamed from cannot_store_register,
18975 made static.
18976 (the_low_target): New.
18977 * linux-sh-low.c (num_regs): Remove.
18978 (sh_num_regs): Define.
18979 (sh_regmap): Renamed from regmap, made static.
18980 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18981 made static.
18982 (sh_cannot_store_register): Renamed from cannot_store_register,
18983 made static.
18984 (the_low_target): New.
18985 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18986 (the_low_target): New.
18987
189882002-04-09 Daniel Jacobowitz <drow@mvista.com>
18989
18990 * Makefile.in: Add stamp-h target.
18991 * configure.in: Create stamp-h.
18992 * configure: Regenerated.
18993
189942002-04-09 Daniel Jacobowitz <drow@mvista.com>
18995
18996 * inferiors.c: New file.
18997 * target.c: New file.
18998 * target.h: New file.
18999 * Makefile.in: Add target.o and inferiors.o. Update
19000 dependencies.
19001 * linux-low.c (inferior_pid): New static variable,
19002 moved from server.c.
19003 (linux_create_inferior): Renamed from create_inferior.
19004 Call add_inferior. Return 0 on success instead of a PID.
19005 (linux_attach): Renamed from myattach.
19006 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19007 (linux_thread_alive): Renamed from mythread_alive.
19008 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19009 child dies.
19010 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19011 (regsets_store_inferior_registers): Correct error message.
19012 Add missing ``return 0''.
19013 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19014 (linux_store_registers): Renamed from store_inferior_registers.
19015 (linux_read_memory): Renamed from read_inferior_memory.
19016 (linux_write_memory): Renamed from write_inferior_memory.
19017 (linux_target_ops): New structure.
19018 (initialize_low): Call set_target_ops ().
19019 * remote-utils.c (unhexify): New function.
19020 (hexify): New function.
19021 (input_interrupt): Send signals to ``signal_pid''.
19022 * server.c (inferior_pid): Remove.
19023 (start_inferior): Update create_inferior call.
19024 (attach_inferior): Call add_inferior.
19025 (handle_query): New function.
19026 (main): Call handle_query for `q' packets.
19027 * server.h: Include "target.h". Remove obsolete prototypes.
19028 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19029
190302002-04-09 Daniel Jacobowitz <drow@mvista.com>
19031
19032 * Makefile.in: Add WARN_CFLAGS. Update configury
19033 dependencies.
19034 * configure.in: Check for <string.h>
19035 * configure: Regenerate.
19036 * config.in: Regenerate.
19037 * gdbreplay.c: Include needed system headers.
19038 (remote_open): Remove strchr prototype.
19039 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19040 * regcache.c (supply_register): Change buf argument to const void *.
19041 (supply_register_by_name): Likewise.
19042 (collect_register): Change buf argument to void *.
19043 (collect_register_by_name): Likewise.
19044 * regcache.h: Add missing prototypes.
19045 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19046 * server.c (handle_query): New function.
19047 (attached): New static variable, moved out of main.
19048 (main): Quiet longjmp clobber warnings.
19049 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19050 * utils.c (error): Remove NORETURN.
19051 (fatal): Likewise.