]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: turn target op 'supports_multi_process' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
652aef77
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's supports_multi_process op into a
4 method 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.cc (process_target::supports_multi_process): Define.
9 (target_supports_multi_process): Update.
10
11 Update the derived classes and callers below.
12
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_supports_multi_process): Turn into ...
15 (linux_process_target::supports_multi_process): ... 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
0dc587d4
TBA
212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 Turn process_stratum_target's supports_non_stop, async, and
24 start_non_stop ops into methods of process_target.
25
26 * target.h (struct process_stratum_target): Remove the target ops.
27 (class process_target): Add the target ops.
28 (target_supports_non_stop): Update the macro.
29 (target_async): Update the macro.
30 (start_non_stop): Remove declaration.
31 * target.cc (process_target::supports_non_stop): Define.
32 (process_target::async): Define.
33 (process_target::start_non_stop): Define.
34 (start_non_stop): Remove.
35
36 Update the derived classes and callers below.
37
38 * server.cc (handle_qxfer_siginfo): Update.
39 (handle_query): Update.
40 * linux-low.cc (linux_target_ops): Update.
41 (linux_supports_non_stop): Turn into ...
42 (linux_process_target::supports_non_stop): ... this.
43 (linux_async): Turn into ...
44 (linux_process_target::async): ... this.
45 (linux_start_non_stop): Turn into ...
46 (linux_process_target::start_non_stop): ... this.
47 * linux-low.h (class linux_process_target): Update.
48 * lynx-low.cc (lynx_target_ops): Update.
49 * nto-low.cc (nto_target_ops): Update.
50 (nto_supports_non_stop): Remove; rely on the default behavior
51 instead.
52 * win32-low.cc (win32_target_ops): Update.
53
d7abedf7
TBA
542020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
55
56 Turn process_stratum_target's qxfer_siginfo op into a method of
57 process_target.
58
59 * target.h (struct process_stratum_target): Remove the target op.
60 (class process_target): Add the target op. Also add
61 'supports_qxfer_siginfo'.
62 * target.cc (process_target::qxfer_siginfo): Define.
63 (process_target::supports_qxfer_siginfo): Define.
64
65 Update the derived classes and callers below.
66
67 * server.cc (handle_qxfer_siginfo): Update.
68 (handle_query): Update.
69 * linux-low.cc (linux_target_ops): Update.
70 (linux_process_target::supports_qxfer_siginfo): Define.
71 (linux_xfer_siginfo): Turn into ...
72 (linux_process_target::qxfer_siginfo): ... this.
73 * linux-low.h (class linux_process_target): Update.
74 * lynx-low.cc (lynx_target_ops): Update.
75 * nto-low.cc (nto_target_ops): Update.
76 * win32-low.cc (win32_target_ops): Update.
77
2d0795ee
TBA
782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
79
80 Turn process_stratum_target's qxfer_osdata op into a method of
81 process_target.
82
83 * target.h (struct process_stratum_target): Remove the target op.
84 (class process_target): Add the target op. Also add
85 'supports_qxfer_osdata'.
86 * target.cc (process_target::qxfer_osdata): Define.
87 (process_target::supports_qxfer_osdata): Define.
88
89 Update the derived classes and callers below.
90
91 * server.cc (handle_qxfer_osdata): Update.
92 (handle_query): Update.
93 * linux-low.cc (linux_target_ops): Update.
94 (linux_process_target::supports_qxfer_osdata): Define.
95 (linux_qxfer_osdata): Turn into ...
96 (linux_process_target::qxfer_osdata): ... this.
97 * linux-low.h (class linux_process_target): Update.
98 * lynx-low.cc (lynx_target_ops): Update.
99 * nto-low.cc (nto_target_ops): Update.
100 * win32-low.cc (win32_target_ops): Update.
101
ea06bbaa
TBA
1022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
103
104 Turn process_stratum_target's hostio_last_error op into a
105 method of process_target.
106
107 * target.h (struct process_stratum_target): Remove the target op.
108 (class process_target): Add the target op.
109 * target.cc: Add "hostio.h" to includes.
110 (process_target::hostio_last_error): Define.
111
112 Update the derived classes and callers below.
113
114 * hostio.cc (hostio_error): Update.
115 * linux-low.cc: Remove "hostio.h" from includes.
116 (linux_target_ops): Update.
117 * lynx-low.cc (lynx_target_ops): Update.
118 * nto-low.cc (nto_target_ops): Update.
119 * win32-low.h (class win32_process_target): Update.
120 * win32-low.cc (win32_target_ops): Update.
121 (wince_hostio_last_error): Turn into ...
122 (win32_process_target::hostio_last_error): ... this.
123
6e3fd7e9
TBA
1242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
125
126 Turn process_stratum_target's get_tls_address op into a method of
127 process_target.
128
129 * target.h (struct process_stratum_target): Remove the target op.
130 (class process_target): Add the target op. Also add
131 'supports_get_tls_address'.
132 * target.cc (process_target::get_tls_address): Define.
133 (process_target::supports_get_tls_address): Define.
134
135 Update the derived classes and callers below.
136
137 * server.cc (handle_query): Update.
138 * linux-low.cc (linux_target_ops): Update.
139 (linux_process_target::supports_get_tls_address): Define.
140 (linux_process_target::get_tls_address): Define.
141 * linux-low.h (class linux_process_target): Update.
142 * lynx-low.cc (lynx_target_ops): Update.
143 * nto-low.cc (nto_target_ops): Update.
144 * win32-low.cc (win32_target_ops): Update.
145
5203ae1e
TBA
1462020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
147
148 Turn process_stratum_target's read_offsets op into a method of
149 process_target.
150
151 * target.h (struct process_stratum_target): Remove the target op.
152 (class process_target): Add the target op. Also add
153 'supports_read_offsets'.
154 * target.cc (process_target::read_offsets): Define.
155 (process_target::supports_read_offsets): Define.
156
157 Update the derived classes and callers below.
158
159 * server.cc (handle_query): Update.
160 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
161 (linux_target_ops): Update.
162 (linux_process_target::supports_read_offsets): Define.
163 (linux_read_offsets): Turn into ...
164 (linux_process_target::read_offsets): ... this.
165 * linux-low.h (class linux_process_target): Update.
166 * lynx-low.cc (lynx_target_ops): Update.
167 * nto-low.cc (nto_target_ops): Update.
168 * win32-low.cc (win32_target_ops): Update.
169
6eeb5c55
TBA
1702020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
171
172 Turn process_stratum_target's stopped_by_watchpoint and
173 stopped_data_address ops into methods of process_target.
174
175 * target.h (struct process_stratum_target): Remove the target ops.
176 (class process_target): Add the target ops.
177 * target.cc (process_target::stopped_by_watchpoint): Define.
178 (process_target::stopped_data_address): Define.
179
180 Update the derived classes and callers below.
181
182 * remote-utils.cc (prepare_resume_reply): Update.
183 * linux-low.cc (linux_target_ops): Update.
184 (linux_stopped_by_watchpoint): Turn into ...
185 (linux_process_target::stopped_by_watchpoint): ... this.
186 (linux_stopped_data_address): Turn into ...
187 (linux_process_target::stopped_data_address): ... this.
188 * linux-low.h (class linux_process_target): Update.
189 * lynx-low.cc (lynx_target_ops): Update.
190 * nto-low.cc (nto_target_ops): Update.
191 (nto_stopped_by_watchpoint): Turn into ...
192 (nto_process_target::stopped_by_watchpoint): ... this.
193 (nto_stopped_data_address): Turn into ...
194 (nto_process_target::stopped_data_address): ... this.
195 * nto-low.h (class nto_process_target): Update.
196 * win32-low.cc (win32_target_ops): Update.
197 (win32_stopped_by_watchpoint): Turn into ...
198 (win32_process_target::stopped_by_watchpoint): ... this.
199 (win32_stopped_data_address): Turn into ...
200 (win32_process_target::stopped_data_address): ... this.
201 * win32-low.h (class win32_process_target): Update.
202
22aa6223
TBA
2032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
204
205 Turn process_stratum_target's supports_hardware_single_step op into
206 a method of process_target.
207
208 * target.h (struct process_stratum_target): Remove the target op.
209 (class process_target): Add the target op.
210 (target_supports_hardware_single_step): Update the macro.
211 (target_can_do_hardware_single_step): Remove declaration.
212 * target.cc (process_target::supports_hardware_single_step): Define.
213 (target_can_do_hardware_single_step): Remove.
214
215 Update the derived classes and callers below.
216
217 * linux-low.h (class linux_process_target): Update.
218 * linux-low.cc (linux_target_ops): Update.
219 (linux_supports_hardware_single_step): Turn into ...
220 (linux_process_target::supports_hardware_single_step): ... this.
221 * lynx-low.h (class lynx_process_target): Update.
222 * lynx-low.cc (lynx_target_ops): Update.
223 (lynx_process_target::supports_hardware_single_step): Define.
224 * nto-low.h (class nto_process_target): Update.
225 * nto-low.cc (nto_target_ops): Update.
226 (nto_process_target::supports_hardware_single_step): Define.
227 * win32-low.h (class win32_process_target): Update.
228 * win32-low.cc (win32_target_ops): Update.
229 (win32_process_target::supports_hardware_single_step): Define.
230
93fe88b2
TBA
2312020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
232
233 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
234 ops into methods of process_target.
235
236 * target.h (struct process_stratum_target): Remove the target ops.
237 (class process_target): Add the target ops.
238 (target_stopped_by_hw_breakpoint): Update the macro.
239 (target_supports_stopped_by_hw_breakpoint): Update the macro.
240 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
241 (process_target::supports_stopped_by_hw_breakpoint): Define.
242
243 Update the derived classes and callers below.
244
245 * linux-low.cc (linux_target_ops): Update.
246 (linux_stopped_by_hw_breakpoint): Turn into ...
247 (linux_process_target::stopped_by_hw_breakpoint): ... this.
248 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
249 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
250 * linux-low.h (class linux_process_target): Update.
251 * lynx-low.cc (lynx_target_ops): Update.
252 * nto-low.cc (nto_target_ops): Update.
253 * win32-low.cc (win32_target_ops): Update.
254
84320c4e
TBA
2552020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
256
257 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
258 ops into methods of process_target.
259
260 * target.h (struct process_stratum_target): Remove the target ops.
261 (class process_target): Add the target ops.
262 (target_stopped_by_sw_breakpoint): Update the macro.
263 (target_supports_stopped_by_sw_breakpoint): Update the macro.
264 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
265 (process_target::supports_stopped_by_sw_breakpoint): Define.
266
267 Update the derived classes and callers below.
268
269 * linux-low.cc (linux_target_ops): Update.
270 (linux_stopped_by_sw_breakpoint): Turn into ...
271 (linux_process_target::stopped_by_sw_breakpoint): ... this.
272 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
273 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
274 * linux-low.h (class linux_process_target): Update.
275 * lynx-low.cc (lynx_target_ops): Update.
276 * nto-low.cc (nto_target_ops): Update.
277 * win32-low.cc (win32_target_ops): Update.
278
7e0bde70
TBA
2792020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
280
281 Turn process_stratum_target's insert_point and remove_point ops
282 into methods of process_target.
283
284 * target.h (struct process_stratum_target): Remove the target ops.
285 (class process_target): Add the target ops.
286 * target.cc (process_target::insert_point): Define.
287 (process_target::remove_point): Define.
288
289 Update the derived classes and callers below.
290
291 * mem-break.cc (set_raw_breakpoint_at): Update.
292 (delete_raw_breakpoint): Update.
293 (uninsert_raw_breakpoint): Update.
294 (reinsert_raw_breakpoint): Update.
295 * linux-low.cc (linux_target_ops): Update.
296 (linux_insert_point): Turn into ...
297 (linux_process_target::insert_point): ... this.
298 (linux_remove_point): Turn into ...
299 (linux_process_target::remove_point): ... this.
300 * linux-low.h (class linux_process_target): Update.
301 * lynx-low.cc (lynx_target_ops): Update.
302 * nto-low.cc (nto_target_ops): Update.
303 (nto_insert_point): Turn into ...
304 (nto_process_target::insert_point): ... this.
305 (nto_remove_point): Turn into ...
306 (nto_process_target::remove_point): ... this.
307 * nto-low.h (class nto_process_target): Update.
308 * win32-low.cc (win32_target_ops): Update.
309 (win32_insert_point): Turn into ...
310 (win32_process_target::insert_point): ... this.
311 (win32_remove_point): Turn into ...
312 (win32_process_target::remove_point): ... this.
313 * win32-low.h (class win32_process_target): Update.
314
a2b2297a
TBA
3152020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
316
317 Turn process_stratum_target's supports_z_point_type op into a
318 method of process_target.
319
320 * target.h (struct process_stratum_target): Remove the target op.
321 (class process_target): Add the target op.
322 * target.cc (process_target::supports_z_point_type): Define.
323
324 Update the derived classes and callers below.
325
326 * mem-break.cc (z_type_supported): Update.
327 * linux-low.cc (linux_target_ops): Update.
328 (linux_supports_z_point_type): Turn into ...
329 (linux_process_target::supports_z_point_type): ... this.
330 * linux-low.h (class linux_process_target): Update.
331 * lynx-low.cc (lynx_target_ops): Update.
332 * nto-low.cc (nto_target_ops): Update.
333 (nto_supports_z_point_type): Turn into ...
334 (nto_process_target::supports_z_point_type): ... this.
335 * nto-low.h (class nto_process_target): Update.
336 * win32-low.cc (win32_target_ops): Update.
337 (win32_supports_z_point_type): Turn into ...
338 (win32_process_target::supports_z_point_type): ... this.
339 * win32-low.h (class win32_process_target): Update.
340
eac215cc
TBA
3412020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
342
343 Turn process_stratum_target's read_auxv op into a method of
344 process_target.
345
346 * target.h (class process_stratum_target): Remove the target op.
347 (struct process_target): Add the target op. Also add
348 'supports_read_auxv'.
349 * target.cc (process_target::read_auxv): Define.
350 (process_target::supports_read_auxv): Define.
351
352 Update the derived classes and callers below.
353
354 * server.cc (handle_qxfer_auxv): Update.
355 (handle_query): Update.
356 * linux-low.cc (linux_target_ops): Update.
357 (linux_process_target::supports_read_auxv): Define.
358 (linux_read_auxv): Turn into ...
359 (linux_process_target::read_auxv): ... this.
360 * linux-low.h (class linux_process_target): Update.
361 * lynx-low.cc (lynx_target_ops): Update.
362 * nto-low.cc (nto_target_ops): Update.
363 (nto_process_target::supports_read_auxv): Define.
364 (nto_read_auxv): Turn into ...
365 (nto_process_target::read_auxv): ... this.
366 * nto-low.h (class nto_process_target): Update.
367 * win32-low.cc (win32_target_ops): Update.
368
eb497a2a
TBA
3692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
370
371 Turn process_stratum_target's request_interrupt op into a method of
372 process_target.
373
374 * target.h (struct process_stratum_target): Remove the target op.
375 (class process_target): Add the target op.
376
377 Update the derived classes and callers below.
378
379 * remote-utils.cc (putpkt_binary_1): Update.
380 (input_interrupt): Update.
381 (getpkt): Update.
382 * server.cc (handle_v_requests): Update.
383 * linux-low.cc (linux_target_ops): Update.
384 (linux_request_interrupt): Turn into ...
385 (linux_process_target::request_interrupt): ... this.
386 * linux-low.h (class linux_process_target): Update.
387 * lynx-low.cc (lynx_target_ops): Update.
388 (lynx_request_interrupt): Turn into ...
389 (lynx_process_target::request_interrupt): ... this.
390 * lynx-low.h (class lynx_process_target): Update.
391 * nto-low.cc (nto_target_ops): Update.
392 (nto_request_interrupt): Turn into ...
393 (nto_process_target::request_interrupt): ... this.
394 * nto-low.h (class nto_process_target): Update.
395 * win32-low.cc (win32_target_ops): Update.
396 (win32_request_interrupt): Turn into ...
397 (win32_process_target::request_interrupt): ... this.
398 * win32-low.h (class win32_process_target): Update.
399
2a31c7aa
TBA
4002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
401
402 Turn process_stratum_target's look_up_symbols op into a method of
403 process_target.
404
405 * target.h (struct process_stratum_target): Remove the target op.
406 (class process_target): Add the target op.
407 * target.cc (process_target::look_up_symbols): Define.
408
409 Update the derived classes and callers below.
410
411 * server.cc (handle_query): Update.
412 * linux-low.cc (linux_target_ops): Update.
413 (linux_look_up_symbols): Turn into ...
414 (linux_process_target::look_up_symbols): ... this.
415 * linux-low.h (class linux_process_target): Update.
416 * lynx-low.cc (lynx_target_ops): Update.
417 * nto-low.cc (nto_target_ops): Update.
418 * win32-low.cc (win32_target_ops): Update.
419
e2558df3
TBA
4202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
421
422 Turn process_stratum_target's read_memory and write_memory
423 ops into methods of process_target.
424
425 * target.h (struct process_stratum_target): Remove the target ops.
426 (class process_target): Add the target ops.
427
428 Update the derived classes and callers below.
429
430 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
431 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
432 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
433 (arm_get_syscall_trapinfo): Update.
434 * linux-cris-low.cc (cris_breakpoint_at): Update.
435 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
436 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
437 * linux-mips-low.cc (mips_breakpoint_at): Update.
438 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
439 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
440 * linux-sh-low.cc (sh_breakpoint_at): Update.
441 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
442 (sparc_store_gregset_from_stack): Update.
443 (sparc_breakpoint_at): Update.
444 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
445 * linux-tile-low.cc (tile_breakpoint_at): Update.
446 * linux-x86-low.cc (x86_breakpoint_at): Update.
447 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
448 * mem-brea.cc (insert_memory_breakpoint): Update.
449 (validate_inserted_breakpoint): Update.
450 * target.cc (read_inferior_memory): Update.
451 (target_write_memory): Update.
452 * linux-low.cc (linux_target_ops): Update.
453 (linux_read_memory): Make a wrapper around the read_memory target
454 op call.
455 (linux_process_target::read_memory): Rename from linux_read_memory.
456 (linux_write_memory): Turn into ...
457 (linux_process_target::write_memory): ... this.
458 * linux-low.h (class linux_process_target): Update.
459 * lynx-low.cc (lynx_target_ops): Update.
460 (lynx_read_memory): Turn into ...
461 (lynx_process_target::read_memory): ... this.
462 (lynx_write_memory): Turn into ...
463 (lynx_process_target::write_memory): ... this.
464 * lynx-low.h (class lynx_process_target): Update.
465 * nto-low.cc (nto_target_ops): Update.
466 (nto_read_memory): Turn into ...
467 (nto_process_target::read_memory): ... this.
468 (nto_write_memory): Turn into ...
469 (nto_process_target::write_memory): ... this.
470 * nto-low.h (class nto_process_target): Update.
471 * win32-low.cc (win32_target_ops): Update.
472 (win32_read_inferior_memory): Turn into ...
473 (win32_process_target::read_memory): ... this.
474 (win32_write_inferior_memory): Turn into ...
475 (win32_process_target::write_memory): ... this.
476 * win32-low.h (class win32_process_target): Update.
477
79b44087
TBA
4782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
479
480 Turn process_stratum_target's prepare_to_access_memory and
481 done_accessing_memory ops into methods of process_target.
482
483 * target.h (struct process_stratum_target): Remove the target ops.
484 (class process_target): Add the target ops.
485 * target.cc (process_target::prepare_to_access_memory): Define.
486 (process_target::done_accessing_memory): Define.
487 (prepare_to_access_memory): Update.
488 (done_accessing_memory): Update.
489
490 Update the derived classes and callers below.
491
492 * linux-low.cc (linux_target_ops): Update.
493 (linux_prepare_to_access_memory): Turn into ...
494 (linux_process_target::prepare_to_access_memory): ... this.
495 (linux_done_accessing_memory): Turn into ...
496 (linux_process_target::done_accessing_memory): ... this.
497 * linux-low.h (class linux_process_target): Update.
498 * lynx-low.cc (lynx_target_ops): Update.
499 * nto-low.cc (nto_target_ops): Update.
500 * win32-low.cc (win32_target_ops): Update.
501
a5a4d4cd
TBA
5022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
503
504 Turn process_stratum_target's fetch_registers and store_registers
505 ops into methods of process_target.
506
507 * target.h (struct process_stratum_target): Remove the target ops.
508 (class process_target): Add the target ops.
509 (fetch_inferior_registers): Update the macro.
510 (store_inferior_registers): Update the macro.
511
512 Update the derived classes and callers below.
513
514 * linux-low.cc (linux_target_ops): Update.
515 (linux_fetch_registers): Turn into ...
516 (linux_process_target::fetch_registers): ... this.
517 (linux_store_registers): Turn into ...
518 (linux_process_target::store_registers): ... this.
519 * linux-low.h (class linux_process_target): Update.
520 * lynx-low.cc (lynx_target_ops): Update.
521 (lynx_fetch_registers): Turn into ...
522 (lynx_process_target::fetch_registers): ... this.
523 (lynx_store_registers): Turn into ...
524 (lynx_process_target::store_registers): ... this.
525 * lynx-low.h (class lynx_process_target): Update.
526 * nto-low.cc (nto_target_ops): Update.
527 (nto_fetch_registers): Turn into ...
528 (nto_process_target::fetch_registers): ... this.
529 (nto_store_registers): Turn into ...
530 (nto_process_target::store_registers): ... this.
531 * nto-low.h (class nto_process_target): Update.
532 * win32-low.cc (win32_target_ops): Update.
533 (win32_fetch_inferior_registers): Turn into ...
534 (win32_process_target::fetch_registers): ... this.
535 (win32_store_inferior_registers): Turn into ...
536 (win32_process_target::store_registers): ... this.
537 * win32-low.h (class win32_process_target): Update.
538
6532e7e3
TBA
5392020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
540
541 Turn process_stratum_target's wait op into a method of
542 process_target.
543
544 * target.h (struct process_stratum_target): Remove the target op.
545 (class process_target): Add the target op.
546
547 Update the derived classes and callers below.
548
549 * target.cc (target_wait): Update.
550 * linux-low.cc (linux_target_ops): Update.
551 (linux_wait): Turn into ...
552 (linux_process_target::wait): ... this.
553 * linux-low.h (class linux_process_target): Update.
554 * lynx-low.cc (lynx_target_ops): Update.
555 (lynx_wait): Turn into ...
556 (lynx_process_target::wait): ... this.
557 * lynx-low.h (class lynx_process_target): Update.
558 * nto-low.cc (nto_target_ops): Update.
559 (nto_wait): Turn into ...
560 (nto_process_target::wait): ... this.
561 * nto-low.h (class nto_process_target): Update.
562 * win32-low.cc (win32_target_ops): Update.
563 (win32_wait): Turn into ...
564 (win32_process_target::wait): ... this.
565 (do_initial_child_stuff): Update.
566 * win32-low.h (class win32_process_target): Update.
567
0e4d7e35
TBA
5682020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
569
570 Turn process_stratum_target's resume op into a method of
571 process_target.
572
573 * target.h (struct process_stratum_target): Remove the target op.
574 (class process_target): Add the target op.
575
576 Update the derived classes and callers below.
577
578 * server.cc (resume): Update.
579 * target.cc (target_stop_and_wait): Update.
580 (target_continue_no_signal): Update.
581 (target_continue): Update.
582 * linux-low.cc (linux_target_ops): Update.
583 (linux_resume): Turn into ...
584 (linux_process_target::resume): ... this.
585 * linux-low.h (class linux_process_target): Update.
586 * lynx-low.cc (lynx_target_ops): Update.
587 (lynx_resume): Turn into ...
588 (lynx_process_target::resume): ... this.
589 * lynx-low.h (class lynx_process_target): Update.
590 * nto-low.cc (nto_target_ops): Update.
591 (nto_resume): Turn into ...
592 (nto_process_target::resume): ... this.
593 * nto-low.h (class nto_process_target): Update.
594 * win32-low.cc (win32_target_ops): Update.
595 (win32_resume): Turn into ...
596 (win32_process_target::resume): ... this.
597 (win32_process_target::detach): Update.
598 (do_initial_child_stuff): Update.
599 * win32-low.h (class win32_process_target): Update.
600
13d3d99b
TBA
6012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
602
603 Turn process_stratum_target's thread_alive op into a method of
604 process_target.
605
606 * target.h (struct process_stratum_target): Remove the target op.
607 (class process_target): Add the target op.
608 (mythread_alive): Update the macro.
609
610 Update the derived classes and callers below.
611
612 * linux-low.cc (linux_target_ops): Update.
613 (linux_thread_alive): Turn into ...
614 (linux_process_target::thread_alive): ... this.
615 (wait_for_sigstop): Update.
616 * linux-low.h (class linux_process_target): Update.
617 * lynx-low.cc (lynx_target_ops): Update.
618 (lynx_thread_alive): Turn into ...
619 (lynx_process_target::thread_alive): ... this.
620 * lynx-low.h (class lynx_process_target): Update.
621 * nto-low.cc (nto_target_ops): Update.
622 (nto_thread_alive): Turn into ...
623 (nto_process_target::thread_alive): ... this.
624 * nto-low.h (class nto_process_target): Update.
625 * win32-low.cc (win32_target_ops): Update.
626 (win32_thread_alive): Turn into ...
627 (win32_process_target::thread_alive): ... this.
628 * win32-low.h (class win32_process_target): Update.
629
95a49a39
TBA
6302020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
631
632 Turn process_stratum_target's join op into a method of
633 process_target.
634
635 * target.h (struct process_stratum_target): Remove the target op.
636 (class process_target): Add the target op.
637 (join_inferior): Update the macro.
638
639 Update the derived classes and callers below.
640
641 * linux-low.cc (linux_target_ops): Update.
642 (linux_join): Turn into ...
643 (linux_process_target::join): ... this.
644 * linux-low.h (class linux_process_target): Update.
645 * lynx-low.cc (lynx_target_ops): Update.
646 (lynx_join): Turn into ...
647 (lynx_process_target::join): ... this.
648 * lynx-low.h (class lynx_process_target): Update.
649 * nto-low.cc (nto_target_ops): Update.
650 (nto_process_target::join): Define.
651 * nto-low.h (class nto_process_target): Update.
652 * win32-low.cc (win32_target_ops): Update.
653 (win32_join): Turn into ...
654 (win32_process_target::join): ... this.
655 * win32-low.h (class win32_process_target): Update.
656
8adb37b9
TBA
6572020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
658
659 Turn process_stratum_target's mourn op into a method of
660 process_target.
661
662 * target.h (struct process_stratum_target): Remove the target op.
663 (class process_target): Add the target op.
664
665 Update the derived classes and callers below.
666
667 * target.cc (target_mourn_inferior): Update.
668 * linux-low.cc (linux_target_ops): Update.
669 (linux_mourn): Turn into ...
670 (linux_process_target::mourn): ... this.
671 (handle_extended_wait): Update.
672 (linux_process_target::kill): Update.
673 (linux_process_target::detach): Update.
674 * linux-low.h (class linux_process_target): Update.
675 * lynx-low.cc (lynx_target_ops): Update.
676 (lynx_mourn): Turn into ...
677 (lynx_process_target::mourn): ... this.
678 * lynx-low.h (class lynx_process_target): Update.
679 * nto-low.cc (nto_target_ops): Update.
680 (nto_mourn): Turn into ...
681 (nto_process_target::mourn): ... this.
682 * nto-low.h (class nto_process_target): Update.
683 * win32-low.cc (win32_target_ops): Update.
684 (win32_mourn): Turn into ...
685 (win32_process_target::mourn): ... this.
686 * win32-low.h (class win32_process_target): Update.
687
9061c9cf
TBA
6882020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
689
690 Turn process_stratum_target's detach op into a method of
691 process_target.
692
693 * target.h (struct process_stratum_target): Remove the target op.
694 (class process_target): Add the target op.
695 (detach_inferior): Update the macro.
696
697 Update the derived classes and callers below.
698
699 * linux-low.cc (linux_target_ops): Update.
700 (linux_detach): Turn into ...
701 (linux_process_target::detach): ... this.
702 * linux-low.h (class linux_process_target): Update.
703 * lynx-low.cc (lynx_target_ops): Update.
704 (lynx_detach): Turn into ...
705 (lynx_process_target::detach): ... this.
706 * lynx-low.h (class lynx_process_target): Update.
707 * nto-low.cc (nto_target_ops): Update.
708 (nto_detach): Turn into ...
709 (nto_process_target::detach): ... this.
710 * nto-low.h (class nto_process_target): Update.
711 * win32-low.cc (win32_target_ops): Update.
712 (win32_detach): Turn into ...
713 (win32_process_target::detach): ... this.
714 * win32-low.h (class win32_process_target): Update.
715
c6885a57
TBA
7162020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
717
718 Turn process_stratum_target's kill op into a method of
719 process_target.
720
721 * target.h (struct process_stratum_target): Remove the target op.
722 (class process_target): Add the target op.
723
724 Update the derived classes and callers below.
725
726 * target.cc (kill_inferior): Update.
727 * linux-low.cc (linux_target_ops): Update.
728 (linux_kill): Turn into ...
729 (linux_process_target::kill): ... this.
730 * linux-low.h (class linux_process_target): Update.
731 * lynx-low.cc (lynx_target_ops): Update.
732 (lynx_kill): Turn into ...
733 (lynx_process_target::kill): ... this.
734 * lynx-low.h (class lynx_process_target): Update.
735 * nto-low.cc (nto_target_ops): Update.
736 (nto_kill): Turn into ...
737 (nto_process_target::kill): ... this.
738 * nto-low.h (class nto_process_target): Update.
739 * win32-low.cc (win32_target_ops): Update.
740 (win32_kill): Turn into ...
741 (win32_process_target::kill): ... this.
742 * win32-low.h (class win32_process_target): Update.
743
ef03dad8
TBA
7442020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
745
746 Turn process_stratum_target's attach op into a method of
747 process_target.
748
749 * target.h (struct process_stratum_target): Remove the target op.
750 (class process_target): Add the target op.
751 (myattach): Update the macro.
752
753 Update the derived classes and callers below.
754
755 * linux-low.cc (linux_target_ops): Update.
756 (linux_attach): Turn into ...
757 (linux_process_target::attach): ... this.
758 * linux-low.h (class linux_process_target): Update.
759 * lynx-low.cc (lynx_target_ops): Update.
760 (lynx_attach): Turn into ...
761 (lynx_process_target::attach): ... this.
762 * lynx-low.h (class lynx_process_target): Update.
763 * nto-low.cc (nto_target_ops): Update.
764 (nto_attach): Turn into ...
765 (nto_process_target::attach): ... this.
766 * nto-low.h (class nto_process_target): Update.
767 * win32-low.cc (win32_target_ops): Update.
768 (win32_attach): Turn into ...
769 (win32_process_target::attach): ... this.
770 * win32-low.h (class win32_process_target): Update.
771
6dee9afb
TBA
7722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
773
774 Turn process_stratum_target's post_create_inferior op into a method
775 of process_target.
776
777 * target.h (struct process_stratum_target): Remove the target op.
778 (class process_target): Add the target op.
779 (target_post_create_inferior): Update the macro.
780 * target.cc (process_target::post_create_inferior): Define.
781
782 Update the derived classes and callers below.
783
784 * linux-low.cc (linux_target_ops): Update.
785 (linux_post_create_inferior): Turn into ...
786 (linux_process_target::post_create_inferior): ... this.
787 * linux-low.h (class linux_process_target): Update.
788 * lynx-low.cc (lynx_target_ops): Update.
789 * nto-low.cc (nto_target_ops): Update.
790 * win32-low.cc (win32_target_ops): Update.
791
15295543
TBA
7922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
793
794 Turn process_stratum_target's create_inferior op into a method of
795 process_target.
796
797 * target.h (struct process_stratum_target): Remove the target op.
798 (class process_target): Add the target op.
799 (create_inferior): Rename the macro to ...
800 (target_create_inferior): ... this.
801
802 Update the derived classes and callers below.
803
804 * server.cc (handle_v_run): Update.
805 (captured_main): Update.
806 (process_serial_event): Update.
807 * linux-low.cc (linux_target_ops): Update.
808 (linux_create_inferior): Turn into ...
809 (linux_process_target::create_inferior): ... this.
810 * linux-low.h (class linux_process_target): Update.
811 * lynx-low.cc (lynx_target_ops): Update.
812 (lynx_create_inferior): Turn into ...
813 (lynx_process_target::create_inferior): ... this.
814 * lynx-low.h (class lynx_process_target): Update.
815 * nto-low.cc (nto_target_ops): Update.
816 (nto_create_inferior): Turn into ...
817 (nto_process_target::create_inferior): ... this.
818 * nto-low.h (class nto_process_target): Update.
819 * win32-low.cc (win32_target_ops): Update.
820 (win32_create_inferior): Turn into ...
821 (win32_process_target::create_inferior): ... this.
822 * win32-low.h (class win32_process_target): Update.
823
5ef9273d
TBA
8242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
825
826 * target.h (class process_target): New class definition.
827 (struct process_stratum_target) <pt>: New field with type
828 'process_target*'.
829 * linux-low.h (class linux_process_target): Define as a derived
830 class of 'process_target'.
831 * linux-low.cc (linux_target_ops): Add a linux_process_target*
832 as the 'pt' field.
833 * lynx-low.h (class lynx_process_target): Define as a derived
834 class of 'process_target'.
835 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
836 as the 'pt' field.
837 * nto-low.h (class nto_process_target): Define as a derived
838 class of 'process_target'.
839 * nto-low.cc (nto_target_ops): Add an nto_process_target*
840 as the 'pt' field.
841 * win32-low.h (class win32_process_target): Define as a derived
842 class of 'process_target'.
843 * win32-low.cc (win32_target_ops): Add a win32_process_target*
844 as the 'pt' field.
845
9f1528a1
AB
8462020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
847
848 * configure: Regenerate.
849
bf84f706
MR
8502020-02-19 Maciej W. Rozycki <macro@wdc.com>
851 Andrew Burgess <andrew.burgess@embecosm.com>
852
853 * linux-riscv-low.cc: New file.
854 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
855 and nat/riscv-linux-tdesc.c.
856 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
857 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
858 Define.
859
1a627e7e
TT
8602020-02-14 Tom Tromey <tom@tromey.com>
861
862 * acinclude.m4: Don't include acx_configure_dir.m4.
863 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
864 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
865 (all, install-only, uninstall, clean-info, clean)
866 (maintainer-clean): Don't recurse.
867 (subdir_do, all-lib): Remove.
868 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
869 (GNULIB_H): Remove.
870 (generated_files): Update.
871 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
872 * configure: Rebuild.
873 * configure.ac: Don't configure gnulib or libiberty.
874 (GNULIB): Update.
875
a9b34532
EZ
8762020-02-14 Eli Zaretskii <eliz@gnu.org>
877
878 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
879 preparing the command line for CreateProcess.
880 (win32_create_inferior): Reflect the program name in debugging
881 output that shows the process and its command line.
882
feacfcac
SM
8832020-02-13 Simon Marchi <simon.marchi@efficios.com>
884
885 * Makefile.in: Rename source files from .c to .cc.
886 * %.c: Rename to %.cc.
887 * configure.ac: Rename server.c to server.cc.
888 * configure: Re-generate.
889
06b3c5bd
SM
8902020-02-13 Simon Marchi <simon.marchi@efficios.com>
891
892 * Makefile.in: Rename gdbsupport source files from .c to .cc.
893
052793ad
HD
8942020-02-12 Hannes Domani <ssbssa@yahoo.de>
895
896 * win32-low.c (win32_create_inferior): Set signal_pid.
897
f20e3e82
MR
8982020-02-12 Maciej W. Rozycki <macro@wdc.com>
899 Pedro Alves <palves@redhat.com>
900
901 Skip building gdbserver in a cross-configuration.
902 * configure.srv: Set $gdbserver_host depending on whether $target
903 is $host. Use $gdbserver_host instead of $host.
904
8ddd8e0e
SM
9052020-02-11 Simon Marchi <simon.marchi@efficios.com>
906
907 * configure: Re-generate.
908
898e7f60
SM
9092020-02-11 Simon Marchi <simon.marchi@efficios.com>
910
911 * configure: Re-generate.
912
58df732b
SM
9132020-02-11 Simon Marchi <simon.marchi@efficios.com>
914
915 * acinclude.m4: Update warning.m4 path.
916
7928d571
HD
9172020-02-09 Hannes Domani <ssbssa@yahoo.de>
918
919 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
920 (handle_exception): Set siginfo_er.
921 (win32_xfer_siginfo): New function.
922
919adfe8
TT
9232020-02-07 Tom Tromey <tom@tromey.com>
924 Pedro Alves <palves@redhat.com>
925
926 * README: Update build documentation.
927 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
928 host, not target.
929 * configure.ac: Update paths.
930 * configure: Rebuild.
931 * acinclude.m4: Update paths.
932 * Makefile.in: Update include paths.
933 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
934 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
935 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
936 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
937 (%-generated.c): Update paths.
938 * Move entire directory from ../gdb/gdbserver.
939
287c844a
MR
9402020-01-29 Maciej W. Rozycki <macro@wdc.com>
941
942 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
943
548a204f
PFC
9442020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
945
946 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
947 assignment instead of srv_linux_obj.
948
a2236a08
HD
9492020-01-28 Hannes Domani <ssbssa@yahoo.de>
950
951 * server.c (handle_qxfer_libraries): Write segment-address with
952 paddress.
953
bdaed379
HD
9542020-01-24 Hannes Domani <ssbssa@yahoo.de>
955
956 * Makefile.in (install-strip): New target.
957 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
958 * aclocal.m4: Regenerate.
959 * configure: Regenerate.
960 * configure.ac: Add AM_PROG_INSTALL_STRIP.
961
42cd72aa
MR
9622020-01-24 Maciej W. Rozycki <macro@wdc.com>
963
964 * Makefile.in (SFILES): Adjust paths to point to real files.
965 (OBS): Move waitstatus.o to target/waitstatus.o.
966 (TAGS): Transform paths appropriately.
967 (%.o): Rename to...
968 (nat/%.o): ... this pattern rule.
969 (%.o): Rename to...
970 (target/%.o): ... this pattern rule.
971 * configure.srv: Adjust paths throughout to include nat/ prefix
972 with the revant files.
973 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
974 * configure: Regenerate.
975
42ba50ec
MR
9762020-01-24 Maciej W. Rozycki <macro@wdc.com>
977
978 * Makefile.in (TAGS): Remove config files from the recipe.
979
05ea2a05
TT
9802020-01-14 Tom Tromey <tom@tromey.com>
981
982 * configure: Rebuild.
983 * configure.ac: Remove any checks that were added to common.m4.
984 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
985 lib-link.m4.
986
01027315
TT
9872020-01-14 Tom Tromey <tom@tromey.com>
988
989 * server.h: Include config.h.
990 * gdbreplay.c: Include config.h.
991 * configure: Rebuild.
992 * configure.ac: Don't source common.host.
993 * acinclude.m4: Update path.
994 * Makefile.in (INCSUPPORT): New variable.
995 (INCLUDE_CFLAGS): Add INCSUPPORT.
996 (SFILES): Update paths.
997 (version-generated.c): Update path to create-version.sh.
998 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
999
b2ceabe8
TT
10002020-01-14 Tom Tromey <tom@tromey.com>
1001
1002 * configure.ac (LIBS): Use WIN32APILIBS.
1003 (USE_WIN32API): Don't define.
1004 * configure: Rebuild.
1005
25c51f71
TT
10062020-01-14 Tom Tromey <tom@tromey.com>
1007
1008 * configure: Rebuild.
1009
c0bd321d
SM
10102020-01-13 Simon Marchi <simon.marchi@efficios.com>
1011
1012 * Makefile.in (%-generated.c): Remove rule for files from
1013 regformats/i386.
1014
bb564c58
SM
10152020-01-13 Simon Marchi <simon.marchi@efficios.com>
1016
1017 * configure: Re-generate.
1018
6e37c371
SM
10192020-01-13 Simon Marchi <simon.marchi@efficios.com>
1020
1021 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1022 Define to static.
1023 * tracepoint.c (stop_tracing, flush_trace_buffer,
1024 about_to_request_buffer_space, get_trace_state_variable_value,
1025 set_trace_state_variable_value, gdb_collect): Add declaration.
1026
df4a0200
SM
10272020-01-13 Simon Marchi <simon.marchi@efficios.com>
1028
1029 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1030 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1031 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1032 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1033 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1034 static.
1035
89e94ec9
SM
10362020-01-13 Simon Marchi <simon.marchi@efficios.com>
1037
1038 * inferiors.c: Include gdbsupport/common-inferior.h.
1039
2552728a
SM
10402020-01-13 Simon Marchi <simon.marchi@efficios.com>
1041
1042 * hostio-errno.c: Include hostio.h.
1043
4025fa09
SM
10442020-01-13 Simon Marchi <simon.marchi@efficios.com>
1045
1046 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1047 prerequisite.
1048
c0b0a142
SM
10492020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1050
1051 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1052 * linux-arm-tdesc.h: Include arch/arm.h.
1053
bb1183e2
SM
10542020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1055
1056 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1057
f5df0b5f
SM
10582020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1059
1060 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1061 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1062
5b6d1e4f
PA
10632020-01-10 Pedro Alves <palves@redhat.com>
1064
1065 * fork-child.c (post_fork_inferior): Pass target down to
1066 startup_inferior.
1067 * inferiors.c (switch_to_thread): Add process_stratum_target
1068 parameter.
1069 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1070 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1071 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1072 * remote-utils.c (prepare_resume_reply): Pass the target to
1073 switch_to_thread.
1074 * target.c (the_target): Now a process_stratum_target.
1075 (done_accessing_memory): Pass the target to switch_to_thread.
1076 (set_target_ops): Ajust to use process_stratum_target.
1077 * target.h (struct target_ops): Rename to ...
1078 (struct process_stratum_target): ... this.
1079 (the_target, set_target_ops): Adjust.
1080 (prepare_to_access_memory): Adjust comment.
1081 * win32-low.c (child_xfer_memory): Adjust to use
1082 process_stratum_target.
1083 (win32_target_ops): Now a process_stratum_target.
1084
559e7e50
EZ
10852020-01-06 Eli Zaretskii <eliz@gnu.org>
1086 Pedro Alves <palves@redhat.com>
1087
1088 * win32-low.c (get_child_debug_event): Extract the fatal exception
1089 from the exit status and convert to the equivalent Posix signal
1090 number.
1091 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1092 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1093
48189bec
HD
10942020-01-01 Hannes Domani <ssbssa@yahoo.de>
1095
1096 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1097
5dd8bf88
JB
10982020-01-01 Joel Brobecker <brobecker@adacore.com>
1099
1100 * server.c (gdbserver_version): Change copyright year to 2020.
1101 * gdbreplay.c (gdbreplay_version): Likewise.
1102
0ad6b8ee
CB
11032019-12-19 Christian Biesinger <cbiesinger@google.com>
1104
1105 * configure: Regenerate.
1106 * configure.ac: Quote variable arguments of test.
1107
1ee7b812
BE
11082019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1109
1110 * Makefile.in: Fix build with GNU Make 3.81
1111
d9fa87f4
TT
11122019-12-16 Tom Tromey <tromey@adacore.com>
1113
1114 * server.c (get_exec_file): Constify result.
1115
ab7d13f0
CB
11162019-12-10 Christian Biesinger <cbiesinger@google.com>
1117
1118 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1119 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1120 * config.in: Regenerate.
1121 * configure: Regenerate.
1122 * configure.ac: Don't check for strerror.
1123 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1124 Call safe_strerror instead of strerror.
1125 * server.h (strerror): Remove this now-unnecessary declaration.
1126 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1127 strerror.
1128 (gdb_agent_helper_thread): Likewise.
1129 * utils.c (perror_with_name): Likewise.
1130
4da8c3a8
TT
11312019-11-26 Tom Tromey <tom@tromey.com>
1132
1133 * configure, config.in: Rebuild.
1134
21987b9c
TT
11352019-11-26 Tom Tromey <tom@tromey.com>
1136
1137 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1138 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1139 gdb_sigmask.
1140 * configure, config.in: Rebuild.
1141
5e030278
TT
11422019-11-26 Tom Tromey <tom@tromey.com>
1143
1144 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1145 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1146 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1147 * acinclude.m4: Include ax_pthread.m4.
1148 * config.in, configure: Rebuild.
1149
6d91ce9a
CB
11502019-11-26 Christian Biesinger <cbiesinger@google.com>
1151
1152 * debug.c (debug_set_output): Call safe_strerror instead of
1153 strerror.
1154 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1155 (linux_kill_one_lwp): Likewise.
1156 (linux_detach_one_lwp): Likewise.
1157 (linux_wait_for_event_filtered): Likewise.
1158 (store_register): Likewise.
1159 * lynx-low.c (lynx_attach): Likewise.
1160 * mem-break.c (insert_memory_breakpoint): Likewise.
1161 (remove_memory_breakpoint): Likewise.
1162 (delete_fast_tracepoint_jump): Likewise.
1163 (set_fast_tracepoint_jump): Likewise.
1164 (uninsert_fast_tracepoint_jumps_at): Likewise.
1165 (reinsert_fast_tracepoint_jumps_at): Likewise.
1166 * nto-low.c (nto_xfer_memory): Likewise.
1167 (nto_resume): Likewise.
1168
6cdd651f
LM
11692019-11-20 Luis Machado <luis.machado@linaro.org>
1170
1171 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1172 instead of register count.
1173 * tdesc.c (tdesc_contains_feature): New function.
1174 * tdesc.h (tdesc_contains_feature): New prototype.
1175
cd850b40
CB
11762019-11-15 Christian Biesinger <cbiesinger@google.com>
1177
1178 * Makefile.in: Add safe-strerror.c.
1179 * configure: Regenerate.
1180 * configure.ac: Don't source common.host.
1181
5abebf3c
CB
11822019-11-15 Christian Biesinger <cbiesinger@google.com>
1183
1184 * config.in: Regenerate.
1185 * configure: Regenerate.
1186
e06f3d6e
AB
11872019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1188
1189 * ax.c (ax_printf): Handle size_t_arg.
1190
ca3a04f6
CB
11912019-11-06 Christian Biesinger <cbiesinger@google.com>
1192
1193 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1194 * mi/mi-main.c (output_cores): Likewise.
1195 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1196 (linux_xfer_osdata_modules): Likewise.
1197 * remote.c (register_remote_support_xml): Likewise.
1198 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1199 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1200
e48f6033
CB
12012019-11-01 Christian Biesinger <cbiesinger@google.com>
1202
1203 * configure: Regenerate.
1204 * configure.ac: Remove check for strerror_r.
1205
e7e97a2e
CB
12062019-10-31 Christian Biesinger <cbiesinger@google.com>
1207
1208 * config.in: Regenerate.
1209 * configure: Regenerate.
1210 * configure.ac: Also check for strerror_r.
1211
75cafaa6
CB
12122019-10-31 Christian Biesinger <cbiesinger@google.com>
1213
1214 * ax.h (debug_agent): Remove duplicate declaration.
1215
30baf67b
TV
12162019-10-26 Tom de Vries <tdevries@suse.de>
1217
1218 * linux-aarch64-low.c: Fix typos in comments.
1219 * linux-arm-low.c: Same.
1220 * linux-low.c: Same.
1221 * linux-ppc-low.c: Same.
1222 * proc-service.c: Same.
1223 * regcache.h: Same.
1224 * server.c: Same.
1225 * tracepoint.c: Same.
1226 * win32-low.c: Same.
1227
52c64cf7
TT
12282019-10-25 Tom Tromey <tromey@adacore.com>
1229
1230 * utils.c (xstrdup): Remove.
1231
c12d372d
TT
12322019-10-23 Tom Tromey <tom@tromey.com>
1233
1234 * configure, config.in: Rebuild.
1235
4d0b984b
TT
12362019-10-23 Tom Tromey <tom@tromey.com>
1237
1238 * configure: Rebuild.
1239 * acinclude.m4: Use m4_include, not sinclude.
1240
c5adaa19
TT
12412019-10-17 Tom Tromey <tromey@adacore.com>
1242
1243 * configure: Rebuild.
1244 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1245 in AC_CONFIG_FILES invocation.
1246 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1247 invocation.
1248
fec4e896
CB
12492019-10-16 Christian Biesinger <cbiesinger@google.com>
1250
1251 * server.c: Include xml-builtin.h.
1252 (get_xml_features): Don't declare xml_builtins here.
1253
00975ff6
AB
12542019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1255
1256 * Makefile.in: Remove references to vec-ipa.o.
1257
0dc32745
AB
12582019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1259
1260 * Makefile.in: Remove references to vec.c.
1261
3e6ec53a
CB
12622019-10-02 Christian Biesinger <cbiesinger@google.com>
1263
1264 * server.c (server_waiting): Change to bool.
1265 (extended_protocol): Likewise.
1266 (response_needed): Likewise.
1267 (exit_requested): Likewise.
1268 (run_once): Likewise.
1269 (report_no_resumed): Likewise.
1270 (non_stop): Likewise.
1271 (disable_packet_vCont): Likewise.
1272 (disable_packet_Tthread): Likewise.
1273 (disable_packet_qC): Likewise.
1274 (disable_packet_qfThreadInfo): Likewise.
1275 (handle_general_set): Update.
1276 (handle_detach): Update.
1277 (handle_monitor_command): Update.
1278 (handle_query): Update.
1279 (captured_main): Update.
1280 (process_serial_event): Update.
1281 * server.h (server_waiting): Change to bool.
1282 (disable_packet_vCont): Likewise.
1283 (disable_packet_Tthread): Likewise.
1284 (disable_packet_qC): Likewise.
1285 (disable_packet_qfThreadInfo): Likewise.
1286 (run_once): Likewise.
1287 (non_stop): Likewise.
1288 * target.c (target_stop_and_wait): Update.
1289
80fd2826
TT
12902019-10-02 Tom Tromey <tromey@adacore.com>
1291
1292 * Makefile.in (SFILES): Add common-inferior.c.
1293 (OBS): Add common-inferior.o.
1294 * server.c (startup_with_shell): Don't define.
1295
46f29a9a
AB
12962019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1297
1298 * linux-low.c (linux_low_read_btrace): Update for change to
1299 std::vector.
1300
f9d949fb
CB
13012019-09-20 Christian Biesinger <cbiesinger@google.com>
1302
1303 * debug.c (debug_threads): Remove comment in favor of the header.
1304 * debug.h (using_threads): Add declaration.
1305 (debug_threads): Add comment.
1306 * linux-aarch64-low.c: Include debug.h and remove declaration of
1307 debug_threads.
1308 * nto-low.c: Likewise.
1309 * remote-utils.c: Likewise.
1310 * thread-db.c: Likewise.
1311
abf516c6
UW
13122019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1313
1314 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1315 and powerpc-cell64l-ipa.o.
1316 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1317 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1318 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1319 (spu*-*-*): Remove.
1320
1321 * spu-low.c: Remove file.
1322
1323 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1324 (parse_spufs_run): Remove.
1325 (ppc_get_pc): Remove Cell/B.E. support.
1326 (ppc_set_pc): Likewise.
1327 (ppc_breakpoint_at): Likewise.
1328 (ppc_arch_setup): Likewise.
1329 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1330 tdesc_powerpc_cell32l.
1331 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1332 or init_registers_powerpc_cell32l.
1333 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1334 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1335 or init_registers_powerpc_cell32l.
1336 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1337 (init_registers_powerpc_cell32l): Remove prototype.
1338 (init_registers_powerpc_cell64l): Likewise.
1339
1340 * target.h (struct target_ops): Remove qxfer_spu member.
1341 * server.c (handle_qxfer_spu): Remove.
1342 (qxfer_packets): Remove entry for "spu".
1343 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1344 * linux-low.c (SPUFS_MAGIC): Remove.
1345 (spu_enumerate_spu_ids): Remove.
1346 (linux_qxfer_spu): Remove.
1347 (linux_target_ops): Remove qxfer_spu member.
1348 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1349 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1350 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1351
2d41fa11
SDJ
13522019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1353
1354 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1355 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1356 * config.in: Regenerate.
1357 * configure: Regenerate.
1358
d59b55f0
TT
13592019-08-15 Tom Tromey <tromey@adacore.com>
1360
1361 * target.c (target_write_memory): Use gdb::byte_vector.
1362
4196ab2a
TT
13632019-08-15 Tom Tromey <tromey@adacore.com>
1364
1365 * tracepoint.c (write_inferior_data_pointer)
1366 (write_inferior_integer, write_inferior_int8)
1367 (write_inferior_uinteger, m_tracepoint_action_download)
1368 (r_tracepoint_action_download, x_tracepoint_action_download)
1369 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1370 (download_agent_expr, download_tracepoint_1)
1371 (download_trace_state_variables, upload_fast_traceframes): Update.
1372 * server.c (gdb_write_memory): Update.
1373 * remote-utils.c (relocate_instruction): Update.
1374 * proc-service.c (ps_pdwrite): Update.
1375 * mem-break.c (remove_memory_breakpoint)
1376 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1377 (uninsert_fast_tracepoint_jumps_at)
1378 (reinsert_fast_tracepoint_jumps_at): Update.
1379 * linux-x86-low.c (append_insns)
1380 (i386_install_fast_tracepoint_jump_pad)
1381 (amd64_write_goto_address, i386_write_goto_address): Update.
1382 * linux-s390-low.c (append_insns, s390_write_goto_address):
1383 Update.
1384 * linux-ppc-low.c (ppc_relocate_instruction)
1385 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1386 (ppc_write_goto_address): Update.
1387 * linux-aarch64-low.c (append_insns): Update.
1388 * target.h (struct target_ops): Update.
1389 (write_inferior_memory): Don't declare.
1390 * target.c (target_write_memory): Rename from
1391 write_inferior_memory. Remove old target_write_memory.
1392
c6778d00
TT
13932019-08-15 Tom Tromey <tromey@adacore.com>
1394
1395 * target.c (write_inferior_memory): Use std::vector.
1396
404f2902
FCE
13972019-08-06 Frank Ch. Eigler <fche@redhat.com>
1398
1399 PR build/24886
1400 * configure.ac: Drop enable-libmcheck support.
1401 * configure, config.in: Rebuild.
1402 * acinclude.m4: Don't include it.
1403
4c5aa8e0
AH
14042019-07-19 Alan Hayward <alan.hayward@arm.com>
1405
1406 * configure.srv: Remove Arm xml files.
1407
7cc17433
AH
14082019-07-19 Alan Hayward <alan.hayward@arm.com>
1409
1410 * configure.srv: Add new files. Remove xml generated files.
1411 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1412 registers.
1413 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1414 * linux-aarch32-tdesc.c: New file.
1415 * linux-aarch32-tdesc.h: New file.
1416 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1417 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1418 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1419 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1420 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1421 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1422 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1423 (arm_read_description): Call arm_linux_read_description.
1424 (initialize_low_arch): Don't init registers.
1425 * linux-arm-tdesc.c: New file.
1426 * linux-arm-tdesc.h: New file.
1427
166a82be
AH
14282019-07-10 Alan Hayward <alan.hayward@arm.com>
1429
1430 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1431 Move counter inside for.
1432 (arm_read_description): Check ptrace earlier.
1433 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1434
268a13a5
TT
14352019-07-09 Tom Tromey <tom@tromey.com>
1436
1437 * configure: Rebuild.
1438 * configure.ac: Change common to gdbsupport.
1439 * acinclude.m4: Change common to gdbsupport.
1440 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1441 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1442 common to gdbsupport.
1443 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1444 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1445 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1446 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1447 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1448 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1449 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1450 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1451 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1452 common to gdbsupport.
1453
350fab54
AH
14542019-07-04 Alan Hayward <alan.hayward@arm.com>
1455
1456 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1457 defines.
1458 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1459
2b40fda7
AH
14602019-07-04 Alan Hayward <alan.hayward@arm.com>
1461
1462 * configure.srv: Remove legacy xml.
1463 * linux-aarch64-low.c (initialize_low_arch): Remove
1464 initialize_low_tdesc call.
1465 * linux-aarch64-tdesc-selftest.c: Remove file.
1466 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1467 * linux-x86-low.c (initialize_low_arch): Remove
1468 initialize_low_tdesc call.
1469 * linux-x86-tdesc-selftest.c: Remove file.
1470 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1471
7d10623d
TV
14722019-06-20 Tom de Vries <tdevries@suse.de>
1473
1474 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1475 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1476
8d6a48df
TV
14772019-06-19 Tom de Vries <tdevries@suse.de>
1478
1479 * debug.h (debug_write): Change return type to ssize_t.
1480 * debug.c (debug_write): Same.
1481
73cc7272
TT
14822019-06-14 Tom Tromey <tom@tromey.com>
1483
1484 * configure.ac: Use new path to gnulib.
1485 * configure: Rebuild.
1486 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1487 to gnulib.
1488
08f10e02
TT
14892019-06-11 Tom Tromey <tom@tromey.com>
1490
1491 * Makefile.in (SFILES): Add alloc.c.
1492 (OBS): Add alloc.o.
1493 (IPA_OBJS): Add alloc-ipa.o.
1494 (alloc-ipa.o): New target.
1495 (%.o: ../%.c): New pattern rule.
1496
422186a9
TT
14972019-06-10 Tom Tromey <tromey@adacore.com>
1498
1499 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1500 end warning with a newline.
1501 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1502 newline.
1503 * thread-db.c (attach_thread): Don't end warning with a newline.
1504 (thread_db_notice_clone): Likewise.
1505 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1506 newline.
1507 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1508 end warning with a newline.
1509
b02f78f9
PA
15102019-06-04 Pedro Alves <palves@redhat.com>
1511
1512 * server.c (captured_main): Use make_unique_xstrdup.
1513
88ed7edb
TT
15142019-06-02 Tom Tromey <tom@tromey.com>
1515
1516 * gdbreplay.c (fromhex): Remove.
1517 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1518
33a6bc35
TT
15192019-05-29 Tom Tromey <tromey@adacore.com>
1520
1521 * configure: Rebuild.
1522
e90a813d
KB
15232019-05-06 Kevin Buettner <kevinb@redhat.com>
1524
1525 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1526 sign extension code on 32-bit builds.
1527
353ea2d1
EZ
15282019-05-03 Eli Zaretskii <eliz@gnu.org>
1529
1530 * remote-utils.c:
1531 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1532
b494cdff
TT
15332019-04-19 Tom Tromey <tom@tromey.com>
1534
1535 * server.c (struct vstop_notif): Derive from notif_event.
1536 <base>: Remove.
1537 (queue_stop_reply): Update.
1538 (remove_all_on_match_ptid): Change type. Rewrite.
1539 (discard_queued_stop_replies): Rewrite.
1540 (in_queued_stop_replies_ptid): Change type.
1541 (in_queued_stop_replies): Rewrite.
1542 (notif_stop): Update.
1543 (queue_stop_reply_callback): Update.
1544 (captured_main): Don't call initialize_notif.
1545 (push_stop_notification): Update.
1546 * notif.c (notif_write_event, handle_notif_ack)
1547 (notif_event_enque, notif_push): Update.
1548 (notif_event_xfree, initialize_notif): Remove.
1549 * notif.h (struct notif_event): Include <list>, not
1550 "common/queue.h".
1551 (struct notif_server) <queue>: Now a std::list.
1552 (notif_event_p): Remove typedef.
1553 (initialize_notif): Don't declare.
1554 (struct notif_event): Add virtual destructor.
1555
a7e559cc
AH
15562019-04-17 Alan Hayward <alan.hayward@arm.com>
1557
1558 * ax.c (ax_vdebug): Call debug_printf.
1559 * debug.c (debug_write): New function.
1560 * debug.h (debug_write): New declaration.
1561 * linux-low.c (sigchld_handler): Call debug_write.
1562
aeb2e706
AH
15632019-04-17 Alan Hayward <alan.hayward@arm.com>
1564
1565 * debug.c (debug_set_output): New function.
1566 (debug_vprintf): Send output to debug_file.
1567 (debug_flush): Likewise.
1568 * debug.h (debug_set_output): New declaration.
1569 * server.c (handle_monitor_command): Add debug-file option.
1570 (captured_main): Likewise.
1571
c1bc0935
AH
15722019-04-17 Alan Hayward <alan.hayward@arm.com>
1573
1574 * debug.c (remote_debug): Add definition.
1575 * debug.h (remote_debug): Add declaration.
1576 * hostio.c (remote_debug): Remove declaration.
1577 * remote-utils.c (struct ui_file): Likewise.
1578 (remote_debug): Likewise.
1579 * remote-utils.h (remote_debug): Likewise,
1580 * server.c (remote_debug): Remove definition.
1581
3f52fdbc
KB
15822019-04-10 Kevin Buettner <kevinb@redhat.com>
1583
1584 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1585 when using a 64-bit gdbserver.
1586
b0319eaa
TT
15872019-04-09 Tom Tromey <tromey@adacore.com>
1588
1589 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1590
eedc3f4f
TT
15912019-04-08 Tom Tromey <tom@tromey.com>
1592
1593 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1594 throw.
1595 (linux_resume_one_lwp): Likewise.
1596
230d2906
TT
15972019-04-08 Tom Tromey <tom@tromey.com>
1598
1599 * gdbreplay.c: Update.
1600 * linux-low.c: Update.
1601 * server.c: Update.
1602
a70b8144
TT
16032019-04-08 Tom Tromey <tom@tromey.com>
1604
1605 * server.c: Use C++ exception handling.
1606 * linux-low.c: Use C++ exception handling.
1607 * gdbreplay.c: Use C++ exception handling.
1608
3d6e9d23
TT
16092019-04-08 Tom Tromey <tom@tromey.com>
1610
1611 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1612 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1613 (captured_main, main): Update.
1614 * gdbreplay.c (main): Update.
1615
0570503d
PFC
16162019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1617
1618 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1619 value in argument pointer, return 1 if the entry is found and 0
1620 otherwise. Move comment.
1621 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1622 * linux-low.h (linux_get_auxv): Declare.
1623 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1624
227a9e65
TT
16252019-04-05 Tom Tromey <tromey@adacore.com>
1626
1627 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1628 variables.
1629
69f4c9cc
AH
16302019-03-28 Alan Hayward <alan.hayward@arm.com>
1631
1632 * linux-low.c (AT_HWCAP2): Add define if not already included.
1633
974c89e0
AH
16342019-03-26 Alan Hayward <alan.hayward@arm.com>
1635
1636 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1637 (aarch64_arch_setup): Call linux_get_hwcap.
1638 * linux-arm-low.c (arm_get_hwcap): Remove function.
1639 (arm_read_description): Call linux_get_hwcap.
1640 * linux-low.c (linux_get_auxv): New function.
1641 (linux_get_hwcap): Likewise.
1642 (linux_get_hwcap2): Likewise.
1643 * linux-low.h (linux_get_hwcap): New declaration.
1644 (linux_get_hwcap2): Likewise.
1645 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1646 (ppc_arch_setup): Call linux_get_hwcap.
1647 * linux-s390-low.c (s390_get_hwcap): Remove function.
1648 (s390_arch_setup): Call linux_get_hwcap.
1649
1ef53e6b
AH
16502019-03-22 Alan Hayward <alan.hayward@arm.com>
1651 Jiong Wang <jiong.wang@arm.com>
1652
1653 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1654 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1655 to fail.
1656 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1657
ee4fbcfa
AH
16582019-03-22 Alan Hayward <alan.hayward@arm.com>
1659 Jiong Wang <jiong.wang@arm.com>
1660
1661 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1662 (aarch64_get_hwcap): New function.
1663 (aarch64_arch_setup): Read APIA hwcap.
1664
6dc0ebde
AH
16652019-03-22 Alan Hayward <alan.hayward@arm.com>
1666 Jiong Wang <jiong.wang@arm.com>
1667
1668 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1669 (initialize_low_tracepoint): Likewise.
1670 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1671 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1672 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1673 (aarch64_linux_read_description): Likewise.
1674 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1675
1163a4b7
JB
16762019-03-12 John Baldwin <jhb@FreeBSD.org>
1677
1678 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1679 i386_create_target_description for 'segments' parameter.
1680 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1681 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1682 * win32-i386-low.c (i386_arch_setup): Likewise.
1683
d3a70e03
TT
16842019-03-12 Tom Tromey <tromey@adacore.com>
1685
1686 * linux-low.c (iterate_over_lwps): Update.
1687
37991b4f
TT
16882019-03-06 Tom Tromey <tom@tromey.com>
1689
1690 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1691 (captured_main): Use SCOPE_EXIT.
1692
45950eb6
SDJ
16932019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1694
1695 * configure.srv: Use '$enable_unittest' instead of '$development'
1696 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1697 case.
1698
43ac54fc
TT
16992019-02-27 Tom Tromey <tromey@adacore.com>
1700
1701 * gdbreplay.c (logchar): Handle \r\n.
1702
df0da8a2
AH
17032019-02-07 Alan Hayward <alan.hayward@arm.com>
1704
1705 * linux-low.c (linux_attach): Add process before lwp.
1706 * server.c (attach_inferior): Check if already attached.
1707
1a5c2598
TT
17082019-02-07 Tom Tromey <tom@tromey.com>
1709
1710 * x86-tdesc.h: Rename include guard.
1711 * x86-low.h: Add include guard.
1712 * wincecompat.h: Rename include guard.
1713 * win32-low.h: Add include guard.
1714 * utils.h: Rename include guard.
1715 * tracepoint.h: Rename include guard.
1716 * tdesc.h: Rename include guard.
1717 * target.h: Rename include guard.
1718 * server.h: Rename include guard.
1719 * remote-utils.h: Rename include guard.
1720 * regcache.h: Rename include guard.
1721 * nto-low.h: Rename include guard.
1722 * notif.h: Add include guard.
1723 * mem-break.h: Rename include guard.
1724 * lynx-low.h: Add include guard.
1725 * linux-x86-tdesc.h: Add include guard.
1726 * linux-s390-tdesc.h: Add include guard.
1727 * linux-ppc-tdesc-init.h: Add include guard.
1728 * linux-low.h: Add include guard.
1729 * linux-aarch64-tdesc.h: Add include guard.
1730 * linux-aarch32-low.h: Add include guard.
1731 * inferiors.h: Rename include guard.
1732 * i387-fp.h: Rename include guard.
1733 * hostio.h: Rename include guard.
1734 * gdbthread.h: Rename include guard.
1735 * gdb_proc_service.h: Rename include guard.
1736 * event-loop.h: Rename include guard.
1737 * dll.h: Rename include guard.
1738 * debug.h: Rename include guard.
1739 * ax.h: Rename include guard.
1740
956cc47c
SN
17412018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1742
1743 PR gdb/23985
1744 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1745 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1746
a0707f3c
TT
17472019-01-25 Tom Tromey <tom@tromey.com>
1748
1749 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1750
0747795c
TT
17512019-01-25 Tom Tromey <tom@tromey.com>
1752
1753 * win32-low.c: Fix common/ includes.
1754 * win32-i386-low.c: Fix common/ includes.
1755 * tracepoint.c: Fix common/ includes.
1756 * thread-db.c: Fix common/ includes.
1757 * target.h: Fix common/ includes.
1758 * symbol.c: Fix common/ includes.
1759 * spu-low.c: Fix common/ includes.
1760 * server.h: Fix common/ includes.
1761 * server.c: Fix common/ includes.
1762 * remote-utils.c: Fix common/ includes.
1763 * regcache.h: Fix common/ includes.
1764 * regcache.c: Fix common/ includes.
1765 * nto-x86-low.c: Fix common/ includes.
1766 * notif.h: Fix common/ includes.
1767 * mem-break.h: Fix common/ includes.
1768 * lynx-low.c: Fix common/ includes.
1769 * lynx-i386-low.c: Fix common/ includes.
1770 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1771 * linux-x86-low.c: Fix common/ includes.
1772 * linux-low.c: Fix common/ includes.
1773 * inferiors.h: Fix common/ includes.
1774 * i387-fp.c: Fix common/ includes.
1775 * hostio.c: Fix common/ includes.
1776 * hostio-errno.c: Fix common/ includes.
1777 * gdbthread.h: Fix common/ includes.
1778 * gdbreplay.c: Fix common/ includes.
1779 * fork-child.c: Fix common/ includes.
1780 * event-loop.c: Fix common/ includes.
1781 * ax.c:
1782 (enum gdb_agent_op): Fix common/ includes.
1783
be6d4f74
TT
17842019-01-21 Tom Tromey <tom@tromey.com>
1785
1786 * tracepoint.c: Fix includes.
1787 * remote-utils.c: Fix includes.
1788 * linux-x86-low.c: Fix includes.
1789
66d91b39
JB
17902019-01-01 Joel Brobecker <brobecker@adacore.com>
1791
1792 * gdbreplay.c (gdbreplay_version): Update copyright year in
1793 version message.
1794 * server.c (gdbserver_version): Likewise.
1795
754e3168
AH
17962018-12-05 Alan Hayward <alan.hayward@arm.com>
1797
1798 * linux-low.c (add_lwp): Switch ordering.
1799
d105de22
TT
18002018-11-29 Tom Tromey <tom@tromey.com>
1801
1802 * win32-low.c (win32_join): Take pid, not process.
1803 * target.h (struct target_ops) <join>: Change argument type.
1804 (join_inferior): Change argument name.
1805 * spu-low.c (spu_join): Take pid, not process.
1806 * server.c (handle_detach): Preserve pid before destroying
1807 process.
1808 * lynx-low.c (lynx_join): Take pid, not process.
1809 * linux-low.c (linux_join): Take pid, not process.
1810
50138245
AH
18112018-11-23 Alan Hayward <alan.hayward@arm.com>
1812
1813 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1814 (aarch64_cannot_fetch_register): Likewise.
1815 (struct linux_target_ops): Update references.
1816
64f57f3d
PFC
18172018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1818
1819 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1820
8d619c01
EBM
18212018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1822
1823 * configure.srv (ipa_ppc_linux_regobj): Add
1824 powerpc-isa207-htm-vsx32l-ipa.o and
1825 powerpc-isa207-htm-vsx64l-ipa.o.
1826 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1827 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1828 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1829 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1830 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1831 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1832 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1833 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1834 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1835 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1836 (init_registers_powerpc_isa207_htm_vsx32l)
1837 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1838 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1839 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1840 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1841 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1842 (ppc_store_tm_ctarregset): New functions.
1843 (ppc_regsets): Add entries for HTM regsets.
1844 (ppc_arch_setup): Set htm in features struct when needed. Set
1845 sizes for the HTM regsets.
1846 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1847 (initialize_low_arch): Call
1848 init_registers_powerpc_isa207_htm_vsx32l and
1849 init_registers_powerpc_isa207_htm_vsx64l.
1850 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1851 PPC_TDESC_ISA207_HTM_VSX.
1852 (initialize_low_tracepoint): Call
1853 init_registers_powerpc_isa207_htm_vsx32l and
1854 init_registers_powerpc_isa207_htm_vsx64l.
1855
232bfb86
EBM
18562018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1857
1858 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1859 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1860 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1861 (ppc_store_pmuregset): New functions.
1862 (ppc_regsets): Add entries for ebb and pmu regsets.
1863 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1864 pmu regsets are available. Set sizes for these regsets.
1865
f2cf6173
EBM
18662018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1867
1868 * configure.srv (ipa_ppc_linux_regobj): Add
1869 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1870 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1871 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1872 rs6000/powerpc-isa207-vsx32l.xml, and
1873 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1874 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1875 <PPC_TDESC_ISA207_VSX>: New enum value.
1876 (init_registers_powerpc_isa207_vsx32l): Declare.
1877 (init_registers_powerpc_isa207_vsx64l): Declare.
1878 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1879 (ppc_store_tarregset): New function.
1880 (ppc_regsets): Add entry for the TAR regset.
1881 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1882 size for the TAR regsets.
1883 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1884 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1885 and init_registers_powerpc_isa207_vsx64l.
1886 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1887 (initialize_low_tracepoint): Call
1888 init_registers_powerpc_isa207_vsx32l and
1889 init_registers_powerpc_isa207_vsx64l.
1890
7ca18ed6
EBM
18912018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1892 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1893
1894 * configure.srv (ipa_ppc_linux_regobj): Add
1895 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1896 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1897 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1898 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1899 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1900 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1901 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1902 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1903 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1904 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1905 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1906 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1907 (ppc_hwcap): Add comment.
1908 (ppc_hwcap2): New global.
1909 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1910 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1911 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1912 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1913 when needed. Set sizes for the the DSCR and PPR regsets.
1914 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1915 (initialize_low_arch): Call
1916 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1917 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1918 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1919 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1920 (initialize_low_tracepoint): Call
1921 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1922 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1923
5c849b22
PFC
19242018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1925
1926 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1927
8ecfd7bd
SDJ
19282018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1929 Simon Marchi <simark@simark.ca>
1930
1931 * acinclude.m4: Include "../selftest.m4".
1932 * configure: Regenerate.
1933 * configure.ac: Use "GDB_AC_SELFTEST".
1934 * configure.srv: Use "$enable_unittests" instead of
1935 "$development" when checking whether unit tests have been
1936 enabled.
1937 * server.c (captured_main): Update message informing that
1938 selftests have been disabled.
1939
96643e35
TT
19402018-10-04 Tom Tromey <tom@tromey.com>
1941
1942 * configure: Rebuild.
1943
da4ae14a
TT
19442018-10-04 Tom Tromey <tom@tromey.com>
1945
1946 * server.c (handle_status): Rename inner "thread".
1947 (process_serial_event): Declare "res" in 'm' case.
1948 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1949 (iterate_over_lwps): Rename inner "thread".
1950 (linux_qxfer_libraries_svr4): Rename inner "len".
1951 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1952
7c619dbd
GB
19532018-10-01 Gary Benson <gbenson@redhat.com>
1954
1955 * gdb_proc_service.h: Moved common code to
1956 common/gdb_proc_service.h.
1957
3795e814
GB
19582018-10-01 Gary Benson <gbenson@redhat.com>
1959
1960 * gdb_proc_service.h: Synchronize comments and whitespace with
1961 GDB's version of this file.
1962
49b036f1
TT
19632018-09-25 Tom Tromey <tom@tromey.com>
1964
1965 * configure: Rebuild.
1966 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1967
8ff03f0b
SM
19682018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1969
1970 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1971 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1972 ($(IPA_LIB)): Sort IPA_OBJS.
1973
a1cd91dc
SM
19742018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1975
1976 * Makefile.in: Remove references to $(ADD_DEPS).
1977
752312ba
TT
19782018-09-16 Tom Tromey <tom@tromey.com>
1979
1980 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1981 variables.
1982 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1983 variables.
1984
f1628857
TT
19852018-09-05 Tom Tromey <tom@tromey.com>
1986
1987 * configure: Rebuild.
1988
ad202fcc
SM
19892018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1990
1991 PR build/23399
1992 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1993
d3d8724a
TT
19942018-08-27 Tom Tromey <tom@tromey.com>
1995
1996 PR build/23087:
1997 * configure: Rebuild.
1998
b4f183d2
TT
19992018-08-27 Tom Tromey <tom@tromey.com>
2000
2001 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2002 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2003 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2004 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2005 (s390x_emit_stack_adjust): Add casts to unsigned char.
2006
4e2aa472
SM
20072018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2008
2009 PR gdb/23374
2010 PR gdb/23375
2011 * server.h (struct client_state) <disable_randomization>:
2012 Initialize to 1.
2013
cf4088a9
SM
20142018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2015
2016 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2017 variable.
2018 (mips_supply_ptrace_register): Likewise.
2019
a0de763e
TT
20202018-07-22 Tom Tromey <tom@tromey.com>
2021
2022 * configure: Rebuild.
2023
b0a7723d
TT
20242018-07-22 Tom Tromey <tom@tromey.com>
2025
2026 * win32-low.c (win32_create_inferior): Remove unused variables.
2027 * gdbreplay.c (remote_open): Remove unused variable.
2028 * remote-utils.c (remote_prepare): Remove unused variable.
2029 * x86-tdesc.h (X86_TDESC_H): Define.
2030 (amd64_expedite_regs): Define conditionally.
2031 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2032 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2033 * remote-utils.c (readchar): Remove unused variable.
2034
a780ef4f
PA
20352018-07-13 Pedro Alves <palves@redhat.com>
2036
2037 * linux-low.c (linux_kill): Change parameter to process_info
2038 pointer instead of pid. Adjust.
2039 * lynx-low.c (lynx_kill): Likewise.
2040 * nto-low.c (nto_kill): Likewise.
2041 * spu-low.c (spu_kill): Likewise.
2042 * win32-low.c (win32_kill): Likewise.
2043 * server.c (handle_v_kill, kill_inferior_callback)
2044 (detach_or_kill_for_exit): Adjust.
2045 * target.c (kill_inferior): Change parameter to process_info
2046 pointer instead of pid. Adjust.
2047 * target.h (struct target_ops) <kill>: Change parameter to
2048 process_info pointer instead of pid. Adjust all implementations
2049 and callers.
2050 (kill_inferior): Likewise.
2051
ef2ddb33
PA
20522018-07-13 Pedro Alves <palves@redhat.com>
2053
2054 * linux-low.c (linux_detach, linux_join): Change parameter to
2055 process_info pointer instead of pid. Adjust.
2056 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2057 * nto-low.c (nto_detach): Likewise.
2058 * spu-low.c (spu_detach, spu_join): Likewise.
2059 * win32-low.c (win32_detach, win32_join): Likewise.
2060 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2061 * target.h (struct target_ops) <detach, join>: Change parameter to
2062 process_info pointer instead of pid. Adjust all implementations
2063 and callers.
2064 (detach_inferior, join_inferior): Rename 'pid' parameter to
2065 'proc'.
2066
c7ab0aef
SDJ
20672018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2068 Jan Kratochvil <jan.kratochvil@redhat.com>
2069 Paul Fertser <fercerpav@gmail.com>
2070 Tsutomu Seki <sekiriki@gmail.com>
2071
2072 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2073 (OBS): Add 'common/netstuff.o'.
2074 (GDBREPLAY_OBS): Likewise.
2075 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2076 (remote_open): Implement support for IPv6
2077 connections.
2078 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2079 and 'wspiapi.h'.
2080 (handle_accept_event): Accept connections from IPv6 sources.
2081 (remote_prepare): Handle IPv6-style hostnames; implement
2082 support for IPv6 connections.
2083 (remote_open): Implement support for printing connections from
2084 IPv6 sources.
2085
31445d10
PA
20862018-07-11 Pedro Alves <palves@redhat.com>
2087
2088 PR gdb/23377
2089 * mem-break.c (any_persistent_commands): Add process_info
2090 parameter and use it instead of relying on the current process.
2091 Change return type to bool.
2092 * mem-break.h (any_persistent_commands): Add process_info
2093 parameter and change return type to bool.
2094 * server.c (handle_detach): Remove require_running_or_return call.
2095 Look up the process_info for the process we're about to detach.
2096 If not found, return back error to GDB. Adjust
2097 any_persistent_commands call to pass down a process pointer.
2098
cb197132
PA
20992018-07-11 Pedro Alves <palves@redhat.com>
2100
2101 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2102 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2103 instead of collect_register_by_name.
2104 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2105 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2106
1b919490
VB
21072018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2108 Pedro Alves <palves@redhat.com>
2109
2110 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2111
d7e15655
TT
21122018-07-03 Tom Tromey <tom@tromey.com>
2113
2114 * linux-low.c: Update.
2115 * lynx-low.c: Update.
2116 * mem-break.c: Update.
2117 * nto-low.c: Update.
2118 * remote-utils.c: Update.
2119 * server.c: Update.
2120 * spu-low.c: Update.
2121 * target.c: Update.
2122 * win32-low.c: Update.
2123
26a57c92
TT
21242018-07-03 Tom Tromey <tom@tromey.com>
2125
2126 * server.c: Update.
2127
0e998d96
TT
21282018-07-03 Tom Tromey <tom@tromey.com>
2129
2130 * linux-low.c: Update.
2131
cc6bcb54
TT
21322018-07-03 Tom Tromey <tom@tromey.com>
2133
2134 * target.c: Update.
2135
e38504b3
TT
21362018-07-03 Tom Tromey <tom@tromey.com>
2137
2138 * linux-low.c: Update.
2139 * linux-mips-low.c: Update.
2140 * lynx-low.c: Update.
2141 * nto-low.c: Update.
2142 * remote-utils.c: Update.
2143 * server.c: Update.
2144 * spu-low.c: Update.
2145 * target.c: Update.
2146 * thread-db.c: Update.
2147
e99b03dc
TT
21482018-07-03 Tom Tromey <tom@tromey.com>
2149
2150 * linux-low.c: Update.
2151 * linux-mips-low.c: Update.
2152 * lynx-low.c: Update.
2153 * mem-break.c: Update.
2154 * nto-low.c: Update.
2155 * remote-utils.c: Update.
2156 * server.c: Update.
2157 * spu-low.c: Update.
2158 * target.c: Update.
2159 * tracepoint.c: Update.
2160
f2907e49
TT
21612018-07-03 Tom Tromey <tom@tromey.com>
2162
2163 * linux-low.c: Update.
2164 * linux-ppc-low.c: Update.
2165 * linux-x86-low.c: Update.
2166 * proc-service.c: Update.
2167 * server.c: Update.
2168 * spu-low.c: Update.
2169 * thread-db.c: Update.
2170 * win32-low.c: Update.
2171
fd79271b
TT
21722018-07-03 Tom Tromey <tom@tromey.com>
2173
2174 * linux-low.c: Update.
2175 * lynx-low.c: Update.
2176 * nto-low.c: Update.
2177 * remote-utils.c: Update.
2178 * spu-low.c: Update.
2179 * thread-db.c: Update.
2180 * win32-low.c: Update.
2181
c0867626
SDJ
21822018-06-29 Joel Brobecker <brobecker@adacore.com>
2183
2184 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2185 parameter in call to 'amd64_create_target_description'.
2186
2512d7ef
JK
21872018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2188
2189 * x86-tdesc.h: Remove executable permission flag.
2190
d0ac1c44
SM
21912018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2192
2193 * configure.ac: Remove AC_PREREQ, add missing quoting.
2194 * configure: Re-generate.
2195 * config.in: Re-generate.
2196 * aclocal.m4: Re-generate.
2197
c4eb05ff
SM
21982018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2199
2200 * tracepoint.h (current_traceframe): Remove declaration.
2201
02895270
AH
22022018-06-18 Alan Hayward <alan.hayward@arm.com>
2203
2204 * linux-aarch64-low.c (is_sve_tdesc): New function.
2205 (aarch64_sve_regs_copy_to_regcache): Likewise.
2206 (aarch64_sve_regs_copy_from_regcache): Likewise.
2207 (aarch64_regs_info): Add SVE checks.
2208 (initialize_low_arch): Initialize SVE.
2209
e9902bfc
AH
22102018-06-18 Alan Hayward <alan.hayward@arm.com>
2211
2212 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2213
fefa175e
AH
22142018-06-11 Alan Hayward <alan.hayward@arm.com>
2215
2216 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2217 (initialize_low_tracepoint): Likewise
2218 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2219 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2220 param.
2221 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2222 checks.
2223 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2224
b91ad3ff
AH
22252018-06-11 Alan Hayward <alan.hayward@arm.com>
2226
2227 * server.h (PBUFSIZ): Increase size
2228
f868386e
AH
22292018-06-11 Alan Hayward <alan.hayward@arm.com>
2230
2231 * regcache.c (regcache::raw_compare): New function.
2232 * regcache.h (regcache::raw_compare): New declaration.
2233
9c861883
AH
22342018-06-11 Alan Hayward <alan.hayward@arm.com>
2235
2236 * regcache.c (new_register_cache): Use new.
2237 (free_register_cache): Use delete.
2238 (register_data): Use const.
2239 (supply_register): Move body inside regcache.
2240 (regcache::raw_supply): New override function.
2241 (collect_register): Move body inside regcache.
2242 (regcache::raw_collect): New override function.
2243 (regcache::get_register_status): New override function.
2244 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2245
40591844
TT
22462018-06-09 Tom Tromey <tom@tromey.com>
2247
2248 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2249 declare queue.
2250 (event_queue): Use std::queue.
2251 (gdb_event_xfree): Remove.
2252 (initialize_event_loop, process_event, wait_for_event): Update.
2253
6341380d
SC
22542018-06-08 Stan Cox <scox@redhat.com>
2255
2256 * win32-low.c (win32_create_inferior): last_ptid and last_status
2257 moved to client_state.
2258
03349c93
PA
22592018-06-08 Pedro Alves <palves@redhat.com>
2260
2261 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2262 common/common-exceptions.o, common/common-utils.o,
2263 common/errors.o, common/print-utils.o and utils.o.
2264 * gdbreplay.c: Include "common-defs.h" instead of the two
2265 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2266 string.h or alloca.h.
2267 (perror_with_name): Delete.
2268 (remote_open): Use xstrdup instead of strdup.
2269 (main): Rename to ...
2270 (captured_main): ... this.
2271 (main): New.
2272
8dcc53b3
TT
22732018-06-08 Tom Tromey <tom@tromey.com>
2274
2275 * linux-low.c (linux_low_read_btrace): Update.
2276
c12a5089
SC
22772018-06-04 Stan Cox <scox@redhat.com>
2278
2279 * server.h (struct client_state): New.
2280 * server.c (cont_thread, general_thread, multi_process)
2281 (report_fork_events, report_vfork_events, report_exec_events)
2282 (report_thread_events, swbreak_feature, hwbreak_feature)
2283 (vCont_supported, disable_randomization, pass_signals)
2284 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2285 Moved to client_state.
2286 * remote-utils.c (remote_debug, noack_mode)
2287 (transport_is_reliable): Moved to client_state.
2288 * tracepoint.c (current_traceframe): Moved to client_state.
2289
2290 Update all callers.
2291 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2292 linux-low.c, remote-utils.h, target.c: Use client_state.
2293
122394f1
AH
22942018-05-31 Alan Hayward <alan.hayward@arm.com>
2295
2296 * configure.srv: Add new c/h file.
2297
95228a0d
AH
22982018-05-31 Alan Hayward <alan.hayward@arm.com>
2299
2300 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2301 null VQ.
2302
d8dab6c3
MR
23032018-05-25 Maciej W. Rozycki <macro@mips.com>
2304
2305 * gdb.arch/mips-fpregset-core.exp: New test.
2306 * gdb.arch/mips-fpregset-core.c: New test source.
2307
81e25b7c
EK
23082018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2309
2310 PR server/23198
2311 * hostio.c (require_int): Do not report overflow for integers
2312 between 0xfffffff and 0x7fffffff.
2313
7e947ad3
MR
23142018-05-22 Maciej W. Rozycki <macro@mips.com>
2315
2316 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2317 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2318 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2319 functions.
2320 (the_low_target): Wire them.
2321
1d75a658
PFC
23222018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2323
2324 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2325 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2326 mode. Call collect_register_by_name with vscr using
2327 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2328 (ppc_store_vrregset): Add and set vscr_offset variable as in
2329 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2330 vscr_offset.
2331
d078308a
PFC
23322018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2333
2334 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2335 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2336 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2337
7273b5fc
PFC
23382018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2339
2340 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2341 (ppc_store_vsxregset): Likewise.
2342 (ppc_fill_vrregset): Likewise.
2343 (ppc_store_vrregset): Likewise.
2344 (ppc_fill_evrregset): Likewise.
2345 (ppc_store_evrregset): Likewise.
2346 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2347 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2348 needed.
2349
2e077f5e
PFC
23502018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2351
2352 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2353 wordsize of the inferior. Call ppc_linux_target_wordsize.
2354
bd64614e
PFC
23552018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2356
2357 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2358 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2359 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2360 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2361 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2362 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2363 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2364 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2365 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2366 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2367 (tdesc_powerpc_e500l): Remove.
2368 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2369 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2370 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2371 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2372 linux-ppc-tdesc.h.
2373 (ppc_arch_setup): Remove target description matching code. Fill a
2374 ppc_linux_features struct and call ppc_linux_match_description
2375 with it.
2376
75d74cca
MR
23772018-05-22 Maciej W. Rozycki <macro@mips.com>
2378
2379 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2380 width of the requested register exceeds the width of the
2381 `ptrace' data type.
2382 (mips_cannot_store_register): Likewise.
2383
e4439e43
MR
23842018-05-21 Maciej W. Rozycki <macro@mips.com>
2385
2386 * linux-mips-low.c (mips_fetch_register): New function. Update
2387 preceding comment.
2388 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2389 (the_low_target): Wire `mips_fetch_register'.
2390
55271bf9
JB
23912018-05-10 Joel Brobecker <brobecker@adacore.com>
2392
2393 * lynx-i386-low.c (LYNXOS_178): New macro.
2394 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2395 the layout on LynxOS-178.
2396 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2397 handle floating point registers that are not supported by
2398 LynxOS-178.
2399
1a34f210
TT
24002018-05-10 Tom Tromey <tom@tromey.com>
2401
2402 * configure: Rebuild.
2403
190852c8
JB
24042018-05-10 Joel Brobecker <brobecker@adacore.com>
2405
2406 PR server/23158:
2407 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2408 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2409 Use it to set the expedite_regs field in the given tdesc.
2410 * x86-tdesc.h: New file.
2411 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2412 Adjust following the addition of the new expedite_regs parameter
2413 to init_target_desc.
2414 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2415 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2416 (i386_linux_read_description, amd64_linux_read_description):
2417 Adjust following the addition of the new expedite_regs parameter
2418 to init_target_desc.
2419 * lynx-i386-low.c: #include "x86-tdesc.h".
2420 (lynx_i386_arch_setup): Adjust following the addition of the new
2421 expedite_regs parameter to init_target_desc.
2422 * nto-x86-low.c: #include "x86-tdesc.h".
2423 (nto_x86_arch_setup): Adjust following the addition of the new
2424 expedite_regs parameter to init_target_desc.
2425 * win32-i386-low.c: #include "x86-tdesc.h".
2426 (i386_arch_setup): Adjust following the addition of the new
2427 expedite_regs parameter to init_target_desc.
2428
7dbac825
JB
24292018-05-10 Joel Brobecker <brobecker@adacore.com>
2430
2431 PR server/23158:
2432 * win32-low.c (win32_create_inferior): Add call to my_wait
2433 setting last_status global.
2434
906994d9
JB
24352018-05-10 Joel Brobecker <brobecker@adacore.com>
2436
2437 PR server/23158:
2438 * win32-low.c (create_process): Only call gdb_tilde_expand if
2439 inferior_cwd is not NULL.
2440
8ee22052
AB
24412018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2442
2443 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2444 registers to the cache if their values have changed.
2445 (i387_xsave_to_cache): Provide default values for x87 control
2446 registers when these features are available, but disabled.
2447 * regcache.c (supply_register_by_name_zeroed): New function.
2448 * regcache.h (supply_register_by_name_zeroed): Declare new
2449 function.
2450
aff689d3
TT
24512018-05-07 Tom Tromey <tom@tromey.com>
2452
2453 * configure: Rebuild.
2454
85e26832
TT
24552018-05-04 Tom Tromey <tom@tromey.com>
2456
2457 * configure: Rebuild.
2458
a3b60e45
JK
24592018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2460 Pedro Alves <palves@redhat.com>
2461
2462 * linux-aarch64-low.c (aarch64_stopped_data_address):
2463 Likewise.
2464
632e107b
TT
24652018-04-27 Tom Tromey <tom@tromey.com>
2466
2467 * configure: Rebuild.
2468
458412c3
TT
24692018-04-23 Tom Tromey <tom@tromey.com>
2470
2471 * configure: Rebuild.
2472
f31c089e
SM
24732018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2474
2475 * Makefile.in (depcomp): Add "..".
2476 (all_deps_files): New and use it.
2477
b319b098
AH
24782018-04-18 Alan Hayward <alan.hayward@arm.com>
2479
2480 * configure.srv (aarch64*-*-linux*): Don't include xml.
2481 (i[34567]86-*-cygwin*): Likewise.
2482 (i[34567]86-*-linux*): Likewise.
2483 (i[34567]86-*-lynxos*): Likewise.
2484 (i[34567]86-*-mingw32ce*): Likewise.
2485 (i[34567]86-*-mingw*): Likewise.
2486 (i[34567]86-*-nto*): Likewise.
2487 (tic6x-*-uclinux): Likewise.
2488 (x86_64-*-linux*): Likewise.
2489 (x86_64-*-mingw*): Likewise.
2490 (x86_64-*-cygwin*): Likewise.
2491
3b74854b
AH
24922018-04-18 Alan Hayward <alan.hayward@arm.com>
2493
2494 * tdesc.c: Remove xml parameter.
2495
e98577a9
AH
24962018-04-18 Alan Hayward <alan.hayward@arm.com>
2497
2498 * server.c (get_features_xml): Remove cast.
2499 * tdesc.c (void target_desc::accept): Fill in function.
2500 (tdesc_get_features_xml): Remove old xml creation.
2501 (print_xml_feature::visit_pre): Add xml vistor.
2502 * tdesc.h (struct target_desc): Make xmltarget mutable.
2503 (tdesc_get_features_xml): Remove declaration.
2504
d278f585
AH
25052018-04-18 Alan Hayward <alan.hayward@arm.com>
2506
2507 * tdesc.c (tdesc_architecture_name): Add new function.
2508 (tdesc_osabi_name): Likewise.
2509 (tdesc_get_features_xml): Use new functions.
2510
eee8a18d
AH
25112018-04-18 Alan Hayward <alan.hayward@arm.com>
2512
2513 * tdesc.c (tdesc_create_flags): Remove.
2514 (tdesc_add_flag): Likewise.
2515 (tdesc_named_type): Likewise.
2516 (tdesc_create_union): Likewise.
2517 (tdesc_create_struct): Likewise.
2518 (tdesc_create_vector): Likewise.
2519 (tdesc_add_bitfield): Likewise.
2520 (tdesc_add_field): Likewise.
2521 (tdesc_set_struct_size): Likewise.
2522
82ec9bc7
AH
25232018-04-18 Alan Hayward <alan.hayward@arm.com>
2524
2525 * tdesc.c (~target_desc): Remove implictly deleted items.
2526 (init_target_desc): Iterate all features.
2527 (tdesc_get_features_xml): Use vector.
2528 (tdesc_create_feature): Create feature.
2529 * tdesc.h (tdesc_feature) Remove
2530 (target_desc): Add features.
2531
ea3e7d71
AH
25322018-04-18 Alan Hayward <alan.hayward@arm.com>
2533
2534 * Makefile.in: Add common/tdesc.c
2535 * tdesc.c (init_target_desc): init all reg_defs from register
2536 vector.
2537 (tdesc_create_reg): Create tdesc_reg.
2538 * tdesc.h (tdesc_feature): Add register vector.
2539
17d08cd4
SM
25402018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2541
2542 * tdesc.h (struct target_desc) <features>: Change type to
2543 std::vector<std::string>.
2544 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2545 changes.
2546 (tdesc_get_features_xml): Likewise.
2547 (tdesc_create_feature): Likewise.
2548
5cd3e386
AH
25492018-03-26 Alan Hayward <alan.hayward@arm.com>
2550
2551 * regcache.c (find_register_by_number): Return a ref.
2552 (find_regno): Use references.
2553 (register_size): Likewise.
2554 (register_data): Likewise.
2555 * tdesc.c (target_desc::~target_desc): Remove free calls.
2556 (target_desc::operator==): Use std::vector compare.
2557 (init_target_desc): Use reference.
2558 (tdesc_create_reg): Use reg constructors.
2559 * tdesc.h (struct target_desc): Replace pointer with object.
2560
dff7492c
AH
25612018-03-23 Alan Hayward <alan.hayward@arm.com>
2562
2563 * regcache.c (find_register_by_number): Make static.
2564 (find_regno): Use find_register_by_number
2565 * regcache.h (struct reg): Remove declaration.
2566
d80e5242
AH
25672018-03-23 Alan Hayward <alan.hayward@arm.com>
2568
2569 * tdesc.c (target_desc::~target_desc): Move to here.
2570 (target_desc::operator==): Likewise.
2571 * tdesc.h (target_desc::~target_desc): Move from here.
2572 (target_desc::operator==): Likewise.
2573
f69c5afb
AA
25742018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2575
2576 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2577
ce29f843
AA
25782018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2579
2580 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2581 S390_TDESC_GS.
2582 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2583 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2584 and init_registers_s390_gs_linux64.
2585
c49bd90b
AA
25862018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2587
2588 * linux-s390-low.c (s390_fill_gs): Remove function.
2589 (s390_fill_gsbc): Remove function.
2590 (s390_regsets): Set fill functions for the guarded storage regsets
2591 to NULL.
2592
7edb9bd3
AA
25932018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2594
2595 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2596 the word size. Add comment.
2597 (s390_get_wordsize): New function.
2598 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2599 pswm with it. Instead, use s390_get_wordsize to determine the
2600 word size first and derive the correct tdesc from that directly.
2601
39be3c7e
SM
26022018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2603
2604 * Makefile.in: Include silent-rules.mk.
2605 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2606 (COMPILE): Add ECHO_CXX.
2607 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2608 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2609 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2610 (version-generated.c): Add ECHO_GEN.
2611 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2612 (IPAGENT_COMPILE): Add ECHO_CXX.
2613 (%-generated.c): Add ECHO_REGDAT.
2614
3ae9ce5d
TT
26152018-03-14 Tom Tromey <tom@tromey.com>
2616
2617 PR cli/14977:
2618 * ax.c (ax_printf): Special case for NULL.
2619
e6a58aa8
SM
26202018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2621
2622 * linux-low.c (linux_qxfer_libraries_svr4): Use
2623 xml_escape_text_append.
2624
f6e8a41e
SM
26252018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2626
2627 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2628
b9671caf
SM
26292018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2630
2631 * server.c (handle_general_set): Remove unnecessary xstrdup.
2632
e80aaf61
SM
26332018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 * server.c (parse_debug_format_options): Adjust to
2636 delim_string_to_char_ptr_vec changes.
2637 * thread-db.c (thread_db_load_search): Adjust to
2638 dirnames_to_char_ptr_vec changes.
2639
b1223e78
MM
26402018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2641
2642 * target.h (target_enable_btrace, target_disable_btrace)
2643 (target_read_btrace, target_read_btrace_conf): Turn macro into
2644 inline function. Throw error if target method is not defined.
2645 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2646 check for btrace target method. Be prepared to handle exceptions
2647 from btrace target methods.
2648
81561546
SDJ
26492018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2650
2651 * server.c (captured_main): Change order of error message printed
2652 when the current working directory cannot be found.
2653
25e3c82c
SDJ
26542018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2655
2656 * server.c: Include "filenames.h" and "pathstuff.h".
2657 (program_name): Delete variable.
2658 (program_path): New anonymous class.
2659 (get_exec_wrapper): Use "program_path" instead of
2660 "program_name".
2661 (handle_v_run): Likewise.
2662 (captured_main): Likewise.
2663 (process_serial_event): Likewise.
2664
b4987c95
SDJ
26652018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2666
2667 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2668 (OBJS): Add "pathstuff.o".
2669 * server.c (current_directory): New global variable.
2670 (captured_main): Initialize "current_directory".
2671
f46cd62a
AH
26722018-02-26 Alan Hayward <alan.hayward@arm.com>
2673
2674 * tdesc.c: Use common/tdesc.h.
2675 * tdesc.h: Likewise.
2676
a543c5ca
AH
26772018-02-20 Alan Hayward <alan.hayward@arm.com>
2678 Simon Marchi <simon.marchi@ericsson.com>
2679
2680 * Makefile.in: Switch order of make rules.
2681
b5884fa7
AH
26822018-02-19 Alan Hayward <alan.hayward@arm.com>
2683
2684 * Makefile.in: Add common directory in build.
2685 * configure.ac: Add common reference.
2686 * configure: Regenerate.
2687
de6242d3
MM
26882018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2689
2690 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2691 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2692 * spu-low.c (spu_target_ops): Likewise.
2693 * win32-low.c (win32_target_ops): Likewise.
2694 * server.c (supported_btrace_packets): Report packets unconditionally.
2695 * target.h (target_ops) <supports_btrace>: Remove.
2696 (target_supports_btrace): Remove.
2697
9ee23a85
MM
26982018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2699
2700 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2701 (handle_btrace_disable): Change return type to void. Use exceptions
2702 to report errors.
2703 (handle_btrace_general_set): Catch exception and copy message to
2704 return message.
2705
8ce47547
TT
27062018-02-08 Tom Tromey <tom@tromey.com>
2707
2708 * linux-low.c (install_software_single_step_breakpoints): Use
2709 make_scoped_restore.
2710 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2711 (do_restore_current_thread_cleanup): Remove.
2712 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2713 declare.
2714
45dd3607
TT
27152018-02-08 Tom Tromey <tom@tromey.com>
2716
2717 * mem-break.c (set_raw_breakpoint_at): Use
2718 gdb::unique_xmalloc_ptr.
2719
e671cd59
PA
27202018-01-30 Pedro Alves <palves@redhat.com>
2721
2722 PR gdb/13211
2723 * target.c (target_terminal::terminal_state): Rename to ...
2724 (target_terminal::m_terminal_state): ... this.
2725
a0aad537
JC
27262018-01-19 James Clarke <jrtc27@jrtc27.com>
2727
2728 * linux-low.c (handle_extended_wait): Surround call to
2729 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2730
4d9b86e1
SM
27312018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2732
2733 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2734 linux_ptrace_attach_fail_reason_string now returning an
2735 std::string.
2736 (linux_attach): Likewise.
2737 * thread-db.c (attach_thread): Likewise.
2738
f517c180
EA
27392018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2740
2741 PR gdb/21559
2742 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2743 checking for fs_base/gs_base fields in struct user_regs_struct.
2744 * configure: Regenerate.
2745
9a70f35c
YQ
27462018-01-16 Yao Qi <yao.qi@linaro.org>
2747
2748 PR gdb/18749
2749 * linux-low.c (fetch_register): Call supply_register instead of
2750 error.
2751
605fd3c6
YQ
27522018-01-08 Yao Qi <yao.qi@linaro.org>
2753 Simon Marchi <simon.marchi@ericsson.com>
2754
2755 * Makefile.in (OBS): Remove selftest.o.
2756 * configure.ac: Set srv_selftest_objs if $development is true.
2757 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2758 * configure: Re-generated.
2759 * server.c (captured_main): Wrap variable selftest_filter with
2760 GDB_SELF_TEST.
2761
2cc05030
SM
27622018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2763
2764 * server.c (parse_debug_format_options): Return std::string.
2765 (handle_monitor_command, captured_main): Adjust.
2766
e379cee6
PA
27672018-01-05 Pedro Alves <palves@redhat.com>
2768
2769 PR gdb/18653
2770 * server.c (captured_main): Pass quiet=false to
2771 save_original_signals_state.
2772
82e1e79a
JB
27732018-01-01 Joel Brobecker <brobecker@adacore.com>
2774
2775 * gdbreplay.c (gdbreplay_version): Update copyright year in
2776 version message.
2777 * server.c (gdbserver_version): Likewise.
2778
8e481c3b
TT
27792017-12-08 Tom Tromey <tom@tromey.com>
2780
2781 * ax.c (ax_printf): Update.
2782
a8806230
YQ
27832017-12-07 Yao Qi <yao.qi@linaro.org>
2784
2785 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2786 aarch64_linux_read_description.
2787 * linux-amd64-ipa.c (idx2mask): New array.
2788 (get_ipa_tdesc): Move idx2mask out.
2789 (initialize_low_tracepoint): Initialize target descriptions.
2790 * linux-i386-ipa.c (idx2mask): New array.
2791 (get_ipa_tdesc): Move idx2mask out.
2792 (initialize_low_tracepoint): Initialize target descriptions.
2793
d4a0e8b5
SM
27942017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2795
2796 * tdesc.c (struct tdesc_type): Change return type.
2797 (tdesc_add_flag): Change parameter type.
2798 (tdesc_add_bitfield): Likewise.
2799 (tdesc_add_field): Likewise.
2800 (tdesc_set_struct_size): Likewise.
2801
798a7429
SM
28022017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2803
2804 * regcache.c (registers_to_string): Remove unused variable.
2805
c0e15c9b
SM
28062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2807
2808 * inferiors.c (for_each_inferior_with_data): Remove.
2809 * inferiors.h (for_each_inferior_with_data): Remove.
2810 * server.c (handle_qxfer_threads_worker): Change parameter type.
2811 (handle_qxfer_threads_proper): Use for_each_thread.
2812
f0045347
SM
28132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * inferiors.c (for_each_inferior): Remove.
2816 (clear_inferiors): Use for_each_thread.
2817 * inferiors.h (for_each_inferior): Remove.
2818 * linux-low.c (linux_wait_for_event_filtered): Use
2819 for_each_thread.
2820 (linux_stabilize_threads): Likewise.
2821 * regcache.c (regcache_release): Likewise.
2822 * server.c (gdb_wants_all_threads_stopped): Likewise.
2823 (clear_pending_status_callback): Remove.
2824 (handle_status): Use for_each_thread.
2825 (captured_main): Likewise.
2826 * win32-low.c (child_init_thread_list): Likewise.
2827 (win32_clear_inferiors): Likewise.
2828 (fake_breakpoint_event): Likewise.
2829
9521758b
SM
28302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2831
2832 * inferiors.h (find_inferior): Remove.
2833 * inferiors.c (find_inferior): Remove.
2834
8f86d7aa
SM
28352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2836
2837 * linux-low.c (resume_status_pending_p): Update comment.
2838 (need_step_over_p): Update comment.
2839
e2b44075
SM
28402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2841
2842 * linux-low.c (proceed_one_lwp): Return void, change parameter
2843 type.
2844 (unsuspend_and_proceed_one_lwp): Likewise.
2845 (proceed_all_lwps): Use for_each_thread.
2846 (unstop_all_lwps): Likewise.
2847
c80825ff
SM
28482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2849
2850 * linux-low.c (linux_resume_one_thread): Return void, take
2851 parameter directly.
2852 (linux_resume): Use for_each_thread.
2853
df3e4dbe
SM
28542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2855
2856 * linux-low.c (send_sigstop_callback): Return void, change
2857 parameter type. Rename to...
2858 (send_sigstop): ... this.
2859 (suspend_and_send_sigstop_callback): Return void, change parameter
2860 type. Rename to...
2861 (suspend_and_send_sigstop): ... this.
2862 (stop_all_lwps): Use for_each_thread.
2863
5a6b0a41
SM
28642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2865
2866 * linux-low.c (lwp_running): Return bool, remove unused
2867 argument.
2868 (linux_stabilize_threads): Use find_thread.
2869
39a64da5
SM
28702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2871
2872 * linux-low.c (select_singlestep_lwp_callback): Remove.
2873 (count_events_callback): Remove.
2874 (select_event_lwp_callback): Remove.
2875 (select_event_lwp): Use find_thread/for_each_thread.
2876
a1385b7b
SM
28772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2878
2879 * linux-low.c (not_stopped_callback): Return bool, take filter
2880 argument directly.
2881 (linux_wait_for_event_filtered): Use find_thread.
2882 (linux_wait_1): Likewise.
2883
454296a2
SM
28842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2885
2886 * linux-low.c (same_lwp): Remove.
2887 (find_lwp_pid): Use find_thread.
2888
6b2a85da
SM
28892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2890
2891 * linux-low.c (delete_lwp_callback): Remove.
2892 (linux_mourn): Use for_each_thread.
2893
798a38e8
SM
28942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2895
2896 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2897 args parameter, don't check for pid.
2898 (linux_detach): Use for_each_thread.
2899
e4eb0dec
SM
29002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2901
2902 * linux-low.c (struct counter): Remove.
2903 (second_thread_of_pid_p): Remove.
2904 (last_thread_of_process_p): Use find_thread.
2905
83e1b6c1
SM
29062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2907
2908 * inferiors.c (find_inferior_in_random): Remove.
2909 * inferiors.h (find_inferior_in_random): Remove.
2910 * linux-low.c (status_pending_p_callback): Return bool, accept
2911 parameter ptid directly.
2912 (linux_wait_for_event_filtered): Use find_thread_in_random.
2913 (linux_wait_1): Likewise.
2914
8dc7b443
SM
29152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2916
2917 * inferiors.c (find_inferior_id): Remove.
2918 (find_thread_ptid): Move implemention from find_inferior_id to
2919 here.
2920 * inferiors.h (find_inferior_id): Remove.
2921 * server.c (handle_status): Use find_thread_ptid.
2922 (process_serial_event): Likewise.
2923 * thread-db.c (find_one_thread): Likewise.
2924 (thread_db_thread_handle): Likewise.
2925 * win32-low.c (thread_rec): Likewise.
2926 (child_delete_thread): Likewise.
2927 (win32_thread_alive): Likewise.
2928 (get_child_debug_event): Likewise.
2929
da25033c
SM
29302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2931
2932 * linux-mips-low.c (update_watch_registers_callback): Return
2933 void, remove pid_p parameter, don't check for pid.
2934 (mips_insert_point, mips_remove_point): Use for_each_thread.
2935
c91bb56b
SM
29362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2937
2938 * lynx.low (lynx_delete_thread_callback): Remove.
2939 (lynx_mourn): Use for_each_thread.
2940
634a3254
SM
29412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * regcache.c (regcache_invalidate_one): Remove.
2944 (regcache_invalidate_pid): use for_each_thread.
2945
41272101
TT
29462017-11-26 Tom Tromey <tom@tromey.com>
2947
2948 * linux-low.c (linux_create_inferior): Update.
2949
f5291a6f
UW
29502017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2951
2952 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2953
6654d750
AH
29542017-11-24 Alan Hayward <alan.hayward@arm.com>
2955
2956 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2957 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2958 * linux-aarch64-tdesc-selftest.c: New file.
2959 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2960
29612017-11-24 Alan Hayward <alan.hayward@arm.com>
2962
2963 * configure.srv: Add new file.
2964 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2965 * linux-aarch64-tdesc-selftest.c: New file.
2966 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2967
49bdb7ee
AH
29682017-11-24 Alan Hayward <alan.hayward@arm.com>
2969
2970 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2971 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2972 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2973
d6d7ce56
AH
29742017-11-24 Alan Hayward <alan.hayward@arm.com>
2975
2976 * configure.srv: Add new files.
2977 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2978 aarch64_linux_read_description.
2979 * linux-aarch64-low.c (aarch64_linux_read_description):
2980 Merge with aarch64_arch_setup.
2981 (aarch64_arch_setup): Call aarch64_linux_read_description.
2982 * linux-aarch64-tdesc.c: New file.
2983 * linux-aarch64-tdesc.h: New file.
2984
506fe5f4
YQ
29852017-11-24 Yao Qi <yao.qi@linaro.org>
2986
2987 * configure.srv: Set $srv_regobj for tic6x-linux.
2988 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2989 (tic6x_read_description): Move some code to tic6x_arch_setup.
2990 (tic6x_tdesc_test): New function.
2991 (initialize_low_arch): Call selftests::register_test.
2992
29f9a567
YQ
29932017-11-22 Yao Qi <yao.qi@linaro.org>
2994
2995 * remote-utils.c (prepare_resume_reply): Use memcpy.
2996
578290ec
SM
29972017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2998
2999 * linux-low.c (kill_one_lwp_callback): Return void, take
3000 argument directly, don't filter on pid.
3001 (linux_kill): Use for_each_thread.
3002
eca55aec
SM
30032017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3004
3005 * linux-low.c (need_step_over_p): Return bool, remove dummy
3006 argument.
3007 (linux_resume, proceed_all_lwps): Use find_thread.
3008
25c28b4d
SM
30092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3010
3011 * linux-low.c (resume_status_pending_p): Return bool, remove
3012 flag_p argument.
3013 (linux_resume): Use find_thread.
3014
5fdda392
SM
30152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3016
3017 * linux-low.c (struct thread_resume_array): Remove.
3018 (linux_set_resume_request): Return void, take arguments
3019 directly.
3020 (linux_resume): Use for_each_thread.
3021
fcb056a5
SM
30222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3023
3024 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3025 return bool, remove data argument.
3026 (linux_stabilize_threads): Use find_thread.
3027
139720c5
SM
30282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3029
3030 * linux-low.c (unsuspend_one_lwp): Remove.
3031 (unsuspend_all_lwps): Use for_each_thread, inline code from
3032 unsuspend_one_lwp.
3033
6d1e5673
SM
30342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3035
3036 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3037 * linux-low.c (struct iterate_over_lwps_args): Remove.
3038 (iterate_over_lwps_filter): Remove.
3039 (iterate_over_lwps): Use find_thread.
3040
bbf550d5
SM
30412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3042
3043 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3044 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3045 code from reset_lwp_ptrace_options_callback.
3046
00192f77
SM
30472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3048
3049 * linux-arm-low.c (struct update_registers_data): Remove.
3050 (update_registers_callback): Return void, take arguments
3051 directly, don't check thread's pid.
3052 (arm_insert_point, arm_remove_point): Use for_each_thread.
3053
2bee2b6c
SM
30542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3055
3056 * win32-low.c (continue_one_thread): Return void, take argument
3057 directly.
3058 (child_continue): Use for_each_thread.
3059
0b360f19
SM
30602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3061
3062 * win32-i386-low.c (update_debug_registers_callback): Rename
3063 to ...
3064 (update_debug_registers): ... this, return void, remove pid_p arg.
3065 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3066
f27866ba
SM
30672017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3068
3069 * inferiors.h (struct process_info): Add constructor, initialize
3070 fields..
3071 <syscalls_to_catch>: Change type to std::vector<int>.
3072 * inferiors.c (add_process): Allocate process_info with new.
3073 (remove_process): Free process_info with delete.
3074 * linux-low.c (handle_extended_wait): Adjust.
3075 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3076 * server.c (handle_general_set): Adjust.
3077
e849ea89
PA
30782017-11-16 Pedro Alves <palves@redhat.com>
3079
3080 * remote-utils.c (remote_close): Block SIGIO signals instead of
3081 uninstalling the SIGIO handler.
3082
1d0aa65c
AH
30832017-11-16 Alan Hayward <alan.hayward@arm.com>
3084
3085 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3086
3491a34c
YQ
30872017-11-16 Yao Qi <yao.qi@linaro.org>
3088
3089 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3090 (tic6x_store_gregset): Likewise.
3091 (tic6x_usrregs_info): Move it up.
3092
a602f924
AH
30932017-11-15 Alan Hayward <alan.hayward@arm.com>
3094
3095 * Makefile.in: Update arch rules.
3096 * configure.srv: Explicitly mark arch/ files.
3097
5616b6c3
AS
30982017-11-13 Andreas Schwab <schwab@suse.de>
3099
3100 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3101 function.
3102 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3103
d1928160
PA
31042017-11-06 Pedro Alves <palves@redhat.com>
3105
3106 * config.in, configure: Regenerate.
3107
bac608e7
SM
31082017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3109
3110 * target.c (struct thread_search): Remove.
3111 (thread_search_callback): Remove.
3112 (prepare_to_access_memory): Use for_each_thread instead of
3113 find_inferior. Inline code from thread_search_callback.
3114
eaddb425
SM
31152017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3116
3117 * server.c (struct visit_actioned_threads_data): Remove.
3118 (visit_actioned_threads): Change prototype to take arguments
3119 directly.
3120 (resume): Use find_thread instead of find_inferior.
3121
99078d34
SM
31222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3123
3124 * server.c (queue_stop_reply_callback): Change prototype, return
3125 void.
3126 (find_status_pending_thread_callback): Remove.
3127 (handle_status): Replace find_inferior with find_thread and
3128 for_each_thread.
3129
cc628f3d
AH
31302017-10-25 Alan Hayward <alan.hayward@arm.com>
3131
3132 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3133 with REGNO.
3134 (aarch64_store_gregset): Likewise.
3135 (aarch64_fill_fpregset): Likewise.
3136 (aarch64_store_fpregset): Likewise.
3137
4d3bb80e
SM
31382017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * gdbthread.h (find_thread, for_each_thread): New functions.
3141 * inferiors.c (thread_of_pid): Remove.
3142 (find_any_thread_of_pid): Use find_thread.
3143 * linux-low.c (num_lwps): Use for_each_thread.
3144
7a7cdfa0
YQ
31452017-10-17 Yao Qi <yao.qi@linaro.org>
3146
3147 * Makefile.in: Remove one rule.
3148 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3149
e675d170
YQ
31502017-10-17 Yao Qi <yao.qi@linaro.org>
3151
3152 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3153 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3154
7eb4e0f9
YQ
31552017-10-17 Yao Qi <yao.qi@linaro.org>
3156
3157 * configure.srv: Rename arm.o with arch/arm.o.
3158
60d6cfc9
YQ
31592017-10-17 Yao Qi <yao.qi@linaro.org>
3160
3161 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3162 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3163 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3164 (arch-i386.o, arch-amd64.o): Remove rules.
3165 (arch/%.o): New rule.
3166 Update POSTCOMPILE and COMPILE.pre.
3167 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3168 * configure: Re-generated.
3169 * configure.srv: Replace arch-i386.o with arch/i386.o.
3170 Replace arch-amd64.o with arch/amd64.o.
3171
5bfda255
YQ
31722017-10-16 Yao Qi <yao.qi@linaro.org>
3173
3174 * configure: Regenerated.
3175
9c80ecd6
SM
31762017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3177
3178 * inferiors.h: (struct inferior_list): Remove.
3179 (struct inferior_list_entry); Remove.
3180 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3181 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3182 get_first_inferior): Remove.
3183 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3184 find_inferior_id, find_inferior_in_random): Change signature.
3185 * inferiors.c (all_threads): Change type to
3186 std::list<thread_info *>.
3187 (get_thread): Remove macro.
3188 (find_inferior, find_inferior_id): Change signature, implement
3189 using find_thread.
3190 (find_inferior_in_random): Change signature, implement using
3191 find_thread_in_random.
3192 (for_each_inferior, for_each_inferior_with_data): Change
3193 signature, implement using for_each_thread.
3194 (add_inferior_to_list, remove_inferior): Remove.
3195 (add_thread, get_first_thread, thread_of_pid,
3196 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3197 (get_first_inferior, one_inferior_p, clear_inferior_list):
3198 Remove.
3199 (clear_inferiors, get_thread_process): Update.
3200 * gdbthread.h: Include <list>.
3201 (struct thread_info) <entry>: Remove field.
3202 <id>: New field.
3203 (all_threads): Change type to std::list<thread_info *>.
3204 (get_first_inferior): Add doc.
3205 (find_thread, for_each_thread, find_thread_in_random): New
3206 functions.
3207 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3208 * linux-arm-low.c (update_registers_callback): Update.
3209 * linux-low.c (second_thread_of_pid_p): Update.
3210 (kill_one_lwp_callback, linux_detach_lwp_callback,
3211 delete_lwp_callback, status_pending_p_callback, same_lwp,
3212 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3213 iterate_over_lwps, not_stopped_callback,
3214 resume_stopped_resumed_lwps, count_events_callback,
3215 select_singlestep_lwp_callback, select_event_lwp_callback,
3216 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3217 suspend_and_send_sigstop_callback, wait_for_sigstop,
3218 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3219 lwp_running, linux_set_resume_request, resume_status_pending_p,
3220 need_step_over_p, start_step_over, linux_resume_one_thread,
3221 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3222 reset_lwp_ptrace_options_callback): Update.
3223 * linux-mips-low.c (update_watch_registers_callback): Update.
3224 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3225 Update.
3226 (free_register_cache_thread_one): Remove.
3227 (regcache_release): Update.
3228 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3229 handle_qxfer_threads_worker): Update.
3230 (handle_query): Update, use list iterator.
3231 (visit_actioned_threads, handle_pending_status,
3232 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3233 clear_pending_status_callback, set_pending_status_callback,
3234 find_status_pending_thread_callback, handle_status,
3235 process_serial_event): Update.
3236 * target.c (thread_search_callback): Update.
3237 * thread-db.c (thread_db_get_tls_address): Update.
3238 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3239 Update.
3240 * win32-i386-low.c (update_debug_registers_callback): Update.
3241 * win32-low.c (delete_thread_info, child_delete_thread,
3242 continue_one_thread, suspend_one_thread,
3243 get_child_debug_event): Adjust.
3244
9179355e
SM
32452017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3246
3247 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3248 * inferiors.h: Include <list>.
3249 (struct process_info) <entry>: Remove field.
3250 <pid>: New field.
3251 (pid_of): Change macro to function.
3252 (ptid_of, lwpid_of): Remove macro.
3253 (all_processes): Change type to std::list<process_info *>.
3254 (ALL_PROCESSES): Remove macro.
3255 (for_each_process, find_process): New function.
3256 * inferiors.c (all_processes): Change type to
3257 std::list<process_info *>.
3258 (find_thread_process): Adjust.
3259 (add_process): Likewise.
3260 (remove_process): Likewise.
3261 (find_process_pid): Likewise.
3262 (get_first_process): Likewise.
3263 (started_inferior_callback): Remove.
3264 (have_started_inferiors_p): Adjust.
3265 (attached_inferior_callback): Remove.
3266 (have_attached_inferiors_p): Adjust.
3267 * linux-low.c (check_zombie_leaders): Likewise.
3268 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3269 (x86_linux_update_xmltarget): Adjust.
3270 * server.c (handle_query): Likewise.
3271 (gdb_reattached_process): Remove.
3272 (handle_status): Adjust.
3273 (kill_inferior_callback): Likewise.
3274 (detach_or_kill_inferior): Remove.
3275 (print_started_pid): Likewise.
3276 (print_attached_pid): Likewise.
3277 (detach_or_kill_for_exit): Update.
3278 (process_serial_event): Likewise.
3279 * linux-arm-low.c (arm_new_fork): Likewise.
3280
c9cb8905
SM
32812017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3282
3283 * dll.h: Include <list>.
3284 (struct dll_info): Add constructor.
3285 <entry>: Remove field.
3286 (all_dlls): Change type to std::list<dll_info>.
3287 * dll.c: Include <algorithm>.
3288 (get_dll): Remove macro.
3289 (all_dlls): Change type to std::list<dll_info *>.
3290 (free_one_dll): Remove.
3291 (match_dll): Likewise.
3292 (loaded_dll): Adjust.
3293 (unloaded_dll): Adjust to all_dlls type change, use
3294 std::find_if. Inline code from match_dll.
3295 (clear_dlls): Adjust to all_dlls type change.
3296 * server.c (emit_dll_description): Remove.
3297 (handle_qxfer_libraries): Adjust to all_dlls type change,
3298 integrate emit_dll_description's functionality.
3299
04ec7890
SM
33002017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3301
3302 * linux-low.h (struct linux_target_ops) <delete_process>: New
3303 field.
3304 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3305 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3306 (struct linux_target_ops): Add delete_process callback.
3307 * linux-arm-low.c (arm_delete_process): New.
3308 (struct linux_target_ops): Add delete_process callback.
3309 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3310 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3311 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3312 * linux-mips-low.c (mips_linux_delete_process): New.
3313 (struct linux_target_ops): Add delete_process callback.
3314 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3315 * linux-s390-low.c (struct linux_target_ops): Likewise.
3316 * linux-sh-low.c (struct linux_target_ops): Likewise.
3317 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3318 * linux-tile-low.c (struct linux_target_ops): Likewise.
3319 * linux-x86-low.c (x86_linux_delete_process): New.
3320 (struct linux_target_ops): Add delete_process callback.
3321 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3322
466eecee
SM
33232017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3324
3325 * linux-aarch64-low.c (the_low_target): Add thread delete
3326 callback.
3327 * linux-arm-low.c (arm_delete_thread): New function.
3328 (the_low_target): Add thread delete callback.
3329 * linux-bfin-low.c (the_low_target): Likewise.
3330 * linux-crisv32-low.c (the_low_target): Likewise.
3331 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3332 set.
3333 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3334 field.
3335 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3336 * linux-mips-low.c (mips_linux_delete_thread): New function.
3337 (the_low_target): Add thread delete callback.
3338 * linux-ppc-low.c (the_low_target): Likewise.
3339 * linux-s390-low.c (the_low_target): Likewise.
3340 * linux-sh-low.c (the_low_target): Likewise.
3341 * linux-tic6x-low.c (the_low_target): Likewise.
3342 * linux-tile-low.c (the_low_target): Likewise.
3343 * linux-x86-low.c (the_low_target): Likewise.
3344 * linux-xtensa-low.c (the_low_target): Likewise.
3345
b79f7801
YZ
33462017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3347
3348 * win32-low.c: Include "common-inferior.h".
3349
bc3b087d
SDJ
33502017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3351
3352 * inferiors.c (set_inferior_cwd): New function.
3353 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3354 (handle_query): Inform that QSetWorkingDir is supported.
3355 * win32-low.c (create_process): Pass the inferior's cwd to
3356 CreateProcess.
3357
d092c5a2
SDJ
33582017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3359
3360 * inferiors.c (current_inferior_cwd): New global variable.
3361 (get_inferior_cwd): New function.
3362 * inferiors.h (struct process_info) <cwd>: New field.
3363
7da0a886
SDJ
33642017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3365
3366 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3367 (OBS): Add gdb_tilde_expand.o.
3368
289a6840
SM
33692017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3370
3371 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3372 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3373
256642e8
PA
33742017-09-29 Pedro Alves <palves@redhat.com>
3375
3376 * ax.c (gdb_parse_agent_expr): Constify.
3377 * ax.h (gdb_parse_agent_expr): Constify.
3378 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3379 Constify.
3380 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3381 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3382 * remote-utils.h (read_ptid): Constify.
3383 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3384 (process_point_options, process_serial_event): Constify.
3385 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3386 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3387 (cmd_qtbuffer): Constify.
3388
5b9ca4d4
PA
33892017-09-29 Pedro Alves <palves@redhat.com>
3390
3391 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3392 fails.
3393
94c207e0
PA
33942017-09-29 Pedro Alves <palves@redhat.com>
3395
3396 * linux-low.c (handle_extended_wait): Pass parent thread instead
3397 of process to thread_db_notice_clone.
3398 * linux-low.h (thread_db_notice_clone): Replace parent process
3399 parameter with parent thread parameter.
3400 * thread-db.c (find_one_thread): Add comment.
3401 (thread_db_notice_clone): Replace parent process parameter with
3402 parent thread parameter. Temporarily switch to the parent thread.
3403
75352e28
SDJ
34042017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3405
3406 * gdbthread.h: Include "common-gdbthread.h".
3407 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3408 "if" when validating the ptid.
3409 * remote-utils.c: Include "gdbthread.h".
3410 (prepare_resume_reply): Use "switch_to_thread".
3411 * target.c (done_accessing_memory): Likewise.
3412
ad339634
AA
34132017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3414
3415 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3416 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3417 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3418 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3419 s390x-gs-linux64-ipa.o to ipa_obj.
3420 * linux-s390-low.c (HWCAP_S390_GS): New define.
3421 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3422 New functions.
3423 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3424 (s390_arch_setup): Check for guarded-storage support and choose
3425 appropriate tdesc.
3426 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3427 init_registers_s390x_gs_linux64.
3428 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3429 enum value.
3430 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3431 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3432
cc4d742f
SM
34332017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3434
3435 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3436
f6327dcb
KB
34372017-09-21 Kevin Buettner <kevinb@redhat.com>
3438
3439 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3440 (thread_db_thread_handle): Declare.
3441 * linux-low.c (linux_target_ops): Initialize thread_handle.
3442 * server.c (handle_qxfer_threads_worker): Add support for
3443 "handle" attribute.
3444 * target.h (struct target_ops): Add new function pointer,
3445 thread_handle.
3446 (target_thread_handle): Define.
3447 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3448 field in lwp.
3449 (thread_db_thread_handle): New function.
3450
86299109
KB
34512017-09-21 Kevin Buettner <kevinb@redhat.com>
3452
3453 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3454 * linux-low.h (thread_db_notice_clone): Declare.
3455 * thread-db.c (thread_db_notice_clone): New function.
3456
f557a88a
PA
34572017-09-21 Pedro Alves <palves@redhat.com>
3458
3459 * server.c (gdb_read_memory, handle_status, process_serial_event)
3460 (handle_serial_event, handle_target_event): Adjust to
3461 set_desired_thread prototype change.
3462 * target.c (set_desired_thread): Remove 'use_general' parameter
3463 and adjust.
3464 * target.h (set_desired_thread): Remove 'use_general' parameter.
3465
223ffa71
TT
34662017-09-20 Tom Tromey <tom@tromey.com>
3467
3468 * target.c (target_terminal::terminal_state): Define.
3469 (target_terminal::init): Rename from target_terminal_init.
3470 (target_terminal::inferior): Rename from
3471 target_terminal_inferior.
3472 (target_terminal::ours): Rename from target_terminal_ours.
3473 (target_terminal::ours_for_output, target_terminal::info): New.
3474
04fd3ba9
SM
34752017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3476
3477 * server.c (accumulate_file_name_length): Remove.
3478 (emit_dll_description): Adjust to std::string change.
3479 (handle_qxfer_libraries): Use std::string to hold document.
3480
5e187554
SM
34812017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3482
3483 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3484 return type of xml_escape_text.
3485 * server.c (emit_dll_description): Likewise.
3486
1526853e
SM
34872017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3488
3489 * server.c (captured_main): Accept argument for --selftest.
3490 Update run_tests call.
3491 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3492 when registering selftests.
3493
c4dfafab
SDJ
34942017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3495
3496 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3497 instead of "VEC" for "target_desc.reg_defs".
3498 (regcache_cpy): Likewise.
3499 (registers_to_string): Likewise.
3500 (registers_from_string): Likewise.
3501 (find_regno): Likewise.
3502 (supply_regblock): Likewise.
3503 (regcache_raw_read_unsigned): Likewise.
3504 * tdesc.c (init_target_desc): Likewise.
3505 (tdesc_create_reg): Likewise.
3506 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3507 (struct target_desc) <reg_defs>: Convert to "std::vector".
3508 (target_desc): Do not initialize "reg_defs".
3509 (~target_desc): Update code to use "std::vector" instead of "VEC"
3510 for "target_desc.reg_defs".
3511 (operator==): Likewise.
3512
124aceb4
SM
35132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3514
3515 * inferiors.h (thread_to_gdb_id): Remove.
3516 * inferiors.c (thread_to_gdb_id): Remove.
3517 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3518 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3519 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3520 Likewise.
3521 * nto-low.c (nto_fetch_registers, nto_store_registers,
3522 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3523
96cde54f
SM
35242017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3525
3526 * inferiors.h (gdb_id_to_thread_id): Remove.
3527 * inferiors.c (gdb_id_to_thread_id): Remove.
3528 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3529 removal. Move pid declaration closer to where it's used.
3530
e8ca139e
SM
35312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3532
3533 * server.c (handle_detach): New function.
3534 (process_serial_event): Move code out, call handle_detach.
3535
f8a4e119
SM
35362017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3537
3538 * server.c (require_running): Rename to ...
3539 (require_running_or_return): ... this ...
3540 (require_running_or_break): ... and this.
3541 (handle_query, process_serial_event): Adjust.
3542
0eb0a407
SM
35432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3544
3545 * linux-low.c (linux_set_resume_request): Remove unused
3546 variables.
3547
785922a5
SM
35482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3549
3550 * server.c (first_thread_of): Remove.
3551 (process_serial_event): Replace usage of first_thread_of with
3552 find_any_thread_of_pid.
3553 * tracepoint.c (same_process_p): Remove.
3554 (gdb_agent_about_to_close): Replace usage of same_process_p with
3555 find_any_thread_of_pid.
3556 * linux-x86-low.c (same_process_callback): Remove.
3557 (x86_arch_setup_process_callback): Replace usage of
3558 same_process_callback with find_any_thread_of_pid.
3559 * thread-db.c (any_thread_of): Remove.
3560 (switch_to_process): Replace usage of any_thread_of with
3561 find_any_thread_of_pid.
3562 * inferiors.c (thread_pid_matches_callback): Remove.
3563 (find_thread_process): Adjust to use find_any_thread_of_pid.
3564
a059f00c
SDJ
35652017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3566
3567 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3568 with "!VEC_empty".
a059f00c 3569
cc397f3a
SDJ
35702017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3571
3572 * linux-low.c (handle_extended_wait): Use
3573 "allocate_target_description" instead of "XNEW".
3574 * linux-x86-low.c (initialize_low_arch): Likewise.
3575
22916b07
YQ
35762017-09-05 Yao Qi <yao.qi@linaro.org>
3577
3578 * configure.srv (srv_i386_regobj): Remove.
3579 (srv_amd64_regobj): Remove.
3580 (srv_regobj): Set it to "" for x86 non-linux targets.
3581 * linux-x86-tdesc.c (i386_linux_read_description):
3582 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3583 (init_registers_i386): Remove the declaration.
3584 (tdesc_i386): Remove the declaration.
3585 (lynx_i386_arch_setup): Call i386_create_target_description.
3586 * nto-x86-low.c: Likewise.
3587 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3588 [!__x86_64__]: include arch/i386.h.
3589 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3590
38602d55
YQ
35912017-09-05 Yao Qi <yao.qi@linaro.org>
3592
3593 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3594 i386/amd64-XXX-linux from it.
3595
44b886ff
YQ
35962017-09-05 Yao Qi <yao.qi@linaro.org>
3597
3598 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3599 false.
3600 (ipa_amd64_linux_regobj): Remove.
3601 (ipa_x32_linux_regobj): Remove.
3602
b4570e4b
YQ
36032017-09-05 Yao Qi <yao.qi@linaro.org>
3604
3605 * Makefile.in (arch-amd64.o): New rule.
3606 * configure.srv: Append arch-amd64.o.
3607 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3608 (get_ipa_tdesc): Call amd64_linux_read_description.
3609 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3610 and init_registers_amd64_XXX.
3611 * linux-x86-low.c (x86_linux_read_description): Call
3612 amd64_linux_read_description.
3613 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3614 (initialize_low_arch): Don't call init_registers_x32_XXX and
3615 init_registers_amd64_XXX.
3616 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3617 and tdesc_amd64_XXX.
3618 [__x86_64__] (amd64_tdesc_test): New function.
3619 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3620 and init_registers_amd64_XXX.
3621 * linux-x86-tdesc.c: Include arch/amd64.h.
3622 (xcr0_to_tdesc_idx): New function.
3623 (i386_linux_read_description): New function.
3624 (amd64_get_ipa_tdesc_idx): New function.
3625 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3626 (amd64_get_ipa_tdesc): Declare.
3627
d1f28ea2
YQ
36282017-09-05 Yao Qi <yao.qi@linaro.org>
3629
3630 * configure.srv (srv_i386_linux_xmlfiles): Remove
3631 i386/i386-XXX-linux.xml from it.
3632
25a93583
YQ
36332017-09-05 Yao Qi <yao.qi@linaro.org>
3634
3635 * configure.srv: Set srv_i386_linux_regobj empty if $development
3636 is false.
3637 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3638 initialize_low_tdesc.
3639 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3640 with #if initialize_low_tdesc.
3641 * linux-x86-tdesc-selftest.c: New file.
3642 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3643
5f035c07
YQ
36442017-09-05 Yao Qi <yao.qi@linaro.org>
3645
3646 * Makefile.in (arch-i386.o): New rule.
3647 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3648 (x86_64-*-linux*): Likewise.
3649 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3650 include arch/i386.h.
3651 (i386_linux_read_description): Remove code and call
3652 i386_create_target_description.
3653 * tdesc.c (allocate_target_description): New function.
3654 * tdesc.h (set_tdesc_architecture): Remove declaration.
3655 (set_tdesc_osabi): Likewise.
3656
0abe8a89
YQ
36572017-09-05 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3660 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3661 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3662 .xmltarget.
3663 * server.c (get_features_xml): Call tdesc_get_features_xml.
3664 * tdesc.c (set_tdesc_architecture): New function.
3665 (set_tdesc_osabi): New function.
3666 (tdesc_get_features_xml): New function.
3667 (tdesc_create_feature): Add an argument.
3668 * tdesc.h (struct target_desc) <features>: New field.
3669 <arch, osabi>: New field.
3670 (~target_desc): xfree features, arch, and osabi.
3671 (target_desc::oerator==): Don't compare .xmltarget.
3672 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3673 (set_tdesc_osabi): Likewise.
3674 (tdesc_get_features_xml): Likewise.
3675
0a188386
YQ
36762017-09-05 Yao Qi <yao.qi@linaro.org>
3677
3678 * linux-x86-tdesc.c: Include selftest.h.
3679 (i386_tdesc_test): New function.
3680 (initialize_low_tdesc): Call selftests::register_test.
3681 * tdesc.h: Include regdef.h.
3682 (target_desc): Override operator == and !=.
3683
f49ff000
YQ
36842017-09-05 Yao Qi <yao.qi@linaro.org>
3685
3686 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3687 (ipa_obj): Likewise.
3688 * linux-i386-ipa.c: Include common/x86-xstate.h
3689 (get_ipa_tdesc): Call i386_linux_read_description.
3690 (initialize_low_tracepoint): Don't call init_registers_XXX
3691 functions, call initialize_low_tdesc instead.
3692 * linux-x86-low.c (x86_linux_read_description): Call
3693 i386_linux_read_description.
3694 (initialize_low_arch): Don't call init_registers_i386_XXX
3695 functions, call initialize_low_tdesc.
3696 * linux-x86-tdesc.c: New file.
3697 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3698 (i386_get_ipa_tdesc_idx): Declare.
3699 (i386_get_ipa_tdesc): Declare.
3700 (initialize_low_tdesc): Declare.
3701
2b68ef2f
YQ
37022017-09-05 Yao Qi <yao.qi@linaro.org>
3703
3704 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3705 instead of 0.
3706
f7000548
YQ
37072017-09-05 Yao Qi <yao.qi@linaro.org>
3708
3709 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3710 * regcache.c (get_thread_regcache): Use VEC_length.
3711 (init_register_cache): Likewise.
3712 (regcache_cpy): Likewise.
3713 (registers_to_string): Iterate reg_defs via VEC_iterate.
3714 (find_regno): Likewise.
3715 (find_register_by_number): Use VEC_index.
3716 (register_size): Call find_register_by_number.
3717 (register_data): Call find_register_by_number.
3718 (supply_regblock): Use VEC_length.
3719 (regcache_raw_read_unsigned): Likewise.
3720 * tdesc.c (init_target_desc): Iterate reg_defs via
3721 VEC_iterate.
3722 (default_description): Update initializer.
3723 (copy_target_description): Don't update field num_registers.
3724 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3725 <num_registers>: Remove.
3726
50a421ac
SM
37272017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3728
3729 * Makefile.in (.SECONDARY): Define target.
3730
23fdd69e
SM
37312017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3732
3733 * linux-low.c (linux_wait_1): Adjust.
3734 * server.c (queue_stop_reply_callback): Adjust.
3735
0a2dde4a
SDJ
37362017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3737
3738 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3739 QEnvironmentUnset and QEnvironmentReset packets.
3740 (handle_query): Inform remote that QEnvironmentHexEncoded,
3741 QEnvironmentUnset and QEnvironmentReset are supported.
3742
6afd337d
SM
37432017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3744
3745 * inferiors.h (inferior_target_data): Rename to ...
3746 (thread_target_data): ... this.
3747 (inferior_regcache_data): Rename to ...
3748 (thread_regcache_data): ... this.
3749 (set_inferior_regcache_data): Rename to ...
3750 (set_thread_regcache_data): ... this.
3751 * inferiors.c (inferior_target_data): Rename to ...
3752 (thread_target_data): ... this.
3753 (inferior_regcache_data): Rename to ...
3754 (thread_regcache_data): ... this.
3755 (set_inferior_regcache_data): Rename to ...
3756 (set_thread_regcache_data): ... this.
3757 (free_one_thread): Update.
3758 * linux-low.h (get_thread_lwp): Update.
3759 * regcache.c (get_thread_regcache): Update.
3760 (regcache_invalidate_thread): Update.
3761 (free_register_cache_thread): Update.
3762 * win32-i386-low.c (update_debug_registers_callback): Update.
3763 (win32_get_current_dr): Update.
3764 * win32-low.c (thread_rec): Update.
3765 (delete_thread_info): Update.
3766 (continue_one_thread): Update.
3767 (suspend_one_thread): Update.
3768
a160cc46
SM
37692017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3770
3771 * inferiors.c (set_inferior_target_data): Remove.
3772 * inferiors.h (set_inferior_target_data): Remove.
3773
6d580b63
YQ
37742017-08-18 Yao Qi <yao.qi@linaro.org>
3775
3776 * Makefile.in (OBS): Add selftest.o.
3777 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3778 * configure, config.in: Re-generated.
3779 * server.c: Include common/sefltest.h.
3780 (captured_main): Handle option --selftest.
3781
f5a29eb0
YQ
37822017-08-09 Yao Qi <yao.qi@linaro.org>
3783
3784 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3785 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3786 i386-avx-mpx.o and i386-mmx.o.
3787 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3788 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3789 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3790 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3791 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3792 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3793 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3794 i386/amd64-avx-mpx.xml.
3795
57757c2f
YQ
37962017-08-09 Yao Qi <yao.qi@linaro.org>
3797
3798 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3799 and x32-avx-avx512.o.
3800 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3801 i386/x32-avx-avx512.xml.
3802
229d26fc
SM
38032017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3804
3805 * tracepoint.h (enum class fast_tpoint_collect_result): New
3806 enumeration.
3807 (fast_tracepoint_collecting): Change return type to
3808 fast_tpoint_collect_result.
3809 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3810 * linux-low.h: Include tracepoint.h.
3811 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3812 fast_tpoint_collect_result.
3813 * linux-low.c (handle_tracepoints): Adjust.
3814 (linux_fast_tracepoint_collecting): Change return type to
3815 fast_tpoint_collect_result.
3816 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3817 linux_wait_1, stuck_in_jump_pad_callback,
3818 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3819 proceed_one_lwp): Adjust to type change.
3820
2e1e43e1
YQ
38212017-07-10 Yao Qi <yao.qi@linaro.org>
3822
3823 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3824
adc764e7
YQ
38252017-06-29 Yao Qi <yao.qi@linaro.org>
3826
3827 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3828 Remove.
3829 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3830
a206891a
SM
38312017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3832
3833 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3834
9a6c7d9c
SDJ
38352017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3836
3837 * linux-low.c (linux_create_inferior): Adjust code to access the
3838 environment information via 'gdb_environ' class.
3839 * lynx-low.c (lynx_create_inferior): Likewise.
3840 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3841 (get_environ): Return a pointer to 'our_environ'.
3842 (captured_main): Initialize 'our_environ'.
3843 * server.h (get_environ): Adjust prototype.
3844 * spu-low.c (spu_create_inferior): Adjust code to access the
3845 environment information via 'gdb_environ' class.
3846
ae3e2ccf
SM
38472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3848
3849 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3850 usage of "register" keyword.
3851
3e019bdc
SM
38522017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3853
3854 * configure: Re-generate.
3855
8465943a
SM
38562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3857
3858 * configure: Re-generate.
3859
cf0dd6f0
SM
38602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3861
3862 * Makefile.in (COMPILE.pre): Add "-x c++".
3863
9845682b
SDJ
38642017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3865
3866 * fork-child.c: Conditionally include <signal.h>.
3867
aefd8b33
SDJ
38682017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3869
3870 * server.c (handle_general_set): Handle new packet
3871 "QStartupWithShell".
3872 (handle_query): Add "QStartupWithShell" to the list of supported
3873 packets.
3874 (gdbserver_usage): Add help text explaining the
3875 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3876 options.
3877 (captured_main): Recognize and act upon the presence of the new
3878 CLI options.
3879
2090129c
SDJ
38802017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3881 Pedro Alves <palves@redhat.com>
3882
3883 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3884 * configure: Regenerate.
3885 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3886 "fork-inferior.o".
3887 (i[34567]86-*-lynxos*): Likewise.
3888 (spu*-*-*): Likewise.
3889 * fork-child.c: New file.
3890 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3891 and "environ.h".
3892 (linux_ptrace_fun): New function.
3893 (linux_create_inferior): Adjust function prototype to reflect
3894 change on "target.h". Adjust function code to use
3895 "fork_inferior".
3896 (linux_request_interrupt): Delete "signal_pid".
3897 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3898 (lynx_ptrace_fun): New function.
3899 (lynx_create_inferior): Adjust function prototype to reflect
3900 change on "target.h". Adjust function code to use
3901 "fork_inferior".
3902 * nto-low.c (nto_create_inferior): Adjust function prototype and
3903 code to reflect change on "target.h". Update comments.
3904 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3905 "common-terminal.h" and "environ.h".
3906 (terminal_fd): Moved to fork-child.c.
3907 (old_foreground_pgrp): Likewise.
3908 (restore_old_foreground_pgrp): Likewise.
3909 (last_status): Make it global.
3910 (last_ptid): Likewise.
3911 (our_environ): New variable.
3912 (startup_with_shell): Likewise.
3913 (program_name): Likewise.
3914 (program_argv): Rename to...
3915 (program_args): ...this.
3916 (wrapper_argv): New variable.
3917 (start_inferior): Delete function.
3918 (get_exec_wrapper): New function.
3919 (get_exec_file): Likewise.
3920 (get_environ): Likewise.
3921 (prefork_hook): Likewise.
3922 (post_fork_inferior): Likewise.
3923 (postfork_hook): Likewise.
3924 (postfork_child_hook): Likewise.
3925 (handle_v_run): Update code to deal with arguments coming from the
3926 remote host. Update calls from "start_inferior" to
3927 "create_inferior".
3928 (captured_main): Likewise. Initialize environment variable. Call
3929 "have_job_control".
3930 * server.h (post_fork_inferior): New prototype.
3931 (get_environ): Likewise.
3932 (last_status): Declare.
3933 (last_ptid): Likewise.
3934 (signal_pid): Likewise.
3935 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3936 (spu_ptrace_fun): New function.
3937 (spu_create_inferior): Adjust function prototype to reflect change
3938 on "target.h". Adjust function code to use "fork_inferior".
3939 * target.c (target_terminal_init): New function.
3940 (target_terminal_inferior): Likewise.
3941 (target_terminal_ours): Likewise.
3942 * target.h: Include <vector>.
3943 (struct target_ops) <create_inferior>: Update prototype.
3944 (create_inferior): Update macro.
3945 * utils.c (gdb_flush_out_err): New function.
3946 * win32-low.c (win32_create_inferior): Adjust function prototype
3947 and code to reflect change on "target.h".
3948
043a4934
SDJ
39492017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3950
3951 * inferiors.c (switch_to_thread): New function.
3952
15652511
SDJ
39532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3954
3955 * Makefile.in (SFILE): Add "common/job-control.c".
3956 (OBS): Add "job-control.o".
3957
21ea5acd
SDJ
39582017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3959
3960 * Makefile: Remove "@host_makefile_frag@".
3961
e13cb306
PA
39622017-05-05 Pedro Alves <palves@redhat.com>
3963
3964 * configure: Regenerate.
3965
c94fee56
SDJ
39662017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3967
3968 * configure: Regenerate.
3969
a0ff9e1a
SM
39702017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3971
3972 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3973 software_single_step change of return type to
3974 std::vector<CORE_ADDR>.
3975 * linux-low.c (install_software_single_step_breakpoints):
3976 Likewise.
3977 * linux-low.h (install_software_single_step_breakpoints):
3978 Likewise.
3979
be628ab8
SDJ
39802017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3981
3982 * remote-utils.c: Include "gdb_termios.h" instead of
3983 "terminal.h".
3984 * terminal.h: Delete file.
3985
7c5ded6a
SDJ
39862017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3987
3988 * server.c: Include <vector>.
3989 <program_argv, wrapper_argv>: Convert to std::vector.
3990 (start_inferior): Rewrite function to use C++.
3991 (handle_v_run): Likewise. Update code that calculates the argv
3992 based on the vRun packet; use C++.
3993 (captured_main): Likewise.
3994
436252de
SM
39952017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3996
3997 * server.c (handle_v_cont): Initialize thread_resume::thread
3998 with null_ptid.
3999
9bf2a700
PA
40002017-04-05 Pedro Alves <palves@redhat.com>
4001
4002 * configure: Regenerate.
4003
a121b7c1
PA
40042017-04-05 Pedro Alves <palves@redhat.com>
4005
4006 * gdbreplay.c (sync_error): Constify.
4007 * linux-x86-low.c (push_opcode): Constify.
4008
21c8a587
PA
40092017-04-05 Pedro Alves <palves@redhat.com>
4010
4011 * win32-low.c (get_child_debug_event)
4012 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4013 Report TARGET_WAITKIND_SPURIOUS instead.
4014
fb32b4f7
PA
40152017-04-05 Pedro Alves <palves@redhat.com>
4016
e79be6e5
SM
4017 * remote-utils.c (remote_prepare, remote_open): Constify.
4018 * remote-utils.h (remote_prepare, remote_open): Constify.
4019 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 4020
65dd1e59
SM
40212017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4022
4023 * Makefile.in (clean): Clear .deps.
4024
8fa5b777
SM
40252017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4026
4027 * .gitignore: Remove generated files, replace with wildcard.
4028 * (clean): Replace removal of generated files with wildcard.
4029 (version.c): Replace with...
4030 (version-generated.c): ...this.
4031 (xml-builtin.c): Replace with...
4032 (xml-builtin-generated.c): ...this.
4033 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4034 (%.c: *regformats*): Replace with...
4035 (%-generated.c: *regformats*): ...this.
4036
a12e714b
MF
40372017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4038
4039 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4040 (xtensa_fill_gregset): Call collect_register_by_name for
4041 threadptr register.
4042 (xtensa_store_gregset): Call supply_register_by_name for
4043 threadptr register.
4044
1a09b50a
MF
40452017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4046
4047 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4048 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4049 (xtensa_store_gregset): Call supply_register for all registers in
4050 a0_regnum..a0_regnum + C0_NREGS range.
4051
1a01e7c6
SM
40522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4053
4054 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4055 (ax-ipa.o: ax.c): Remove.
4056 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4057 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4058 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4059 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4060 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4061
36bc18a8
SM
40622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4063
4064 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4065 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4066 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4067 (errors-ipa.o: ../common/errors.c): Remove.
4068 (format-ipa.o: ../common/format.c): Remove.
4069 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4070
a8ebe3d5
SM
40712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4072
4073 * Makefile.in (%-ipa.o: %.c): New rule.
4074 (tracepoint-ipa.o: tracepoint.c): Remove.
4075 (utils-ipa.o: utils.c): Remove.
4076 (remote-utils-ipa.o: remote-utils.c): Remove.
4077 (regcache-ipa.o: regcache.c): Remove.
4078 (i386-linux-ipa.o: i386-linux.c): Remove.
4079 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4080 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4081 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4082 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4083 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4084 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4085 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4086 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4087 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4088 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4089 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4090 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4091 (aarch64-ipa.o: aarch64.c): Remove.
4092 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4093 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4094 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4095 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4096 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4097 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4098 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4099 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4100 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4101 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4102 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4103 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4104 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4105 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4106 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4107 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4108 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4109 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4110 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4111 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4112 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4113 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4114 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4115 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4116 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4117 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4118 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4119 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4120 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4121 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4122 (tdesc-ipa.o: tdesc.c): Remove.
4123 (x32-linux-ipa.o: x32-linux.c): Remove.
4124 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4125 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4126
50cfacb7
SM
41272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4128
4129 * Makefile.in (%.o: ../arch/%.c): New rule.
4130 (arm.o: ../arch/arm.c): Remove.
4131 (arm-linux.o: ../arch/arm-linux.c): Remove.
4132 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4133 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4134
c5a22423
SM
41352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4136
4137 * Makefile.in (%.o: ../nat/%.c): New rule.
4138 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4139 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4140 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4141 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4142 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4143 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4144 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4145 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4146 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4147 (linux-personality.o: ../nat/linux-personality.c): Remove.
4148 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4149 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4150 (x86-linux.o: ../nat/x86-linux.c): Remove.
4151 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4152 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4153
6bda016b
SM
41542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4155
4156 * Makefile.in (%.o: ../common/%.c): New rule.
4157 (signals.o: ../common/signals.c): Remove.
4158 (print-utils.o: ../common/print-utils.c): Remove.
4159 (rsp-low.o: ../common/rsp-low.c): Remove.
4160 (common-utils.o: ../common/common-utils.c): Remove.
4161 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4162 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4163 (vec.o: ../common/vec.c): Remove.
4164 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4165 (xml-utils.o: ../common/xml-utils.c): Remove.
4166 (ptid.o: ../common/ptid.c): Remove.
4167 (buffer.o: ../common/buffer.c): Remove.
4168 (format.o: ../common/format.c): Remove.
4169 (filestuff.o: ../common/filestuff.c): Remove.
4170 (agent.o: ../common/agent.c): Remove.
4171 (errors.o: ../common/errors.c): Remove.
4172 (environ.o: ../common/environ.c): Remove.
4173 (common-debug.o: ../common/common-debug.c): Remove.
4174 (cleanups.o: ../common/cleanups.c): Remove.
4175 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4176 (fileio.o: ../common/fileio.c): Remove.
4177 (common-regcache.o: ../common/common-regcache.c): Remove.
4178 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4179 (new-op.o: ../common/new-op.c): Remove.
4180 (btrace-common.o: ../common/btrace-common.c): Remove.
4181
21122961
SM
41822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4183
4184 * Makefile.in (%.o: ../target/%.c): New rule.
4185 (waitstatus.o: ../target/waitstatus.c): Remove.
4186
c362e621
SM
41872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4188
4189 * Makefile.in
4190 (%.c: ../regformats/%.dat,
4191 (%.c: ../regformats/arm/%.dat,
4192 (%.c: ../regformats/i386/%.dat,
4193 (%.c: ../regformats/rs6000/%.dat): New rules.
4194 (aarch64.c): Remove.
4195 (reg-arm.c): Remove.
4196 (arm-with-iwmmxt.c): Remove.
4197 (arm-with-vfpv2.c): Remove.
4198 (arm-with-vfpv3.c): Remove.
4199 (arm-with-neon.c): Remove.
4200 (reg-bfin.c): Remove.
4201 (reg-cris.c): Remove.
4202 (reg-crisv32.c): Remove.
4203 (i386.c): Remove.
4204 (i386-linux.c): Remove.
4205 (i386-avx.c): Remove.
4206 (i386-avx-linux.c): Remove.
4207 (i386-avx-avx512.c): Remove.
4208 (i386-avx-avx512-linux.c): Remove.
4209 (i386-mpx.c): Remove.
4210 (i386-mpx-linux.c): Remove.
4211 (i386-avx-mpx-avx512-pku.c): Remove.
4212 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4213 (i386-avx-mpx.c): Remove.
4214 (i386-avx-mpx-linux.c): Remove.
4215 (i386-mmx.c): Remove.
4216 (i386-mmx-linux.c): Remove.
4217 (reg-ia64.c): Remove.
4218 (reg-m32r.c): Remove.
4219 (reg-m68k.c): Remove.
4220 (reg-cf.c): Remove.
4221 (mips-linux.c): Remove.
4222 (mips-dsp-linux.c): Remove.
4223 (mips64-linux.c): Remove.
4224 (mips64-dsp-linux.c): Remove.
4225 (nios2-linux.c): Remove.
4226 (powerpc-32.c): Remove.
4227 (powerpc-32l.c): Remove.
4228 (powerpc-altivec32l.c): Remove.
4229 (powerpc-cell32l.c): Remove.
4230 (powerpc-vsx32l.c): Remove.
4231 (powerpc-isa205-32l.c): Remove.
4232 (powerpc-isa205-altivec32l.c): Remove.
4233 (powerpc-isa205-vsx32l.c): Remove.
4234 (powerpc-e500l.c): Remove.
4235 (powerpc-64l.c): Remove.
4236 (powerpc-altivec64l.c): Remove.
4237 (powerpc-cell64l.c): Remove.
4238 (powerpc-vsx64l.c): Remove.
4239 (powerpc-isa205-64l.c): Remove.
4240 (powerpc-isa205-altivec64l.c): Remove.
4241 (powerpc-isa205-vsx64l.c): Remove.
4242 (s390-linux32.c): Remove.
4243 (s390-linux32v1.c): Remove.
4244 (s390-linux32v2.c): Remove.
4245 (s390-linux64.c): Remove.
4246 (s390-linux64v1.c): Remove.
4247 (s390-linux64v2.c): Remove.
4248 (s390-te-linux64.c): Remove.
4249 (s390-vx-linux64.c): Remove.
4250 (s390-tevx-linux64.c): Remove.
4251 (s390x-linux64.c): Remove.
4252 (s390x-linux64v1.c): Remove.
4253 (s390x-linux64v2.c): Remove.
4254 (s390x-te-linux64.c): Remove.
4255 (s390x-vx-linux64.c): Remove.
4256 (s390x-tevx-linux64.c): Remove.
4257 (tic6x-c64xp-linux.c): Remove.
4258 (tic6x-c64x-linux.c): Remove.
4259 (tic6x-c62x-linux.c): Remove.
4260 (reg-sh.c): Remove.
4261 (reg-sparc64.c): Remove.
4262 (reg-spu.c): Remove.
4263 (amd64.c): Remove.
4264 (amd64-linux.c): Remove.
4265 (amd64-avx.c): Remove.
4266 (amd64-avx-linux.c): Remove.
4267 (amd64-avx-avx512.c): Remove.
4268 (amd64-avx-avx512-linux.c): Remove.
4269 (amd64-mpx.c): Remove.
4270 (amd64-mpx-linux.c): Remove.
4271 (amd64-avx-mpx-avx512-pku.c): Remove.
4272 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4273 (amd64-avx-mpx.c): Remove.
4274 (amd64-avx-mpx-linux.c): Remove.
4275 (x32.c): Remove.
4276 (x32-linux.c): Remove.
4277 (x32-avx.c): Remove.
4278 (x32-avx-linux.c): Remove.
4279 (x32-avx-avx512.c): Remove.
4280 (x32-avx-avx512-linux.c): Remove.
4281 (reg-xtensa.c): Remove.
4282 (reg-tilegx.c): Remove.
4283 (reg-tilegx32.c): Remove.
4284
1672e0d9
SDJ
42852017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4286
4287 * Makefile.in (SFILES): Add "common/environ.c".
4288 (OBJS): Add "common/environ.h".
4289
239b6d10
WT
42902017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4291
4292 * configure.ac: Check if the fs_base and gs_base members of
4293 `struct user_regs_struct' exist.
4294 * config.in: Regenerated.
4295 * configure: Likewise.
4296
694b382c
AT
42972017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4298
4299 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4300 target_read_memory.
4301 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4302 (get_next_pcs_syscall_next_pc): Likewise.
4303
7dc53023
LM
43042016-12-23 Luis Machado <lgustavo@codesourcery.com>
4305
4306 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4307 * nto-x86-low.c: Likewise.
4308
ad02e4fe
SM
43092016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4310
4311 * Makefile.in: Include disable-implicit-rules.mk.
4312
dcb07cfa
PA
43132016-11-23 Pedro Alves <palves@redhat.com>
4314
4315 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4316 (debug_vprintf): Use std::chrono::steady_clock instead of
4317 gettimeofday. Use '.' instead of ':'.
4318 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4319 (get_timestamp): Use std::chrono::steady_clock instead of
4320 gettimeofday.
4321
8629c02c
SM
43222016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4323
4324 * Makefile.in: Fix whitespace formatting.
4325
b593ecca
SM
43262016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4327
4328 * Makefile.in (SFILES, OBS): Flatten list and order
4329 alphabetically.
4330
9986ba08
PA
43312016-11-23 Pedro Alves <palves@redhat.com>
4332
4333 * event-loop.c (handle_file_event): Use warning.
4334 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4335 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4336 Use warning.
4337
4eefa7bc
PA
43382016-11-23 Pedro Alves <palves@redhat.com>
4339
4340 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4341 output.
4342 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4343 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4344 debug_printf and debug_flush for debug output.
4345 * server.c (handle_general_set): Likewise.
4346 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4347 output.
4348
5443506e
SM
43492016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4350
4351 * Makefile.in (.c.o): Replace rule with ...
4352 (%.o: %.c): ... this one.
4353
3b165252
SM
43542016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4355
4356 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4357 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4358 make.
4359 * configure.ac: Remove checks for the make program.
4360 * configure: Re-generate.
4361
0bcda685
PA
43622016-10-28 Pedro Alves <palves@redhat.com>
4363
4364 * Makefile.in (CXX_DIALECT): Get from configure.
4365 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4366 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4367 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4368 * config.in: Regenerate.
4369 * configure: Regenerate.
4370
c3805894
YQ
43712016-10-27 Yao Qi <yao.qi@linaro.org>
4372
4373 * linux-low.c (linux_supports_range_stepping): Return true if
4374 can_software_single_step return true.
4375
89342618
YQ
43762016-10-27 Yao Qi <yao.qi@linaro.org>
4377
4378 * inferiors.c (find_inferior_in_random): New function.
4379 * inferiors.h (find_inferior_in_random): Declare.
4380 * linux-low.c (linux_wait_for_event_filtered): Call
4381 find_inferior_in_random instead of find_inferior.
4382
e3652c84
YQ
43832016-10-27 Yao Qi <yao.qi@linaro.org>
4384
4385 * linux-low.c (linux_wait_1): If single-step breakpoints are
4386 inserted, remove them.
4387
5a04c4cf
PA
43882016-10-26 Pedro Alves <palves@redhat.com>
4389
4390 * linux-low.c (handle_extended_wait): Link parent/child fork
4391 threads.
4392 (linux_wait_1): Unlink them.
4393 (linux_set_resume_request): Ignore resume requests for
4394 already-resumed and unhandled fork child threads.
4395 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4396 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4397 New functions.
4398 (handle_v_requests) <vCont>: Don't call require_running.
4399 * server.h (in_queued_stop_replies): New declaration.
4400
cb93dc7f
YQ
44012016-10-24 Yao Qi <yao.qi@linaro.org>
4402
4403 PR server/20733
4404 * linux-aarch64-low.c (append_insns): Cast the return value to
4405 'uint32_t *'.
4406
a1078bea
YQ
44072016-10-10 Yao Qi <yao.qi@linaro.org>
4408
4409 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4410
1fb77080
SDJ
44112016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4412
4413 * target.c (target_supports_multi_process): New function, moved
4414 from...
4415 * target.h (target_supports_multi_process): ... here. Remove
4416 macro.
4417
39b5a3b9
TT
44182016-10-05 Tom Tromey <tom@tromey.com>
4419
4420 PR remote/20655:
4421 * tracepoint.c (handle_tracepoint_bkpts): Check
4422 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4423
c1d0b70a
YQ
44242016-10-05 Yao Qi <yao.qi@linaro.org>
4425
4426 * configure.srv: Update the path of arm-*.xml files.
4427
0a69eedb
YQ
44282016-10-05 Terry Guo <terry.guo@arm.com>
4429 Yao Qi <yao.qi@linaro.org>
4430
4431 * Makefile.in: Adjust the path of rules.
4432 * configure.srv: Update the path of xml files.
4433 * regformats/arm-with-iwmmxt.dat: Regenerated.
4434 * regformats/arm-with-neon.dat: Likewise.
4435 * regformats/arm-with-vfpv2.dat: Likewise.
4436 * regformats/arm-with-vfpv3.dat Likewise.
4437
17e16485
YQ
44382016-09-30 Yao Qi <yao.qi@linaro.org>
4439
4440 PR gdbserver/20627
4441 * target.c (target_stop_and_wait): Don't call
4442 target_continue_no_signal, use resume_stop instead.
4443
edeeb602
YQ
44442016-09-26 Yao Qi <yao.qi@linaro.org>
4445
4446 * linux-low.c (linux_wait_1): Call debug_exit.
4447
503b1c39
PA
44482016-09-23 Pedro Alves <palves@redhat.com>
4449
4450 * Makefile.in (SFILES): Add common/new-op.c.
4451 (OBS): Add common/new-op.o.
4452 (new-op.o): New rule.
4453
74172ecf
SM
44542016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4455
4456 * .gitinore: Ignore more files.
4457
fc6cda2e
YQ
44582016-09-21 Yao Qi <yao.qi@linaro.org>
4459
4460 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4461 23.
4462
bc1e6c81
SDJ
44632016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4464
4465 * server.c (start_inferior): Call target_mourn_inferior instead of
4466 mourn_inferior; pass ptid_t argument to it.
4467 (resume): Likewise.
4468 (handle_target_event): Likewise.
4469 * target.c (target_mourn_inferior): New function.
4470 * target.h (mourn_inferior): Delete macro.
4471
0e00e962
AA
44722016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4473
4474 * linux-low.c (lwp_is_stepping): New function.
4475
1d8cb77d
CL
44762016-09-06 Carl Love <cel@us.ibm.com>
4477
4478 * server.c (start_inferior): Fixed comment, requested comment change
4479 didn't get updated correctly. Removed reference to ptrace () call as
4480 it is only true on Linux systems.
4481
7313bced
CL
44822016-09-06 Carl Love <cel@us.ibm.com>
4483
4484 * server.c (start_inferior): Do not call
4485 function target_post_create_inferior () if the
4486 inferior process has already exited.
4487
cf6de44d
PA
44882016-09-05 Pedro Alves <palves@redhat.com>
4489
4490 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4491 (COMPILE.pre, CC_LD): Use CXX directly.
4492 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4493 * acinclude.m4: Don't include build-with-cxx.m4.
4494 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4495 * configure: Regenerate.
4496
c1da6748
AT
44972016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4498
4499 PR gdb/19495
4500 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4501 call writing data to own_buf.
4502
f2b9e3df
SDJ
45032016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4504
4505 * target.c (mywait): Call target_wait instead of
4506 the_target->wait.
4507 (target_wait): New function.
4508
049a8570
SDJ
45092016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4510
4511 * server.c (start_inferior): New variable 'ptid'. Replace calls
4512 to the_target->resume by target_continue{,_no_signal}, depending
4513 on the case.
4514 * target.c (target_stop_and_wait): Call target_continue_no_signal
4515 instead of the_target->resume.
4516 (target_continue): New function.
4517
3aa5cfa0
AT
45182016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4519
4520 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4521
754653a7
AZ
45222016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4523
4524 PR server/20491
4525 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4526 ps_prochandle.
4527 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4528 * linux-arm-low.c (ps_get_thread_area): Likewise.
4529 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4530 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4531 * linux-mips-low.c (ps_get_thread_area): Likewise.
4532 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4533 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4534 * linux-x86-low.c (ps_get_thread_area): Likewise.
4535 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4536
ed036b40
PA
45372016-08-19 Pedro Alves <palves@redhat.com>
4538
4539 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4540
c8ef42ee
PA
45412016-08-19 Pedro Alves <palves@redhat.com>
4542
4543 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4544 comment. Use memcpy instead of casting through unsigned long.
4545
9c235a72
PA
45462016-08-19 Pedro Alves <palves@redhat.com>
4547
4548 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4549 allocating around 0x80000000.
4550
201506da
PA
45512016-08-19 Pedro Alves <palves@redhat.com>
4552
4553 PR gdb/20415
4554 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4555 (x32-avx512-linux-ipa.o): New rules.
4556 * configure.ac (x86_64-*-linux*): New x32 check.
4557 * configure.srv (ipa_x32_linux_regobj): New.
4558 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4559 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4560 descriptions.
4561 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4562 descriptions.
4563 * configure: Regenerate.
4564
f348d89a
PA
45652016-08-09 Pedro Alves <palves@redhat.com>
4566
4567 PR gdb/18653
4568 * Makefile.in (OBS): Add signals-state-save-restore.o.
4569 (signals-state-save-restore.o): New rule.
4570 * config.in: Regenerate.
4571 * configure: Regenerate.
4572 * linux-low.c: Include "signals-state-save-restore.h".
4573 (linux_create_inferior): Call
4574 restore_original_signals_state.
4575 * server.c: Include "dispositions-save-restore.h".
4576 (captured_main): Call save_original_signals_state.
4577
1baf5149
PA
45782016-08-05 Pedro Alves <palves@redhat.com>
4579
4580 * configure: Regenerate.
4581
fcd4a73d
YQ
45822016-08-04 Yao Qi <yao.qi@linaro.org>
4583
4584 * linux-low.c (regsets_fetch_inferior_registers): Check
4585 errno is ESRCH or not.
4586
979659d0
YQ
45872016-08-02 Yao Qi <yao.qi@linaro.org>
4588
4589 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4590 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4591 (thread_db_load_search): Update.
4592 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4593 td_ta_set_event and td_ta_event_getmsg.
4594
6598661d
PA
45952016-07-26 Pedro Alves <palves@redhat.com>
4596
4597 PR server/20414
4598 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4599 of unsigned long for 64-bit registers and use uint32_t instead of
4600 unsigned int for 32-bit registers.
4601
9cf12d57
PA
46022016-07-26 Pedro Alves <palves@redhat.com>
4603
4604 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4605 to 'ptrace'.
4606
305450ed
TT
46072016-07-21 Tom Tromey <tom@tromey.com>
4608
4609 * configure: Rebuild.
4610
2583da7c
YQ
46112016-07-21 Yao Qi <yao.qi@linaro.org>
4612
4613 * mem-break.c (find_gdb_breakpoint): Cast bp to
4614 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4615
21536b36
YQ
46162016-07-21 Yao Qi <yao.qi@linaro.org>
4617
4618 * server.c (handle_v_requests): Support s and S actions
4619 if target_supports_software_single_step return true.
4620
8901d193
YQ
46212016-07-21 Yao Qi <yao.qi@linaro.org>
4622
4623 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4624 is resume_step, call maybe_hw_step.
4625 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4626 and unstop them.
4627 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4628 breakpoints or not.
4629 (proceed_one_lwp): If resume request is resume_step, install
4630 reinsert breakpoints and call maybe_hw_step.
4631
0e9a339e
YQ
46322016-07-21 Yao Qi <yao.qi@linaro.org>
4633
4634 * linux-low.c (proceed_one_lwp): Declare.
4635 (linux_resume_one_thread): Remove local variable 'step'.
4636 Lift code enqueue signal. Call proceed_one_lwp instead of
4637 linux_resume_one_lwp.
4638
4281b351
YQ
46392016-07-21 Yao Qi <yao.qi@linaro.org>
4640
4641 * linux-low.c (linux_resume_one_thread): Call
4642 enqueue_pending_signal.
4643
984a2c04
YQ
46442016-07-21 Yao Qi <yao.qi@linaro.org>
4645
4646 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4647 * inferiors.c (do_restore_current_thread_cleanup): New function.
4648 (make_cleanup_restore_current_thread): Likewise.
4649 * linux-low.c (install_software_single_step_breakpoints): Call
4650 make_cleanup_restore_current_thread. Switch current_thread to
4651 thread.
4652
bec903c9
YQ
46532016-07-21 Yao Qi <yao.qi@linaro.org>
4654
4655 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4656 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4657 (clone_one_breakpoint): Likewise.
4658 (delete_reinsert_breakpoints): Change parameter to thread.
4659 Callers updated.
4660 (has_reinsert_breakpoints): Likewise.
4661 (uninsert_reinsert_breakpoints): Likewise.
4662 (reinsert_reinsert_breakpoints): Likewise.
4663 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4664 (delete_reinsert_breakpoints): Likewise.
4665 (reinsert_reinsert_breakpoints): Likewise.
4666 (uninsert_reinsert_breakpoints): Likewise.
4667 (has_reinsert_breakpoints): Likewise.
4668
63c40ec7
YQ
46692016-07-21 Yao Qi <yao.qi@linaro.org>
4670
4671 * inferiors.c (get_thread_process): Make parameter const.
4672 * inferiors.h (get_thread_process): Update declaration.
4673 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4674 Add new parameters child_thread and parent_thread. Callers
4675 updated.
4676 * mem-break.h (clone_all_breakpoints): Update declaration.
4677
9aa76cd0
YQ
46782016-07-21 Yao Qi <yao.qi@linaro.org>
4679
4680 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4681 <command_list, handler>: Remove.
4682 (struct gdb_breakpoint): New.
4683 (struct other_breakpoint): New.
4684 (struct reinsert_breakpoint): New.
4685 (is_gdb_breakpoint): New function.
4686 (any_persistent_commands): Update command_list if
4687 is_gdb_breakpoint returns true.
4688 (set_breakpoint): Create breakpoints according to their types.
4689 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4690 (set_gdb_breakpoint_1): Likewise.
4691 (set_gdb_breakpoint): Likewise.
4692 (clear_breakpoint_conditions): Change parameter type to
4693 'struct gdb_breakpoint *'.
4694 (clear_breakpoint_commands): Likewise.
4695 (clear_breakpoint_conditions_and_commands): Likewise.
4696 (add_condition_to_breakpoint): Likewise.
4697 (add_breakpoint_condition): Likewise.
4698 (add_commands_to_breakpoint): Likewise.
4699 (check_breakpoints): Check other_breakpoint.
4700 (clone_one_breakpoint): Clone breakpopint according to its type.
4701 * mem-break.h (struct gdb_breakpoint): Declare.
4702 (set_gdb_breakpoint): Update declaration.
4703 (clear_breakpoint_conditions_and_commands): Likewise.
4704 (add_breakpoint_condition): Likewise.
4705 (add_breakpoint_commands): Likewise.
4706 * server.c (process_point_options): Change parameter type to
4707 'struct gdb_breakpoint *'.
4708
811f8301
YQ
47092016-07-21 Yao Qi <yao.qi@linaro.org>
4710
4711 * mem-break.c (set_breakpoint_at): Rename it to ...
4712 (set_breakpoint_type_at): ... it.
4713 (set_breakpoint_at): Call set_breakpoint_type_at.
4714 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4715 * mem-break.h (set_breakpoint_at): Update comments.
4716
b1c51e36
CLT
47172016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4718
4719 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4720 to buf parameter.
4721 (nios2_store_gregset): Likewise.
4722
ced2dffb
PA
47232016-07-01 Pedro Alves <palves@redhat.com>
4724 Antoine Tremblay <antoine.tremblay@ericsson.com>
4725
4726 * linux-low.c: Change interface to take the target lwp_info
4727 pointer directly and return void. Handle detaching from a zombie
4728 thread.
4729 (linux_detach_lwp_callback): New function.
4730 (linux_detach): Detach from the leader thread after detaching from
4731 the clone threads.
4732
2ac09a5b
YQ
47332016-06-28 Yao Qi <yao.qi@linaro.org>
4734
4735 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4736 for variable new_offset.
4737 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4738 (aarch64_ftrace_insn_reloc_cb): Likewise.
4739 (aarch64_ftrace_insn_reloc_tb): Likewise.
4740 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4741 PRIx64 instead of PRIx32.
4742
79e7fd4f
YQ
47432016-06-28 Yao Qi <yao.qi@linaro.org>
4744
4745 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4746 (the_low_target): Install arm_get_syscall_trapinfo.
4747
061fc021
YQ
47482016-06-28 Yao Qi <yao.qi@linaro.org>
4749
4750 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4751 function.
4752 (the_low_target): Install aarch64_get_syscall_trapinfo.
4753
4cc32bec
YQ
47542016-06-28 Yao Qi <yao.qi@linaro.org>
4755
4756 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4757 Callers updated.
4758 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4759 Remove parameter sysno.
4760 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4761 sysret.
4762
782c1122
AA
47632016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4764
4765 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4766 (s390_emit_ne_goto): Likewise.
4767 (s390_emit_lt_goto): Likewise.
4768 (s390_emit_le_goto): Likewise.
4769 (s390_emit_gt_goto): Likewise.
4770 (s390_emit_ge_goto): Likewise.
4771 (s390x_emit_eq_goto): Likewise.
4772 (s390x_emit_ne_goto): Likewise.
4773 (s390x_emit_lt_goto): Likewise.
4774 (s390x_emit_le_goto): Likewise.
4775 (s390x_emit_gt_goto): Likewise.
4776 (s390x_emit_ge_goto): Likewise.
4777 (s390_emit_ops_impl): Mark variable static.
4778 (s390x_emit_ops): Likewise.
4779
2e7b624b
YQ
47802016-06-17 Yao Qi <yao.qi@linaro.org>
4781
4782 * linux-low.c (handle_extended_wait): Call
4783 uninsert_reinsert_breakpoints for the parent process. Remove
4784 reinsert breakpoints from the child process. Reinsert them to
4785 the parent process when vfork is done.
4786 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4787 (reinsert_reinsert_breakpoints): New function.
4788 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4789 (reinsert_reinsert_breakpoints): Declare.
4790
8a81c5d7
YQ
47912016-06-17 Yao Qi <yao.qi@linaro.org>
4792
4793 * linux-low.c (handle_extended_wait): If the parent is doing
4794 step-over, remove the reinsert breakpoints from the forked child.
4795
f50bf8e5
YQ
47962016-06-17 Yao Qi <yao.qi@linaro.org>
4797
4798 * linux-low.c (unsuspend_all_lwps): Declare.
4799 (linux_low_filter_event): If thread exited, call finish_step_over.
4800 If step-over is finished, unsuspend other threads.
4801
8376a3cb
YQ
48022016-06-17 Yao Qi <yao.qi@linaro.org>
4803
4804 * linux-low.c (linux_resume_one_lwp_throw): Assert
4805 has_reinsert_breakpoints returns false.
4806 * mem-break.c (delete_disabled_breakpoints): Assert
4807 bp type isn't reinsert_breakpoint.
4808
f79b145d
YQ
48092016-06-17 Yao Qi <yao.qi@linaro.org>
4810
4811 * linux-low.c (maybe_hw_step): New function.
4812 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4813 (finish_step_over): Switch current_thread to lwp temporarily,
4814 and assert has_reinsert_breakpoints returns true.
4815 (proceed_one_lwp): Call maybe_hw_step.
4816 * mem-break.c (has_reinsert_breakpoints): New function.
4817 * mem-break.h (has_reinsert_breakpoints): Declare.
4818
0ae534d2
JT
48192016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4820
4821 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4822
fcdad592
YQ
48232016-05-17 Yao Qi <yao.qi@linaro.org>
4824
4825 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4826 instead of find_inferior.
4827
9e784964
YQ
48282016-05-05 Yao Qi <yao.qi@linaro.org>
4829
4830 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4831 Initialize res to zero.
4832
cf2ebb6e
YQ
48332016-05-05 Yao Qi <yao.qi@linaro.org>
4834
4835 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4836 to uint32_t.
4837
c1aebf87
UW
48382016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4839
4840 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4841 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4842 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4843
35fd2deb 48442016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4845 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4846
4847 * tracepoint.c (write_inferior_int8): New function.
4848 (cmd_qtenable_disable): Write enable flag using
4849 write_inferior_int8.
4850
484b3c32
YQ
48512016-04-25 Yao Qi <yao.qi@linaro.org>
4852
4853 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4854 (need_step_over_p): Return zero if the LWP has pending signals
4855 can be delivered on software single step target.
4856
85ba7d86
YQ
48572016-04-25 Yao Qi <yao.qi@linaro.org>
4858
4859 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4860 return instead of error.
4861
3539aa13
YQ
48622016-04-22 Yao Qi <yao.qi@linaro.org>
4863
4864 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4865 to 23.
4866
5b061e98
YQ
48672016-04-22 Yao Qi <yao.qi@linaro.org>
4868
4869 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4870 signal when stepping over breakpoint with software single
4871 step.
4872
3451269c
PA
48732016-04-21 Pedro Alves <palves@redhat.com>
4874
4875 * linux-s390-low.c (s390_collect_ptrace_register)
4876 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4877 add casts.
4878 (s390_check_regset): Use void * instead of gdb_byte *.
4879
a2358508
PA
48802016-04-20 Pedro Alves <palves@redhat.com>
4881
4882 * configure: Renegerate.
4883
6885166d
YQ
48842016-04-20 Yao Qi <yao.qi@linaro.org>
4885
4886 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4887 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4888 number 16.
4889 (arm_store_gregset): Likewise.
4890
2b863f51
WT
48912016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4892
4893 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4894 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4895 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4896 (amd64-avx-mpx-linux.c): New rules.
4897 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4898 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4899 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4900 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4901 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4902 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4903 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4904 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4905 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4906 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4907 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4908 * linux-x86-low.c (x86_linux_read_description): Add case for
4909 X86_XSTATE_AVX_MPX_MASK.
4910 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4911 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4912 init_registers_i386_avx_mpx_linux.
4913 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4914 (initialize_low_tracepoint): Call
4915 init_registers_i386_avx_mpx_linux.
4916 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4917 (initialize_low_tracepoint): Call
4918 init_registers_amd64_avx_mpx_linux.
4919 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4920 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4921 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4922 declarations.
4923
9b30624b
PA
49242016-04-18 Pedro Alves <palves@redhat.com>
4925
4926 * configure: Regenerate.
4927
45e3745e
AT
49282016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4929
4930 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4931 (aarch64_emit_sub): Likewise.
4932
2afc13ff
PA
49332016-04-12 Pedro Alves <palves@redhat.com>
4934
4935 * utils.c (prepare_to_throw_exception): Delete.
4936
6e774b13
SM
49372016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4938
4939 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4940
4dca19f8
MK
49412016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4942
4943 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4944
d0a9981f
MK
49452016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4946
4947 * linux-aarch64-ipa.c: Add <elf.h> include.
4948 * linux-ppc-ipa.c: Add <elf.h> include.
4949 * linux-s390-ipa.c: Add <elf.h> include.
4950
252db07e
MK
49512016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4952
4953 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4954 (get_raw_reg_ptr): Likewise.
4955 (get_trace_state_variable_value_ptr): Likewise.
4956 (set_trace_state_variable_value_ptr): Likewise.
4957 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4958 char *.
4959
14e2b6d9
MK
49602016-03-31 Wei-cheng Wang <cole945@gmail.com>
4961 Marcin Kościelnicki <koriakin@0x04.net>
4962
4963 PR/17221
4964 * linux-ppc-low.c (emit_insns): New function.
4965 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4966 (ppc_emit_prologue): New function.
4967 (ppc_emit_epilogue): New function.
4968 (ppc_emit_add): New function.
4969 (ppc_emit_sub): New function.
4970 (ppc_emit_mul): New function.
4971 (ppc_emit_lsh): New function.
4972 (ppc_emit_rsh_signed): New function.
4973 (ppc_emit_rsh_unsigned): New function.
4974 (ppc_emit_ext): New function.
4975 (ppc_emit_zero_ext): New function.
4976 (ppc_emit_log_not): New function.
4977 (ppc_emit_bit_and): New function.
4978 (ppc_emit_bit_or): New function.
4979 (ppc_emit_bit_xor): New function.
4980 (ppc_emit_bit_not): New function.
4981 (ppc_emit_equal): New function.
4982 (ppc_emit_less_signed): New function.
4983 (ppc_emit_less_unsigned): New function.
4984 (ppc_emit_ref): New function.
4985 (ppc_emit_const): New function.
4986 (ppc_emit_reg): New function.
4987 (ppc_emit_pop): New function.
4988 (ppc_emit_stack_flush): New function.
4989 (ppc_emit_swap): New function.
4990 (ppc_emit_stack_adjust): New function.
4991 (ppc_emit_call): New function.
4992 (ppc_emit_int_call_1): New function.
4993 (ppc_emit_void_call_2): New function.
4994 (ppc_emit_if_goto): New function.
4995 (ppc_emit_goto): New function.
4996 (ppc_emit_eq_goto): New function.
4997 (ppc_emit_ne_goto): New function.
4998 (ppc_emit_lt_goto): New function.
4999 (ppc_emit_le_goto): New function.
5000 (ppc_emit_gt_goto): New function.
5001 (ppc_emit_ge_goto): New function.
5002 (ppc_write_goto_address): New function.
5003 (ppc_emit_ops_impl): New static variable.
5004 (ppc64v1_emit_prologue): New function.
5005 (ppc64v2_emit_prologue): New function.
5006 (ppc64_emit_epilogue): New function.
5007 (ppc64_emit_add): New function.
5008 (ppc64_emit_sub): New function.
5009 (ppc64_emit_mul): New function.
5010 (ppc64_emit_lsh): New function.
5011 (ppc64_emit_rsh_signed): New function.
5012 (ppc64_emit_rsh_unsigned): New function.
5013 (ppc64_emit_ext): New function.
5014 (ppc64_emit_zero_ext): New function.
5015 (ppc64_emit_log_not): New function.
5016 (ppc64_emit_bit_and): New function.
5017 (ppc64_emit_bit_or): New function.
5018 (ppc64_emit_bit_xor): New function.
5019 (ppc64_emit_bit_not): New function.
5020 (ppc64_emit_equal): New function.
5021 (ppc64_emit_less_signed): New function.
5022 (ppc64_emit_less_unsigned): New function.
5023 (ppc64_emit_ref): New function.
5024 (ppc64_emit_const): New function.
5025 (ppc64v1_emit_reg): New function.
5026 (ppc64v2_emit_reg): New function.
5027 (ppc64_emit_pop): New function.
5028 (ppc64_emit_stack_flush): New function.
5029 (ppc64_emit_swap): New function.
5030 (ppc64v1_emit_call): New function.
5031 (ppc64v2_emit_call): New function.
5032 (ppc64v1_emit_int_call_1): New function.
5033 (ppc64v2_emit_int_call_1): New function.
5034 (ppc64v1_emit_void_call_2): New function.
5035 (ppc64v2_emit_void_call_2): New function.
5036 (ppc64_emit_if_goto): New function.
5037 (ppc64_emit_eq_goto): New function.
5038 (ppc64_emit_ne_goto): New function.
5039 (ppc64_emit_lt_goto): New function.
5040 (ppc64_emit_le_goto): New function.
5041 (ppc64_emit_gt_goto): New function.
5042 (ppc64_emit_ge_goto): New function.
5043 (ppc64v1_emit_ops_impl): New static variable.
5044 (ppc64v2_emit_ops_impl): New static variable.
5045 (ppc_emit_ops): New function.
5046 (linux_low_target): Wire in ppc_emit_ops.
5047
a2174ba4
MK
50482016-03-31 Wei-cheng Wang <cole945@gmail.com>
5049 Marcin Kościelnicki <koriakin@0x04.net>
5050
5051 PR/17221
5052 * Makefile.in: Add powerpc-*-ipa.o
5053 * configure.srv: Add ipa_obj for powerpc*-linux.
5054 * linux-ppc-ipa.c: New file.
5055 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5056 includes.
5057 (PPC_FIELD): New macro.
5058 (PPC_SEXT): New macro.
5059 (PPC_OP6): New macro.
5060 (PPC_BO): New macro.
5061 (PPC_LI): New macro.
5062 (PPC_BD): New macro.
5063 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5064 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5065 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5066 (ppc_get_thread_area): New function.
5067 (is_elfv2_inferior): New function.
5068 (gen_ds_form): New function.
5069 (GEN_STD): New macro.
5070 (GEN_STDU): New macro.
5071 (GEN_LD): New macro.
5072 (GEN_LDU): New macro.
5073 (gen_d_form): New function.
5074 (GEN_ADDI): New macro.
5075 (GEN_ADDIS): New macro.
5076 (GEN_LI): New macro.
5077 (GEN_LIS): New macro.
5078 (GEN_ORI): New macro.
5079 (GEN_ORIS): New macro.
5080 (GEN_LWZ): New macro.
5081 (GEN_STW): New macro.
5082 (GEN_STWU): New macro.
5083 (gen_xfx_form): New function.
5084 (GEN_MFSPR): New macro.
5085 (GEN_MTSPR): New macro.
5086 (GEN_MFCR): New macro.
5087 (GEN_MTCR): New macro.
5088 (GEN_SYNC): New macro.
5089 (GEN_LWSYNC): New macro.
5090 (gen_x_form): New function.
5091 (GEN_OR): New macro.
5092 (GEN_MR): New macro.
5093 (GEN_LWARX): New macro.
5094 (GEN_STWCX): New macro.
5095 (GEN_CMPW): New macro.
5096 (gen_md_form): New function.
5097 (GEN_RLDICL): New macro.
5098 (GEN_RLDICR): New macro.
5099 (gen_i_form): New function.
5100 (GEN_B): New macro.
5101 (GEN_BL): New macro.
5102 (gen_b_form): New function.
5103 (GEN_BNE): New macro.
5104 (GEN_LOAD): New macro.
5105 (GEN_STORE): New macro.
5106 (gen_limm): New function.
5107 (gen_atomic_xchg): New function.
5108 (gen_call): New function.
5109 (ppc_relocate_instruction): New function.
5110 (ppc_install_fast_tracepoint_jump_pad): New function.
5111 (ppc_get_min_fast_tracepoint_insn_len): New function.
5112 (ppc_get_ipa_tdesc_idx): New function.
5113 (the_low_target): Wire in the new functions.
5114 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5115 tdescs.
5116 * linux-ppc-tdesc.h: New file.
5117
a13c4696
MK
51182016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5119
5120 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5121 (alloc_jump_pad_buffer): New function.
5122 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5123 (alloc_jump_pad_buffer): New function.
5124 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5125 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5126 (alloc_jump_pad_buffer): New function.
5127 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5128 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5129 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5130 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5131
1cda1512
MK
51322016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5133
5134 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5135 * linux-amd64-ipa.c: Likewise.
5136 * linux-i386-ipa.c: Likewise.
5137 * linux-s390-ipa.c: Likewise.
5138 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5139 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5140 set_trace_state_variable_value_ptr.
5141 (struct ipa_sym_addresses): Likewise.
5142 (symbol_list): Likewise.
5143 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5144 accessing gdb_collect directly.
5145 (gdb_collect_ptr_type): New typedef.
5146 (get_raw_reg_ptr_type): New typedef.
5147 (get_trace_state_variable_value_ptr_type): New typedef.
5148 (set_trace_state_variable_value_ptr_type): New typedef.
5149 (gdb_collect_ptr): New global.
5150 (get_raw_reg_ptr): New global.
5151 (get_trace_state_variable_value_ptr): New global.
5152 (set_trace_state_variable_value_ptr): New global.
5153 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5154 accessing get_raw_reg directly.
5155 (get_get_tsv_func_addr): Likewise for
5156 get_trace_state_variable_value_ptr.
5157 (get_set_tsv_func_addr): Likewise for
5158 set_trace_state_variable_value_ptr.
5159 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5160
72fb5488
SM
51612016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5162
5163 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5164
28170b88
MK
51652016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5166
5167 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5168 packets.
5169 (relocate_instruction): Remove own_buf.
5170 * server.c (own_buf): Make global.
5171 (handle_v_requests): Make global.
5172 * server.h (own_buf): New declaration.
5173 (handle_v_requests): New prototype.
5174
f39e8743
MK
51752016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5176
5177 PR 18377
5178 * linux-s390-low.c (add_insns): New function.
5179 (s390_emit_prologue): New function.
5180 (s390_emit_epilogue): New function.
5181 (s390_emit_add): New function.
5182 (s390_emit_sub): New function.
5183 (s390_emit_mul): New function.
5184 (s390_emit_lsh): New function.
5185 (s390_emit_rsh_signed): New function.
5186 (s390_emit_rsh_unsigned): New function.
5187 (s390_emit_ext): New function.
5188 (s390_emit_log_not): New function.
5189 (s390_emit_bit_and): New function.
5190 (s390_emit_bit_or): New function.
5191 (s390_emit_bit_xor): New function.
5192 (s390_emit_bit_not): New function.
5193 (s390_emit_equal): New function.
5194 (s390_emit_less_signed): New function.
5195 (s390_emit_less_unsigned): New function.
5196 (s390_emit_ref): New function.
5197 (s390_emit_if_goto): New function.
5198 (s390_emit_goto): New function.
5199 (s390_write_goto_address): New function.
5200 (s390_emit_litpool): New function.
5201 (s390_emit_const): New function.
5202 (s390_emit_call): New function.
5203 (s390_emit_reg): New function.
5204 (s390_emit_pop): New function.
5205 (s390_emit_stack_flush): New function.
5206 (s390_emit_zero_ext): New function.
5207 (s390_emit_swap): New function.
5208 (s390_emit_stack_adjust): New function.
5209 (s390_emit_set_r2): New function.
5210 (s390_emit_int_call_1): New function.
5211 (s390_emit_void_call_2): New function.
5212 (s390_emit_eq_goto): New function.
5213 (s390_emit_ne_goto): New function.
5214 (s390_emit_lt_goto): New function.
5215 (s390_emit_le_goto): New function.
5216 (s390_emit_gt_goto): New function.
5217 (s390_emit_ge_goto): New function.
5218 (s390x_emit_prologue): New function.
5219 (s390x_emit_epilogue): New function.
5220 (s390x_emit_add): New function.
5221 (s390x_emit_sub): New function.
5222 (s390x_emit_mul): New function.
5223 (s390x_emit_lsh): New function.
5224 (s390x_emit_rsh_signed): New function.
5225 (s390x_emit_rsh_unsigned): New function.
5226 (s390x_emit_ext): New function.
5227 (s390x_emit_log_not): New function.
5228 (s390x_emit_bit_and): New function.
5229 (s390x_emit_bit_or): New function.
5230 (s390x_emit_bit_xor): New function.
5231 (s390x_emit_bit_not): New function.
5232 (s390x_emit_equal): New function.
5233 (s390x_emit_less_signed): New function.
5234 (s390x_emit_less_unsigned): New function.
5235 (s390x_emit_ref): New function.
5236 (s390x_emit_if_goto): New function.
5237 (s390x_emit_const): New function.
5238 (s390x_emit_call): New function.
5239 (s390x_emit_reg): New function.
5240 (s390x_emit_pop): New function.
5241 (s390x_emit_stack_flush): New function.
5242 (s390x_emit_zero_ext): New function.
5243 (s390x_emit_swap): New function.
5244 (s390x_emit_stack_adjust): New function.
5245 (s390x_emit_int_call_1): New function.
5246 (s390x_emit_void_call_2): New function.
5247 (s390x_emit_eq_goto): New function.
5248 (s390x_emit_ne_goto): New function.
5249 (s390x_emit_lt_goto): New function.
5250 (s390x_emit_le_goto): New function.
5251 (s390x_emit_gt_goto): New function.
5252 (s390x_emit_ge_goto): New function.
5253 (s390_emit_ops): New function.
5254 (struct linux_target_ops): Fill in emit_ops hook.
5255
abd9baf9
MK
52562016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5257
5258 PR 18377
5259 * Makefile.in: Add s390 IPA files.
5260 * configure.srv: Build IPA for s390.
5261 * linux-s390-ipa.c: New file.
5262 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5263 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5264 (tdesc_s390_linux32): Likewise.
5265 (init_registers_s390_linux32v1): Likewise.
5266 (tdesc_s390_linux32v1): Likewise.
5267 (init_registers_s390_linux32v2): Likewise.
5268 (tdesc_s390_linux32v2): Likewise.
5269 (init_registers_s390_linux64): Likewise.
5270 (tdesc_s390_linux64): Likewise.
5271 (init_registers_s390_linux64v1): Likewise.
5272 (tdesc_s390_linux64v1): Likewise.
5273 (init_registers_s390_linux64v2): Likewise.
5274 (tdesc_s390_linux64v2): Likewise.
5275 (init_registers_s390_te_linux64): Likewise.
5276 (tdesc_s390_te_linux64): Likewise.
5277 (init_registers_s390_vx_linux64): Likewise.
5278 (tdesc_s390_vx_linux64): Likewise.
5279 (init_registers_s390_tevx_linux64): Likewise.
5280 (tdesc_s390_tevx_linux64): Likewise.
5281 (init_registers_s390x_linux64): Likewise.
5282 (tdesc_s390x_linux64): Likewise.
5283 (init_registers_s390x_linux64v1): Likewise.
5284 (tdesc_s390x_linux64v1): Likewise.
5285 (init_registers_s390x_linux64v2): Likewise.
5286 (tdesc_s390x_linux64v2): Likewise.
5287 (init_registers_s390x_te_linux64): Likewise.
5288 (tdesc_s390x_te_linux64): Likewise.
5289 (init_registers_s390x_vx_linux64): Likewise.
5290 (tdesc_s390x_vx_linux64): Likewise.
5291 (init_registers_s390x_tevx_linux64): Likewise.
5292 (tdesc_s390x_tevx_linux64): Likewise.
5293 (have_hwcap_s390_vx): New static variable.
5294 (s390_arch_setup): Fill have_hwcap_s390_vx.
5295 (s390_get_thread_area): New function.
5296 (s390_ft_entry_gpr_esa): New const.
5297 (s390_ft_entry_gpr_zarch): New const.
5298 (s390_ft_entry_misc): New const.
5299 (s390_ft_entry_fr): New const.
5300 (s390_ft_entry_vr): New const.
5301 (s390_ft_main_31): New const.
5302 (s390_ft_main_64): New const.
5303 (s390_ft_exit_fr): New const.
5304 (s390_ft_exit_vr): New const.
5305 (s390_ft_exit_misc): New const.
5306 (s390_ft_exit_gpr_esa): New const.
5307 (s390_ft_exit_gpr_zarch): New const.
5308 (append_insns): New function.
5309 (s390_relocate_instruction): New function.
5310 (s390_install_fast_tracepoint_jump_pad): New function.
5311 (s390_get_min_fast_tracepoint_insn_len): New function.
5312 (s390_get_ipa_tdesc_idx): New function.
5313 (struct linux_target_ops): Wire in the above functions.
5314 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5315 * linux-s390-tdesc.h: New file.
5316
a4105d04
MK
53172016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5318
5319 * linux-s390-low.c (s390_supports_tracepoints): New function.
5320 (struct linux_target_ops): Fill supports_tracepoints hook.
5321
35ac8b3e
YQ
53222016-03-18 Yao Qi <yao.qi@linaro.org>
5323
5324 * linux-low.c (lwp_signal_can_be_delivered): New function.
5325 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5326
94610ec4
YQ
53272016-03-18 Yao Qi <yao.qi@linaro.org>
5328
5329 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5330 0 if signal is enqueued. Remove 'signal' from one debugging
5331 message. Move one debugging message to some lines below.
5332 Remove code setting 'signal' to 0.
5333
80aea927
YQ
53342016-03-18 Yao Qi <yao.qi@linaro.org>
5335
5336 * linux-low.c (linux_low_filter_event): Remove redundant
5337 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5338
b04fd3be
MK
53392016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5340
5341 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5342 (struct linux_target_ops): Wire in the above.
5343
c40c8d4b
YQ
53442016-03-03 Yao Qi <yao.qi@linaro.org>
5345
5346 * linux-low.c: Update comments to start_step_over.
5347
0f8288ae
YQ
53482016-03-03 Yao Qi <yao.qi@linaro.org>
5349
5350 PR server/19736
5351 * linux-low.c (handle_extended_wait): Set child suspended
5352 if event_lwp->bp_reinsert isn't zero.
5353
fdbd04a8
YQ
53542016-03-02 Yao Qi <yao.qi@linaro.org>
5355
5356 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5357 enqueue_pending_signal.
5358
6896a8fa
MK
53592016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5360
5361 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5362 is actually loaded.
5363
ab503087
MK
53642016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5365
5366 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5367 (s390_regmap_3264) [!__s390x__]: New global.
5368 (s390_collect_ptrace_register): Skip map entries containing -1.
5369 (s390_supply_ptrace_register): Ditto.
5370 (s390_fill_gprs_high): New function.
5371 (s390_store_gprs_high): New function.
5372 (s390_regsets): Add NT_S390_HIGH_GPRS.
5373 (s390_get_hwcap): Enable on 31-bit.
5374 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5375 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5376 Detect NT_S390_HIGH_GPRS.
5377 (s390_usrregs_info_3264): Enable on 31-bit.
5378 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5379 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5380
ae91f625
MK
53812016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5382
5383 PR gdb/13808
5384 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5385 * configure.srv: Ditto.
5386 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5387 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5388 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5389 (init_registers_amd64_linux): Remove prototype.
5390 (tdesc_amd64_linux): Remove declaration.
5391 (get_ipa_tdesc): New function.
5392 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5393 initialize remaining tdescs.
5394 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5395 (init_registers_i386_linux): Remove prototype.
5396 (tdesc_i386_linux): Remove declaration.
5397 (get_ipa_tdesc): New function.
5398 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5399 initialize remaining tdescs.
5400 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5401 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5402 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5403 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5404 (x86_get_ipa_tdesc_idx): New function.
5405 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5406 * linux-x86-tdesc.h: New file.
5407 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5408 (target_get_ipa_tdesc_idx): New macro.
5409 * tracepoint.c (ipa_tdesc_idx): New macro.
5410 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5411 (symbol_list): Add ipa_tdesc_idx.
5412 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5413 (ipa_tdesc): Remove.
5414 (ipa_tdesc_idx): New variable.
5415 (get_context_regcache): Use get_ipa_tdesc.
5416 (gdb_collect): Ditto.
5417 (gdb_probe): Ditto.
5418 * tracepoint.h (get_ipa_tdesc): New prototype.
5419 (ipa_tdesc): Remove.
5420
e7ad2f14
PA
54212016-02-24 Pedro Alves <palves@redhat.com>
5422
5423 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5424 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5425 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5426 Factor out common code between the USE_SIGTRAP_SIGINFO and
5427 !USE_SIGTRAP_SIGINFO blocks.
5428 (linux_low_filter_event): Call save_stop_reason instead of
5429 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5430 Update comments.
5431 (linux_wait_1): Update comments.
5432
657f9cde
WW
54332016-02-24 Wei-cheng Wang <cole945@gmail.com>
5434
5435 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5436 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5437 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5438 ppc_insert_point, ppc_remove_point.
5439
b00b61e1
MK
54402016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5441
5442 * linux-s390-low.c (s390_supports_z_point_type): New function.
5443 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5444
553cb527
YQ
54452016-02-16 Yao Qi <yao.qi@linaro.org>
5446
5447 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5448 PC. Get pc from regcache_read_pc.
5449
a5652c21
YQ
54502016-02-12 Yao Qi <yao.qi@linaro.org>
5451
5452 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5453 or linux_get_pc_32bit.
5454 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5455
ed443b61
YQ
54562016-02-12 Yao Qi <yao.qi@linaro.org>
5457
5458 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5459 arm_linux_get_next_pcs_fixup.
5460
020ecd38
MK
54612016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5462
5463 * tracepoint.c (x_tracepoint_action_download): Change
5464 write_inferior_data_ptr to write_inferior_data_pointer.
5465 (cmd_qtstart): Likewise.
5466 (write_inferior_data_ptr): Remove.
5467 (download_agent_expr): Change write_inferior_data_ptr to
5468 write_inferior_data_pointer.
5469 (download_tracepoint_1): Likewise.
5470 (download_tracepoint): Likewise.
5471 (download_trace_state_variables): Likewise.
5472
7cae9051
WW
54732016-02-11 Wei-cheng Wang <cole945@gmail.com>
5474 Marcin Kościelnicki <koriakin@0x04.net>
5475
5476 * tracepoint.c (struct tracepoint_action_ops): Remove.
5477 (struct tracepoint_action): Remove ops.
5478 (m_tracepoint_action_download, r_tracepoint_action_download)
5479 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5480 size and offset accordingly.
5481 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5482 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5483 (tracepoint_action_send, tracepoint_action_download): New functions.
5484 Helpers for trace action handlers.
5485 (add_tracepoint_action): Remove setup actions ops.
5486 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5487
9f6a71b4
YQ
54882016-02-10 Yao Qi <yao.qi@linaro.org>
5489
5490 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5491
1e94266c
SM
54922016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5493
5494 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5495 to AC_OUTPUT.
5496 * configure: Regenerate.
5497
8adce034
SM
54982016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5499
5500 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5501 void * to gdb_byte *.
5502 * linux-low.c (siginfo_fixup): Likewise.
5503 (linux_xfer_siginfo): Likewise.
5504 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5505 Likewise.
5506 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5507
93813b37
WT
55082016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5509
5510 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5511 to srv_tgtobj.
5512 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5513 to srv_tgtobj.
5514 * linux-x86-low.c [__x86_64__]: Include
5515 "nat/amd64-linux-siginfo.h".
5516 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5517 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5518 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5519 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5520 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5521 (cpt_si_fd, si_timerid, si_overrun): Move from
5522 nat/amd64-linux-siginfo.c.
5523 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5524
8424cc97
SM
55252016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5526
5527 * server.c (skip_to_semicolon): Remove.
5528 (process_point_options): Use strchrnul instead of
5529 skip_to_semicolon.
5530
4d18591b
YQ
55312016-01-26 Yao Qi <yao.qi@linaro.org>
5532
5533 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5534 * linux-low.c (install_software_single_step_breakpoints): Don't
5535 call regcache_read_pc.
5536 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5537 argument pc.
5538
d8020970
YQ
55392016-01-26 Yao Qi <yao.qi@linaro.org>
5540
5541 * linux-low.c (install_software_single_step_breakpoints): Call
5542 regcache_read_pc instead of get_pc.
5543
8b207339
YQ
55442016-01-26 Yao Qi <yao.qi@linaro.org>
5545
5546 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5547 (unblock_async_io): Rename to ...
5548 (block_unblock_async_io): ... it. New function.
5549 (enable_async_io): Don't install SIGIO handler. Unblock it
5550 instead.
5551 (disable_async_io): Don't ignore SIGIO. Block it instead.
5552 (initialize_async_io): Install SIGIO handler. Don't call
5553 unblock_async_io.
5554
18879fef
YQ
55552016-01-26 Yao Qi <yao.qi@linaro.org>
5556
5557 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5558 first character is '\003', call *the_target->request_interrupt.
5559
a0f8e08a
YQ
55602016-01-25 Yao Qi <yao.qi@linaro.org>
5561
5562 * remote-utils.c (new_thread_notify): Remove.
5563 (dead_thread_notify): Likewise.
5564 * remote-utils.h (new_thread_notify): Remove declaration.
5565 (dead_thread_notify): Likewise.
5566
cc5fd9ab
MK
55672016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5568
5569 * gdb.trace/pending.exp: Fix expected message on continue.
5570
99e8eb11
MK
55712016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5572
5573 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5574 it works properly on big-endian machines where sizeof (CORE_ADDR)
5575 != sizeof (void *).
5576
a994041d
PA
55772016-01-21 Pedro Alves <palves@redhat.com>
5578
5579 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5580 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5581 * configure: Regenerate.
5582
f7a6a40d
YQ
55832016-01-21 Yao Qi <yao.qi@linaro.org>
5584
5585 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5586 is_thumb and set it according to CPSR saved on the stack.
5587 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5588 arm_sigreturn_next_pc.
5589
6f69e520
YQ
55902016-01-18 Yao Qi <yao.qi@linaro.org>
5591
5592 * linux-low.c (linux_set_pc_64bit): New function.
5593 (linux_get_pc_64bit): New function.
5594 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5595 Declare.
5596 * linux-sparc-low.c (debug_threads): Remove declaration.
5597 (sparc_get_pc): Remove.
5598 (the_low_target): Use linux_get_pc_64bit instead of
5599 sparc_get_pc.
5600 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5601 (the_low_target): Use linux_get_pc_64bit and
5602 linux_set_pc_64bit.
5603
276d4552
YQ
56042016-01-18 Yao Qi <yao.qi@linaro.org>
5605
5606 * linux-arm-low.c (debug_threads): Remove declaration.
5607 (arm_get_pc, arm_set_pc): Remove.
5608 (the_low_target): Use linux_get_pc_32bit and
5609 linux_set_pc_32bit.
5610 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5611 (the_low_target): Use linux_get_pc_32bit and
5612 linux_set_pc_32bit.
5613 * linux-cris-low.c (debug_threads): Remove declaration.
5614 (cris_get_pc, cris_set_pc,): Remove.
5615 (the_low_target): Use linux_get_pc_32bit and
5616 linux_set_pc_32bit.
5617 * linux-crisv32-low.c (debug_threads): Remove declaration.
5618 (cris_get_pc, cris_set_pc): Remove.
5619 (the_low_target): Use linux_get_pc_32bit and
5620 linux_set_pc_32bit.
5621 * linux-low.c: Include inttypes.h.
5622 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5623 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5624 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5625 (the_low_target): Use linux_get_pc_32bit and
5626 linux_set_pc_32bit.
5627 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5628 (the_low_target): Use linux_get_pc_32bit and
5629 linux_set_pc_32bit.
5630 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5631 (the_low_target): Use linux_get_pc_32bit and
5632 linux_set_pc_32bit.
5633 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5634 (the_low_target): Use linux_get_pc_32bit and
5635 linux_set_pc_32bit.
5636 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5637 (the_low_target): Use linux_get_pc_32bit and
5638 linux_set_pc_32bit.
5639
eb0edac8
GB
56402016-01-18 Gary Benson <gbenson@redhat.com>
5641
5642 * configure.ac (AC_FUNC_FORK): New check.
5643 * config.in: Regenerate.
5644 * configure: Likewise.
5645
1b451dda
YQ
56462016-01-14 Yao Qi <yao.qi@linaro.org>
5647
5648 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5649 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5650 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5651 arm_get_next_pcs_ctor.
5652
82075af2
JS
56532016-01-12 Josh Stone <jistone@redhat.com>
5654 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5655
5656 * inferiors.h: Include "gdb_vecs.h".
5657 (struct process_info): Add syscalls_to_catch.
5658 * inferiors.c (remove_process): Free syscalls_to_catch.
5659 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5660 syscall_return stops.
5661 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5662 * server.c (handle_general_set): Handle QCatchSyscalls.
5663 (handle_query): Report support for QCatchSyscalls.
5664 * target.h (struct target_ops): Add supports_catch_syscall.
5665 (target_supports_catch_syscall): New macro.
5666 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5667 (struct lwp_info): Add syscall_state.
5668 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5669 Maintain syscall_state and syscalls_to_catch across exec.
5670 (get_syscall_trapinfo): New function, proxy to the_low_target.
5671 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5672 (linux_low_filter_event): Toggle syscall_state entry/return for
5673 syscall traps, and set it ignored for all others.
5674 (gdb_catching_syscalls_p): New function.
5675 (gdb_catch_this_syscall_p): New function.
5676 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5677 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5678 (linux_supports_catch_syscall): New function.
5679 (linux_target_ops): Install it.
5680 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5681 (the_low_target): Install it.
5682
8f13a3ce
MF
56832016-01-12 Mike Frysinger <vapier@gentoo.org>
5684
5685 * acinclude.m4: Include new ../warning.m4 file.
5686 * configure: Regenerated.
5687 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5688
5b3da067
MF
56892016-01-12 Mike Frysinger <vapier@gentoo.org>
5690
5691 * ax.c (is_goto_target): Mark static.
5692 * linux-low.c (register_addr): Likewise.
5693 (linux_fetch_registers, linux_store_registers): Likewise.
5694 * mem-break.c (any_persistent_commands): Fix old prototype.
5695 (add_commands_to_breakpoint): Mark static.
5696 * regcache.c (find_register_by_name): Delete unused func.
5697 * remote-utils.c (hex_or_minus_one): Mark static.
5698 * server.c (monitor_show_help): Mark static.
5699 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5700 handle_v_requests): Likewise.
5701
bc504a31
PA
57022016-01-12 Pedro Alves <palves@redhat.com>
5703
5704 Remove use of the registered trademark symbol throughout.
5705
5a0dd67a
YQ
57062016-01-08 Yao Qi <yao.qi@linaro.org>
5707
5708 * remote-utils.c (getpkt): If c is '\003', call target hook
5709 request_interrupt.
5710
b2ca446f
YQ
57112016-01-06 Yao Qi <yao.qi@linaro.org>
5712
5713 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5714 linux-aarch32-low.c.
5715 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5716 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5717 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5718 (thumb2_breakpoint): Declare.
5719 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5720 linux-aarch32-low.h.
5721 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5722 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5723 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5724
edd88788
JB
57252016-01-01 Joel Brobecker <brobecker@adacore.com>
5726
5727 * gdbreplay.c (gdbreplay_version): Change copyright year in
5728 version message.
5729 * server.c (gdbserver_version): Likewise.
5730
65da7f14
PP
57312015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5732
5733 * server.c (crc32_table): Delete.
5734 (crc32): Use libiberty's xcrc32 function.
5735
4abd5ed2
JB
57362015-12-22 Joel Brobecker <brobecker@adacore.com>
5737
5738 * lynx-low.c (lynx_delete_thread_callback): New function.
5739 (lynx_mourn): Properly delete our process and all of its
5740 threads. Remove call to clear_inferiors.
5741
0e50fe5c
JB
57422015-12-22 Joel Brobecker <brobecker@adacore.com>
5743
5744 * target.c (thread_search_callback): Add check that
5745 the thread_stopped target callback is not NULL before
5746 calling it.
5747
35adc03f
YQ
57482015-12-21 Yao Qi <yao.qi@linaro.org>
5749
5750 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5751 arm breakpoint.
5752
bd2b2909
AT
57532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5754
5755 * server.c (handle_query): Call target_supports_software_single_step.
5756
7fe5e27e
AT
57572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5758
5759 * linux-low.c (single_step): New function.
5760 (linux_resume_one_lwp_throw): Call single_step.
5761 (start_step_over): Likewise.
5762
d9311bfa
AT
57632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5764
5765 * Makefile.in (SFILES): Append arch/arm-linux.c,
5766 arch/arm-get-next-pcs.c.
5767 (arm-linux.o): New rule.
5768 (arm-get-next-pcs.o): New rule.
5769 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5770 arm-linux.o.
5771 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5772 to linux-aarch32-low.c.
5773 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5774 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5775 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5776 (thumb2_breakpoint_len): Likewise.
5777 (arm_is_thumb_mode): Make non-static.
5778 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5779 from linux-aarch32-low.c.
5780 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5781 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5782 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5783 (thumb2_breakpoint_len): Likewise.
5784 (arm_is_thumb_mode): New declaration.
5785 * linux-arm-low.c: Include arch/arm-linux.h
5786 aarch/arm-get-next-pcs.h, sys/syscall.h.
5787 (get_next_pcs_ops): New struct.
5788 (get_next_pcs_addr_bits_remove): New function.
5789 (get_next_pcs_is_thumb): New function.
5790 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5791 (arm_sigreturn_next_pc): Likewise.
5792 (get_next_pcs_syscall_next_pc): Likewise.
5793 (arm_gdbserver_get_next_pcs): Likewise.
5794 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5795 Initialize.
5796 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5797 * server.h: Include gdb_vecs.h.
5798
68ce2059
AT
57992015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5800
5801 * Makefile.in (SFILES): Append common/common-regcache.c.
5802 (OBS): Append common-regcache.o.
5803 (common-regcache.o): New rule.
5804 * regcache.c (init_register_cache): Initialize cache to
5805 REG_UNAVAILABLE.
5806 (regcache_raw_read_unsigned): New function.
5807 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5808 register_status enum.
5809
fa5308bd
AT
58102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5811
5812 * linux-aarch64-low.c (the_low_targets): Rename
5813 breakpoint_reinsert_addr to get_next_pcs.
5814 * linux-arm-low.c (the_low_targets): Likewise.
5815 * linux-bfin-low.c (the_low_targets): Likewise.
5816 * linux-cris-low.c (the_low_targets): Likewise.
5817 * linux-crisv32-low.c (the_low_targets): Likewise.
5818 * linux-low.c (can_software_single_step): Likewise.
5819 (install_software_single_step_breakpoints): New function.
5820 (start_step_over): Use install_software_single_step_breakpoints.
5821 * linux-low.h: New CORE_ADDR vector.
5822 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5823 get_next_pcs.
5824 * linux-mips-low.c (the_low_targets): Likewise.
5825 * linux-nios2-low.c (the_low_targets): Likewise.
5826 * linux-sparc-low.c (the_low_targets): Likewise.
5827
4a6ed09b
PA
58282015-12-17 Pedro Alves <palves@redhat.com>
5829
5830 * linux-low.c (linux_kill_one_lwp): Remove references to
5831 LinuxThreads.
5832 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5833 to 'kill'.
5834 (linux_init_signals): Delete.
5835 (initialize_low): Adjust.
5836 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5837
7544db95
PA
58382015-12-16 Pedro Alves <palves@redhat.com>
5839
5840 * configure.ac (compiler warning flags): When testing a
5841 -Wno-foo option, check whether -Wfoo works instead.
5842 * configure: Regenerate.
5843
8020350c
DB
58442015-12-11 Don Breazeal <donb@codesourcery.com>
5845
5846 * server.c (process_serial_event): Don't exit from gdbserver
5847 in remote mode if there are still active inferiors.
5848
db91f502
YQ
58492015-12-11 Yao Qi <yao.qi@linaro.org>
5850
5851 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5852 arm_breakpoint_at if the process is 32-bit.
5853
b37a6290
YQ
58542015-12-11 Yao Qi <yao.qi@linaro.org>
5855
5856 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5857 arm breakpoint.
5858
17b1509a
YQ
58592015-12-07 Yao Qi <yao.qi@linaro.org>
5860
5861 * configure.srv: Append arm.o to srv_tgtobj for
5862 aarch64*-*-linux* target.
5863 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5864 from linux-arm-low.c.
5865 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5866 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5867 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5868 (thumb2_breakpoint_len): Likewise.
5869 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5870 (arm_breakpoint_kinds): Likewise.
5871 (arm_breakpoint_kind_from_pc): Likewise.
5872 (arm_sw_breakpoint_from_kind): Likewise.
5873 (arm_breakpoint_kind_from_current_state): Likewise.
5874 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5875 (arm_sw_breakpoint_from_kind): Declare.
5876 (arm_breakpoint_kind_from_current_state): Declare.
5877 (arm_breakpoint_at): Declare.
5878 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5879 arm_sw_breakpoint_from_kind if process is 32-bit.
5880 (aarch64_breakpoint_kind_from_pc): New function.
5881 (aarch64_breakpoint_kind_from_current_state): New function.
5882 (the_low_target): Initialize fields breakpoint_kind_from_pc
5883 and breakpoint_kind_from_current_state.
5884 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5885 linux-aarch32-low.c.
5886 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5887 (arm_breakpoint, arm_breakpoint_len): Likewise.
5888 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5889 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5890 (arm_is_thumb_mode): Likewise.
5891 (arm_breakpoint_at): Likewise.
5892 (arm_breakpoint_kind_from_pc): Likewise.
5893 (arm_sw_breakpoint_from_kind): Likewise.
5894 (arm_breakpoint_kind_from_current_state): Likewise.
5895
5896 Revert:
5897 2015-08-04 Yao Qi <yao.qi@linaro.org>
5898
5899 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5900 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5901 * server.c (extended_protocol): Remove "static".
5902 * server.h (extended_protocol): Declare it.
5903
ece66d65
JS
59042015-12-04 Josh Stone <jistone@redhat.com>
5905
5906 * target.h (struct target_ops) <arch_setup>: Rename to ...
5907 (struct target_ops) <post_create_inferior>: ... this.
5908 (target_arch_setup): Rename to ...
5909 (target_post_create_inferior): ... this, calling post_create_inferior.
5910 * server.c (start_inferior): Update target_arch_setup calls to
5911 target_post_create_inferior.
5912 * linux-low.c (linux_low_ptrace_options): Forward declare.
5913 (linux_arch_setup): Update its comment for general use.
5914 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5915 (struct linux_target_ops): Use linux_post_create_inferior.
5916 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5917 to post_create_inferior.
5918 * nto-low.c (struct nto_target_ops): Likewise.
5919 * spu-low.c (struct spu_target_ops): Likewise.
5920 * win32-low.c (struct win32_target_ops): Likewise.
5921
e58c48b4
AT
59222015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5923
5924 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5925
fbec8956
AT
59262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5927
5928 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5929 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5930 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5931 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5932 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5933 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5934 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5935 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5936 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5937 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5938 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5939 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5940
9b4c5f87
AT
59412015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5942
5943 * linux-low.c (linux_look_up_symbols): Don't call
5944 linux_supports_traceclone.
5945 * linux-low.h (thread_db_init): Remove use_events argument.
5946 * thread-db.c (thread_db_use_event): Remove global variable.
5947 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5948 (struct thread_db) <td_create_bp>: Remove field.
5949 (thread_db_create_event): Remove function.
5950 (thread_db_enable_reporting): Likewise.
5951 (find_one_thread): Don't check for thread_db_use_events.
5952 (attach_thread): Likewise.
5953 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5954 (try_thread_db_load_1): Don't check for thread_db_use_events.
5955 (thread_db_init): Remove use_events argument and thread events
5956 handling.
5957 (remove_thread_event_breakpoints): Remove function.
5958 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5959
7d00775e
AT
59602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5961
5962 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5963 New function.
5964 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5965 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5966 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5967 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5968 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5969 Initialize.
5970 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5971 New function.
5972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5973 * linux-low.c (can_hardware_single_step): Use
5974 supports_hardware_single_step.
5975 (can_software_single_step): New function.
5976 (start_step_over): Call can_software_single_step.
5977 (linux_supports_hardware_single_step): New function.
5978 (struct target_ops) <supports_software_single_step>: Initialize.
5979 * linux-low.h (struct linux_target_ops)
5980 <supports_hardware_single_step>: Initialize.
5981 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5982 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5983 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5984 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5985 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5986 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5987 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5988 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5989 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5990 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5991 Initialize.
5992 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5993 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5994 Initialize.
5995 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5996 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5997 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5998 New function.
5999 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6000 * target.h (struct target_ops): <supports_software_single_step>:
6001 New field.
6002 (target_supports_software_single_step): New macro.
6003
2d97cd35
AT
60042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6005
6006 * linux-low.c (linux_wait_1): Fix pc advance condition.
6007 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6008 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6009
769ef81f
AT
60102015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6011
6012 * linux-arm-low.c (arm_is_thumb_mode): New function.
6013 (arm_breakpoint_at): Use arm_is_thumb_mode.
6014 (arm_breakpoint_kind_from_current_state): New function.
6015 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6016 Initialize.
6017 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6018 (linux_breakpoint_kind_from_current_state): New function.
6019 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6020 * linux-low.h (struct linux_target_ops)
6021 <breakpoint_kind_from_current_state>: New field.
6022 * target.h (struct target_ops): Likewise.
6023 (target_breakpoint_kind_from_current_state): New macro.
6024
1bebeeca
PA
60252015-11-30 Pedro Alves <palves@redhat.com>
6026
6027 * linux-low.c (linux_resume): Wake up the event loop before
6028 returning.
6029
a67a9fae
PA
60302015-11-30 Pedro Alves <palves@redhat.com>
6031
6032 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6033 check.
6034 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6035 to -1.
6036 * target.c (struct thread_search): New structure.
6037 (thread_search_callback): New function.
6038 (prev_general_thread): New global.
6039 (prepare_to_access_memory, done_accessing_memory): New functions.
6040 * target.h (prepare_to_access_memory, done_accessing_memory):
6041 Replace macros with function declarations.
6042
f2faf941
PA
60432015-11-30 Pedro Alves <palves@redhat.com>
6044
6045 PR 14618
6046 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6047 report TARGET_WAITKIND_NO_RESUMED.
6048 * remote-utils.c (prepare_resume_reply): Handle
6049 TARGET_WAITKIND_NO_RESUMED.
6050 * server.c (report_no_resumed): New global.
6051 (handle_query) <qSupported>: Handle "no-resumed+". Report
6052 "no-resumed+" support.
6053 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6054 return error if the client doesn't support no-resumed events.
6055 (push_stop_notification): New function.
6056 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6057 events if the client supports them.
6058
a681f9c9
PA
60592015-11-30 Pedro Alves <palves@redhat.com>
6060
6061 * linux-low.c (thread_still_has_status_pending_p): Don't check
6062 vCont;t here.
6063 (lwp_resumed): New function.
6064 (status_pending_p_callback): Return early if the LWP is not
6065 supposed to be resumed.
6066
65706a29
PA
60672015-11-30 Pedro Alves <palves@redhat.com>
6068
6069 * linux-low.c (handle_extended_wait): Assert that the LWP's
6070 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6071 thread create events, leave the new child's status pending.
6072 (linux_low_filter_event): If GDB wants to hear about thread exit
6073 events, leave the LWP marked dead and don't delete it.
6074 (linux_wait_for_event_filtered): Don't check for thread exit.
6075 (filter_exit_event): New function.
6076 (linux_wait_1): Use it, when returning an exit event.
6077 (linux_resume_one_lwp_throw): Assert that the LWP's
6078 waitstatus is TARGET_WAITKIND_IGNORE.
6079 * remote-utils.c (prepare_resume_reply): Handle
6080 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6081 * server.c (report_thread_events): New global.
6082 (handle_general_set): Handle QThreadEvents.
6083 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6084 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6085 TARGET_WAITKIND_THREAD_EXITED.
6086 * server.h (report_thread_events): Declare.
6087
56cf4bed
PA
60882015-11-30 Pedro Alves <palves@redhat.com>
6089
6090 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6091 the thread's last_resume_kind was resume_stop.
6092
500c1d85
PA
60932015-11-30 Pedro Alves <palves@redhat.com>
6094
6095 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6096 before returning.
6097
de979965
PA
60982015-11-30 Pedro Alves <palves@redhat.com>
6099
6100 * server.c (handle_v_requests): Handle vCtrlC.
6101
34c65914
PA
61022015-11-30 Pedro Alves <palves@redhat.com>
6103
6104 * gdbthread.h (find_any_thread_of_pid): Declare.
6105 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6106 functions.
6107 * server.c (handle_query): If current_thread is NULL, look for
6108 another thread of the selected process.
6109
79efa585 61102015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 6111 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
6112
6113 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6114 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6115 name in reply.
6116 * target.h (struct target_ops) <thread_name>: New field.
6117 (target_thread_name): New macro.
6118
80d82c19
JB
61192015-11-23 Joel Brobecker <brobecker@adacore.com>
6120
6121 * regcache.h (regcache_invalidate_pid): Add declaration.
6122 * regcache.c (regcache_invalidate_pid): New function, extracted
6123 from regcache_invalidate.
6124 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6125 Add trivial documentation comment.
6126 * lynx-low.c: Use regcache_invalidate_pid instead of
6127 regcache_invalidate.
6128
64da5dd5
JB
61292015-11-23 Joel Brobecker <brobecker@adacore.com>
6130
6131 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6132 and Elf64_auxv_t if the target is Android.
6133
37ce4055
DE
61342015-11-22 Doug Evans <xdje42@gmail.com>
6135
6136 * target.h: #include <sys/types.h>.
6137
06e03fff
PA
61382015-11-19 Pedro Alves <palves@redhat.com>
6139
6140 * linux-low.c (linux_process_qsupported): Change prototype.
6141 Adjust.
6142 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6143 Change prototype.
6144 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6145 and adjust to loop over all features.
6146 * server.c (handle_query) <qSupported>: Adjust to call
6147 target_process_qsupported once, passing it a vector of unprocessed
6148 features.
6149 * target.h (struct target_ops) <process_qsupported>: Change
6150 prototype.
6151 (target_process_qsupported): Adjust.
6152
9a084706
PA
61532015-11-19 Pedro Alves <palves@redhat.com>
6154
6155 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6156 mode.
6157 * configure: Regenerate.
6158
dad44a1f
PA
61592015-11-19 Pedro Alves <palves@redhat.com>
6160
6161 * configure: Regenerate.
6162
231c0592
YQ
61632015-11-19 Yao Qi <yao.qi@linaro.org>
6164
6165 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6166 type to uint32_t.
6167
6c1c9a8b
YQ
61682015-11-19 Yao Qi <yao.qi@linaro.org>
6169
6170 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6171 (struct aarch64_operand): Move enum out.
6172
9caa3311
YQ
61732015-11-19 Yao Qi <yao.qi@linaro.org>
6174
6175 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6176 struct user_fpsimd_state *.
6177 (aarch64_store_fpregset): Likewise.
6178
6a69a054
YQ
61792015-11-19 Yao Qi <yao.qi@linaro.org>
6180
6181 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6182 struct user_pt_regs *.
6183 (aarch64_store_gregset): Likewise.
6184
1798301e
PA
61852015-11-18 Pedro Alves <palves@redhat.com>
6186
6187 * Makefile.in (all_object_files): Add $IPA_OBJS.
6188
ce7715e2
PA
61892015-11-17 Pedro Alves <palves@redhat.com>
6190
6191 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6192 GDB_SIGNAL_0 and gdb_signal_to_string.
6193
c0879059
PA
61942015-11-17 Pedro Alves <palves@redhat.com>
6195
6196 * win32-low.c (handle_output_debug_string): Remove parameter.
6197 (win32_kill): Remove our_status local and adjust call to
6198 handle_output_debug_string.
6199 (get_child_debug_event): Adjust call to
6200 handle_output_debug_string.
6201
1996e237
SM
62022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6203
6204 * linux-mips-low.c (mips_fill_gregset): Add cast.
6205 (mips_store_gregset): Likewise.
6206 (mips_fill_fpregset): Likewise.
6207 (mips_store_fpregset): Likewise.
6208
cbec665b
SM
62092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6210
6211 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6212 priv.
6213
eb3e3c67
SM
62142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6215
6216 * linux-mips-low.c (mips_linux_new_thread): Change type of
6217 watch_type to enum target_hw_bp_type.
6218
171de4b8
SM
62192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6220
6221 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6222 Change return type to arm_hwbp_type.
6223
04248ead
SM
62242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6225
6226 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6227 (arm_store_gregset): Likewise.
6228 * linux-arm-low.c (arm_get_hwcap): Likewise.
6229 (arm_read_description): Likewise.
6230
04b3479c
SM
62312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6232
6233 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6234
2bc84e8a
SM
62352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6236
6237 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6238 (ppc_fill_vsxregset): Likewise.
6239 (ppc_store_vsxregset): Likewise.
6240 (ppc_fill_vrregset): Likewise.
6241 (ppc_store_vrregset): Likewise.
6242 (ppc_fill_evrregset): Likewise.
6243 (ppc_store_evrregset): Likewise.
6244
e6c5bb05
SM
62452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6246
6247 * linux-ppc-low.c (ppc_usrregs_info): Remove
6248 forward-declaration.
6249 (ppc_arch_setup): Move lower in file.
6250
7ea45d72
SM
62512015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6252
6253 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6254 (ps_pdwrite): Likewise.
6255
69291610
HW
62562015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6257
6258 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6259 to after assert checks.
6260
b42945fd
SM
62612015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6262
6263 * proc-service.c (ps_pdread): Add/adjust casts.
6264 (ps_pdwrite): Add/adjust casts.
6265
d6f85c84
SM
62662015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6267
6268 * server.c (handle_search_memory_1): Cast return value of
6269 memmem.
6270
f98cd059
SM
62712015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6272
6273 * server.c (write_qxfer_response): Change type of data to
6274 gdb_byte *.
6275
d2412fa5
PA
62762015-10-29 Pedro Alves <palves@redhat.com>
6277
6278 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6279
c17414a2
PA
62802015-10-29 Pedro Alves <palves@redhat.com>
6281
6282 * tracepoint.c (clear_installed_tracepoints): Add casts.
6283
e053fbc4
PA
62842015-10-29 Pedro Alves <palves@redhat.com>
6285
6286 * server.c (handle_v_cont, process_serial_event): Add enum
6287 gdb_signal casts to signal parsing code.
6288
add67df8
PA
62892015-10-29 Pedro Alves <palves@redhat.com>
6290
6291 * linux-low.h (NULL_REGSET): Define.
6292 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6293 * linux-arm-low.c (arm_regsets): Likewise.
6294 * linux-crisv32-low.c (cris_regsets): Likewise.
6295 * linux-m68k-low.c (m68k_regsets): Likewise.
6296 * linux-mips-low.c (mips_regsets): Likewise.
6297 * linux-nios2-low.c (nios2_regsets): Likewise.
6298 * linux-ppc-low.c (ppc_regsets): Likewise.
6299 * linux-s390-low.c (s390_regsets): Likewise.
6300 * linux-sh-low.c (sh_regsets): Likewise.
6301 * linux-sparc-low.c (sparc_regsets): Likewise.
6302 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6303 * linux-tile-low.c (tile_regsets): Likewise.
6304 * linux-x86-low.c (x86_regsets): Likewise.
6305 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6306
50bc912a
PA
63072015-10-29 Pedro Alves <palves@redhat.com>
6308
6309 * linux-low.h (NULL_REGSET): Define.
6310 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6311 * linux-arm-low.c (arm_regsets): Likewise.
6312 * linux-crisv32-low.c (cris_regsets): Likewise.
6313 * linux-m68k-low.c (m68k_regsets): Likewise.
6314 * linux-mips-low.c (mips_regsets): Likewise.
6315 * linux-nios2-low.c (nios2_regsets): Likewise.
6316 * linux-ppc-low.c (ppc_regsets): Likewise.
6317 * linux-s390-low.c (s390_regsets): Likewise.
6318 * linux-sh-low.c (sh_regsets): Likewise.
6319 * linux-sparc-low.c (sparc_regsets): Likewise.
6320 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6321 * linux-tile-low.c (tile_regsets): Likewise.
6322 * linux-x86-low.c (x86_regsets): Likewise.
6323 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6324
682b2546
DE
63252015-10-26 Doug Evans <dje@google.com>
6326
6327 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6328
963843d4
DE
63292015-10-26 Doug Evans <dje@google.com>
6330
6331 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6332
d41401ac
DE
63332015-10-26 Doug Evans <dje@google.com>
6334
6335 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6336 for debug_printf.
6337 (attach_thread, find_new_threads_callback): Ditto.
6338
3db28855
AT
63392015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6340
6341 * mem-break.h (set_breakpoint_data): Remove.
6342
fb78e89c
AT
63432015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6344
6345 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6346 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6347 (initialize_low): Remove set_breakpoint_data call.
6348 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6349 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6350 (initialize_low): Remove set_breakpoint_data call.
6351 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6352 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6353 (initialize_low): Remove set_breakpoint_data call.
6354
2e6ee069
AT
63552015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6356
6357 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6358 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6359 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6360 * target.h (target_breakpoint_kind_from_pc): New macro.
6361
1652a986
AT
63622015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6363
6364 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6365 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6366 the default breakpoint kind.
6367
abeead09
AT
63682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6369
6370 * linux-arm-low.c (arm_supports_z_point_type): Add software
6371 breakpoint support.
6372
b0b4b501
AT
63732015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6374
6375 * linux-arm-low.c: Refactor breakpoint definitions.
6376 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6377 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6378
8689682c
AT
63792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6380
6381 * Makefile.in: Add arm.c/o.
6382 * configure.srv: Likewise.
6383 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6384 (arm_breakpoint_kind_from_pc): New function.
6385 (arm_sw_breakpoint_from_kind): Return proper kind.
6386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6387
27165294
AT
63882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6389
6390 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6391 removal.
6392 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6393 (struct raw_breakpoint) <size>: Remove.
6394 (struct raw_breakpoint) <kind>: Add.
6395 (bp_size): New function.
6396 (bp_opcode): Likewise.
6397 (find_raw_breakpoint_at): Adjust for kind.
6398 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6399 (remove_memory_breakpoint): Adjust for kind call bp_size.
6400 (set_raw_breakpoint_at): Adjust for kind.
6401 (set_breakpoint): Likewise.
6402 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6403 (delete_raw_breakpoint): Adjust for kind.
6404 (delete_breakpoint): Likewise.
6405 (find_gdb_breakpoint): Likewise.
6406 (set_gdb_breakpoint_1): Likewise.
6407 (set_gdb_breakpoint): Likewise.
6408 (delete_gdb_breakpoint_1): Likewise.
6409 (delete_gdb_breakpoint): Likewise.
6410 (uninsert_raw_breakpoint): Likewise.
6411 (reinsert_raw_breakpoint): Likewise.
6412 (set_breakpoint_data): Remove.
6413 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6414 (check_mem_read): Adjust for kind call bp_size.
6415 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6416 (clone_one_breakpoint): Adjust for kind.
6417 * mem-break.h (set_gdb_breakpoint): Likewise.
6418 (delete_gdb_breakpoint): Likewise.
6419 * server.c (process_serial_event): Likewise.
6420
dd373349
AT
64212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6422
6423 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6424 (struct linux_target_ops) <breakpoint>: Remove.
6425 (struct linux_target_ops) <breakpoint_len>: Remove.
6426 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6427 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6428 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6429 (arm_sw_breakpoint_from_kind): New function.
6430 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6431 (struct linux_target_ops) <breakpoint>: Remove.
6432 (struct linux_target_ops) <breakpoint_len>: Remove.
6433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6435 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6436 (struct linux_target_ops) <breakpoint>: Remove.
6437 (struct linux_target_ops) <breakpoint_len>: Remove.
6438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6440 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6441 (struct linux_target_ops) <breakpoint>: Remove.
6442 (struct linux_target_ops) <breakpoint_len>: Remove.
6443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6445 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6446 and sw_breakpoint_from_kind to increment the pc.
6447 (linux_breakpoint_kind_from_pc): New function.
6448 (linux_sw_breakpoint_from_kind): New function.
6449 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6450 (initialize_low): Call breakpoint_kind_from_pc and
6451 sw_breakpoint_from_kind to replace breakpoint_data/len.
6452 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6453 New field.
6454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6455 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6456 (struct linux_target_ops) <breakpoint>: Remove.
6457 (struct linux_target_ops) <breakpoint_len>: Remove.
6458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6460 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6461 (struct linux_target_ops) <breakpoint>: Remove.
6462 (struct linux_target_ops) <breakpoint_len>: Remove.
6463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6465 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6466 (struct linux_target_ops) <breakpoint>: Remove.
6467 (struct linux_target_ops) <breakpoint_len>: Remove.
6468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6470 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6471 (struct linux_target_ops) <breakpoint>: Remove.
6472 (struct linux_target_ops) <breakpoint_len>: Remove.
6473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6475 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6476 (struct linux_target_ops) <breakpoint>: Remove.
6477 (struct linux_target_ops) <breakpoint_len>: Remove.
6478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6480 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6481 (struct linux_target_ops) <breakpoint>: Remove.
6482 (struct linux_target_ops) <breakpoint_len>: Remove.
6483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6485 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6486 (struct linux_target_ops) <breakpoint>: Remove.
6487 (struct linux_target_ops) <breakpoint_len>: Remove.
6488 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6490 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6491 (struct linux_target_ops) <breakpoint>: Remove.
6492 (struct linux_target_ops) <breakpoint_len>: Remove.
6493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6495 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6496 (struct linux_target_ops) <breakpoint>: Remove.
6497 (struct linux_target_ops) <breakpoint_len>: Remove.
6498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6500 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6501 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6502 (struct linux_target_ops) <breakpoint>: Remove.
6503 (struct linux_target_ops) <breakpoint_len>: Remove.
6504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6506 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6507 (struct linux_target_ops) <breakpoint>: Remove.
6508 (struct linux_target_ops) <breakpoint_len>: Remove.
6509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6511
4cd98a19
AT
65122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6513
6514 * linux-cris-low.c (cris_get_pc): Remove void arg.
6515
774ee6d2
AR
65162015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6517
6518 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6519 variable name.
6520
833dcd29
AR
65212015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6522
6523 * inferiors.c (thread_pid_matches_callback): New function.
6524 (find_thread_process): New function.
6525 (remove_thread): Reset current_thread.
6526 (remove_process): Assert threads have been removed first.
6527
8d689ee5
YQ
65282015-10-15 Yao Qi <yao.qi@linaro.org>
6529
6530 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6531 if it is 3.
6532 (aarch64_remove_point): Likewise.
6533 * regcache.c (regcache_register_size): New function.
6534
1c2e1515
YQ
65352015-10-12 Yao Qi <yao.qi@linaro.org>
6536
6537 * linux-aarch64-low.c: Update all callers as emit_load_store
6538 is renamed to aarch64_emit_load_store.
6539
e1c587c3
YQ
65402015-10-12 Yao Qi <yao.qi@linaro.org>
6541
6542 * linux-aarch64-low.c: Update all callers of function renaming
6543 from emit_insn to aarch64_emit_insn.
6544
b6542f81
YQ
65452015-10-12 Yao Qi <yao.qi@linaro.org>
6546
6547 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6548 arch/aarch64-insn.h.
6549 (struct aarch64_memory_operand): Likewise.
6550 (ENCODE): Likewise.
6551 (emit_insn): Move to arch/aarch64-insn.c.
6552 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6553 (emit_load_store): Move to arch/aarch64-insn.c.
6554 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6555 (can_encode_int32): Remove.
6556
246994ce
YQ
65572015-10-12 Yao Qi <yao.qi@linaro.org>
6558
6559 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6560 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6561 (aarch64_relocate_instruction): Likewise.
6562 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6563 (struct aarch64_insn_visitor): Likewise.
6564
0badd99f
YQ
65652015-10-12 Yao Qi <yao.qi@linaro.org>
6566
6567 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6568 (struct aarch64_insn_visitor): New.
6569 (struct aarch64_insn_relocation_data): New.
6570 (aarch64_ftrace_insn_reloc_b): New function.
6571 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6572 (aarch64_ftrace_insn_reloc_cb): Likewise.
6573 (aarch64_ftrace_insn_reloc_tb): Likewise.
6574 (aarch64_ftrace_insn_reloc_adr): Likewise.
6575 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6576 (aarch64_ftrace_insn_reloc_others): Likewise.
6577 (visitor): New.
6578 (aarch64_relocate_instruction): Use visitor.
6579
dfaffe9d
YQ
65802015-10-12 Yao Qi <yao.qi@linaro.org>
6581
6582 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6583 int. Add argument buf.
6584 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6585 aarch64_relocate_instruction.
6586
70b439f0
YQ
65872015-10-12 Yao Qi <yao.qi@linaro.org>
6588
6589 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6590 argument insn. Remove local variable insn. Don't call
6591 target_read_uint32.
6592 (aarch64_install_fast_tracepoint_jump_pad): Call
6593 target_read_uint32.
6594
7781c06f
YQ
65952015-09-30 Yao Qi <yao.qi@linaro.org>
6596
6597 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6598 (emit_load_store_pair): Likewise.
6599
9a3c8263
SM
66002015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6601
6602 * dll.c (match_dll): Add cast(s).
6603 (unloaded_dll): Likewise.
6604 * linux-low.c (second_thread_of_pid_p): Likewise.
6605 (delete_lwp_callback): Likewise.
6606 (count_events_callback): Likewise.
6607 (select_event_lwp_callback): Likewise.
6608 (linux_set_resume_request): Likewise.
6609 * server.c (accumulate_file_name_length): Likewise.
6610 (emit_dll_description): Likewise.
6611 (handle_qxfer_threads_worker): Likewise.
6612 (visit_actioned_threads): Likewise.
6613 * thread-db.c (any_thread_of): Likewise.
6614 * tracepoint.c (same_process_p): Likewise.
6615 (match_blocktype): Likewise.
6616 (build_traceframe_info_xml): Likewise.
6617
224c3ddb
SM
66182015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6619
6620 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6621 assignment.
6622 (gdb_unparse_agent_expr): Likewise.
6623 * hostio.c (require_data): Likewise.
6624 (handle_pread): Likewise.
6625 * linux-low.c (disable_regset): Likewise.
6626 (fetch_register): Likewise.
6627 (store_register): Likewise.
6628 (get_dynamic): Likewise.
6629 (linux_qxfer_libraries_svr4): Likewise.
6630 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6631 (set_fast_tracepoint_jump): Likewise.
6632 (uninsert_fast_tracepoint_jumps_at): Likewise.
6633 (reinsert_fast_tracepoint_jumps_at): Likewise.
6634 (validate_inserted_breakpoint): Likewise.
6635 (clone_agent_expr): Likewise.
6636 * regcache.c (init_register_cache): Likewise.
6637 * remote-utils.c (putpkt_binary_1): Likewise.
6638 (decode_M_packet): Likewise.
6639 (decode_X_packet): Likewise.
6640 (look_up_one_symbol): Likewise.
6641 (relocate_instruction): Likewise.
6642 (monitor_output): Likewise.
6643 * server.c (handle_search_memory): Likewise.
6644 (handle_qxfer_exec_file): Likewise.
6645 (handle_qxfer_libraries): Likewise.
6646 (handle_qxfer): Likewise.
6647 (handle_query): Likewise.
6648 (handle_v_cont): Likewise.
6649 (handle_v_run): Likewise.
6650 (captured_main): Likewise.
6651 * target.c (write_inferior_memory): Likewise.
6652 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6653 * tracepoint.c (init_trace_buffer): Likewise.
6654 (add_tracepoint_action): Likewise.
6655 (add_traceframe): Likewise.
6656 (add_traceframe_block): Likewise.
6657 (cmd_qtdpsrc): Likewise.
6658 (cmd_qtdv): Likewise.
6659 (cmd_qtstatus): Likewise.
6660 (response_source): Likewise.
6661 (response_tsv): Likewise.
6662 (cmd_qtnotes): Likewise.
6663 (gdb_collect): Likewise.
6664 (initialize_tracepoint): Likewise.
6665
afbe19f8
PL
66662015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6667
6668 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6669 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6670 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6671 <NOP>: New.
6672 (enum aarch64_condition_codes): New enum.
6673 (w0): New static global.
6674 (fp): Likewise.
6675 (lr): Likewise.
6676 (struct aarch64_memory_operand) <type>: New
6677 MEMORY_OPERAND_POSTINDEX type.
6678 (postindex_memory_operand): New helper function.
6679 (emit_ret): New function.
6680 (emit_load_store_pair): New function, factored out of emit_stp
6681 with support for MEMORY_OPERAND_POSTINDEX.
6682 (emit_stp): Rewrite using emit_load_store_pair.
6683 (emit_ldp): New function.
6684 (emit_load_store): Likewise.
6685 (emit_ldr): Mention post-index instruction in comment.
6686 (emit_ldrh): New function.
6687 (emit_ldrb): New function.
6688 (emit_ldrsw): Mention post-index instruction in comment.
6689 (emit_str): Likewise.
6690 (emit_subs): New function.
6691 (emit_cmp): Likewise.
6692 (emit_and): Likewise.
6693 (emit_orr): Likewise.
6694 (emit_orn): Likewise.
6695 (emit_eor): Likewise.
6696 (emit_mvn): Likewise.
6697 (emit_lslv): Likewise.
6698 (emit_lsrv): Likewise.
6699 (emit_asrv): Likewise.
6700 (emit_mul): Likewise.
6701 (emit_sbfm): Likewise.
6702 (emit_sbfx): Likewise.
6703 (emit_ubfm): Likewise.
6704 (emit_ubfx): Likewise.
6705 (emit_csinc): Likewise.
6706 (emit_cset): Likewise.
6707 (emit_nop): Likewise.
6708 (emit_ops_insns): New helper function.
6709 (emit_pop): Likewise.
6710 (emit_push): Likewise.
6711 (aarch64_emit_prologue): New function.
6712 (aarch64_emit_epilogue): Likewise.
6713 (aarch64_emit_add): Likewise.
6714 (aarch64_emit_sub): Likewise.
6715 (aarch64_emit_mul): Likewise.
6716 (aarch64_emit_lsh): Likewise.
6717 (aarch64_emit_rsh_signed): Likewise.
6718 (aarch64_emit_rsh_unsigned): Likewise.
6719 (aarch64_emit_ext): Likewise.
6720 (aarch64_emit_log_not): Likewise.
6721 (aarch64_emit_bit_and): Likewise.
6722 (aarch64_emit_bit_or): Likewise.
6723 (aarch64_emit_bit_xor): Likewise.
6724 (aarch64_emit_bit_not): Likewise.
6725 (aarch64_emit_equal): Likewise.
6726 (aarch64_emit_less_signed): Likewise.
6727 (aarch64_emit_less_unsigned): Likewise.
6728 (aarch64_emit_ref): Likewise.
6729 (aarch64_emit_if_goto): Likewise.
6730 (aarch64_emit_goto): Likewise.
6731 (aarch64_write_goto_address): Likewise.
6732 (aarch64_emit_const): Likewise.
6733 (aarch64_emit_call): Likewise.
6734 (aarch64_emit_reg): Likewise.
6735 (aarch64_emit_pop): Likewise.
6736 (aarch64_emit_stack_flush): Likewise.
6737 (aarch64_emit_zero_ext): Likewise.
6738 (aarch64_emit_swap): Likewise.
6739 (aarch64_emit_stack_adjust): Likewise.
6740 (aarch64_emit_int_call_1): Likewise.
6741 (aarch64_emit_void_call_2): Likewise.
6742 (aarch64_emit_eq_goto): Likewise.
6743 (aarch64_emit_ne_goto): Likewise.
6744 (aarch64_emit_lt_goto): Likewise.
6745 (aarch64_emit_le_goto): Likewise.
6746 (aarch64_emit_gt_goto): Likewise.
6747 (aarch64_emit_ge_got): Likewise.
6748 (aarch64_emit_ops_impl): New static global variable.
6749 (aarch64_emit_ops): New target function, return
6750 &aarch64_emit_ops_impl.
6751 (struct linux_target_ops): Install it.
6752
bb903df0
PL
67532015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6754
6755 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6756 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6757 aarch64-ipa.o.
6758 * linux-aarch64-ipa.c: New file.
6759 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6760 and endian.h.
6761 (aarch64_get_thread_area): New target method.
6762 (extract_signed_bitfield): New helper function.
6763 (aarch64_decode_ldr_literal): New function.
6764 (enum aarch64_opcodes): New enum.
6765 (struct aarch64_register): New struct.
6766 (struct aarch64_operand): New struct.
6767 (x0): New static global.
6768 (x1): Likewise.
6769 (x2): Likewise.
6770 (x3): Likewise.
6771 (x4): Likewise.
6772 (w2): Likewise.
6773 (ip0): Likewise.
6774 (sp): Likewise.
6775 (xzr): Likewise.
6776 (aarch64_register): New helper function.
6777 (register_operand): Likewise.
6778 (immediate_operand): Likewise.
6779 (struct aarch64_memory_operand): New struct.
6780 (offset_memory_operand): New helper function.
6781 (preindex_memory_operand): Likewise.
6782 (enum aarch64_system_control_registers): New enum.
6783 (ENCODE): New macro.
6784 (emit_insn): New helper function.
6785 (emit_b): New function.
6786 (emit_bcond): Likewise.
6787 (emit_cb): Likewise.
6788 (emit_tb): Likewise.
6789 (emit_blr): Likewise.
6790 (emit_stp): Likewise.
6791 (emit_ldp_q_offset): Likewise.
6792 (emit_stp_q_offset): Likewise.
6793 (emit_load_store): Likewise.
6794 (emit_ldr): Likewise.
6795 (emit_ldrsw): Likewise.
6796 (emit_str): Likewise.
6797 (emit_ldaxr): Likewise.
6798 (emit_stxr): Likewise.
6799 (emit_stlr): Likewise.
6800 (emit_data_processing_reg): Likewise.
6801 (emit_data_processing): Likewise.
6802 (emit_add): Likewise.
6803 (emit_sub): Likewise.
6804 (emit_mov): Likewise.
6805 (emit_movk): Likewise.
6806 (emit_mov_addr): Likewise.
6807 (emit_mrs): Likewise.
6808 (emit_msr): Likewise.
6809 (emit_sevl): Likewise.
6810 (emit_wfe): Likewise.
6811 (append_insns): Likewise.
6812 (can_encode_int32_in): New helper function.
6813 (aarch64_relocate_instruction): New function.
6814 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6815 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6816 (struct linux_target_ops): Install aarch64_get_thread_area,
6817 aarch64_install_fast_tracepoint_jump_pad and
6818 aarch64_get_min_fast_tracepoint_insn_len.
6819
787749ea
PL
68202015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6821
6822 * Makefile.in (aarch64-insn.o): New rule.
6823 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6824
9812b2e6
YQ
68252015-09-21 Yao Qi <yao.qi@linaro.org>
6826
6827 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6828
18fe412b
YQ
68292015-09-21 Yao Qi <yao.qi@linaro.org>
6830
6831 * tracepoint.c (max_jump_pad_size): Remove.
6832
a0cc84cd
YQ
68332015-09-18 Yao Qi <yao.qi@linaro.org>
6834
6835 * linux-aarch64-low.c: Don't include sys/uio.h.
6836 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6837
d78908cf
WW
68382015-09-16 Wei-cheng Wang <cole945@gmail.com>
6839
6840 * tracepoint.c (eval_result_type): Change prototype.
6841 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6842
d57e0d50
PA
68432015-09-15 Pedro Alves <palves@redhat.com>
6844
6845 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6846 Check whether to report exec events instead of checking whether
6847 multiprocess is enabled.
6848
5a676acc
PA
68492015-09-15 Pedro Alves <palves@redhat.com>
6850
6851 PR remote/18965
6852 * remote-utils.c (prepare_resume_reply): Merge
6853 TARGET_WAITKIND_VFORK_DONE switch case with the
6854 TARGET_WAITKIND_FORKED case.
6855
7c5d0fad
YQ
68562015-09-15 Yao Qi <yao.qi@linaro.org>
6857
6858 * server.c (handle_query): Check string comparison using
6859 "else if" instead of "if".
6860
750ce8d1
YQ
68612015-09-15 Yao Qi <yao.qi@linaro.org>
6862
6863 * server.c (vCont_supported): New global variable.
6864 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6865 matches. Append ";vContSupported+" to own_buf.
6866 (handle_v_requests): Append ";s;S" to own_buf if target supports
6867 hardware single step or vCont_supported is false.
6868 (capture_main): Set vCont_supported to zero.
6869
70b90b91
YQ
68702015-09-15 Yao Qi <yao.qi@linaro.org>
6871
6872 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6873 it to ...
6874 (linux_supports_hardware_single_step): ... New function.
6875 (linux_target_ops): Update.
6876 * lynx-low.c (lynx_target_ops): Set field
6877 supports_hardware_single_step to target_can_do_hardware_single_step.
6878 * nto-low.c (nto_target_ops): Likewise.
6879 * spu-low.c (spu_target_ops): Likewise.
6880 * win32-low.c (win32_target_ops): Likewise.
6881 * target.c (target_can_do_hardware_single_step): New function.
6882 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6883 Remove. <supports_hardware_single_step>: New field.
6884 (target_supports_conditional_breakpoints): Remove.
6885 (target_supports_hardware_single_step): New macro.
6886 (target_can_do_hardware_single_step): Declare.
6887 * server.c (handle_query): Use target_supports_hardware_single_step
6888 instead of target_supports_conditional_breakpoints.
6889
ade90bde
YQ
68902015-09-15 Yao Qi <yao.qi@linaro.org>
6891
6892 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6893 function.
6894 (struct linux_target_ops the_low_target): Install
6895 aarch64_linux_siginfo_fixup.
6896
94585166
DB
68972015-09-11 Don Breazeal <donb@codesourcery.com>
6898 Luis Machado <lgustavo@codesourcery.com>
6899
6900 * linux-low.c (linux_mourn): Static declaration.
6901 (linux_arch_setup): Move in front of
6902 handle_extended_wait.
6903 (linux_arch_setup_thread): New function.
6904 (handle_extended_wait): Handle exec events. Call
6905 linux_arch_setup_thread. Make event_lwp argument a
6906 pointer-to-a-pointer.
6907 (check_zombie_leaders): Do not check stopped threads.
6908 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6909 (linux_low_filter_event): Add lwp and thread for exec'ing
6910 non-leader thread if leader thread has been deleted.
6911 Refactor code into linux_arch_setup_thread and call it.
6912 Pass child lwp pointer by reference to handle_extended_wait.
6913 (linux_wait_for_event_filtered): Update comment.
6914 (linux_wait_1): Prevent clobbering exec event status.
6915 (linux_supports_exec_events): New function.
6916 (linux_target_ops) <supports_exec_events>: Initialize new member.
6917 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6918 new member.
6919 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6920 * server.c (report_exec_events): New global variable.
6921 (handle_query): Handle qSupported query for exec-events feature.
6922 (captured_main): Initialize report_exec_events.
6923 * server.h (report_exec_events): Declare new global variable.
6924 * target.h (struct target_ops) <supports_exec_events>: New
6925 member.
6926 (target_supports_exec_events): New macro.
6927 * win32-low.c (win32_target_ops) <supports_exec_events>:
6928 Initialize new member.
6929
0568462b
MM
69302015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6931
6932 * linux-low.c (linux_low_enable_btrace): Remove.
6933 (linux_target_ops): Replace linux_low_enable_btrace with
6934 linux_enable_btrace.
6935
39edd165
YQ
69362015-09-03 Yao Qi <yao.qi@linaro.org>
6937
6938 * linux-aarch64-low.c (aarch64_insert_point): Call
6939 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6940 returns true.
6941
1db33b5a
UW
69422015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6943
6944 * linux-low.c (check_stopped_by_breakpoint): Use
6945 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6946
ab290430
PA
69472015-08-27 Pedro Alves <palves@redhat.com>
6948
6949 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6950
8d749320
SM
69512015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6952
6711b7f8
SM
6953 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6954 the XNEW-family equivalent.
8d749320
SM
6955 (compile_bytecodes): Likewise.
6956 * dll.c (loaded_dll): Likewise.
6957 * event-loop.c (append_callback_event): Likewise.
6958 (create_file_handler): Likewise.
6959 (create_file_event): Likewise.
6960 * hostio.c (handle_open): Likewise.
6961 * inferiors.c (add_thread): Likewise.
6962 (add_process): Likewise.
6963 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6964 * linux-arm-low.c (arm_new_process): Likewise.
6965 (arm_new_thread): Likewise.
6966 * linux-low.c (add_to_pid_list): Likewise.
6967 (linux_add_process): Likewise.
6968 (handle_extended_wait): Likewise.
6969 (add_lwp): Likewise.
6970 (enqueue_one_deferred_signal): Likewise.
6971 (enqueue_pending_signal): Likewise.
6972 (linux_resume_one_lwp_throw): Likewise.
6973 (linux_resume_one_thread): Likewise.
6974 (linux_read_memory): Likewise.
6975 (linux_write_memory): Likewise.
6976 * linux-mips-low.c (mips_linux_new_process): Likewise.
6977 (mips_linux_new_thread): Likewise.
6978 (mips_add_watchpoint): Likewise.
6979 * linux-x86-low.c (initialize_low_arch): Likewise.
6980 * lynx-low.c (lynx_add_process): Likewise.
6981 * mem-break.c (set_raw_breakpoint_at): Likewise.
6982 (set_breakpoint): Likewise.
6983 (add_condition_to_breakpoint): Likewise.
6984 (add_commands_to_breakpoint): Likewise.
6985 (clone_agent_expr): Likewise.
6986 (clone_one_breakpoint): Likewise.
6987 * regcache.c (new_register_cache): Likewise.
6988 * remote-utils.c (look_up_one_symbol): Likewise.
6989 * server.c (queue_stop_reply): Likewise.
6990 (start_inferior): Likewise.
6991 (queue_stop_reply_callback): Likewise.
6992 (handle_target_event): Likewise.
6993 * spu-low.c (fetch_ppc_memory): Likewise.
6994 (store_ppc_memory): Likewise.
6995 * target.c (set_target_ops): Likewise.
6996 * thread-db.c (thread_db_load_search): Likewise.
6997 (try_thread_db_load_1): Likewise.
6998 * tracepoint.c (add_tracepoint): Likewise.
6999 (add_tracepoint_action): Likewise.
7000 (create_trace_state_variable): Likewise.
7001 (cmd_qtdpsrc): Likewise.
7002 (cmd_qtro): Likewise.
7003 (add_while_stepping_state): Likewise.
7004 * win32-low.c (child_add_thread): Likewise.
7005 (get_image_name): Likewise.
7006
ed8b7b42
YQ
70072015-08-25 Yao Qi <yao.qi@linaro.org>
7008
7009 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7010
db3cb7cb
YQ
70112015-08-25 Yao Qi <yao.qi@linaro.org>
7012
7013 * Makefile.in (aarch64-linux.o): New rule.
7014 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7015 srv_tgtobj.
7016 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7017 (aarch64_init_debug_reg_state): Make it extern.
7018 (aarch64_linux_prepare_to_resume): Remove.
7019
f6011a1c
YQ
70202015-08-25 Yao Qi <yao.qi@linaro.org>
7021
7022 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7023 lwp_arch_private_info and ptid_of_lwp.
7024
88e2cf7e
YQ
70252015-08-25 Yao Qi <yao.qi@linaro.org>
7026
7027 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7028 Find proc_info by find_process_pid. All callers updated.
7029
5e35436e
YQ
70302015-08-25 Yao Qi <yao.qi@linaro.org>
7031
7032 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7033 Remove.
7034 (debug_reg_change_callback): Remove.
7035 (aarch64_notify_debug_reg_change): Remove.
7036
4a8a7965
YQ
70372015-08-25 Yao Qi <yao.qi@linaro.org>
7038
7039 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7040 Call current_lwp_ptid.
7041
32a271ee
YQ
70422015-08-25 Yao Qi <yao.qi@linaro.org>
7043
7044 * linux-aarch64-low.c (debug_reg_change_callback): Use
7045 debug_printf.
7046
0d51c8d7
YQ
70472015-08-25 Yao Qi <yao.qi@linaro.org>
7048
7049 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7050
31a43dd5
YQ
70512015-08-25 Yao Qi <yao.qi@linaro.org>
7052
7053 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7054
8ee52567
YQ
70552015-08-25 Yao Qi <yao.qi@linaro.org>
7056
7057 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7058 the code.
7059
ff3f0f45
YQ
70602015-08-25 Yao Qi <yao.qi@linaro.org>
7061
7062 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7063 Remove.
7064 (debug_reg_change_callback): Remove argument entry and add argument
7065 lwp. Remove local variable thread. Don't print thread id in the
7066 debugging output. Don't check whether pid of thread equals to pid.
7067 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7068 iterate_over_lwps instead find_inferior.
7069
3d40fbb5
PA
70702015-08-24 Pedro Alves <palves@redhat.com>
7071
7072 * inferiors.c (get_first_process): New function.
7073 * inferiors.h (get_first_process): New declaration.
7074 * remote-utils.c (read_ptid): Default to the first process in the
7075 list, instead of to the current thread's process.
7076
438e1e42
PA
70772015-08-24 Pedro Alves <palves@redhat.com>
7078
7079 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7080 * event-loop.c: Likewise.
7081 * remote-utils.c: Likewise.
7082 * tracepoint.c: Likewise.
7083
a8c6d4fc
PA
70842015-08-24 Pedro Alves <palves@redhat.com>
7085
7086 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7087 ptid_get_lwp.
7088
99b0bb12
PA
70892015-08-21 Pedro Alves <palves@redhat.com>
7090
7091 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7092 instead of literal 1.
7093
f8904751
PA
70942015-08-21 Pedro Alves <palves@redhat.com>
7095
7096 * tdesc.c (default_description): Explicitly zero-initialize.
7097
465a859e
PA
70982015-08-21 Pedro Alves <palves@redhat.com>
7099
7100 PR gdb/18749
7101 * inferiors.c (remove_thread): Discard any pending stop reply for
7102 this thread.
7103 * server.c (remove_all_on_match_pid): Rename to ...
7104 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7105 instead of a pid.
7106 (discard_queued_stop_replies): Change parameter to a ptid. Now
7107 extern.
7108 (handle_v_kill, kill_inferior_callback, captured_main)
7109 (process_serial_event): Adjust.
7110 * server.h (discard_queued_stop_replies): Declare.
7111
f0db101d
PA
71122015-08-21 Pedro Alves <palves@redhat.com>
7113
7114 * linux-low.c (wait_for_sigstop): Always switch to no thread
7115 selected if the previously current thread dies.
7116 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7117 process instead of the current thread's.
7118 * remote-utils.c (input_interrupt): Don't check if there's no
7119 current thread.
7120 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7121 current thread to the general thread fails, error out.
7122 (handle_qxfer_auxv, handle_qxfer_libraries)
7123 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7124 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7125 (handle_query): Check if there's a thread selected instead of
7126 checking whether there's any thread in the thread list.
7127 (handle_qxfer_threads, handle_qxfer_btrace)
7128 (handle_qxfer_btrace_conf): Don't error out early if there's no
7129 thread in the thread list.
7130 (handle_v_cont, myresume): Don't set the current thread to the
7131 continue thread.
7132 (process_serial_event) <Hg handling>: Also set thread_id if the
7133 previous general thread is still alive.
7134 (process_serial_event) <g/G handling>: If setting the current
7135 thread to the general thread fails, error out.
7136 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7137 thread's lwp instead of the current thread's.
7138 * target.c (set_desired_thread): If the desired thread was not
7139 found, leave the current thread pointing to NULL. Return an int
7140 (boolean) indicating success.
7141 * target.h (set_desired_thread): Change return type to int.
7142
40045d91
MF
71432015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7144
7145 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7146 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7147 #includes.
7148 (ps_get_thread_area): New function.
7149
45face3b
GB
71502015-08-19 Gary Benson <gbenson@redhat.com>
7151
7152 * hostio.c (handle_pread): Do not attempt to read more data
7153 than hostio_reply_with_data can fit in a packet.
7154
16d5f642
JB
71552015-08-18 Joel Brobecker <brobecker@adacore.com>
7156
7157 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7158
a738da3a
MF
71592015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7160
7161 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7162
33ebda9d
PA
71632015-08-06 Pedro Alves <palves@redhat.com>
7164
7165 * tracepoint.c (expr_eval_result): Now an int.
7166
a44892be
PA
71672015-08-06 Pedro Alves <palves@redhat.com>
7168
7169 * gdbthread.h (struct regcache): Forward declare.
7170 (struct thread_info) <regcache_data>: Now a struct regcache
7171 pointer.
7172 * inferiors.c (inferior_regcache_data)
7173 (set_inferior_regcache_data): Now work with struct regcache
7174 pointers.
7175 * inferiors.h (struct regcache): Forward declare.
7176 (inferior_regcache_data, set_inferior_regcache_data): Now work
7177 with struct regcache pointers.
7178 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7179 (free_register_cache_thread): Remove struct regcache pointer
7180 casts.
7181
608a1e46
PA
71822015-08-06 Pedro Alves <palves@redhat.com>
7183
7184 * server.c (captured_main): On error, print the exception message
7185 to stderr, and if run_once is set, throw a quit.
7186
f0ce0d3a
PA
71872015-08-06 Pedro Alves <palves@redhat.com>
7188
7189 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7190 the current thread.
7191
bf47e248
PA
71922015-08-06 Pedro Alves <palves@redhat.com>
7193
7194 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7195 reading beyond the passed in buffer length.
7196
b6b9ffcc
PL
71972015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7198
7199 * tracepoint.c (symbol_list) <required>: Remove.
7200
863d01bd
PA
72012015-08-06 Pedro Alves <palves@redhat.com>
7202
7203 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7204 count if stopping and suspending threads.
7205 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7206 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7207 (linux_detach): Complete an ongoing step-over.
7208 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7209 throughout.
7210 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7211 (linux_wait_1): If passing a signal to the inferior after
7212 finishing a step-over, unsuspend and re-resume all lwps. If we
7213 see a single-step event but the thread should be continuing, don't
7214 pass the trap to gdb.
7215 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7216 internal_error instead of gdb_assert.
7217 (enqueue_pending_signal): New function.
7218 (check_ptrace_stopped_lwp_gone): Add debug output.
7219 (start_step_over): Use internal_error instead of gdb_assert.
7220 (complete_ongoing_step_over): New function.
7221 (linux_resume_one_thread): Don't resume a suspended thread.
7222 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7223 it stepping.
7224
00db26fa
PA
72252015-08-06 Pedro Alves <palves@redhat.com>
7226
7227 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7228 (linux_thread_alive): Use lwp_is_marked_dead.
7229 (extended_event_reported): Delete.
7230 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7231 instead of extended_event_reported.
7232 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7233 as well.
7234 (lwp_is_marked_dead): New function.
7235 (lwp_running): Use lwp_is_marked_dead.
7236 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7237 comment.
7238
ad071a30
PA
72392015-08-06 Pedro Alves <palves@redhat.com>
7240
7241 * linux-low.c (linux_wait_1): Move fork event output out of the
7242 !report_to_gdb check. Pass event_child->waitstatus to
7243 target_waitstatus_to_string instead of ourstatus.
7244
524b57e6
YQ
72452015-08-04 Yao Qi <yao.qi@linaro.org>
7246
7247 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7248 if current_thread is 32 bit.
7249
6085d6f6
YQ
72502015-08-04 Yao Qi <yao.qi@linaro.org>
7251
7252 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7253 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7254 * server.c (extended_protocol): Remove "static".
7255 * server.h (extended_protocol): Declare it.
7256
8a7e4587
YQ
72572015-08-04 Yao Qi <yao.qi@linaro.org>
7258
7259 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7260 both aarch64 and aarch32.
7261 (aarch64_set_pc): Likewise.
7262
3b53ae99
YQ
72632015-08-04 Yao Qi <yao.qi@linaro.org>
7264
7265 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7266 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7267 arm-with-neon.xml to srv_xmlfiles.
7268 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7269 (is_64bit_tdesc): New function.
7270 (aarch64_linux_read_description): New function.
7271 (aarch64_arch_setup): Call aarch64_linux_read_description.
7272 (regs_info): Rename to regs_info_aarch64.
7273 (aarch64_regs_info): Return right regs_info.
7274 (initialize_low_arch): Call initialize_low_arch_aarch32.
7275
bd9e6534
YQ
72762015-08-04 Yao Qi <yao.qi@linaro.org>
7277
7278 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7279 * linux-aarch32-low.c: New file.
7280 * linux-aarch32-low.h: New file.
7281 * linux-arm-low.c (arm_fill_gregset): Move it to
7282 linux-aarch32-low.c.
7283 (arm_store_gregset): Likewise.
7284 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7285 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7286 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7287 (regs_info): Rename to regs_info_arm.
7288 (arm_regs_info): Return regs_info_aarch32 if
7289 have_ptrace_getregset is 1 and target description is
7290 arm_with_neon or arm_with_vfpv3.
7291 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7292 Call initialize_low_arch_aarch32 instead.
7293
ded48a5e
YQ
72942015-08-04 Yao Qi <yao.qi@linaro.org>
7295
7296 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7297 * linux-low.c: ... here.
7298 * linux-low.h (have_ptrace_getregset): Declare it.
7299
96e9210f
PA
73002015-08-04 Pedro Alves <palves@redhat.com>
7301
7302 * thread-db.c (struct thread_db): Use new typedefs.
7303 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7304 CHK calls.
7305 (disable_thread_event_reporting): Cast result of dlsym to
7306 destination function pointer type.
7307 (thread_db_mourn): Use td_ta_delete_ftype.
7308
af60a1ef
SL
73092015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7310
7311 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7312 arch variant.
7313 (CDX_BREAKPOINT): Define for R2.
7314 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7315 (the_low_target): Add comments.
7316
e8b41681
YQ
73172015-07-30 Yao Qi <yao.qi@linaro.org>
7318
7319 * linux-arm-low.c (arm_hwcap): Remove it.
7320 (arm_read_description): New local variable arm_hwcap. Don't
7321 set arm_hwcap to zero.
7322
89abb039
YQ
73232015-07-30 Yao Qi <yao.qi@linaro.org>
7324
7325 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7326 Use regcache->tdesc instead.
7327 (arm_store_wmmxregset): Likewise.
7328 (arm_fill_vfpregset): Likewise.
7329 (arm_store_vfpregset): Likewise.
7330
deca266c
YQ
73312015-07-30 Yao Qi <yao.qi@linaro.org>
7332
7333 * linux-arm-low.c: Include arch/arm.h.
7334 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7335 (arm_store_gregset): Likewise.
7336
aa58a496
SM
73372015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7338
7339 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7340 ptrace's 4th parameter.
7341
50904b25
YQ
73422015-07-27 Yao Qi <yao.qi@linaro.org>
7343
7344 * configure.srv (case aarch64*-*-linux*): Don't set
7345 srv_linux_usrregs.
7346
5826e159
PA
73472015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7348
7349 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7350 sys/ptrace.h.
7351 * linux-arm-low.c: Likewise.
7352 * linux-cris-low.c: Likewise.
7353 * linux-crisv32-low.c: Likewise.
7354 * linux-low.c: Likewise.
7355 * linux-m68k-low.c: Likewise.
7356 * linux-mips-low.c: Likewise.
7357 * linux-nios2-low.c: Likewise.
7358 * linux-s390-low.c: Likewise.
7359 * linux-sparc-low.c: Likewise.
7360 * linux-tic6x-low.c: Likewise.
7361 * linux-tile-low.c: Likewise.
7362 * linux-x86-low.c: Likewise.
7363
54019719
PA
73642015-07-24 Pedro Alves <palves@redhat.com>
7365
7366 * config.in: Regenerate.
7367 * configure: Regenerate.
7368
eb7aa561
PA
73692015-07-24 Pedro Alves <palves@redhat.com>
7370
7371 * acinclude.m4: Include ../ptrace.m4.
7372 * configure.ac: Call GDB_AC_PTRACE.
7373 * config.in, configure: Regenerate.
7374
55d7b841
YQ
73752015-07-24 Yao Qi <yao.qi@linaro.org>
7376
7377 * linux-low.c (linux_create_inferior): Remove setting to
7378 proc->priv->new_inferior.
7379 (linux_attach): Likewise.
7380 (linux_low_filter_event): Likewise.
7381 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7382
c06cbd92
YQ
73832015-07-24 Yao Qi <yao.qi@linaro.org>
7384
7385 * linux-low.c (linux_arch_setup): New function.
7386 (linux_low_filter_event): If proc->tdesc is NULL and
7387 proc->attached is true, call the_low_target.arch_setup.
7388 Otherwise, keep status pending, and return.
7389 (linux_resume_one_lwp_throw): Don't call get_pc if
7390 thread->while_stepping isn't NULL. Don't call
7391 get_thread_regcache if proc->tdesc is NULL.
7392 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7393 (linux_target_ops): Install arch_setup.
7394 * server.c (start_inferior): Call the_target->arch_setup.
7395 * target.h (struct target_ops) <arch_setup>: New field.
7396 (target_arch_setup): New marco.
7397 * lynx-low.c (lynx_target_ops): Update.
7398 * nto-low.c (nto_target_ops): Update.
7399 * spu-low.c (spu_target_ops): Update.
7400 * win32-low.c (win32_target_ops): Update.
7401
5ae3ebba
YQ
74022015-07-24 Yao Qi <yao.qi@linaro.org>
7403
7404 * linux-low.c (linux_add_process): Don't set
7405 proc->priv->new_inferior.
7406 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7407 (linux_attach): Likewise.
7408
eb97750b
YQ
74092015-07-24 Yao Qi <yao.qi@linaro.org>
7410
7411 * server.c (start_inferior): Code refactor.
7412
51aee833
YQ
74132015-07-24 Yao Qi <yao.qi@linaro.org>
7414
7415 * server.c (process_serial_event): Set general_thread.
7416
af1b22f3
YQ
74172015-07-21 Yao Qi <yao.qi@linaro.org>
7418
7419 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7420 aarch64_linux_get_debug_reg_capacity.
7421
554717a3
YQ
74222015-07-17 Yao Qi <yao.qi@linaro.org>
7423
7424 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7425 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7426 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7427 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7428 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7429 (AARCH64_HWP_ALIGNMENT): Likewise.
7430 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7431 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7432 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7433 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7434 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7435 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7436 (struct aarch64_debug_reg_state): Likewise.
7437 (struct arch_lwp_info): Likewise.
7438 (aarch64_align_watchpoint): Likewise.
7439 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7440 (aarch64_watchpoint_length): Likewise.
7441 (aarch64_point_encode_ctrl_reg): Likewise
7442 (aarch64_point_is_aligned): Likewise.
7443 (aarch64_align_watchpoint): Likewise.
7444 (aarch64_linux_set_debug_regs):
7445 (aarch64_dr_state_insert_one_point): Likewise.
7446 (aarch64_dr_state_remove_one_point): Likewise.
7447 (aarch64_handle_breakpoint): Likewise.
7448 (aarch64_handle_aligned_watchpoint): Likewise.
7449 (aarch64_handle_unaligned_watchpoint): Likewise.
7450 (aarch64_handle_watchpoint): Likewise.
7451
c67ca4de
YQ
74522015-07-17 Yao Qi <yao.qi@linaro.org>
7453
7454 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7455 and don't aarch64_get_debug_reg_state. All callers update.
7456 (aarch64_handle_aligned_watchpoint): Likewise.
7457 (aarch64_handle_unaligned_watchpoint): Likewise.
7458 (aarch64_handle_watchpoint): Likewise.
7459 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7460 (aarch64_remove_point): Likewise.
7461
25abf979
YQ
74622015-07-17 Yao Qi <yao.qi@linaro.org>
7463
7464 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7465 debug_printf.
7466 (aarch64_handle_unaligned_watchpoint): Likewise.
7467
db1ff28b
JK
74682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7469
7470 Revert the previous 3 commits:
7471 Move gdb_regex* to common/
7472 Move linux_find_memory_regions_full & co.
7473 gdbserver build-id attribute generator
7474
700ca40f
JK
74752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7476 Jan Kratochvil <jan.kratochvil@redhat.com>
7477
7478 gdbserver build-id attribute generator.
7479 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7480 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7481 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7482 (find_phdr): New.
7483 (get_dynamic): Use find_pdhr to traverse program headers.
7484 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7485 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7486 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7487 (get_hex_build_id): New.
7488 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7489 to reply XML document.
7490
9904185c
JK
74912015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7492 Jan Kratochvil <jan.kratochvil@redhat.com>
7493
7494 * target.c: Include target/target-utils.h and fcntl.h.
7495 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7496 (target_fileio_read_stralloc): New functions.
7497
6e5b4429
JK
74982015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7499
7500 * Makefile.in (OBS): Add gdb_regex.o.
7501 (gdb_regex.o): New.
7502 * config.in: Rebuilt.
7503 * configure: Rebuilt.
7504
ddc98fbf
JK
75052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7506 Jan Kratochvil <jan.kratochvil@redhat.com>
7507
7508 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7509 * Makefile.in (OBS): Add target-utils.o.
7510 (linux-maps.o, target-utils.o): New.
7511 * configure.srv (srv_linux_obj): Add linux-maps.o.
7512
e57bb7a0
PL
75132015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7514
7515 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7516 function, return 1.
7517 (the_low_target): Install it.
7518
586b02a9
PA
75192015-07-14 Pedro Alves <palves@redhat.com>
7520
7521 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7522 Instead, ignore ECHILD, and throw an error for other errnos.
7523
58c1b36c
PA
75242015-07-10 Pedro Alves <palves@redhat.com>
7525
7526 * event-loop.c (struct callback_event) <data>: Change type to
7527 gdb_client_data instance instead of gdb_client_data pointer.
7528 (append_callback_event): Adjust.
7529
421530db
PL
75302015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7531
7532 * linux-aarch64-low.c: Add comments for each linux_target_ops
7533 method. Remove comments already covered in target_ops and
7534 linux_target_ops definitions.
7535 (the_low_target): Add comments for each unimplemented method.
7536
c2d65f38
YQ
75372015-07-09 Yao Qi <yao.qi@linaro.org>
7538
7539 * linux-aarch64-low.c (aarch64_regmap): Remove.
7540 (aarch64_usrregs_info): Remove.
7541 (regs_info): Set field usrregs to NULL.
7542
b20a6524
MM
75432015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7544
7545 * linux-low.c: Include "rsp-low.h"
7546 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7547 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7548 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7549 (handle_btrace_enable_pt): New.
7550 (handle_btrace_general_set): Support "pt".
7551 (handle_btrace_conf_general_set): Support "pt:size".
7552
96c97461
PL
75532015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7554
7555 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7556 Z_PACKET_SW_BP.
7557
37d66942
PL
75582015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7559
7560 * linux-aarch64-low.c: Remove comment about endianness.
7561 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7562 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7563 memcmp.
7564
dc06243f
GB
75652015-06-24 Gary Benson <gbenson@redhat.com>
7566
7567 * linux-i386-ipa.c (stdint.h): Do not include.
7568 * lynx-i386-low.c (stdint.h): Likewise.
7569 * lynx-ppc-low.c (stdint.h): Likewise.
7570 * mem-break.c (stdint.h): Likewise.
7571 * thread-db.c (stdint.h): Likewise.
7572 * tracepoint.c (stdint.h): Likewise.
7573 * win32-low.c (stdint.h): Likewise.
7574
124e13d9
SM
75752015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7576
7577 * server.c (write_qxfer_response): Update call to
7578 remote_escape_output.
7579
909c2cda
JK
75802015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7581 Jan Kratochvil <jan.kratochvil@redhat.com>
7582
7583 Merge multiple hex conversions.
7584 * gdbreplay.c (tohex): Rename to 'fromhex'.
7585 (logchar): Use fromhex.
7586
24c05f46
JK
75872015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7588
7589 * server.c (handle_qxfer_libraries): Set `version' attribute for
7590 <library-list>.
7591
14d2069a
GB
75922015-06-10 Gary Benson <gbenson@redhat.com>
7593
7594 * target.h (struct target_ops) <multifs_open>: New field.
7595 <multifs_unlink>: Likewise.
7596 <multifs_readlink>: Likewise.
7597 * linux-low.c (nat/linux-namespaces.h): New include.
7598 (linux_target_ops): Initialize the_target->multifs_open,
7599 the_target->multifs_unlink and the_target->multifs_readlink.
7600 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7601 * hostio.c (hostio_fs_pid): New static variable.
7602 (hostio_handle_new_gdb_connection): New function.
7603 (handle_setfs): Likewise.
7604 (handle_open): Use the_target->multifs_open as appropriate.
7605 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7606 (handle_readlink): Use the_target->multifs_readlink as
7607 appropriate.
7608 (handle_vFile): Handle vFile:setfs packets.
7609 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7610 after target_handle_new_gdb_connection.
7611
4b8b5e72
GB
76122015-06-10 Gary Benson <gbenson@redhat.com>
7613
7614 * configure.ac (AC_CHECK_FUNCS): Add setns.
7615 * config.in: Regenerate.
7616 * configure: Likewise.
7617 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7618 (linux-namespaces.o): New rule.
7619 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7620
3ac2e371
GB
76212015-06-09 Gary Benson <gbenson@redhat.com>
7622
7623 * hostio.c (handle_open): Process mode argument with
7624 fileio_to_host_mode.
7625
ca9b78ce
YQ
76262015-06-01 Yao Qi <yao.qi@linaro.org>
7627
7628 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7629 * linux-x86-low.c: Likewise.
7630
bfacd19d
DB
76312015-05-28 Don Breazeal <donb@codesourcery.com>
7632
7633 * linux-low.c (handle_extended_wait): Initialize
7634 thread_info.last_resume_kind for new fork children.
7635
452003ef
PA
76362015-05-15 Pedro Alves <palves@redhat.com>
7637
7638 * target.h (target_handle_new_gdb_connection): Rewrite using if
7639 wrapped in do/while.
7640
1041a03c
JB
76412015-05-14 Joel Brobecker <brobecker@adacore.com>
7642
7643 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7644 * configure, config.in: Regenerate.
7645 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7646 Declare typedef.
7647
c269dbdb
DB
76482015-05-12 Don Breazeal <donb@codesourcery.com>
7649
7650 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7651 PTRACE_EVENT_VFORK_DONE.
7652 (linux_low_ptrace_options, extended_event_reported): Add vfork
7653 events.
7654 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7655 and "vforkdone" for RSP 'T' Stop Reply Packet.
7656 * server.h (report_vfork_events): Declare
7657 global variable.
7658
3a8a0396
DB
76592015-05-12 Don Breazeal <donb@codesourcery.com>
7660
7661 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7662 (the_low_target) <new_fork>: Initialize new member.
7663 * linux-arm-low.c (arm_new_fork): New function.
7664 (the_low_target) <new_fork>: Initialize new member.
7665 * linux-low.c (handle_extended_wait): Call new target function
7666 new_fork.
7667 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7668 * linux-mips-low.c (mips_add_watchpoint): New function
7669 extracted from mips_insert_point.
7670 (the_low_target) <new_fork>: Initialize new member.
7671 (mips_linux_new_fork): New function.
7672 (mips_insert_point): Call mips_add_watchpoint.
7673 * linux-x86-low.c (x86_linux_new_fork): New function.
7674 (the_low_target) <new_fork>: Initialize new member.
7675
de0d863e
DB
76762015-05-12 Don Breazeal <donb@codesourcery.com>
7677
7678 * linux-low.c (handle_extended_wait): Implement return value,
7679 rename argument 'event_child' to 'event_lwp', handle
7680 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7681 (linux_low_ptrace_options): New function.
7682 (linux_low_filter_event): Call linux_low_ptrace_options,
7683 use different argument fo linux_enable_event_reporting,
7684 use return value from handle_extended_wait.
7685 (extended_event_reported): New function.
7686 (linux_wait_1): Call extended_event_reported and set
7687 status to report fork events.
7688 (linux_write_memory): Add pid to debug message.
7689 (reset_lwp_ptrace_options_callback): New function.
7690 (linux_handle_new_gdb_connection): New function.
7691 (linux_target_ops): Initialize new structure member.
7692 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7693 * lynx-low.c: Initialize new structure member.
7694 * remote-utils.c (prepare_resume_reply): Implement stop reason
7695 "fork" for "T" stop message.
7696 * server.c (handle_query): Call handle_new_gdb_connection.
7697 * server.h (report_fork_events): Declare global flag.
7698 * target.h (struct target_ops) <handle_new_gdb_connection>:
7699 New member.
7700 (target_handle_new_gdb_connection): New macro.
7701 * win32-low.c: Initialize new structure member.
7702
ddcbc397
DB
77032015-05-12 Don Breazeal <donb@codesourcery.com>
7704
7705 * mem-break.c (APPEND_TO_LIST): Define macro.
7706 (clone_agent_expr): New function.
7707 (clone_one_breakpoint): New function.
7708 (clone_all_breakpoints): New function.
7709 * mem-break.h: Declare new functions.
7710
89245bc0
DB
77112015-05-12 Don Breazeal <donb@codesourcery.com>
7712
7713 * linux-low.c (linux_supports_fork_events): New function.
7714 (linux_supports_vfork_events): New function.
7715 (linux_target_ops): Initialize new structure members.
7716 (initialize_low): Call linux_check_ptrace_features.
7717 * lynx-low.c (lynx_target_ops): Initialize new structure
7718 members.
7719 * server.c (report_fork_events, report_vfork_events):
7720 New global flags.
7721 (handle_query): Add new features to qSupported packet and
7722 response.
7723 (captured_main): Initialize new global variables.
7724 * target.h (struct target_ops) <supports_fork_events>:
7725 New member.
7726 <supports_vfork_events>: New member.
7727 (target_supports_fork_events): New macro.
7728 (target_supports_vfork_events): New macro.
7729 * win32-low.c (win32_target_ops): Initialize new structure
7730 members.
7731
835205d0
GB
77322015-05-12 Gary Benson <gbenson@redhat.com>
7733
7734 * server.c (handle_qxfer_exec_file): Use current process
7735 if annex is empty.
7736
21e94bd9
SL
77372015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7738
7739 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7740 Remove HAVE_PTRACE_GETREGS conditionals.
7741 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7742 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7743
45614f15
YQ
77442015-05-08 Yao Qi <yao.qi@linaro.org>
7745
7746 * linux-low.c (linux_supports_conditional_breakpoints): New
7747 function.
7748 (linux_target_ops): Install new target method.
7749 * lynx-low.c (lynx_target_ops): Install NULL hook for
7750 supports_conditional_breakpoints.
7751 * nto-low.c (nto_target_ops): Likewise.
7752 * spu-low.c (spu_target_ops): Likewise.
7753 * win32-low.c (win32_target_ops): Likewise.
7754 * server.c (handle_query): Check
7755 target_supports_conditional_breakpoints.
7756 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7757 New field.
7758 (target_supports_conditional_breakpoints): New macro.
7759
80ad801e
PA
77602015-05-06 Pedro Alves <palves@redhat.com>
7761
7762 PR server/18081
7763 * server.c (start_inferior): If the process exits, mourn it.
7764
819843c7
GB
77652015-04-21 Gary Benson <gbenson@redhat.com>
7766
7767 * hostio.c (fileio_open_flags_to_host): Factored out to
7768 fileio_to_host_openflags in common/fileio.c. Single use
7769 updated.
7770
a2d5a9d7
MF
77712015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7772
7773 * linux-xtensa-low.c (xtensa_fill_gregset)
7774 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7775 XCHAL_HAVE_LOOP.
7776
deb44829
MF
77772015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7778
7779 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7780 (regs_info): Replace usrregs pointer with NULL.
7781
e57f1de3
GB
77822015-04-17 Gary Benson <gbenson@redhat.com>
7783
7784 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7785 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7786 * server.c (handle_qxfer_exec_file): New function.
7787 (qxfer_packets): Add exec-file entry.
7788 (handle_query): Report qXfer:exec-file:read as supported packet.
7789
62828379
RN
77902015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7791
7792 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7793
b88bb450
GB
77942015-04-09 Gary Benson <gbenson@redhat.com>
7795
7796 * hostio-errno.c (errno_to_fileio_error): Remove function.
7797 Update caller to use remote_fileio_to_fio_error.
7798
c8f4bfdd
YQ
77992015-04-09 Yao Qi <yao.qi@linaro.org>
7800
7801 * linux-low.c (linux_insert_point): Call
7802 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7803 (linux_remove_point): Call remove_memory_breakpoint if type is
7804 raw_bkpt_type_sw.
7805 * linux-x86-low.c (x86_insert_point): Don't call
7806 insert_memory_breakpoint.
7807 (x86_remove_point): Don't call remove_memory_breakpoint.
7808
41f98f02
PA
78092015-04-01 Pedro Alves <palves@redhat.com>
7810 Cleber Rosa <crosa@redhat.com>
7811
7812 * server.c (gdbserver_usage): Reorganize and extend the usage
7813 message.
7814
2bf6fb9d
PA
78152015-03-24 Pedro Alves <palves@redhat.com>
7816
7817 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7818 output. Also dump TRAP_TRACE.
7819 (linux_low_filter_event): In debug output, distinguish a
7820 resume_stop SIGSTOP from a delayed SIGSTOP.
7821
369f6daa
GB
78222015-03-24 Gary Benson <gbenson@redhat.com>
7823
7824 * linux-x86-low.c (x86_linux_new_thread): Moved to
7825 nat/x86-linux.c.
7826 (x86_linux_prepare_to_resume): Likewise.
7827
8e5d4070
GB
78282015-03-24 Gary Benson <gbenson@redhat.com>
7829
7830 * Makefile.in (x86-linux-dregs.o): New rule.
7831 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7832 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7833 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7834 (x86_linux_dr_get): Likewise.
7835 (x86_linux_dr_set): Likewise.
7836 (update_debug_registers_callback): Likewise.
7837 (x86_linux_dr_set_addr): Likewise.
7838 (x86_linux_dr_get_addr): Likewise.
7839 (x86_linux_dr_set_control): Likewise.
7840 (x86_linux_dr_get_control): Likewise.
7841 (x86_linux_dr_get_status): Likewise.
7842 (x86_linux_update_debug_registers): Likewise.
7843
2b95d440
GB
78442015-03-24 Gary Benson <gbenson@redhat.com>
7845
7846 * linux-x86-low.c (x86_linux_update_debug_registers):
7847 New function, factored out from...
7848 (x86_linux_prepare_to_resume): ...this.
7849
14b0bc68
GB
78502015-03-24 Gary Benson <gbenson@redhat.com>
7851
7852 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7853 (x86_linux_dr_set): Likewise.
7854 (update_debug_registers_callback): Likewise.
7855 (x86_linux_dr_set_addr): Likewise.
7856 (x86_linux_dr_get_addr): Likewise.
7857 (x86_linux_dr_set_control): Likewise.
7858 (x86_linux_dr_get_control): Likewise.
7859 (x86_linux_dr_get_status): Likewise.
7860 (x86_linux_prepare_to_resume): Likewise.
7861
5dfe6ca8
GB
78622015-03-24 Gary Benson <gbenson@redhat.com>
7863
7864 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7865 Use perror_with_name. Pass string through gettext.
7866 (x86_linux_dr_set): Likewise.
7867
d33472ad
GB
78682015-03-24 Gary Benson <gbenson@redhat.com>
7869
7870 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7871 (x86_linux_dr_set_addr): ...this.
7872 (x86_dr_low_get_addr): Rename to...
7873 (x86_linux_dr_get_addr): ...this.
7874 (x86_dr_low_set_control): Rename to...
7875 (x86_linux_dr_set_control): ...this.
7876 (x86_dr_low_get_control): Rename to...
7877 (x86_linux_dr_get_control): ...this.
7878 (x86_dr_low_get_status): Rename to...
7879 (x86_linux_dr_get_status): ...this.
7880 (x86_dr_low): Update with new function names.
7881
4b134ca1
GB
78822015-03-24 Gary Benson <gbenson@redhat.com>
7883
7884 * Makefile.in (x86-linux.o): New rule.
7885 * configure.srv: Add x86-linux.o to relevant targets.
7886 * linux-low.c (lwp_set_arch_private_info): New function.
7887 (lwp_arch_private_info): Likewise.
7888 * linux-x86-low.c: Include nat/x86-linux.h.
7889 (arch_lwp_info): Removed structure.
7890 (update_debug_registers_callback):
7891 Use lwp_set_debug_registers_changed.
7892 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7893 and lwp_set_debug_registers_changed.
7894 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7895
34c703da
GB
78962015-03-24 Gary Benson <gbenson@redhat.com>
7897
7898 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7899 * linux-arm-low.c (arm_new_thread): Likewise.
7900 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7901 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7902 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7903 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7904
cff068da
GB
79052015-03-24 Gary Benson <gbenson@redhat.com>
7906
7907 * linux-low.c (ptid_of_lwp): New function.
7908 (lwp_is_stopped): Likewise.
7909 (lwp_stop_reason): Likewise.
7910 * linux-x86-low.c (update_debug_registers_callback):
7911 Use lwp_is_stopped.
7912 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7913 lwp_stop_reason.
7914
b2f7c7e8
GB
79152015-03-24 Gary Benson <gbenson@redhat.com>
7916
7917 * linux-low.h (linux_stop_lwp): Remove declaration.
7918
6d4ee8c6
GB
79192015-03-24 Gary Benson <gbenson@redhat.com>
7920
7921 * linux-low.h: Include nat/linux-nat.h.
7922 * linux-low.c (iterate_over_lwps_args): New structure.
7923 (iterate_over_lwps_filter): New function.
7924 (iterate_over_lwps): Likewise.
7925 * linux-x86-low.c (update_debug_registers_callback):
7926 Update signature to what iterate_over_lwps expects.
7927 Remove PID check that iterate_over_lwps now performs.
7928 (x86_dr_low_set_addr): Use iterate_over_lwps.
7929 (x86_dr_low_set_control): Likewise.
7930
70a0bb6b
GB
79312015-03-24 Gary Benson <gbenson@redhat.com>
7932
7933 * linux-x86-low.c (x86_debug_reg_state): New function.
7934 (x86_linux_prepare_to_resume): Use the above.
7935
7b669087
GB
79362015-03-24 Gary Benson <gbenson@redhat.com>
7937
7938 * linux-low.c (current_lwp_ptid): New function.
7939 * linux-x86-low.c: Include nat/linux-nat.h.
7940 (x86_dr_low_get_addr): Use current_lwp_ptid.
7941 (x86_dr_low_get_control): Likewise.
7942 (x86_dr_low_get_status): Likewise.
7943
eef49a3d
PA
79442015-03-20 Pedro Alves <palves@redhat.com>
7945
7946 * tracepoint.c (cmd_qtstatus): Make "str" const.
7947
b2333d22
PA
79482015-03-20 Pedro Alves <palves@redhat.com>
7949
7950 * server.c (handle_general_set): Make "req_str" const.
7951
23f238d3
PA
79522015-03-19 Pedro Alves <palves@redhat.com>
7953
7954 * linux-low.c (linux_resume_one_lwp): Rename to ...
7955 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7956 instead call perror_with_name.
7957 (check_ptrace_stopped_lwp_gone): New function.
7958 (linux_resume_one_lwp): Reimplement as wrapper around
7959 linux_resume_one_lwp_throw that swallows errors if the LWP is
7960 gone.
7961
91baf43f
PA
79622015-03-19 Pedro Alves <palves@redhat.com>
7963
7964 * linux-low.c (count_events_callback, select_event_lwp_callback):
7965 No longer check whether the thread has resume_stop as last resume
7966 kind.
7967
8bf3b159
PA
79682015-03-19 Pedro Alves <palves@redhat.com>
7969
7970 * linux-low.c (count_events_callback, select_event_lwp_callback):
7971 Use the lwp's status_pending_p field, not the thread's.
7972
b90fc188
PA
79732015-03-19 Pedro Alves <palves@redhat.com>
7974
7975 * linux-low.c (select_event_lwp_callback): Update comments to
7976 no longer mention SIGTRAP.
7977
464b0089
GB
79782015-03-18 Gary Benson <gbenson@redhat.com>
7979
7980 * server.c (handle_query): Do not report vFile:fstat as supported.
7981
aa9e327f
GB
79822015-03-11 Gary Benson <gbenson@redhat.com>
7983
7984 * hostio.c (sys/types.h): New include.
7985 (sys/stat.h): Likewise.
7986 (common-remote-fileio.h): Likewise.
7987 (handle_fstat): New function.
7988 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7989
791c0056
GB
79902015-03-11 Gary Benson <gbenson@redhat.com>
7991
7992 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7993 struct stat.st_blocks and struct stat.st_blksize.
7994 * configure: Regenerate.
7995 * config.in: Likewise.
7996 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7997 (OBS): Add common-remote-fileio.o.
7998 (common-remote-fileio.o): New rule.
7999
9a9df970
PA
80002015-03-09 Pedro Alves <palves@redhat.com>
8001
8002 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8003 'struct sockaddr' pointer in 'accept' call.
8004
9eb1356e
PA
80052015-03-09 Pedro Alves <palves@redhat.com>
8006
8007 Revert:
8008 2015-03-07 Pedro Alves <palves@redhat.com>
8009 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8010 or <winsock2.h> here. Instead include "gdb_socket.h".
8011 (remote_open): Use union gdb_sockaddr_u.
8012 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8013 or <winsock2.h> here. Instead include "gdb_socket.h".
8014 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8015 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8016 or <sys/un.h>.
8017 (init_named_socket, gdb_agent_helper_thread): Use union
8018 gdb_sockaddr_u.
8019
aac331e4
PA
80202015-03-07 Pedro Alves <palves@redhat.com>
8021
8022 * configure.ac (build_warnings): Move
8023 -Wdeclaration-after-statement to the C-specific set.
8024 * configure: Regenerate.
8025
366c75fc
PA
80262015-03-07 Pedro Alves <palves@redhat.com>
8027
8028 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8029 or <winsock2.h> here. Instead include "gdb_socket.h".
8030 (remote_open): Use union gdb_sockaddr_u.
8031 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8032 or <winsock2.h> here. Instead include "gdb_socket.h".
8033 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8034 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8035 or <sys/un.h>.
8036 (init_named_socket, gdb_agent_helper_thread): Use union
8037 gdb_sockaddr_u.
8038
492d29ea
PA
80392015-03-07 Pedro Alves <palves@redhat.com>
8040
8041 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8042 instead.
8043
60a191ed
YQ
80442015-03-06 Yao Qi <yao.qi@linaro.org>
8045
8046 * linux-aarch64-low.c (aarch64_insert_point): Use
8047 show_debug_regs as a boolean.
8048 (aarch64_remove_point): Likewise.
8049
f5771b1d
PA
80502015-03-05 Pedro Alves <palves@redhat.com>
8051
8052 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8053 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8054 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8055 * nto-low.c (nto_target_ops): Likewise.
8056 * spu-low.c (spu_target_ops): Likewise.
8057 * win32-low.c (win32_target_ops): Likewise.
8058
3e572f71
PA
80592015-03-04 Pedro Alves <palves@redhat.com>
8060
72f4393d 8061 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
8062 Decide whether a breakpoint triggered based on the SIGTRAP's
8063 siginfo.si_code.
72f4393d
L
8064 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8065 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
8066 (linux_low_filter_event): Check for breakpoints before checking
8067 watchpoints.
8068 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8069 siginfo.si_code.
72f4393d
L
8070 (linux_stopped_by_sw_breakpoint)
8071 (linux_supports_stopped_by_sw_breakpoint)
8072 (linux_stopped_by_hw_breakpoint)
8073 (linux_supports_stopped_by_hw_breakpoint): New functions.
8074 (linux_target_ops): Install new target methods.
3e572f71 8075
1ec68e26
PA
80762015-03-04 Pedro Alves <palves@redhat.com>
8077
8078 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8079 * server.c (swbreak_feature, hwbreak_feature): New globals.
8080 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8081 (captured_main): Clear swbreak_feature and hwbreak_feature.
8082 * server.h (swbreak_feature, hwbreak_feature): Declare.
8083 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8084 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8085 supports_stopped_by_hw_breakpoint>: New fields.
8086 (target_supports_stopped_by_sw_breakpoint)
8087 (target_stopped_by_sw_breakpoint)
8088 (target_supports_stopped_by_hw_breakpoint)
8089 (target_stopped_by_hw_breakpoint): Declare.
8090
15c66dd6
PA
80912015-03-04 Pedro Alves <palves@redhat.com>
8092
8093 enum lwp_stop_reason -> enum target_stop_reason
8094 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8095 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8096 (linux_wait_1, stuck_in_jump_pad_callback)
8097 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8098 (linux_stopped_by_watchpoint):
8099 * linux-low.h (enum lwp_stop_reason): Delete.
8100 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8101 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8102
98fc70d6
YQ
81032015-03-04 Yao Qi <yao.qi@linaro.org>
8104
8105 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8106
dd2ac174
GB
81072015-03-03 Gary Benson <gbenson@redhat.com>
8108
8109 * hostio.c (handle_vFile): Fix prefix lengths.
8110
d68e53f4
MM
81112015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8112
8113 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8114 ptr_bits.
8115
bf2d68ab
AA
81162015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8117
8118 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8119 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8120 (clean): Add "rm -f" for above C files.
8121 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8122 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8123 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8124 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8125 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8126 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8127 (init_registers_s390x_vx_linux64)
8128 (init_registers_s390x_tevx_linux64)
8129 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8130 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8131 declarations.
8132 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8133 (s390_store_vxrs_high): New functions.
8134 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8135 NT_S390_VXRS_HIGH.
8136 (s390_arch_setup): Add logic for selecting one of the new target
8137 descriptions. Activate the new vector regsets if applicable.
8138 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8139 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8140 and init_registers_s390x_tevx_linux64.
8141
c966a859
PA
81422015-03-01 Pedro Alves <palves@redhat.com>
8143
8144 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8145 parameter.
8146
4180215b
PA
81472015-02-27 Pedro Alves <palves@redhat.com>
8148
8149 * linux-x86-low.c (u_debugreg_offset): New function.
8150 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8151
749bab01
PA
81522015-02-27 Pedro Alves <palves@redhat.com>
8153
8154 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8155 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8156 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8157 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8158 (ps_lsetfpregs, ps_getpid)
8159 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8160 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8161 (ps_lsetxregs, ps_plog): Declare.
8162
3c14e5a3
PA
81632015-02-27 Pedro Alves <palves@redhat.com>
8164
8165 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8166 IP_AGENT_EXPORT_FUNC.
8167 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8168 IP_AGENT_EXPORT_FUNC.
8169 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8170 (IP_AGENT_EXPORT): Delete.
8171 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8172 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8173 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8174 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8175 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8176 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8177 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8178 (traceframe_read_count, traceframe_write_count)
8179 (traceframes_created, trace_state_variables, get_raw_reg)
8180 (get_trace_state_variable_value, set_trace_state_variable_value)
8181 (ust_loaded, helper_thread_id, cmd_buf): Use
8182 IPA_SYM_EXPORTED_NAME.
8183 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8184 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8185 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8186 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8187 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8188 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8189 EXTERN_C_PUSH/EXTERN_C_POP.
8190 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8191 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8192 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8193 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8194 (traceframe_write_count, traceframe_read_count)
8195 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8196 (about_to_request_buffer_space, get_trace_state_variable_value)
8197 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8198 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8199 EXTERN_C_PUSH/EXTERN_C_POP.
8200 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8201 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8202 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8203 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8204 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8205 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8206 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8207 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8208 Define.
8209 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8210 (IP_AGENT_EXPORT_VAR_DECL): Define.
8211 (tracing): Declare.
8212 (gdb_agent_get_raw_reg): Declare.
8213
fe978cb0
PA
82142015-02-27 Tom Tromey <tromey@redhat.com>
8215 Pedro Alves <palves@redhat.com>
8216
8217 Rename symbols whose names are reserved C++ keywords throughout.
8218
3bc3d82a
PA
82192015-02-27 Pedro Alves <palves@redhat.com>
8220
8221 * Makefile.in (COMPILER): New, get it from autoconf.
8222 (CXX): Get from autoconf instead.
8223 (COMPILE.pre): Use COMPILER.
8224 (CC-LD): Rename to ...
8225 (CC_LD): ... this. Use COMPILER.
8226 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8227 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8228 * acinclude.m4: Include build-with-cxx.m4.
8229 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8230 Disable -Werror by default if building in C++ mode.
8231 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8232 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8233 the C++ compiler. Save/restore CXXFLAGS too.
8234 * configure: Regenerate.
8235
07697489
PA
82362015-02-27 Pedro Alves <palves@redhat.com>
8237
8238 * acinclude.m4: Include libiberty.m4.
8239 * configure.ac: Call libiberty_INIT.
8240 * config.in, configure: Regenerate.
8241
9beb7c4e
PA
82422015-02-26 Pedro Alves <palves@redhat.com>
8243
8244 * linux-low.c (linux_wait_1): When incrementing the PC past a
8245 program breakpoint always use the_low_target.breakpoint_len as
8246 increment, rather than the maximum between that and
8247 the_low_target.decr_pc_after_break.
8248
8090aef2
PA
82492015-02-23 Pedro Alves <palves@redhat.com>
8250
8251 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8252 thread was doing a step-over; always adjust the PC if
8253 we stepped over a permanent breakpoint.
8254 (linux_wait_1): If we stepped over breakpoint that was on top of a
8255 permanent breakpoint, manually advance the PC past it.
8256
bc9540e8
PA
82572015-02-23 Pedro Alves <palves@redhat.com>
8258
8259 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8260 modes.
8261 (x86_fill_gregset, x86_store_gregset): Use it when handling
8262 $orig_eax.
8263
2db9a427
PA
82642015-02-20 Pedro Alves <palves@redhat.com>
8265
8266 * thread-db.c: Include "nat/linux-procfs.h".
8267 (thread_db_init): Skip listing new threads if the kernel supports
8268 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8269
afa8d396
PA
82702015-02-20 Pedro Alves <palves@redhat.com>
8271
8272 * linux-low.c (status_pending_p_callback): Use ptid_match.
8273
c9587f88
AT
82742015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8275
8276 PR breakpoints/16812
8277 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8278 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8279 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8280
b05ec7a5
AT
82812015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8282
8283 PR breakpoints/15956
8284 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8285
d33501a5
MM
82862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8287
8288 * linux-low.c (linux_low_btrace_conf): Print size.
8289 * server.c (handle_btrace_conf_general_set): New.
8290 (hanle_general_set): Call handle_btrace_conf_general_set.
8291 (handle_query): Report Qbtrace-conf:bts:size as supported.
8292
f4abbc16
MM
82932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8294
8295 * linux-low.c (linux_low_enable_btrace): Update parameters.
8296 (linux_low_btrace_conf): New.
8297 (linux_target_ops)<to_btrace_conf>: Initialize.
8298 * server.c (current_btrace_conf): New.
8299 (handle_btrace_enable): Rename to ...
8300 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8301 to target_enable_btrace. Update comment. Update users.
8302 (handle_qxfer_btrace_conf): New.
8303 (qxfer_packets): Add btrace-conf entry.
8304 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8305 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8306 (target_ops)<read_btrace_conf>: New.
8307 (target_enable_btrace): Update parameters.
8308 (target_read_btrace_conf): New.
8309
043c3577
MM
83102015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8311
8312 * server.c (handle_btrace_general_set): Remove call to
8313 target_supports_btrace.
8314 (supported_btrace_packets): New.
8315 (handle_query): Call supported_btrace_packets.
8316 * target.h: include btrace-common.h.
8317 (btrace_target_info): Removed.
8318 (supports_btrace, target_supports_btrace): Update parameters.
8319
734b0e4b
MM
83202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8321
8322 * Makefile.in (SFILES): Add common/btrace-common.c.
8323 (OBS): Add common/btrace-common.o.
8324 (btrace-common.o): Add build rules.
8325 * linux-low: Include btrace-common.h.
8326 (linux_low_read_btrace): Use struct btrace_data. Call
8327 btrace_data_init and btrace_data_fini.
8328
d6c146e9
PA
83292015-02-06 Pedro Alves <palves@redhat.com>
8330
8331 * thread-db.c (find_new_threads_callback): Add debug output.
8332
20ba1ce6
PA
83332015-02-04 Pedro Alves <palves@redhat.com>
8334
8335 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8336 (resume_stopped_resumed_lwps): New function.
8337 (linux_wait_for_event_filtered): Use it.
8338
8cc73a39
SDJ
83392015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8340
8341 * Makefile.in (SFILES): Add linux-personality.c.
8342 (linux-personality.o): New rule.
8343 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8344 list of objects to be built.
8345 * linux-low.c: Include nat/linux-personality.h.
8346 (linux_create_inferior): Remove code to disable address space
8347 randomization (moved to ../nat/linux-personality.c). Create
8348 cleanup to disable address space randomization.
8349
fb23d554
SDJ
83502015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8351
8352 * Makefile.in (posix-strerror.o): New rule.
8353 (mingw-strerror.o): Likewise.
8354 * configure: Regenerated.
8355 * configure.ac: Source file ../common/common.host. Initialize new
8356 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8357
cdf43629
YQ
83582015-01-14 Yao Qi <yao@codesourcery.com>
8359
8360 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8361 (ppc-linux.o): New rule.
8362 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8363 * configure.ac: AC_CHECK_FUNCS(getauxval).
8364 * config.in: Re-generated.
8365 * configure: Re-generated.
8366 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8367 ppc64_64bit_inferior_p
8368
514c5338
YQ
83692015-01-14 Yao Qi <yao@codesourcery.com>
8370
8371 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8372 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8373 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8374 (PT_ORIG_R3, PT_TRAP): Likewise.
8375 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8376 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8377 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8378
3368c1e5
JB
83792015-01-10 Joel Brobecker <brobecker@adacore.com>
8380
8381 * i387-fp.c (i387_cache_to_xsave): In look over
8382 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8383 zmmh_low_space field by use of zmmh_high_space.
8384
582511be
PA
83852015-01-09 Pedro Alves <palves@redhat.com>
8386
8387 * linux-low.c (step_over_bkpt): Move higher up in the file.
8388 (handle_extended_wait): Don't store the stop_pc here.
8389 (get_stop_pc): Adjust comments and rename to ...
8390 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8391 stopped for a software breakpoint or hardware breakpoint.
8392 (thread_still_has_status_pending_p): New function.
8393 (status_pending_p_callback): Use
8394 thread_still_has_status_pending_p. If the event is no longer
8395 interesting, resume the LWP.
8396 (handle_tracepoints): Add assert.
8397 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8398 (wstatus_maybe_breakpoint): New function.
8399 (cancel_breakpoint): Delete function.
8400 (check_stopped_by_watchpoint): New function, factored out from
8401 linux_low_filter_event.
8402 (lp_status_maybe_breakpoint): Delete function.
8403 (linux_low_filter_event): Remove filter_ptid argument.
8404 Leave thread group exits pending here. Store the LWP's stop PC.
8405 Always leave events pending.
8406 (linux_wait_for_event_filtered): Pull all events out of the
8407 kernel, and leave them all pending.
8408 (count_events_callback, select_event_lwp_callback): Consider all
8409 events.
8410 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8411 (select_event_lwp): Only give preference to the stepping LWP in
8412 all-stop mode. Adjust comments.
8413 (ignore_event): New function.
8414 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8415 references to cancel_breakpoints. Adjust to renames. Also give
8416 equal priority to all LWPs that have had events in non-stop mode.
8417 If reporting a software breakpoint event, unadjust the LWP's PC.
8418 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8419 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8420 Adjust.
8421 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8422 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8423 (linux_stopped_by_watchpoint): Adjust.
8424 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8425 * linux-low.h (enum lwp_stop_reason): New.
8426 (struct lwp_info) <stop_pc>: Adjust comment.
8427 <stopped_by_watchpoint>: Delete field.
8428 <stop_reason>: New field.
8429 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8430 * mem-break.c (software_breakpoint_inserted_here)
8431 (hardware_breakpoint_inserted_here): New function.
8432 * mem-break.h (software_breakpoint_inserted_here)
8433 (hardware_breakpoint_inserted_here): Declare.
8434 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8435 (cancel_breakpoints): Delete.
8436 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8437 (upload_fast_traceframes): Remove references to
8438 cancel_breakpoints.
8439
a33e3959
PA
84402015-01-09 Pedro Alves <palves@redhat.com>
8441
8442 * thread-db.c (find_new_threads_callback): Ignore thread if the
8443 kernel thread ID is -1.
8444
8784d563
PA
84452015-01-09 Pedro Alves <palves@redhat.com>
8446
8447 * linux-low.c (linux_attach_fail_reason_string): Move to
8448 nat/linux-ptrace.c, and rename.
8449 (linux_attach_lwp): Update comment.
8450 (attach_proc_task_lwp_callback): New function.
8451 (linux_attach): Adjust to rename and use
8452 linux_proc_attach_tgid_threads.
8453 (linux_attach_fail_reason_string): Delete declaration.
8454
76f2b779
JB
84552015-01-01 Joel Brobecker <brobecker@adacore.com>
8456
8457 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8458 * server.c (gdbserver_version): Likewise.
8459
fafcc06a
SDJ
84602014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8461
8462 * remote-utils.c: Include ctype.h.
8463 (input_interrupt): Explicitly handle the case when the char
8464 received is the NUL byte. Improve the printing of non-ASCII
8465 characters.
8466
beed38b8
JB
84672014-12-16 Joel Brobecker <brobecker@adacore.com>
8468
8469 * linux-low.c (linux_low_filter_event): Update call to
8470 linux_enable_event_reporting following the addition of
8471 a new parameter to that function.
8472
bf330350
CU
84732014-12-16 Catalin Udma <catalin.udma@freescale.com>
8474
8475 PR server/17457
8476 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8477 (AARCH64_FPCR_REGNO): Likewise.
8478 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8479 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8480 (aarch64_store_fpregset): Likewise.
8481
5227d625
JB
84822014-12-15 Joel Brobecker <brobecker@adacore.com>
8483
8484 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8485 Remove FIXME comment about assumption about N.
8486
f93b65a0
JB
84872014-12-13 Joel Brobecker <brobecker@adacore.com>
8488
8489 * configure.ac: If large-file support is disabled in GDBserver,
8490 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8491 * configure: Regenerate.
8492
e5a9158d
AA
84932014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8494
8495 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8496 warning upon ENODATA from ptrace.
8497 * linux-s390-low.c (s390_store_tdb): New.
8498 (s390_regsets): Add regset for NT_S390_TDB.
8499
feea5f36
AA
85002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8501
8502 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8503 without a fill_function.
8504 * linux-s390-low.c (s390_fill_last_break): Remove.
8505 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8506 (s390_arch_setup): Use regset's size instead of fill_function for
8507 loop end condition.
8508
098dbe61
AA
85092014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8510
8511 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8512 the regset's store function when ptrace returned an error.
8513 * regcache.c (get_thread_regcache): Invalidate register cache
8514 before fetching inferior's registers.
8515
28eef672
AA
85162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8517
8518 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8519 while-loop as for-loop.
8520 (regsets_store_inferior_registers): Likewise.
8521
bdca27a2
YQ
85222014-11-28 Yao Qi <yao@codesourcery.com>
8523
8524 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8525 * config.in, configure: Re-generate.
8526 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8527 is defined.
8528
9c232dda
YQ
85292014-11-21 Yao Qi <yao@codesourcery.com>
8530
8531 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8532 (AC_CHECK_HEADERS): Remove malloc.h.
8533 * configure: Re-generated.
8534 * config.in: Re-generated.
8535 * server.h: Don't include alloca.h and malloc.h.
8536 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8537 Don't include malloc.h.
8538
43968415
JB
85392014-11-17 Joel Brobecker <brobecker@adacore.com>
8540
8541 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8542 corresponding ERRNO check in same block.
8543
40e91bc7
PA
85442014-11-12 Pedro Alves <palves@redhat.com>
8545
8546 * server.c (cont_thread): Update comment.
8547 (start_inferior, attach_inferior): No longer clear cont_thread.
8548 (handle_v_cont): No longer set cont_thread.
8549 (captured_main): Clear cont_thread each time a GDB connects.
8550
c2c118cf
PA
85512014-11-12 Pedro Alves <palves@redhat.com>
8552
8553 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8554 thread, and don't resume all threads if the Hc thread has exited.
8555
78708b7c
PA
85562014-11-12 Pedro Alves <palves@redhat.com>
8557
8558 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8559 the process group instead of to a specific LWP.
8560
a2abc7de
PA
85612014-10-15 Pedro Alves <palves@redhat.com>
8562
8563 PR server/17487
8564 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8565 parameter.
8566 (arm_set_thread_context): Delete.
8567 (the_low_target): Adjust.
8568 * win32-i386-low.c (debug_registers_changed)
8569 (debug_registers_used): Delete.
8570 (update_debug_registers_callback): New function.
8571 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8572 needing to update their debug registers.
8573 (win32_get_current_dr): New function.
8574 (x86_dr_low_get_addr, x86_dr_low_get_control)
8575 (x86_dr_low_get_status): Fetch the debug register from the thread
8576 record's context.
8577 (i386_initial_stuff): Adjust.
8578 (i386_get_thread_context): Remove current_event parameter. Don't
8579 clear debug_registers_changed nor copy DR values to
8580 debug_reg_state.
8581 (i386_set_thread_context): Delete.
8582 (i386_prepare_to_resume): New function.
8583 (i386_thread_added): Mark the thread as needing to update irs
8584 debug registers.
8585 (the_low_target): Remove i386_set_thread_context and install
8586 i386_prepare_to_resume.
8587 * win32-low.c (win32_get_thread_context): Adjust.
8588 (win32_set_thread_context): Use SetThreadContext
8589 directly.
8590 (win32_prepare_to_resume): New function.
8591 (win32_require_context): New function, factored out from ...
8592 (thread_rec): ... this.
8593 (continue_one_thread): Call win32_prepare_to_resume on each thread
8594 we're about to continue.
8595 (win32_resume): Call win32_prepare_to_resume on the event thread.
8596 * win32-low.h (struct win32_thread_info)
8597 <debug_registers_changed>: New field.
8598 (struct win32_target_ops): Change prototype of set_thread_context,
8599 delete set_thread_context and add prepare_to_resume.
8600 (win32_require_context): New declaration.
8601
a442d071
GB
86022014-10-08 Gary Benson <gbenson@redhat.com>
8603
8604 * server.h: Do not include common-exceptions.h.
8605
6f1947e8
GB
86062014-10-08 Gary Benson <gbenson@redhat.com>
8607
8608 * server.h: Do not include cleanups.h.
8609
63b434a4
JH
86102014-09-30 James Hogan <james.hogan@imgtec.com>
8611
8612 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8613 mips64-dsp-linux.c.
8614
c4d9ceb6
YQ
86152014-09-23 Yao Qi <yao@codesourcery.com>
8616
8617 * linux-low.c (lp_status_maybe_breakpoint): New function.
8618 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8619 (count_events_callback): Likewise.
8620 (select_event_lwp_callback): Likewise.
8621 (cancel_breakpoints_callback): Likewise.
8622
89a5711c
DB
86232014-09-19 Don Breazeal <donb@codesourcery.com>
8624
8625 * linux-low.c (handle_extended_wait): Call
8626 linux_ptrace_get_extended_event.
8627 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8628 linux_is_extended_waitstatus.
8629
bffc0964
JB
86302014-09-16 Joel Brobecker <brobecker@adacore.com>
8631
8632 * Makefile.in (CPPFLAGS): Define.
8633 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8634 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8635
0bfdf32f
GB
86362014-09-16 Gary Benson <gbenson@redhat.com>
8637
8638 * inferiors.h (current_inferior): Renamed as...
8639 (current_thread): New variable. All uses updated.
8640 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8641 (maybe_move_out_of_jump_pad): Likewise.
8642 (cancel_breakpoint): Likewise.
8643 (linux_low_filter_event): Likewise.
8644 (wait_for_sigstop): Likewise.
8645 (linux_resume_one_lwp): Likewise.
8646 (need_step_over_p): Likewise.
8647 (start_step_over): Likewise.
8648 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8649 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8650 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8651 and save_inferior as saved_thread.
8652 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8653 saved_thread.
8654 (regcache_invalidate_thread): Likewise.
8655 * remote-utils.c (prepare_resume_reply): Likewise.
8656 * thread-db.c (thread_db_get_tls_address): Likewise.
8657 (disable_thread_event_reporting): Likewise.
8658 (remove_thread_event_breakpoints): Likewise.
8659 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8660 as saved_thread.
8661 * target.h (set_desired_inferior): Renamed as...
8662 (set_desired_thread): New declaration. All uses updated.
8663 * server.c (myresume): Updated comment to reference thread instead
8664 of inferior.
8665 (handle_serial_event): Likewise.
8666 (handle_target_event): Likewise.
8667
361c8ade
GB
86682014-09-12 Tom Tromey <tromey@redhat.com>
8669 Gary Benson <gbenson@redhat.com>
8670
8671 * regcache.h: Include common-regcache.h.
8672 (regcache_read_pc): Don't declare.
8673 * regcache.c (get_thread_regcache_for_ptid): New function.
8674
bd9269f7
GB
86752014-09-11 Tom Tromey <tromey@redhat.com>
8676 Gary Benson <gbenson@redhat.com>
8677
8678 * symbol.c: New file.
8679 * Makefile.in (SFILES): Add symbol.c.
8680 (OBS): Add symbol.o.
8681
f8c1d06b
GB
86822014-09-11 Gary Benson <gbenson@redhat.com>
8683
8684 * target.c (target_stop_ptid, target_continue_ptid): New
8685 functions.
8686
721ec300
GB
86872014-09-11 Tom Tromey <tromey@redhat.com>
8688 Gary Benson <gbenson@redhat.com>
8689
8690 * target.h: Include target/target.h.
8691 * target.c (target_read_memory, target_read_uint32)
8692 (target_write_memory): New functions.
8693
c5e92cca
GB
86942014-09-11 Gary Benson <gbenson@redhat.com>
8695
8696 * server.h (debug_hw_points): Don't declare.
8697 * server.c (debug_hw_points): Don't define. Replace all uses
8698 with show_debug_regs.
8699 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8700 all uses with show_debug_regs.
8701
2e4bb98a
EBM
87022014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8703
8704 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8705 endianness into account.
8706 (ppc_supply_ptrace_register): Likewise.
8707
ac740bc7
JH
87082014-09-03 James Hogan <james.hogan@imgtec.com>
8709
8710 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8711 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8712
97ea6506
GB
87132014-09-03 Gary Benson <gbenson@redhat.com>
8714
8715 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8716 ALL_DEBUG_ADDRESS_REGISTERS.
8717
df7e5265
GB
87182014-09-02 Gary Benson <gbenson@redhat.com>
8719
8720 * i386-low.h: Renamed as...
8721 * x86-low.h: New file. All type, function and variable name
8722 prefixes changed from "i386_" to "x86_". All references updated.
8723 * i386-low.c: Renamed as...
8724 * x86-low.c: New file. All type, function and variable name
8725 prefixes changed from "i386_" to "x86_". All references updated.
8726
ed859da7
GB
87272014-09-02 Gary Benson <gbenson@redhat.com>
8728
8729 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8730 (x86_linux_new_thread): Likewise.
8731
860789c7
GB
87322014-08-29 Gary Benson <gbenson@redhat.com>
8733
8734 * server.h (setjmp.h): Do not include.
8735 (toplevel): Do not declare.
8736 (common-exceptions.h): Include.
8737 (cleanups.h): Likewise.
8738 * server.c (toplevel): Do not define.
8739 (exit_code): New static global.
8740 (detach_or_kill_for_exit_cleanup): New function.
8741 (main): New function. Original main renamed to...
8742 (captured_main): New function.
8743 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8744
ff55e1b5
GB
87452014-08-29 Gary Benson <gbenson@redhat.com>
8746
8747 * Makefile.in (SFILES): Add common/common-exceptions.c.
8748 (OBS): Add common-exceptions.o.
8749 (common-exceptions.o): New rule.
8750 * utils.c (prepare_to_throw_exception): New function.
8751
e9bcb658
GB
87522014-08-29 Gary Benson <gbenson@redhat.com>
8753
8754 * config.in: Regenerate.
8755 * configure: Likewise.
8756
e3180625
GB
87572014-08-29 Gary Benson <gbenson@redhat.com>
8758
8759 * Makefile.in (SFILES): Add common/cleanups.c.
8760 (OBS): cleanups.o.
8761 (cleanups.o): New rule.
8762
e3d6ba5d
GB
87632014-08-29 Gary Benson <gbenson@redhat.com>
8764
8765 * utils.c (internal_vwarning): New function.
8766
7096e886
GB
87672014-08-28 Gary Benson <gbenson@redhat.com>
8768
8769 * utils.h (fatal): Remove declaration.
8770 * utils.c (fatal): Remove function.
8771
14ce3192
GB
87722014-08-28 Gary Benson <gbenson@redhat.com>
8773
8774 * tracepoint.c (gdb_agent_init): Replace fatal with
8775 perror_with_name.
8776 (initialize_tracepoint): Likewise.
8777
50278d59
GB
87782014-08-28 Gary Benson <gbenson@redhat.com>
8779
8780 * remote-utils.c (remote_prepare): Replace fatal with error.
8781
aa96c426
GB
87822014-08-28 Gary Benson <gbenson@redhat.com>
8783
8784 * linux-low.c (linux_async): Replace fatal with warning.
8785 Tidy up and return.
8786 (linux_start_non_stop): Return -1 if linux_async failed.
8787
f7160e97
GB
87882014-08-28 Gary Benson <gbenson@redhat.com>
8789
8790 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8791 gdb_assert.
8792 (i386_dr_low_get_addr): Remove vague comment.
8793 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8794 gdb_assert.
8795
38e08fca
GB
87962014-08-28 Gary Benson <gbenson@redhat.com>
8797
8798 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8799 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8800 internal_error.
8801 (linux_resume_one_lwp): Likewise.
8802 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8803 gdb_assert.
8804 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8805 with internal_error.
8806 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8807 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8808 (find_register_by_name): Replace fatal with internal_error.
8809 (find_regno): Likewise.
8810 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8811 * thread-db.c (thread_db_create_event): Likewise.
8812 (thread_db_load_search): Likewise.
8813 (try_thread_db_load_1): Likewise.
8814 * tracepoint.c (get_jump_space_head): Replace fatal with
8815 internal_error.
8816 (claim_trampoline_space): Likewise.
8817 (have_fast_tracepoint_trampoline_buffer): Likewise.
8818 (cmd_qtstart): Likewise.
8819 (stop_tracing): Likewise.
8820 (fast_tracepoint_collecting): Likewise.
8821 (target_malloc): Likewise.
8822 (download_tracepoint): Likewise.
8823 (download_trace_state_variables): Replace check with gdb_assert.
8824 (upload_fast_traceframes): Replace fatal with internal_error.
8825
34abf635
GB
88262014-08-19 Tom Tromey <tromey@redhat.com>
8827 Gary Benson <gbenson@redhat.com>
8828
8829 * Makefile.in (SFILES): Add common/common-debug.c.
8830 (OBS): Add common-debug.o.
8831 (common-debug.o): New rule.
8832 * debug.h (debug_printf): Don't declare.
8833 * debug.c (debug_printf): Renamed and rewritten as...
8834 (debug_vprintf): New function.
8835
f6e94d78
GB
88362014-08-19 Gary Benson <gbenson@redhat.com>
8837
8838 * utils.h: Do not include print-utils.h.
8839
9239eeab
GB
88402014-08-19 Tom Tromey <tromey@redhat.com>
8841 Gary Benson <gbenson@redhat.com>
8842
8843 * server.h: Add static assertion.
8844 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8845
ef87c8bb
GB
88462014-08-19 Tom Tromey <tromey@redhat.com>
8847 Gary Benson <gbenson@redhat.com>
8848
8849 * Makefile.in (SFILES): Add common/errors.c.
8850 (OBS): Add errors.o.
8851 (IPA_OBS): Add errors-ipa.o.
8852 (errors.o): New rule.
8853 (errors-ipa.o): Likewise.
8854 * utils.h (perror_with_name, error, warning): Don't declare.
8855 * utils.c (warning): Renamed and rewritten as...
8856 (vwarning): New function.
8857 (error): Renamed and rewritten as...
8858 (verror): New function.
8859 (internal_error): Renamed and rewritten as...
8860 (internal_verror): New function.
8861
bb974a24
GB
88622014-08-07 Gary Benson <gbenson@redhat.com>
8863
8864 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8865 * configure: Regenerate.
8866 * config.in: Likewise.
8867 * server.h: Do not include errno.h.
8868 * event-loop.c: Likewise.
8869 * hostio-errno.c: Likewise.
8870 * linux-low.c: Likewise.
8871 * remote-utils.c: Likewise.
8872 * spu-low.c: Likewise.
8873 * utils.c: Likewise.
8874 * gdbreplay.c: Unconditionally include errno.h.
8875
6d3d12eb
GB
88762014-08-07 Gary Benson <gbenson@redhat.com>
8877
8878 * server.h: Do not include string.h.
8879 * event-loop.c: Likewise.
8880 * linux-low.c: Likewise.
8881 * regcache.c: Likewise.
8882 * remote-utils.c: Likewise.
8883 * spu-low.c: Likewise.
8884 * utils.c: Likewise.
8885
dccbb609
GB
88862014-08-07 Gary Benson <gbenson@redhat.com>
8887
8888 * server.h: Do not include gdb_assert.h.
8889
e76df0d0
GB
88902014-08-07 Gary Benson <gbenson@redhat.com>
8891
8892 * server.h: Do not include common-utils.h.
8893
4cb9c816
GB
88942014-08-07 Gary Benson <gbenson@redhat.com>
8895
8896 * server.h: Do not include ptid.h.
8897 * notif.h: Likewise.
8898
3995eeee
GB
88992014-08-07 Gary Benson <gbenson@redhat.com>
8900
8901 * server.h: Do not include gdb_locale.h.
8902
cb9f1a9b
GB
89032014-08-07 Gary Benson <gbenson@redhat.com>
8904
8905 * server.h: Do not include gdb/signals.h.
8906 * win32-low.c: Likewise.
8907
a5fceff8
GB
89082014-08-07 Gary Benson <gbenson@redhat.com>
8909
8910 * server.h: Do not include pathmax.h.
8911
b9391142
GB
89122014-08-07 Gary Benson <gbenson@redhat.com>
8913
8914 * server.h: Do not include libiberty.h.
8915 * linux-bfin-low.c: Likewise.
8916
0e443c87
GB
89172014-08-07 Gary Benson <gbenson@redhat.com>
8918
8919 * server.h: Do not include ansidecl.h.
8920
8ebb3f56
GB
89212014-08-07 Gary Benson <gbenson@redhat.com>
8922
8923 * linux-x86-low.c: Do not include stddef.h.
8924 * lynx-ppc-low.c: Likewise.
8925 * tracepoint.c: Likewise.
8926
8980bdf6
GB
89272014-08-07 Gary Benson <gbenson@redhat.com>
8928
8929 * server.h: Do not include stdarg.h.
8930 * nto-low.c: Likewise.
8931
d7096f71
GB
89322014-08-07 Gary Benson <gbenson@redhat.com>
8933
8934 * server.h: Do not include stdlib.h.
8935 * inferiors.c: Likewise.
8936 * linux-low.c: Likewise.
8937 * regcache.c: Likewise.
8938 * spu-low.c: Likewise.
8939 * tracepoint.c: Likewise.
8940 * utils.c: Likewise.
8941
d02f550d
GB
89422014-08-07 Gary Benson <gbenson@redhat.com>
8943
8944 * server.h: Do not include stdio.h.
8945 * linux-low.c: Likewise.
8946 * remote-utils.c: Likewise.
8947 * spu-low.c: Likewise.
8948 * utils.c: Likewise.
8949 * wincecompat.c: Likewise.
8950
87f6c4e3
GB
89512014-08-06 Gary Benson <gbenson@redhat.com>
8952
8953 * regcache.c (init_register_cache): Move conditionals inside if.
8954
7089dca4
GB
89552014-08-06 Gary Benson <gbenson@redhat.com>
8956
8957 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8958
462f517e
GB
89592014-07-31 Gary Benson <gbenson@redhat.com>
8960
8961 * ax.h: Do not include server.h.
8962 * gdbthread.h: Likewise.
8963 * lynx-low.h: Likewise.
8964 * notif.h: Likewise.
8965
976411d6
GB
89662014-07-30 Gary Benson <gbenson@redhat.com>
8967
8968 * server.h: Include common-defs.h.
8969 Do not include config.h or build-gnulib-gdbserver/config.h.
8970
d41f6d8e
GB
89712014-07-30 Gary Benson <gbenson@redhat.com>
8972
8973 * hostio-errno.c: Move server.h to top of includes list.
8974 * inferiors.c: Likewise.
8975 * linux-x86-low.c: Likewise.
8976 * notif.c: Include server.h.
8977
314c6a35
TT
89782014-07-24 Tom Tromey <tromey@redhat.com>
8979 Gary Benson <gbenson@redhat.com>
8980
8981 * server.h (CORE_ADDR): Now unsigned.
8982
69ff6be5
PA
89832014-07-16 Pedro Alves <palves@redhat.com>
8984
8985 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8986
ce9e3fe7
PA
89872014-07-15 Pedro Alves <palves@redhat.com>
8988
8989 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8990 copy.
8991
e76126e8
PA
89922014-07-11 Pedro Alves <palves@redhat.com>
8993
8994 * linux-low.c (kill_wait_lwp): New function, based on
8995 kill_one_lwp_callback, but use my_waitpid directly.
8996 (kill_one_lwp_callback, linux_kill): Use it.
8997
8e9db26e
PA
89982014-06-23 Pedro Alves <palves@redhat.com>
8999
9000 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9001 before setting DR0..DR3.
9002
698b3e08
GB
90032014-06-20 Gary Benson <gbenson@redhat.com>
9004
9005 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9006 * configure: Regenerated.
9007 * config.in: Likewise.
9008
125f8a3d
GB
90092014-06-20 Gary Benson <gbenson@redhat.com>
9010
9011 * Makefile.in (SFILES): Update locations for files moved
9012 from common to nat.
9013 (object file files): Reordered.
9014
42995dbd
GB
90152014-06-20 Gary Benson <gbenson@redhat.com>
9016
9017 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9018 (i386_dr_low_set_addr): Likewise.
9019 (i386_dr_low_get_addr): Likewise.
9020 (i386_dr_low_can_set_control): Likewise.
9021 (i386_dr_low_set_control): Likewise.
9022 (i386_dr_low_get_control): Likewise.
9023 (i386_dr_low_get_status): Likewise.
9024 (i386_get_debug_register_length): Likewise.
9025 * linux-x86-low.c (i386_dr_low_set_addr):
9026 Changed signature. Made static.
9027 (i386_dr_low_get_addr): Likewise.
9028 (i386_dr_low_set_control): Likewise.
9029 (i386_dr_low_get_control): Likewise.
9030 (i386_dr_low_get_status): Likewise.
9031 (i386_dr_low): New global variable.
9032 * win32-i386-low.c (i386_dr_low_set_addr):
9033 Changed signature. Made static.
9034 (i386_dr_low_get_addr): Likewise.
9035 (i386_dr_low_set_control): Likewise.
9036 (i386_dr_low_get_control): Likewise.
9037 (i386_dr_low_get_status): Likewise.
9038 (i386_dr_low): New global variable.
9039
e1d2394b
MS
90402014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9041
9042 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9043 * Makefile.in (AR, AR_FLAGS): Define.
9044 * configure: Regenerate.
9045
3a8ee006
GB
90462014-06-19 Gary Benson <gbenson@redhat.com>
9047
9048 * Makefile.in (i386-dregs.o): New rule.
9049 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9050 * i386-low.c (target.h): Remove include.
9051 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9052 (DR_CONTROL_SHIFT): Likewise.
9053 (DR_CONTROL_SIZE): Likewise.
9054 (DR_RW_EXECUTE): Likewise.
9055 (DR_RW_WRITE): Likewise.
9056 (DR_RW_READ): Likewise.
9057 (DR_RW_IORW): Likewise.
9058 (DR_LEN_1): Likewise.
9059 (DR_LEN_2): Likewise.
9060 (DR_LEN_4): Likewise.
9061 (DR_LEN_8): Likewise.
9062 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9063 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9064 (DR_ENABLE_SIZE): Likewise.
9065 (DR_LOCAL_SLOWDOWN): Likewise.
9066 (DR_GLOBAL_SLOWDOWN): Likewise.
9067 (DR_CONTROL_RESERVED): Likewise.
9068 (I386_DR_CONTROL_MASK): Likewise.
9069 (I386_DR_VACANT): Likewise.
9070 (I386_DR_LOCAL_ENABLE): Likewise.
9071 (I386_DR_GLOBAL_ENABLE): Likewise.
9072 (I386_DR_DISABLE): Likewise.
9073 (I386_DR_SET_RW_LEN): Likewise.
9074 (I386_DR_GET_RW_LEN): Likewise.
9075 (I386_DR_WATCH_HIT): Likewise.
9076 (i386_wp_op_t): Likewise.
9077 (i386_show_dr): Likewise.
9078 (i386_length_and_rw_bits): Likewise.
9079 (i386_insert_aligned_watchpoint): Likewise.
9080 (i386_remove_aligned_watchpoint): Likewise.
9081 (i386_handle_nonaligned_watchpoint): Likewise.
9082 i386_update_inferior_debug_regs(): Likewise.
9083 (i386_dr_insert_watchpoint): Likewise.
9084 (i386_dr_remove_watchpoint): Likewise.
9085 (i386_dr_region_ok_for_watchpoint): Likewise.
9086 (i386_dr_stopped_data_address): Likewise.
9087 (i386_dr_stopped_by_watchpoint): Likewise.
9088
8f26655c
GB
90892014-06-19 Gary Benson <gbenson@redhat.com>
9090
9091 * i386-low.c (i386_dr_show): Renamed to
9092 i386_show_dr and made static. All uses updated.
9093 (i386_dr_length_and_rw_bits): Renamed to
9094 i386_length_and_rw_bits and made static.
9095 All uses updated.
9096 (i386_dr_insert_aligned_watchpoint): Renamed to
9097 i386_insert_aligned_watchpoint and made static.
9098 All uses updated.
9099 (i386_dr_remove_aligned_watchpoint): Renamed to
9100 i386_remove_aligned_watchpoint and made static.
9101 All uses updated.
9102 (i386_dr_update_inferior_debug_regs): Renamed to
9103 i386_update_inferior_debug_regs and made static.
9104 All uses updated.
9105
b9228891
GB
91062014-06-18 Gary Benson <gbenson@redhat.com>
9107
5171def3
GB
9108 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9109 (i386_dr_low_can_set_control): Likewise.
9110 (i386_get_debug_register_length): Likewise.
9111 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9112 (i386_dr_low_can_set_control): Likewise.
9113 (i386_get_debug_register_length): Likewise.
9114
91152014-06-17 Gary Benson <gbenson@redhat.com>
9116
b9228891
GB
9117 * i386-low.h (i386-dregs.h): New include.
9118 (DR_FIRSTADDR): Now in i386-dregs.h.
9119 (DR_LASTADDR): Likewise.
9120 (DR_NADDR): Likewise.
9121 (DR_STATUS): Likewise.
9122 (DR_CONTROL): Likewise.
9123 (i386_debug_reg_state): Likewise.
9124 (i386_dr_insert_watchpoint): Likewise.
9125 (i386_dr_remove_watchpoint): Likewise.
9126 (i386_dr_region_ok_for_watchpoint): Likewise.
9127 (i386_dr_stopped_data_address): Likewise.
9128 (i386_dr_stopped_by_watchpoint): Likewise.
9129 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9130
4be83cc2
GB
91312014-06-18 Gary Benson <gbenson@redhat.com>
9132
9133 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9134 i386_dr_insert_watchpoint.
9135 (i386_low_remove_watchpoint): Renamed to
9136 i386_dr_remove_watchpoint.
9137 (i386_low_region_ok_for_watchpoint): Renamed to
9138 i386_dr_region_ok_for_watchpoint.
9139 (i386_low_stopped_data_address): Renamed to
9140 i386_dr_stopped_data_address.
9141 (i386_low_stopped_by_watchpoint): Renamed to
9142 i386_dr_stopped_by_watchpoint.
9143 * i386-low.c (i386_show_dr): Renamed to
9144 i386_dr_show and made nonstatic. All uses updated.
9145 (i386_length_and_rw_bits): Renamed to
9146 i386_dr_length_and_rw_bits and made nonstatic.
9147 All uses updated.
9148 (i386_insert_aligned_watchpoint): Renamed to
9149 i386_dr_insert_aligned_watchpoint and made nonstatic.
9150 All uses updated.
9151 (i386_remove_aligned_watchpoint): Renamed to
9152 i386_dr_remove_aligned_watchpoint and made nonstatic.
9153 All uses updated.
9154 (i386_update_inferior_debug_regs): Renamed to
9155 i386_dr_update_inferior_debug_regs and made nonstatic.
9156 All uses updated.
9157 (i386_low_insert_watchpoint): Renamed to
9158 i386_dr_insert_watchpoint. All uses updated.
9159 (i386_low_remove_watchpoint): Renamed to
9160 i386_dr_remove_watchpoint. All uses updated.
9161 (i386_low_region_ok_for_watchpoint): Renamed to
9162 i386_dr_region_ok_for_watchpoint. All uses updated.
9163 (i386_low_stopped_data_address): Renamed to
9164 i386_dr_stopped_data_address. All uses updated.
9165 (i386_low_stopped_by_watchpoint): Renamed to
9166 i386_dr_stopped_by_watchpoint. All uses updated.
9167
131aa0d4
GB
91682014-06-18 Gary Benson <gbenson@redhat.com>
9169
9170 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9171 (i386_dr_low_can_set_control): Likewise.
9172 (i386_insert_aligned_watchpoint): New check.
9173
d9305f7f
GB
91742014-06-18 Gary Benson <gbenson@redhat.com>
9175
9176 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9177 Renamed to state.
9178
e927c9fc
GB
91792014-06-18 Gary Benson <gbenson@redhat.com>
9180
9181 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9182 instead of fatal and error.
9183 (i386_handle_nonaligned_watchpoint): Likewise.
9184
1b6d4134
GB
91852014-06-18 Gary Benson <gbenson@redhat.com>
9186
9187 * i386-low.c (i386_get_debug_register_length): New macro.
9188 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9189 (i386_show_dr): Use debug_printf instead of fprintf. Use
9190 phex to format values.
9191
6e62758f
GB
91922014-06-18 Gary Benson <gbenson@redhat.com>
9193
9194 * i386-low.h: Comment changes.
9195 * i386-low.c: Likewise.
9196
fc6e2f03
GB
91972014-06-18 Gary Benson <gbenson@redhat.com>
9198
9199 * i386-low.c: Whitespace changes.
9200
f9d1eeed
TT
92012014-06-12 Tom Tromey <tromey@redhat.com>
9202
9203 * utils.c (freeargv): Remove.
9204
0b04e523
TT
92052014-06-12 Tom Tromey <tromey@redhat.com>
9206
9207 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9208 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9209 (parse_debug_format_options): Likewise.
9210 (gdbserver_usage): Likewise.
9211 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9212 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9213 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9214 against libiberty.
9215 ($(LIBGNU)): Depend on libiberty.
9216 (all-lib): Recurse into all subdirs.
9217 (install-only): Invoke "install" target in subdirs.
9218 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9219 targets.
9220 * configure: Rebuild.
9221 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9222 for vasprintf, vsnprintf, or gettimeofday.
9223 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9224 srv_tgtobj.
9225
270c9937
JB
92262014-06-05 Joel Brobecker <brobecker@adacore.com>
9227
9228 * development.sh: Delete.
9229 * Makefile.in (config.status): Adjust dependency on development.sh.
9230 * configure.ac: Adjust development.sh source call.
9231 * configure: Regenerate.
9232
0a261ed8
PA
92332014-06-02 Pedro Alves <palves@redhat.com>
9234
9235 * ax.c (gdb_free_agent_expr): New function.
9236 * ax.h (gdb_free_agent_expr): New declaration.
9237 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9238 list.
9239 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9240 static.
9241 (clear_breakpoint_conditions_and_commands): New function.
9242 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9243 (clear_breakpoint_conditions_and_commands): New declaration.
9244
e9dae05e
RR
92452014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9246
9247 * linux-aarch64-low.c (asm/ptrace.h): Include.
9248
5876f503
JK
92492014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9250
9251 Fix TLS access for -static -pthread.
9252 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9253 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9254 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9255
802e8e6d
PA
92562014-05-20 Pedro Alves <palves@redhat.com>
9257
9258 * linux-aarch64-low.c (aarch64_insert_point)
9259 (aarch64_remove_point): No longer check whether the type is
9260 supported here. Adjust to new interface.
9261 (the_low_target): Install aarch64_supports_z_point_type as
9262 supports_z_point_type method.
9263 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9264 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9265 instead of a Z packet char. Adjust.
9266 (arm_supports_z_point_type): New function.
9267 (arm_insert_point, arm_remove_point): Adjust to new interface.
9268 (the_low_target): Install arm_supports_z_point_type.
9269 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9270 (cris_insert_point, cris_remove_point): Adjust to new interface.
9271 Don't check whether the type is supported here.
9272 (the_low_target): Install cris_supports_z_point_type.
9273 * linux-low.c (linux_supports_z_point_type): New function.
9274 (linux_insert_point, linux_remove_point): Adjust to new interface.
9275 * linux-low.h (struct linux_target_ops) <insert_point,
9276 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9277 raw_breakpoint pointer parameter.
9278 <supports_z_point_type>: New method.
9279 * linux-mips-low.c (mips_supports_z_point_type): New function.
9280 (mips_insert_point, mips_remove_point): Adjust to new interface.
9281 Use mips_supports_z_point_type.
9282 (the_low_target): Install mips_supports_z_point_type.
9283 * linux-ppc-low.c (the_low_target): Install NULL as
9284 supports_z_point_type method.
9285 * linux-s390-low.c (the_low_target): Install NULL as
9286 supports_z_point_type method.
9287 * linux-sparc-low.c (the_low_target): Install NULL as
9288 supports_z_point_type method.
9289 * linux-x86-low.c (x86_supports_z_point_type): New function.
9290 (x86_insert_point): Adjust to new insert_point interface. Use
9291 insert_memory_breakpoint. Adjust to new
9292 i386_low_insert_watchpoint interface.
9293 (x86_remove_point): Adjust to remove_point interface. Use
9294 remove_memory_breakpoint. Adjust to new
9295 i386_low_remove_watchpoint interface.
9296 (the_low_target): Install x86_supports_z_point_type.
9297 * lynx-low.c (lynx_target_ops): Install NULL as
9298 supports_z_point_type callback.
9299 * nto-low.c (nto_supports_z_point_type): New.
9300 (nto_insert_point, nto_remove_point): Adjust to new interface.
9301 (nto_target_ops): Install nto_supports_z_point_type.
9302 * mem-break.c: Adjust intro comment.
9303 (struct raw_breakpoint) <raw_type, size>: New fields.
9304 <inserted>: Update comment.
9305 <shlib_disabled>: Delete field.
9306 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9307 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9308 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9309 (raw_bkpt_type_to_target_hw_bp_type): New function.
9310 (find_enabled_raw_code_breakpoint_at): New function.
9311 (find_raw_breakpoint_at): New type and size parameters. Use them.
9312 (insert_memory_breakpoint): New function, based off
9313 set_raw_breakpoint_at.
9314 (remove_memory_breakpoint): New function.
9315 (set_raw_breakpoint_at): Reimplement.
9316 (set_breakpoint): New, based on set_breakpoint_at.
9317 (set_breakpoint_at): Reimplement.
9318 (delete_raw_breakpoint): Go through the_target->remove_point
9319 instead of assuming memory breakpoints.
9320 (find_gdb_breakpoint_at): Delete.
9321 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9322 (find_gdb_breakpoint): New function.
9323 (set_gdb_breakpoint_at): Delete.
9324 (z_type_supported): New function.
9325 (set_gdb_breakpoint_1): New function, loosely based off
9326 set_gdb_breakpoint_at.
9327 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9328 (delete_gdb_breakpoint_at): Delete.
9329 (delete_gdb_breakpoint_1): New function, loosely based off
9330 delete_gdb_breakpoint_at.
9331 (delete_gdb_breakpoint): New function.
9332 (clear_gdb_breakpoint_conditions): Rename to ...
9333 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9334 breakpoint.
9335 (add_condition_to_breakpoint): Make static.
9336 (add_breakpoint_condition): Take a struct breakpoint pointer
9337 instead of an address. Adjust.
9338 (gdb_condition_true_at_breakpoint): Rename to ...
9339 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9340 z_type parameter.
9341 (gdb_condition_true_at_breakpoint): Reimplement.
9342 (add_breakpoint_commands): Take a struct breakpoint pointer
9343 instead of an address. Adjust.
9344 (gdb_no_commands_at_breakpoint): Rename to ...
9345 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9346 parameter. Return true if no breakpoint was found. Change debug
9347 output.
9348 (gdb_no_commands_at_breakpoint): Reimplement.
9349 (run_breakpoint_commands): Rename to ...
9350 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9351 and change return type to boolean.
9352 (run_breakpoint_commands): New function.
9353 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9354 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9355 breakpoint. Go through the_target->remove_point instead of
9356 assuming memory breakpoint.
9357 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9358 software and hardware breakpoints.
9359 (reinsert_raw_breakpoint): Go through the_target->insert_point
9360 instead of assuming memory breakpoint.
9361 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9362 software and hardware breakpoints.
9363 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9364 Check both software and hardware breakpoints.
9365 (validate_inserted_breakpoint): Assert the breakpoint is a
9366 software breakpoint. Set the inserted flag to -1 instead of
9367 setting shlib_disabled.
9368 (delete_disabled_breakpoints): Adjust.
9369 (validate_breakpoints): Only validate software breakpoints.
9370 Adjust to inserted flag change.
9371 (check_mem_read, check_mem_write): Skip breakpoint types other
9372 than software breakpoints. Adjust to inserted flag change.
9373 * mem-break.h (enum raw_bkpt_type): New enum.
9374 (raw_breakpoint, struct process_info): Forward declare.
9375 (Z_packet_to_target_hw_bp_type): Delete declaration.
9376 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9377 (set_gdb_breakpoint, delete_gdb_breakpoint)
9378 (clear_breakpoint_conditions): New declarations.
9379 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9380 (breakpoint_inserted_here): Update comment.
9381 (add_breakpoint_condition, add_breakpoint_commands): Replace
9382 address parameter with a breakpoint pointer parameter.
9383 (gdb_breakpoint_here): Update comment.
9384 (delete_gdb_breakpoint_at): Delete.
9385 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9386 * server.c (process_point_options): Take a struct breakpoint
9387 pointer instead of an address. Adjust.
9388 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9389 delete_gdb_breakpoint.
9390 * spu-low.c (spu_target_ops): Install NULL as
9391 supports_z_point_type method.
9392 * target.h: Include mem-break.h.
9393 (struct target_ops) <prepare_to_access_memory>: Update comment.
9394 <supports_z_point_type>: New field.
9395 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9396 instead of a char. Also take a raw breakpoint pointer.
9397 * win32-arm-low.c (the_low_target): Install NULL as
9398 supports_z_point_type.
9399 * win32-i386-low.c (i386_supports_z_point_type): New function.
9400 (i386_insert_point, i386_remove_point): Adjust to new interface.
9401 (the_low_target): Install i386_supports_z_point_type.
9402 * win32-low.c (win32_supports_z_point_type): New function.
9403 (win32_insert_point, win32_remove_point): Adjust to new interface.
9404 (win32_target_ops): Install win32_supports_z_point_type.
9405 * win32-low.h (struct win32_target_ops):
9406 <supports_z_point_type>: New method.
9407 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9408 instead of a char. Also take a raw breakpoint pointer.
9409
932539e3
PA
94102014-05-20 Pedro Alves <palves@redhat.com>
9411
9412 * mem-break.h: Include break-common.h.
9413 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9414 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9415 (Z_packet_to_target_hw_bp_type): New declaration.
9416 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9417 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9418 (Z_PACKET_ACCESS_WP): Delete macros.
9419 (Z_packet_to_hw_type): Delete function.
9420 * i386-low.h: Don't include break-common.h here.
9421 (Z_packet_to_hw_type): Delete declaration.
9422 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9423 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9424 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9425 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9426 * linux-aarch64-low.c: Don't include break-common.h here.
9427 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9428 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9429 (Z_packet_to_target_hw_bp_type): Delete function.
9430 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9431 function.
9432 (mips_insert_point, mips_remove_point): Use
9433 Z_packet_to_target_hw_bp_type.
9434
4ff0d3d8
PA
94352014-05-20 Pedro Alves <palves@redhat.com>
9436
9437 * linux-aarch64-low.c: Include break-common.h.
9438 (enum target_point_type): Delete.
9439 (Z_packet_to_point_type): Rename to ...
9440 (Z_packet_to_target_hw_bp_type): ... this, and return a
9441 target_hw_bp_type instead.
9442 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9443 instead of an enum target_point_type.
9444 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9445 breakpoint type.
9446 (aarch64_dr_state_insert_one_point)
9447 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9448 (aarch64_handle_aligned_watchpoint)
9449 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9450 Take an enum target_hw_bp_type instead of an enum
9451 target_point_type.
9452 (aarch64_supports_z_point_type): New function.
9453 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9454 use Z_packet_to_target_hw_bp_type.
9455
786dc519
JB
94562014-05-20 Joel Brobecker <brobecker@adacore.com>
9457
9458 * configure.ac: Only use -Werror by default when DEVELOPMENT
9459 is true.
9460 * configure: Regenerate.
9461
9e0aa64f
JK
94622014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9463
9464 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9465 * linux-x86-low.c (X86_64_USER_REGS): New.
9466 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9467
2b577b92
YQ
94682014-04-28 Yao Qi <yao@codesourcery.com>
9469
9470 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9471 name.
9472
94611da2
PA
94732014-04-25 Pedro Alves <palves@redhat.com>
9474
9475 PR server/16255
9476 * linux-low.c (linux_attach_fail_reason_string): New function.
9477 (linux_attach_lwp): Delete.
9478 (linux_attach_lwp_1): Rename to ...
9479 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9480 argument. Remove "initial" parameter. Return int instead of
9481 void. Don't error or warn here.
9482 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9483 failure to attach to the tgid. Call warning when failing to
9484 attach to an lwp.
9485 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9486 argument. Remove "initial" parameter. Return int instead of
9487 void. Don't error or warn here.
9488 (linux_attach_fail_reason_string): New declaration.
9489 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9490 interface change. Use linux_attach_fail_reason_string.
9491
01f9f808
MS
94922014-04-24 Michael Sturm <michael.sturm@mintel.com>
9493 Walfred Tedeschi <walfred.tedeschi@intel.com>
9494
9495 * Makefile.in: Added rules to handle new files
9496 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9497 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9498 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9499 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9500 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9501 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9502 x32-avx512-linux.o.
9503 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9504 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9505 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9506 i386/x32-avx512.xml.
9507 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9508 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9509 i386/x32-avx512-linux.xml.
9510 * i387-fp.c (num_avx512_k_registers): New constant for number
9511 of K registers.
9512 (num_avx512_zmmh_low_registers): New constant for number of
9513 lower ZMM registers (0-15).
9514 (num_avx512_zmmh_high_registers): New constant for number of
9515 higher ZMM registers (16-31).
9516 (num_avx512_ymmh_registers): New contant for number of higher
9517 YMM registers (ymm16-31 added by avx521 on x86_64).
9518 (num_avx512_xmm_registers): New constant for number of higher
9519 XMM registers (xmm16-31 added by AVX512 on x86_64).
9520 (struct i387_xsave): Add space for AVX512 registers.
9521 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9522 Add code to handle AVX512 registers.
9523 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9524 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9525 prototypei from generated file.
9526 (tdesc_amd64_avx512_linux): Likewise.
9527 (init_registers_x32_avx512_linux): Likewise.
9528 (tdesc_x32_avx512_linux): Likewise.
9529 (init_registers_i386_avx512_linux): Likewise.
9530 (tdesc_i386_avx512_linux): Likewise.
9531 (x86_64_regmap): Add AVX512 registers.
9532 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9533 mask.
9534 (initialize_low_arch): Add code to initialize AVX512 registers.
9535
51aa91f9
PA
95362014-04-23 Pedro Alves <palves@redhat.com>
9537
9538 * mem-break.c (find_gdb_breakpoint_at): Make static.
9539 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9540
a4165e94
PA
95412014-04-23 Pedro Alves <palves@redhat.com>
9542
9543 * i386-low.c: Don't include break-common.h here.
9544 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9545 prototype to take target_hw_bp_type as argument instead of a Z
9546 packet char.
9547 * i386-low.h: Include break-common.h here.
9548 (Z_packet_to_hw_type): Declare.
9549 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9550 prototypes.
9551 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9552 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9553 (x86_remove_point): Convert the packet number to a
9554 target_hw_bp_type before calling i386_low_remove_watchpoint.
9555 * win32-i386-low.c (i386_insert_point): Convert the packet number
9556 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9557 (i386_remove_point): Convert the packet number to a
9558 target_hw_bp_type before calling i386_low_remove_watchpoint.
9559
b8acf843
PA
95602014-04-23 Pedro Alves <palves@redhat.com>
9561
9562 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9563
d708bcd1
PA
95642014-04-10 Pedro Alves <palves@redhat.com>
9565
9566 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9567 Check if the condition or command is NULL before checking if the
9568 breakpoint is known. On success, return true.
9569 * mem-break.h (add_breakpoint_condition): Document return.
9570 (add_breakpoint_commands): Add describing comment.
9571 * server.c (skip_to_semicolon): New function.
9572 (process_point_options): Use it.
9573
2eec7d5b
PA
95742014-04-09 Pedro Alves <palves@redhat.com>
9575
9576 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9577 to lwpid_of.
9578
fa96cb38
PA
95792014-02-27 Pedro Alves <palves@redhat.com>
9580
9581 PR 12702
9582 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9583 macros.
9584 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9585 output.
9586 (last_thread_of_process_p): Take a PID argument instead of a
9587 thread pointer.
9588 (linux_wait_for_lwp): Delete.
9589 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9590 functions.
9591 (linux_low_filter_event): New function, party factored out from
9592 linux_wait_for_event.
9593 (linux_wait_for_event): Rename to ...
9594 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9595 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9596 sigsuspend. Check for zombie leaders.
9597 (linux_wait_for_event): Reimplement as wrapper around
9598 linux_wait_for_event_filtered.
9599 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9600 a normal or signal exit is seen, it's the whole process exiting.
9601 (wait_for_sigstop): No longer a for_each_inferior callback.
9602 Rewrite on top of linux_wait_for_event_filtered.
9603 (stop_all_lwps): Call wait_for_sigstop directly.
9604 * server.c (resume, handle_target_event): Handle
9605 TARGET_WAITKIND_NO_RESUMED.
9606
d763de10
JB
96072014-02-26 Joel Brobecker <brobecker@adacore.com>
9608
9609 * win32-low.c (psapi_get_dll_name,
9610 * win32_CreateToolhelp32Snapshot): Delete.
9611 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9612 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9613 Delete.
9614 (handle_load_dll): Add function description.
9615 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9616
850a0f76
JB
96172014-02-26 Joel Brobecker <brobecker@adacore.com>
9618
9619 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9620 Add comment.
9621 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9622 base address when calling win32_add_one_solib.
9623 (handle_load_dll): Delete local variable load_addr.
9624 Remove 0x1000 offset applied to DLL base address when calling
9625 win32_add_one_solib.
9626 (handle_unload_dll): Add comment.
9627
f25b3fc3
JB
96282014-02-26 Joel Brobecker <brobecker@adacore.com>
9629
9630 * win32-low.c (win32_add_all_dlls): Renames
9631 win32_ensure_ntdll_loaded. Rewrite function documentation.
9632 Adjust implementation to always load all DLLs.
9633 Add 0x1000 offset to DLL base address when calling
9634 win32_add_one_solib.
9635 (child_initialization_done): New static global.
9636 (do_initial_child_stuff): Set child_initialization_done to
9637 zero during child initialization, and 1 after. Replace call
9638 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9639 Add comment.
9640 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9641 (handle_unload_dll): Add function documentation.
9642 (get_child_debug_event): Ignore load and unload DLL events
9643 during child initialization.
9644
d86d4aaf
DE
96452014-02-20 Doug Evans <dje@google.com>
9646
3bc32da3 9647 Remove global all_lwps.
d86d4aaf
DE
9648 * inferiors.h (ptid_of): Move here from linux-low.h.
9649 (pid_of, lwpid_of): Ditto.
9650 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9651 parameter is a struct thread_info * now.
9652 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9653 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9654 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9655 directly.
9656 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9657 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9658 * linux-arm-low.c (update_registers_callback): Update, "entry"
9659 parameter is a struct thread_info * now.
9660 Fetch lwpid from current_inferior directly.
9661 (arm_insert_point): Pass &all_threads to find_inferior instead of
9662 &all_lwps.
9663 (arm_remove_point): Ditto.
9664 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9665 (arm_prepare_to_resume): Fetch pid from thread.
9666 (arm_read_description): Fetch lwpid from current_inferior directly.
9667 * linux-low.c (all_lwps): Delete.
9668 (delete_lwp): Delete call to remove_inferior.
9669 (handle_extended_wait): Fetch lwpid from thread.
9670 (add_lwp): Don't set lwp->entry.id. Remove call to
9671 add_inferior_to_list.
9672 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9673 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9674 (kill_one_lwp_callback): Ditto.
9675 (linux_kill): Don't dereference NULL pointer.
9676 Fetch ptid,lwpid from thread.
9677 (get_detach_signal): Fetch ptid from thread.
9678 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9679 Simplify call to regcache_invalidate_thread.
9680 (delete_lwp_callback): Update, "entry" parameter is a
9681 struct thread_info * now. Fetch pid from thread.
9682 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9683 (status_pending_p_callback): Update, "entry" parameter is a
9684 struct thread_info * now. Fetch ptid from thread.
9685 (find_lwp_pid): Update, "entry" parameter is a
9686 struct thread_info * now.
9687 (linux_wait_for_lwp): Fetch pid from thread.
9688 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9689 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9690 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9691 (dequeue_one_deferred_signal): Ditto.
9692 (cancel_breakpoint): Fetch ptid from current_inferior.
9693 (linux_wait_for_event): Pass &all_threads to find_inferior,
9694 not &all_lwps. Fetch ptid, lwpid from thread.
9695 (count_events_callback): Update, "entry" parameter is a
9696 struct thread_info * now.
9697 (select_singlestep_lwp_callback): Ditto.
9698 (select_event_lwp_callback): Ditto.
9699 (cancel_breakpoints_callback): Ditto.
9700 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9701 not &all_lwps.
9702 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9703 (unsuspend_one_lwp): Update, "entry" parameter is a
9704 struct thread_info * now.
9705 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9706 not &all_lwps.
9707 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9708 Fetch lwpid from thread, not lwp.
9709 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9710 Pass &all_threads to find_inferior, not &all_lwps.
9711 (send_sigstop): Fetch lwpid from thread, not lwp.
9712 (send_sigstop_callback): Update, "entry" parameter is a
9713 struct thread_info * now.
9714 (suspend_and_send_sigstop_callback): Ditto.
9715 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9716 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9717 struct thread_info * now.
9718 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9719 from thread, lwp.
9720 (lwp_running): Update, "entry" parameter is a
9721 struct thread_info * now.
9722 (stop_all_lwps): Fetch ptid from thread.
9723 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9724 (linux_resume_one_lwp): Fetch lwpid from thread.
9725 (linux_set_resume_request): Update, "entry" parameter is a
9726 struct thread_info * now. Fetch pid, lwpid from thread.
9727 (resume_status_pending_p): Update, "entry" parameter is a
9728 struct thread_info * now.
9729 (need_step_over_p): Ditto. Fetch lwpid from thread.
9730 (start_step_over): Fetch lwpid from thread.
9731 (linux_resume_one_thread): Update, "entry" parameter is a
9732 struct thread_info * now. Fetch lwpid from thread.
9733 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9734 (proceed_one_lwp): Update, "entry" parameter is a
9735 struct thread_info * now. Fetch lwpid from thread.
9736 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9737 struct thread_info * now.
9738 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9739 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9740 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9741 directly.
9742 (regsets_store_inferior_registers): Ditto.
9743 (fetch_register, store_register): Ditto.
9744 (linux_read_memory, linux_write_memory): Ditto.
9745 (linux_request_interrupt): Ditto.
9746 (linux_read_auxv): Ditto.
9747 (linux_xfer_siginfo): Ditto.
9748 (linux_qxfer_spu): Ditto.
9749 (linux_qxfer_libraries_svr4): Ditto.
9750 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9751 moved to inferiors.h.
9752 (get_lwp): Delete.
9753 (get_thread_lwp): Update.
9754 (struct lwp_info): Delete member "entry". Simplify comment for
9755 member "thread".
9756 (all_lwps): Delete.
9757 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9758 current_inferior directly.
9759 (update_watch_registers_callback): Update, "entry" parameter is a
9760 struct thread_info * now. Fetch pid from thread.
9761 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9762 (mips_insert_point): Fetch lwpid from current_inferior.
9763 Pass &all_threads to find_inferior, not &all_lwps.
9764 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9765 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9766 directly.
9767 (mips_stopped_data_address): Ditto.
9768 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9769 directly.
9770 * linux-tile-low.c (tile_arch_setup): Ditto.
9771 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9772 (update_debug_registers_callback): Update, "entry" parameter is a
9773 struct thread_info * now. Fetch pid from thread.
9774 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9775 Pass &all_threads to find_inferior, not &all_lwps.
9776 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9777 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9778 Pass &all_threads to find_inferior, not &all_lwps.
9779 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9780 (i386_dr_low_get_status): Ditto.
9781 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9782 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9783 (x86_linux_read_description): Ditto.
9784 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9785
3b8361aa
DE
97862014-02-20 Doug Evans <dje@google.com>
9787
9788 * inferiors.c (get_first_inferior): Fix buglet.
9789
f7667f0d
DE
97902014-02-19 Doug Evans <dje@google.com>
9791
9792 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9793 * inferiors.c (add_thread): Change result type to struct thread_info *.
9794 All callers updated.
9795 (add_lwp): Call add_thread here instead of in callers.
9796 All callers updated.
9797 * linux-low.h (get_lwp_thread): Rewrite.
9798 (struct lwp_info): New member "thread".
9799
b3312d80
DE
98002014-02-19 Doug Evans <dje@google.com>
9801
9802 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9803 All callers updated.
9804
ecc6f45c
DE
98052014-02-19 Doug Evans <dje@google.com>
9806
9807 * inferiors.c (add_thread): Fix whitespace.
9808
649ebbca
DE
98092014-02-19 Doug Evans <dje@google.com>
9810
9811 * dll.c (clear_dlls): Replace accessing list implemention details
9812 with API function.
9813 * gdbthread.h (get_first_thread): Declare.
9814 * inferiors.c (for_each_inferior_with_data): New function.
9815 (get_first_thread): New function.
9816 (find_thread_ptid): Simplify.
9817 (get_first_inferior): New function.
9818 (clear_list): Delete.
9819 (one_inferior_p): New function.
9820 (clear_inferior_list): New function.
9821 (clear_inferiors): Update.
9822 * inferiors.h (for_each_inferior_with_data): Declare.
9823 (clear_inferior_list): Declare.
9824 (one_inferior_p): Declare.
9825 (get_first_inferior): Declare.
9826 * linux-low.c (linux_wait_for_event): Replace accessing list
9827 implemention details with API function.
9828 * server.c (target_running): Ditto.
9829 (accumulate_file_name_length): New function.
9830 (emit_dll_description): New function.
9831 (handle_qxfer_libraries): Replace accessing list implemention
9832 details with API function.
9833 (handle_qxfer_threads_worker): New function.
9834 (handle_qxfer_threads_proper): Replace accessing list implemention
9835 details with API function.
9836 (handle_query): Ditto.
9837 (visit_actioned_threads_callback_ftype): New typedef.
9838 (visit_actioned_threads_data): New struct.
9839 (visit_actioned_threads): Rewrite to be find_inferior callback.
9840 (resume): Call find_inferior.
9841 (handle_status): Replace accessing list implemention
9842 details with API function.
9843 (process_serial_event): Replace accessing list implemention details
9844 with API function.
9845 * target.c (set_desired_inferior): Replace accessing list implemention
9846 details with API function.
9847 * tracepoint.c (same_process_p): New function.
9848 (gdb_agent_about_to_close): Replace accessing list implemention
9849 details with API function.
9850 * win32-low.c (child_delete_thread): Replace accessing list
9851 implemention details with API function.
9852 (match_dll_by_basename): New function.
9853 (dll_is_loaded_by_basename): New function.
9854 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9855 details call to dll_is_loaded_by_basename.
9856
80894984
DE
98572014-02-19 Doug Evans <dje@google.com>
9858
9859 * dll.h (struct dll_info): Add comment.
9860 * gdbthread.h (struct thread_info): Add comment.
9861 (current_ptid): Simplify.
9862 * inferiors.c (add_process): Update.
9863 (remove_process): Update.
9864 * inferiors.h (struct process_info): Rename member "head" to "entry".
9865 * linux-low.c (delete_lwp): Update.
9866 (add_lwp): Update.
9867 (last_thread_of_process_p): Update.
9868 (kill_one_lwp_callback, linux_kill): Update.
9869 (status_pending_p_callback): Update.
9870 (wait_for_sigstop): Update. Simplify read of ptid.
9871 (start_step_over): Update.
9872 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9873 (get_lwp_thread): Update.
9874 (struct lwp_info): Rename member "head" to "entry".
9875 * regcache.h (inferior_list_entry): Delete.
9876 * server.c (kill_inferior_callback): Update.
9877 (detach_or_kill_inferior_callback): Update.
9878 (print_started_pid): Update.
9879 (print_attached_pid): Update.
9880 (process_serial_event): Simplify read of ptid.
9881 * thread-db.c (thread_db_create_event): Update.
9882 (thread_db_get_tls_address): Update.
9883 * win32-low.c (current_inferior_ptid): Simplify.
9884
46917d26
TT
98852014-02-19 Tom Tromey <tromey@redhat.com>
9886
9887 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9888 argument.
9889 (target_supports_btrace): Update.
9890
0759a81e
YQ
98912014-02-14 Yao Qi <yao@codesourcery.com>
9892
9893 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9894 (rsp-low-ipa.o): New target.
9895
a7191e8b
TT
98962014-02-12 Tom Tromey <tromey@redhat.com>
9897
9898 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9899 convert_ascii_to_int.
9900 * regcache.c (registers_to_string): Likewise.
9901 * remote-utils.c (decode_M_packet): Likewise.
9902 * server.c (process_serial_event): Likewise.
9903
ff0e980e
TT
99042014-02-12 Tom Tromey <tromey@redhat.com>
9905
9906 * server.c (handle_query, handle_v_run): Use hex2bin, not
9907 unhexify.
9908 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9909
e9371aff
TT
99102014-02-12 Tom Tromey <tromey@redhat.com>
9911
9912 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9913 convert_int_to_ascii.
9914 * regcache.c (registers_to_string, collect_register_as_string):
9915 Likewise.
9916 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9917 Likewise.
9918 * server.c (process_serial_event): Likewise.
9919 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9920 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9921
971dc0b8
TT
99222014-02-12 Tom Tromey <tromey@redhat.com>
9923
9924 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9925 bin2hex, not hexify.
9926 * tracepoint.c (cmd_qtstatus): Likewise.
9927
0a822afb
TT
99282014-02-12 Tom Tromey <tromey@redhat.com>
9929
9930 * remote-utils.c (monitor_output): Pass explicit length to
9931 hexify.
9932
9c3d6531
TT
99332014-02-12 Tom Tromey <tromey@redhat.com>
9934
9935 * tracepoint.c: Include rsp-low.h.
9936 * server.c: Include rsp-low.h.
9937 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9938 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9939 declare.
9940 * remote-utils.c: Include rsp-low.h.
9941 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9942 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9943 (convert_int_to_ascii, convert_ascii_to_int): Move to
9944 common/rsp-low.c.
9945 * regcache.c: Include rsp-low.h.
9946 * ax.c: Include rsp-low.h.
9947 * Makefile.in (SFILES): Add common/rsp-low.c.
9948 (OBS): Add rsp-low.o.
9949 (rsp-low.o): New target.
9950
01fd3ea5
TT
99512014-02-12 Tom Tromey <tromey@redhat.com>
9952
9953 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9954 Include print-utils.h.
9955 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9956 (plongest, thirty_two, phex_nz): Remove.
9957 * Makefile.in (SFILES): Add common/print-utils.c.
9958 (OBS): Add print-utils.o.
9959 (print-utils-ipa.o): New target.
9960 (print-utils.o): New target.
9961 (IPA_OBJS): Add print-utils-ipa.o.
9962
e99dc820
TT
99632014-02-06 Tom Tromey <tromey@redhat.com>
9964
9965 * Makefile.in (SFILES): Fix indentation.
9966
ee1e2d4f
DE
99672014-02-05 Doug Evans <dje@google.com>
9968
9969 * linux-low.c (linux_wait_for_event): Improve comment.
9970 (linux_wait_1): Keep current_inferior in sync with event_child.
9971
f5a02773
DE
99722014-01-22 Doug Evans <dje@google.com>
9973
9974 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9975
87ce2a04
DE
99762014-01-22 Doug Evans <dje@google.com>
9977
9978 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9979 * configure: Regenerate.
9980 * config.in: Regenerate.
9981 * Makefile.in (SFILES): Add debug.c.
9982 (OBS): Add debug.o.
9983 * debug.c: New file.
9984 * debug.h: New file.
9985 * linux-aarch64-low.c (*): Update all debugging printfs to use
9986 debug_printf instead of fprintf.
9987 * linux-arm-low.c (*): Ditto.
9988 * linux-cris-low.c (*): Ditto.
9989 * linux-crisv32-low.c (*): Ditto.
9990 * linux-m32r-low.c (*): Ditto.
9991 * linux-sparc-low.c (*): Ditto.
9992 * linux-x86.c (*): Ditto.
9993 * linux-low.c (*): Ditto.
9994 (linux_wait_1): Add calls to debug_enter, debug_exit.
9995 (linux_wait): Remove redundant debugging printf.
9996 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9997 (linux_resume, unstop_all_lwps): Ditto.
9998 * mem-break.c (*): Update all debugging printfs to use
9999 debug_printf instead of fprintf.
10000 * remote-utils.c (*): Ditto.
10001 * thread-db.c (*): Ditto.
10002 * server.c #include <ctype.h>, "gdb_vecs.h".
10003 (debug_threads): Moved to debug.c.
10004 (*): Update all debugging printfs to use debug_printf instead of
10005 fprintf.
10006 (start_inferior): Replace call to fflush with call to debug_flush.
10007 (monitor_show_help): Mention set debug-format.
10008 (parse_debug_format_options): New function.
10009 (handle_monitor_command): Handle "monitor set debug-format".
10010 (gdbserver_usage): Mention --debug-format.
10011 (main): Parse --debug-format.
10012 * server.h (debug_threads): Declaration moved to debug.h.
10013 #include "debug.h".
10014 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10015 trace_debug_1 that uses debug_printf.
10016 (tracepoint_look_up_symbols): Update all debugging printfs to use
10017 debug_printf instead of fprintf.
10018
e671835b
BS
100192014-01-20 Baruch Siach <baruch@tkos.co.il>
10020
10021 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10022 sys/ptrace.h.
10023
b5737fa9
PA
100242014-01-17 Pedro Alves <palves@redhat.com>
10025
ea38d2a9 10026 PR build/16445
c7faa97a
PA
10027 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10028 defined after including gdb_proc_service.h.
b5737fa9 10029
40ed484e
DE
100302014-01-16 Doug Evans <dje@google.com>
10031
10032 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10033 (match_dll): Use it.
10034
969c39fb
MM
100352014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10036
10037 * target.h (target_ops) <read_btrace>: Change parameters and
10038 return type to allow error reporting.
10039 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10040 trace reading errors on.
10041 * linux-low.c (linux_low_read_btrace): Pass trace reading
10042 errors on.
10043 (linux_low_disable_btrace): New.
10044
ab7f45ba
DE
100452014-01-15 Doug Evans <dje@google.com>
10046
10047 * inferiors.c (thread_id_to_gdb_id): Delete.
10048 * inferiors.h (thread_id_to_gdb_id): Delete.
10049
66af0f44
EZ
100502014-01-13 Eli Zaretskii <eliz@gnu.org>
10051
10052 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10053 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10054 versions.
10055
9939e131
PA
100562014-01-08 Pedro Alves <palves@redhat.com>
10057
10058 * server.c (handle_status): Don't discard previous queued stop
10059 replies or thread's pending status here.
10060 (main) <disconnection>: Do it here instead.
10061
b7ea362b
PA
100622014-01-08 Pedro Alves <palves@redhat.com>
10063
10064 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10065 * server.c (visit_actioned_threads, handle_pending_status): New
10066 function.
10067 (handle_v_cont): Factor out parts to ...
10068 (resume): ... this new function. If in all-stop, and a thread
10069 being resumed has a pending status, report it without actually
10070 resuming.
10071 (myresume): Adjust to use the new 'resume' function.
10072 (clear_pending_status_callback, set_pending_status_callback)
10073 (find_status_pending_thread_callback): New functions.
10074 (handle_status): Handle the case of multiple threads having
10075 interesting statuses to report. Report threads' real last signal
10076 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10077 with an interesting thread to report the status for, instead of
10078 always reporting the status of the first thread.
10079
28498c42
JB
100802014-01-01 Joel Brobecker <brobecker@adacore.com>
10081
10082 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10083 * gdbreplay.c (gdbreplay_version): Likewise.
10084
f45c82da
YZ
100852013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10086
10087 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10088 iov.iov_len with the real length in use.
10089
379a5e2d
JB
100902013-12-13 Joel Brobecker <brobecker@adacore.com>
10091
10092 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10093 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10094 for all targets that use win32-low.c.
10095 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10096 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10097
4210d83e
PA
100982013-12-13 Pedro Alves <palves@redhat.com>
10099
10100 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10101 if equal to TARGET_WAITKIND_LOADED.
10102 * win32-low.c (cached_status): New static global.
10103 (win32_wait): Add declaration.
10104 (do_initial_child_stuff): Flush all initial pending debug events
10105 up to the initial breakpoint.
10106 (win32_wait): If CACHED_STATUS was set, return that instead
10107 of doing a real wait. Remove the code resuming the execution
10108 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10109 during the initial phase. Also remove the code changing
10110 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10111 TARGET_WAITKIND_STOPPED.
10112
e7f0d979
YQ
101132013-12-11 Yao Qi <yao@codesourcery.com>
10114
10115 * notif.c (handle_notif_ack): Return 0 if no notification
10116 matches.
10117
ebcf782c
DE
101182013-11-20 Doug Evans <dje@google.com>
10119
10120 * linux-low.c (linux_set_resume_request): Fix comment.
10121
20ad9378
DE
101222013-11-20 Doug Evans <dje@google.com>
10123
10124 * linux-low.c (resume_status_pending_p): Tweak comment.
10125
a196ebeb
WT
101262013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10127
10128 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10129 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10130 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10131 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10132 (srv_amd64_regobj): Add amd64-mpx.o.
10133 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10134 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10135 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10136 * i387-fp.c (num_pl_bnd_register) Added constant.
10137 (num_pl_bnd_cfg_registers) Added constant.
10138 (struct i387_xsave) Added reserved area and MPX fields.
10139 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10140 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10141 function.
10142 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10143 (init_registers_amd64_mpx_linux): Declare new function.
10144 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10145 (x86_64_regmap): Add MPX registers.
10146 (x86_linux_read_description): Add MPX case.
10147 (initialize_low_arch): Initialize MPX targets.
10148
0080a2f6
TT
101492013-11-18 Tom Tromey <tromey@redhat.com>
10150
10151 * configure: Rebuild.
10152 * configure.ac: Don't check for stdlib.h.
10153 * gdbreplay.c: Unconditionally include stdlib.h.
10154
2978b111
TT
101552013-11-18 Tom Tromey <tromey@redhat.com>
10156
10157 * config.in: Rebuild.
10158 * configure: Rebuild.
10159 * configure.ac: Don't use AC_HEADER_DIRENT.
10160
a3d08894
TT
101612013-11-18 Tom Tromey <tromey@redhat.com>
10162
10163 * server.h: Don't check HAVE_STRING_H.
10164 * gdbreplay.c: Don't check HAVE_STRING_H.
10165 * configure: Rebuild.
10166
0a5dd17d
TT
101672013-11-18 Tom Tromey <tromey@redhat.com>
10168
10169 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10170 LIBGNU.
10171
1bd2f0ba
TT
101722013-11-08 Tom Tromey <tromey@redhat.com>
10173
10174 * configure, config.in: Rebuild.
10175 * configure.ac: Remove unused configury.
10176
3266f10b
TT
101772013-11-08 Tom Tromey <tromey@redhat.com>
10178
10179 * acinclude.m4: Include common.m4, codeset.m4.
10180 * configure, config.in: Rebuild.
10181 * configure.ac: Use GDB_AC_COMMON.
10182
6682d959
AA
101832013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10184
10185 * linux-s390-low.c (HWCAP_S390_TE): New define.
10186 (s390_arch_setup): Consider the TE field in the HWCAP for
10187 determining 'have_regset_tdb'.
10188
fd0a4d76
SDJ
101892013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10190
10191 PR gdb/16014
10192 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10193 call to sizeof.
10194
1a3d890b
PA
101952013-10-02 Pedro Alves <palves@redhat.com>
10196
10197 * server.c (process_serial_event): Don't output "GDBserver
10198 exiting" if GDB is connected through stdio.
10199 * target.c (mywait): Likewise, be silent if GDB is connected
10200 through stdio.
10201
97ad4581
JB
102022013-10-01 Joel Brobecker <brobecker@adacore.com>
10203
10204 * lynx-low.c (lynx_add_threads_after_attach): New function.
10205 (lynx_attach): Remove call to add_thread. Add call to
10206 lynx_add_threads_after_attach instead.
10207
5b4e221c
MF
102082013-09-28 Mike Frysinger <vapier@gentoo.org>
10209
10210 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10211 * config.in, configure: Regenerated.
10212
ee47b2f8
YQ
102132013-09-18 Yao Qi <yao@codesourcery.com>
10214
10215 PR server/15959
10216 * server.c (start_inferior): Clear 'resume_info'.
10217
d6707650 102182013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10219
d6707650
JW
10220 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10221 for each register.
10222
9243dd0e 102232013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10224
9243dd0e
JW
10225 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10226 linux-tile-low.o to srv_tgtobj.
10227
c623a6ef
WN
102282013-09-16 Will Newton <will.newton@linaro.org>
10229
10230 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10231 out regs.
10232
fb71d39e
PA
102332013-09-06 Pedro Alves <palves@redhat.com>
10234
10235 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10236 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10237 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10238 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10239 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10240 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10241
8e7e9910
PA
102422013-09-06 Pedro Alves <palves@redhat.com>
10243
10244 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10245 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10246
7c3a12ca
PA
102472013-09-06 Pedro Alves <palves@redhat.com>
10248
10249 * linux-amd64-ipa.c: Include tracepoint.h.
10250 * linux-i386-ipa.c: Include tracepoint.h.
10251
8eb3d7b6
RW
102522013-09-06 Ricard Wanderlof <ricardw@axis.com>
10253
10254 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10255 (ps_get_thread_area): New function.
10256
eddddb9d
RW
102572013-09-06 Ricard Wanderlof <ricardw@axis.com>
10258
10259 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10260 (initialize_low_arch): Call init_registers_crisv32 rather than
10261 init_register_crisv32.
10262
533b0600
PA
102632013-09-05 Pedro Alves <palves@redhat.com>
10264
10265 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10266 to ...
10267 * hostio.h: ... this new file.
10268 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10269 win32-low.c: Include hostio.h.
10270
0ce3d3b5
PA
102712013-09-05 Pedro Alves <palves@redhat.com>
10272
10273 * server.h (gdb_client_data, handler_func, callback_handler_func)
10274 (delete_file_handler, add_file_handler, append_callback_event)
10275 (delete_callback_event, start_event_loop, initialize_event_loop):
10276 Move to event-loop.h and include it.
10277 * event-loop.h: New file.
10278
799cdc37
PA
102792013-09-05 Pedro Alves <palves@redhat.com>
10280
10281 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10282 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10283 (loaded_dll, unloaded_dll): Move to ...
10284 * dll.h: ... this new file.
10285 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10286
6a6bbd9d
PA
102872013-09-05 Pedro Alves <palves@redhat.com>
10288
10289 * server.h (current_process, get_thread_process, all_processes)
10290 (add_inferior_to_list, for_each_inferior, current_inferior)
10291 (remove_inferior, add_process, remove_process, find_process_pid)
10292 (have_started_inferiors_p, have_attached_inferiors_p)
10293 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10294 (clear_inferiors, find_inferior, find_inferior_id)
10295 (inferior_target_data, set_inferior_target_data)
10296 (inferior_regcache_data, set_inferior_regcache_data): Move to
10297 inferiors.h, and include it.
10298 * inferiors.h: New file.
10299
f699aaba
PA
103002013-09-05 Pedro Alves <palves@redhat.com>
10301
10302 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10303 Move ...
72f4393d 10304 * ax.h: ... here.
f699aaba 10305
c144c7a0
PA
103062013-09-05 Pedro Alves <palves@redhat.com>
10307
10308 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10309 tracepoint.h.
10310 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10311 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10312 (handle_tracepoint_general_set, handle_tracepoint_query)
10313 (tracepoint_finished_step, tracepoint_was_hit)
10314 (release_while_stepping_state_list, current_traceframe)
10315 (in_readonly_region, traceframe_read_mem)
10316 (fetch_traceframe_registers, traceframe_read_sdata)
10317 (traceframe_read_info, struct fast_tpoint_collect_status)
10318 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10319 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10320 (supply_fast_tracepoint_registers)
10321 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10322 (ipa_tdesc, claim_trampoline_space)
10323 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10324 (agent_mem_read, agent_get_trace_state_variable_value)
10325 (agent_set_trace_state_variable_value, agent_tsv_read)
10326 (agent_mem_read_string, get_raw_reg_func_addr)
10327 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10328 * tracepoint.h: ... this new file.
10329
ff42e6ab
PA
103302013-09-05 Pedro Alves <palves@redhat.com>
10331
10332 * server.h (perror_with_name, error, fatal, warning, paddress)
10333 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10334 include it.
10335 * utils.h: New file.
10336
541af0f4
PA
103372013-09-05 Pedro Alves <palves@redhat.com>
10338
10339 * server.h (remote_debug, noack_mode, transport_is_reliable)
10340 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10341 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10342 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10343 (write_enn, initialize_async_io, enable_async_io)
10344 (disable_async_io, check_remote_input_interrupt_request)
10345 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10346 (dead_thread_notify, prepare_resume_reply)
10347 (decode_address_to_semicolon, decode_address, decode_m_packet)
10348 (decode_M_packet, decode_X_packet, decode_xfer_write)
10349 (decode_search_memory_packet, unhexify, hexify)
10350 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10351 (look_up_one_symbol, relocate_instruction)
10352 (monitor_output): Move to remote-utils.h, and include it.
10353 * remote-utils.h: New file.
10354
eebdf26b
PA
103552013-09-05 Pedro Alves <palves@redhat.com>
10356
10357 * server.h (_): Delete.
10358
3aafd2ff
PA
103592013-09-02 Pedro Alves <palves@redhat.com>
10360
10361 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10362 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10363 allocated.
10364 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10365
cee83bcb
PM
103662013-09-02 Pierre Muller <muller@sourceware.org>
10367
10368 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10369 or WriteProcessMemory complete successfully and handle
10370 ERROR_PARTIAL_COPY error.
10371
9a13b2fa
PA
103722013-09-02 Pedro Alves <palves@redhat.com>
10373
10374 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10375 error instead of EIO.
10376
602e3198
JK
103772013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10378
10379 PR server/15604
10380 * linux-low.c: Include filestuff.h.
10381 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10382 * lynx-low.c: Include filestuff.h.
10383 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10384 * server.c: Include filestuff.h.
10385 (main): Call notice_open_fds.
10386 * spu-low.c: Include filestuff.h.
10387 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10388
96d7229d
LM
103892013-08-22 Luis Machado <lgustavo@codesourcery.com>
10390
10391 * Makefile.in: Explain why ../target and ../nat are not
10392 listed as include file search paths.
10393 (linux-waitpid.o): New object file rule.
10394 * configure.srv (srv_native_linux_obj): New variable.
10395 Replace all occurrences of linux native object files with
10396 $srv_native_linux_obj.
10397 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10398 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10399 (linux_enable_event_reporting): Remove declaration.
10400 (my_waitpid): Moved to common/linux-waitpid.c.
10401 (linux_wait_for_event): Pass ptid when calling
10402 linux_enable_event_reporting.
10403 (linux_supports_tracefork_flag): Remove.
10404 (linux_enable_event_reporting): Likewise.
10405 (linux_tracefork_grandchild): Remove.
10406 (STACK_SIZE): Moved to common/linux-ptrace.c.
10407 (linux_tracefork_child): Remove.
10408 (linux_test_for_tracefork): Remove.
10409 (linux_look_up_symbols): Call linux_supports_traceclone.
10410 (initialize_low): Remove call to linux_test_for_tracefork.
10411 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10412 common/linux-ptrace.h.
10413 (PTRACE_TYPE_ARG4): Likewise.
10414 Include linux-ptrace.h.
10415
32940073
PA
104162013-08-21 Pedro Alves <palves@redhat.com>
10417
10418 * config.in: Renegerate.
10419
33b60d58 104202013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 10421
33b60d58
LM
10422 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10423 (SFILES): Remove $(srcdir)/common/target-common.c and
10424 add $(srcdir)/target/waitstatus.c.
10425 (OBS): Remove target-common.o and add waitstatus.o.
10426 (server_h): Remove $(srcdir)/../common/target-common.h and
10427 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10428 and $(srcdir)/../target/waitstatus.h.
10429 (target-common.o): Remove.
10430 (waitstatus.o): New target object file.
10431 * target.h: Do not include target-common.h and
10432 include target/resume.h, target/wait.h and
10433 target/waitstatus.h.
10434
b8e1b30e
LM
104352013-08-13 Luis Machado <lgustavo@codesourcery.com>
10436
10437 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10438 to PTRACE_TYPE_ARG3.
10439 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10440 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10441 PTRACE_TYPE_ARG4.
10442 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10443 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10444
7a60ad40
YQ
104452013-07-27 Jie Zhang <jie@codesourcery.com>
10446 Daniel Jacobowitz <dan@codesourcery.com>
10447 Yao Qi <yao@codesourcery.com>
10448
10449 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10450 (mips-linux-watch.o): New rule.
10451 (mips_linux_watch_h): New variable.
10452 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10453 srv_tgtobj.
10454 * linux-mips-low.c: Include mips-linux-watch.h.
10455 (struct arch_process_info, struct arch_lwp_info): New.
10456 (update_watch_registers_callback): New function.
10457 (mips_linux_new_process, mips_linux_new_thread) New functions.
10458 (mips_linux_prepare_to_resume, mips_insert_point): New
10459 functions.
10460 (mips_remove_point, mips_stopped_by_watchpoint): New
10461 functions.
10462 (rsp_bp_type_to_target_hw_bp_type): New function.
10463 (mips_stopped_data_address): New function.
10464 (the_low_target): Add watchpoint support functions.
10465
de6f69ad
YQ
104662013-07-27 Yao Qi <yao@codesourcery.com>
10467
10468 * i386-low.c: Include break-common.h.
10469 (enum target_hw_bp_type): Remove.
10470
3360c0bf
LM
104712013-07-24 Luis Machado <lgustavo@codesourcery.com>
10472
10473 * Makefile.in (SFILES): /common/target-common.c.
10474 (OBS): Add target-common.o.
10475 (server_h): Add $(srcdir)/../common/target-common.h.
10476 (target-common.o): New target.
10477 * server.c (queue_stop_reply_callback): Free
10478 status string after use.
10479 * target.c (target_waitstatus_to_string): Remove.
10480 * target.h: Include target-common.h.
10481 (resume_kind): Likewise.
10482 (target_waitkind): Likewise.
10483 (target_waitstatus): Likewise.
10484 (TARGET_WNOHANG): Likewise.
10485
bd885420
YQ
104862013-07-04 Yao Qi <yao@codesourcery.com>
10487
10488 * Makefile.in (host_alias): Use @host_noncanonical@.
10489 (target_alias): Use @target_noncanonical@.
10490 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10491 ACX_NONCANONICAL_HOST.
10492 * configure: Regenerated.
10493
10494 Revert:
10495 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10496
10497 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10498 * configure: Rebuild.
10499 * Makefile.in (version_host, version_target): Get from configure.
10500 (version.c): Use $(version_host) and $(version_target).
10501
17ef446e
PA
105022013-07-03 Pedro Alves <palves@redhat.com>
10503
10504 * Makefile.in (config.status): Depend on development.sh.
10505 * acinclude.m4: Include libmcheck.m4.
10506 * configure: Regenerate.
10507
7a9a7487
MG
105082013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10509
10510 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10511 attribute inside the parentheses.
10512 (winapi_DebugSetProcessKillOnExit): Ditto.
10513 (winapi_DebugBreakProcess): Ditto.
10514 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 10515
49b64de6
MG
105162013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10517
10518 * notif.h (notif_event): Add a dummy member to avoid compiler
10519 errors.
10520
d5749ee7
PA
105212013-07-01 Pedro Alves <palves@redhat.com>
10522
10523 * hostio.c (HOSTIO_PATH_MAX): Define.
10524 (require_filename, handle_open, handle_unlink, handle_readlink):
10525 Use it.
10526
d8d2a3ee
PA
105272013-07-01 Pedro Alves <palves@redhat.com>
10528
10529 * server.h: Include "pathmax.h".
10530 * linux-low.c: Don't include sys/param.h.
10531 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10532 MAXPATHLEN.
10533 * win32-low.c: Don't include sys/param.h.
10534 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10535
bc7dea8d
PA
105362013-07-01 Pedro Alves <palves@redhat.com>
10537
10538 * event-loop.c: Don't check HAVE_UNISTD_H before including
10539 <unistd.h>.
10540 * gdbreplay.c: Likewise.
10541 * remote-utils.c: Likewise.
10542 * server.c: Likewise.
10543 * configure.ac: Don't check for unistd.h.
10544 * configure: Regenerate.
10545
d6c2da54
TT
105462013-06-28 Tom Tromey <tromey@redhat.com>
10547
10548 * Makefile.in (version.c): Use version.in, not
10549 common/version.in.
10550
257b6bec
MG
105512013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10552
10553 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10554 * configure: Rebuild.
10555 * Makefile.in (version_host, version_target): Get from configure.
10556 (version.c): Use $(version_host) and $(version_target).
10557
86ebe149
DK
105582013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10559
10560 Fix trace-status to output user name without trailing colon.
10561 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10562
f30aa5af
DK
105632013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10564
10565 Fix trace-status to output proper start-time and stop-time.
10566 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10567 output start time and stop time in hex as gdb expects.
10568
28a93511
YQ
105692013-06-26 Pedro Alves <pedro@codesourcery.com>
10570
10571 * tracepoint.c (build_traceframe_info_xml): Output trace state
10572 variables present in the trace buffer.
10573
01208463
TT
105742013-06-24 Tom Tromey <tromey@redhat.com>
10575
10576 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10577 create-version.sh.
10578 (version.o): Remove.
10579 * gdbreplay.c: Include version.h.
10580 (version, host_name): Don't declare.
10581 * server.h: Include version.h.
10582 (version, host_name): Don't declare.
10583
760256f9
PA
105842013-06-12 Pedro Alves <palves@redhat.com>
10585
10586 * linux-x86-low.c (linux_is_elf64): Delete global.
10587 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10588 with local linux_pid_exe_is_elf_64_file use.
10589
030031ee
PA
105902013-06-11 Pedro Alves <palves@redhat.com>
10591
10592 * linux-low.c (regset_disabled, disable_regset): New functions.
10593 (regsets_fetch_inferior_registers)
10594 (regsets_store_inferior_registers): Use them.
10595 (initialize_regsets_info); Don't allocate the disabled_regsets
10596 array here.
10597 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10598 comment.
10599
5da6eb0a
PA
106002013-06-11 Pedro Alves <palves@redhat.com>
10601
10602 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10603 xmalloc.
10604
7e5aaa09
PA
106052013-06-11 Pedro Alves <palves@redhat.com>
10606
10607 * linux-x86-low.c (initialize_low_arch): Call
10608 init_registers_x32_avx_linux.
10609
d878444c
JK
106102013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10611
10612 Fix compatibility with Android Bionic.
10613 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10614 it is not empty.
10615
3aee8918
PA
106162013-06-07 Pedro Alves <palves@redhat.com>
10617
5f2b57b5 10618 PR server/14823
3aee8918
PA
10619 * Makefile.in (OBS): Add tdesc.o.
10620 (IPA_OBJS): Add tdesc-ipa.o.
10621 (tdesc-ipa.o): New rule.
10622 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10623 interface.
10624 * linux-low.c (new_inferior): Delete.
10625 (disabled_regsets, num_regsets): Delete.
10626 (linux_add_process): Adjust to set the new per-process
10627 new_inferior flag.
10628 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10629 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10630 was a stop. When calling arch_setup, switch the current inferior
10631 to the thread that got an event.
10632 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10633 (regsets_fetch_inferior_registers)
10634 (regsets_store_inferior_registers): New regsets_info parameter.
10635 Adjust to use it.
10636 (linux_register_in_regsets): New regs_info parameter. Adjust to
10637 use it.
10638 (register_addr, fetch_register, store_register): New usrregs_info
10639 parameter. Adjust to use it.
10640 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10641 parameter regs_info. Adjust to use it.
10642 (linux_fetch_registers): Get the current inferior's regs_info, and
10643 adjust to use it.
10644 (linux_store_registers): Ditto.
10645 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10646 (initialize_low): Don't initialize the target_regsets here. Call
10647 initialize_low_arch.
10648 * linux-low.h (target_regsets): Delete declaration.
10649 (struct regsets_info): New.
10650 (struct usrregs_info): New.
10651 (struct regs_info): New.
10652 (struct process_info_private) <new_inferior>: New field.
10653 (struct linux_target_ops): Delete the num_regs, regmap, and
10654 regset_bitmap fields. New field regs_info.
10655 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10656 * i387-fp.c (num_xmm_registers): Delete.
10657 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10658 calls to new interface.
10659 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10660 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10661 Infer the number of xmm registers from the regcache's target
10662 description.
10663 * i387-fp.h (num_xmm_registers): Delete.
10664 * inferiors.c (add_thread): Don't install the thread's regcache
10665 here.
10666 * proc-service.c (gregset_info): Fetch the current inferior's
10667 regs_info. Adjust to use it.
10668 * regcache.c: Include tdesc.h.
10669 (register_bytes, reg_defs, num_registers)
10670 (gdbserver_expedite_regs): Delete.
10671 (get_thread_regcache): If the thread doesn't have a regcache yet,
10672 create one, instead of aborting gdbserver.
10673 (regcache_invalidate_one): Rename to ...
10674 (regcache_invalidate_thread): ... this.
10675 (regcache_invalidate_one): New.
10676 (regcache_invalidate): Only invalidate registers of the current
10677 process.
10678 (init_register_cache): Add target_desc parameter, and use it.
10679 (new_register_cache): Ditto. Assert the target description has a
10680 non zero registers_size.
10681 (regcache_cpy): Add assertions. Adjust.
10682 (realloc_register_cache, set_register_cache): Delete.
10683 (registers_to_string, registers_from_string): Adjust.
10684 (find_register_by_name, find_regno, find_register_by_number)
10685 (register_cache_size): Add target_desc parameter, and use it.
10686 (free_register_cache_thread, free_register_cache_thread_one)
10687 (regcache_release, register_cache_size): New.
10688 (register_size): Add target_desc parameter, and use it.
10689 (register_data, supply_register, supply_register_zeroed)
10690 (supply_regblock, supply_register_by_name, collect_register)
10691 (collect_register_as_string, collect_register_by_name): Adjust.
10692 * regcache.h (struct target_desc): Forward declare.
10693 (struct regcache) <tdesc>: New field.
10694 (init_register_cache, new_register_cache): Add target_desc
10695 parameter.
10696 (regcache_invalidate_thread): Declare.
10697 (regcache_invalidate_one): Delete declaration.
10698 (regcache_release): Declare.
10699 (find_register_by_number, register_cache_size, register_size)
10700 (find_regno): Add target_desc parameter.
10701 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10702 declarations.
10703 * remote-utils.c: Include tdesc.h.
10704 (outreg, prepare_resume_reply): Adjust.
10705 * server.c: Include tdesc.h.
10706 (gdbserver_xmltarget): Delete declaration.
10707 (get_features_xml, process_serial_event): Adjust.
10708 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10709 declare.
10710 (struct process_info) <tdesc>: New field.
10711 (ipa_tdesc): Declare.
10712 * tdesc.c: New file.
10713 * tdesc.h: New file.
10714 * tracepoint.c: Include tdesc.h.
10715 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10716 (get_context_regcache): Adjust to pass ipa_tdesc down.
10717 (do_action_at_tracepoint): Adjust to get the register cache size
10718 from the context regcache's description.
10719 (traceframe_walk_blocks): Adjust to get the register cache size
10720 from the current trace frame's description.
10721 (traceframe_get_pc): Adjust to get current trace frame's
10722 description and pass it down.
10723 (gdb_collect): Adjust to get the register cache size from the
10724 IPA's description.
10725 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10726 (gdbserver_xmltarget): Delete.
10727 (initialize_low_tracepoint): Set the ipa's target description.
10728 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10729 (initialize_low_tracepoint): Set the ipa's target description.
10730 * linux-x86-low.c: Include tdesc.h.
10731 [__x86_64__] (is_64bit_tdesc): New.
10732 (ps_get_thread_area, x86_get_thread_area): Use it.
10733 (i386_cannot_store_register): Rename to ...
10734 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10735 (i386_cannot_fetch_register): Rename to ...
10736 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10737 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10738 to new interface.
10739 (target_regsets): Rename to ...
10740 (x86_regsets): ... this.
10741 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10742 interface.
10743 (x86_siginfo_fixup): Use is_64bit_tdesc.
10744 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10745 (tdesc_x32_avx_linux, tdesc_x32_linux)
10746 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10747 Declare.
10748 (x86_linux_update_xmltarget): Delete.
10749 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10750 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10751 (AMD64_LINUX_USER64_CS): New.
10752 (x86_linux_read_description): New, based on
10753 x86_linux_update_xmltarget.
10754 (same_process_callback): New.
10755 (x86_arch_setup_process_callback): New.
10756 (x86_linux_update_xmltarget): New.
10757 (x86_regsets_info): New.
10758 (amd64_linux_regs_info): New.
10759 (i386_linux_usrregs_info): New.
10760 (i386_linux_regs_info): New.
10761 (x86_linux_regs_info): New.
10762 (x86_arch_setup): Reimplement.
10763 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10764 (x86_emit_ops): Ditto.
10765 (the_low_target): Adjust. Install x86_linux_regs_info,
10766 x86_cannot_fetch_register, and x86_cannot_store_register.
10767 (initialize_low_arch): New.
10768 * linux-ia64-low.c (tdesc_ia64): Declare.
10769 (ia64_fetch_register): Adjust.
10770 (ia64_usrregs_info, regs_info): New globals.
10771 (ia64_regs_info): New function.
10772 (the_low_target): Adjust.
10773 (initialize_low_arch): New function.
10774 * linux-sparc-low.c (tdesc_sparc64): Declare.
10775 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10776 Adjust.
10777 (sparc_arch_setup): New function.
10778 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10779 (the_low_target): Adjust.
10780 (initialize_low_arch): New function.
10781 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10782 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10783 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10784 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10785 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10786 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10787 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10788 (tdesc_powerpc_isa205_vsx64l): Declare.
10789 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10790 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10791 (ppc_set_pc, ppc_get_hwcap): Adjust.
10792 (ppc_usrregs_info): Forward declare.
10793 (!__powerpc64__) ppc_regmap_adjusted: New global.
10794 (ppc_arch_setup): Adjust to the current process'es target
10795 description.
10796 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10797 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10798 (ppc_store_evrregset): Adjust.
10799 (target_regsets): Rename to ...
10800 (ppc_regsets): ... this, and make static.
10801 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10802 (ppc_regs_info): New function.
10803 (the_low_target): Adjust.
10804 (initialize_low_arch): New function.
10805 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10806 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10807 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10808 (tdesc_s390x_linux64v2): Declare.
10809 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10810 (s390_fill_gregset, s390_store_last_break): Adjust.
10811 (target_regsets): Rename to ...
10812 (s390_regsets): ... this, and make static.
10813 (s390_get_pc, s390_set_pc): Adjust.
10814 (s390_get_hwcap): New target_desc parameter, and use it.
10815 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10816 (s390_arch_setup): Adjust to set the current process'es target
10817 description. Don't adjust the regmap.
10818 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10819 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10820 (regs_info_3264): New globals.
10821 (s390_regs_info): New function.
10822 (the_low_target): Adjust.
10823 (initialize_low_arch): New function.
10824 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10825 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10826 [__mips64] (init_registers_mips_linux)
10827 (init_registers_mips_dsp_linux): Delete defines.
10828 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10829 (have_dsp): New global.
10830 (mips_read_description): New, based on mips_arch_setup.
10831 (mips_arch_setup): Reimplement.
10832 (get_usrregs_info): New function.
10833 (mips_cannot_fetch_register, mips_cannot_store_register)
10834 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10835 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10836 (target_regsets): Rename to ...
10837 (mips_regsets): ... this, and make static.
10838 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10839 (dsp_regs_info, regs_info): New globals.
10840 (mips_regs_info): New function.
10841 (the_low_target): Adjust.
10842 (initialize_low_arch): New function.
10843 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10844 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10845 Declare.
10846 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10847 (arm_read_description): New, with bits factored from
10848 arm_arch_setup.
10849 (arm_arch_setup): Reimplement.
10850 (target_regsets): Rename to ...
10851 (arm_regsets): ... this, and make static.
10852 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10853 (arm_regs_info): New function.
10854 (the_low_target): Adjust.
10855 (initialize_low_arch): New function.
10856 * linux-m68k-low.c (tdesc_m68k): Declare.
10857 (target_regsets): Rename to ...
10858 (m68k_regsets): ... this, and make static.
10859 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10860 (m68k_regs_info): New function.
10861 (m68k_arch_setup): New function.
10862 (the_low_target): Adjust.
10863 (initialize_low_arch): New function.
10864 * linux-sh-low.c (tdesc_sharch): Declare.
10865 (target_regsets): Rename to ...
10866 (sh_regsets): ... this, and make static.
10867 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10868 (sh_regs_info, sh_arch_setup): New functions.
10869 (the_low_target): Adjust.
10870 (initialize_low_arch): New function.
10871 * linux-bfin-low.c (tdesc_bfin): Declare.
10872 (bfin_arch_setup): New function.
10873 (bfin_usrregs_info, regs_info): New globals.
10874 (bfin_regs_info): New function.
10875 (the_low_target): Adjust.
10876 (initialize_low_arch): New function.
10877 * linux-cris-low.c (tdesc_cris): Declare.
10878 (cris_arch_setup): New function.
10879 (cris_usrregs_info, regs_info): New globals.
10880 (cris_regs_info): New function.
10881 (the_low_target): Adjust.
10882 (initialize_low_arch): New function.
10883 * linux-cris-low.c (tdesc_crisv32): Declare.
10884 (cris_arch_setup): New function.
10885 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10886 (cris_regs_info): New function.
10887 (the_low_target): Adjust.
10888 (initialize_low_arch): New function.
10889 * linux-m32r-low.c (tdesc_m32r): Declare.
10890 (m32r_arch_setup): New function.
10891 (m32r_usrregs_info, regs_info): New globals.
10892 (m32r_regs_info): Adjust.
10893 (initialize_low_arch): New function.
10894 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10895 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10896 (tic6x_usrregs_info): Forward declare.
10897 (tic6x_read_description): New function, based on ...
10898 (tic6x_arch_setup): ... this. Reimplement.
10899 (target_regsets): Rename to ...
10900 (tic6x_regsets): ... this, and make static.
10901 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10902 (tic6x_regs_info): New function.
10903 (the_low_target): Adjust.
10904 (initialize_low_arch): New function.
10905 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10906 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10907 (target_regsets): Rename to ...
10908 (xtensa_regsets): ... this, and make static.
10909 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10910 globals.
10911 (xtensa_arch_setup, xtensa_regs_info): New functions.
10912 (the_low_target): Adjust.
10913 (initialize_low_arch): New function.
10914 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10915 (nios2_arch_setup): Set the current process'es tdesc.
10916 (target_regsets): Rename to ...
10917 (nios2_regsets): ... this.
10918 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10919 (nios2_regs_info): New function.
10920 (the_low_target): Adjust.
10921 (initialize_low_arch): New function.
a261b8f5
PA
10922 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10923 (aarch64_arch_setup): Set the current process'es tdesc.
10924 (target_regsets): Rename to ...
10925 (aarch64_regsets): ... this.
10926 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10927 (aarch64_regs_info): New function.
10928 (the_low_target): Adjust.
10929 (initialize_low_arch): New function.
3aee8918
PA
10930 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10931 globals.
10932 (target_regsets): Rename to ...
10933 (tile_regsets): ... this.
10934 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10935 (tile_regs_info): New function.
10936 (tile_arch_setup): Set the current process'es tdesc.
10937 (the_low_target): Adjust.
10938 (initialize_low_arch): New function.
10939 * spu-low.c (tdesc_spu): Declare.
10940 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10941 * win32-arm-low.c (tdesc_arm): Declare.
10942 (arm_arch_setup): New function.
10943 (the_low_target): Install arm_arch_setup instead of
10944 init_registers_arm.
10945 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10946 (init_windows_x86): Rename to ...
10947 (i386_arch_setup): ... this. Set `win32_tdesc'.
10948 (the_low_target): Adjust.
10949 * win32-low.c (win32_tdesc): New global.
10950 (child_add_thread): Don't create the thread cache here.
10951 (do_initial_child_stuff): Set the new process'es tdesc.
10952 * win32-low.h (struct target_desc): Forward declare.
10953 (win32_tdesc): Declare.
10954 * lynx-i386-low.c (tdesc_i386): Declare global.
10955 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10956 * lynx-low.c (lynx_tdesc): New global.
10957 (lynx_add_process): Set the new process'es tdesc.
10958 * lynx-low.h (struct target_desc): Forward declare.
10959 (lynx_tdesc): Declare global.
10960 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10961 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10962 * nto-low.c (nto_tdesc): New global.
10963 (do_attach): Set the new process'es tdesc.
10964 * nto-low.h (struct target_desc): Forward declare.
10965 (nto_tdesc): Declare.
10966 * nto-x86-low.c (tdesc_i386): Declare.
10967 (nto_x86_arch_setup): Set `nto_tdesc'.
10968
b1fbec62
GB
109692013-06-04 Gary Benson <gbenson@redhat.com>
10970
10971 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10972 to qSupported response when appropriate.
10973 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10974 with nonzero-length annex.
10975 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10976 arguments supplied in annex.
10977
d1ec4ce7
DE
109782013-05-31 Doug Evans <dje@google.com>
10979
ac44adcb 10980 PR server/15594
d1ec4ce7
DE
10981 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10982 64 bits in 64-cross-32 environment.
10983
9b25f2d3
PA
109842013-05-28 Pedro Alves <palves@redhat.com>
10985
10986 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10987 (aarch64-without-fpu.c): Delete rule.
10988 * configure.srv (aarch64*-*-linux*): Remove references to
10989 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10990 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10991 declaration.
10992
6740dc9c
PA
109932013-05-24 Pedro Alves <palves@redhat.com>
10994
10995 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10996 instead of strchr/decode_address. Error if the range isn't split
10997 with a ','. Don't assume there's be a ':' in the action.
10998
c2d6af84
PA
109992013-05-23 Yao Qi <yao@codesourcery.com>
11000 Pedro Alves <palves@redhat.com>
11001
11002 * linux-low.c (lwp_in_step_range): New function.
11003 (linux_wait_1): If the thread was range stepping and stopped
11004 outside the stepping range, report the stop to GDB. Otherwise,
11005 continue stepping. Add range stepping debug output.
11006 (linux_set_resume_request): Copy the step range from the resume
11007 request to the lwp.
11008 (linux_supports_range_stepping): New.
11009 (linux_target_ops) <supports_range_stepping>: Set to
11010 linux_supports_range_stepping.
11011 * linux-low.h (struct linux_target_ops)
11012 <supports_range_stepping>: New field.
11013 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11014 * linux-x86-low.c (x86_supports_range_stepping): New.
11015 (the_low_target) <supports_range_stepping>: Set to
11016 x86_supports_range_stepping.
11017 * server.c (handle_v_cont): Handle 'r' action.
11018 (handle_v_requests): Append ";r" if the target supports range
11019 stepping.
11020 * target.h (struct thread_resume) <step_range_start,
11021 step_range_end>: New fields.
11022 (struct target_ops) <supports_range_stepping>:
11023 New field.
11024 (target_supports_range_stepping): New macro.
11025
58794e1a
JB
110262013-05-17 Joel Brobecker <brobecker@adacore.com>
11027
11028 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11029 confusion in comment.
11030
d631c5a7
JB
110312013-05-17 Joel Brobecker <brobecker@adacore.com>
11032
11033 * lynx-low.c (struct process_info_private): New type.
11034 (lynx_add_process): New function.
11035 (lynx_create_inferior, lynx_attach): Replace calls to
11036 add_process by calls to lynx_add_process.
11037 (lynx_resume): If PTID is null, then try using
11038 current_process()->private->last_wait_event_ptid.
11039 Add comments.
11040 (lynx_clear_inferiors): Delete. The contents of that function
11041 has been inlined in lynx_mourn;
11042 (lynx_wait_1): Save the ptid in the process's private data.
11043 (lynx_mourn): Free the process' private data. Replace call
11044 to lynx_clear_inferiors by call to clear_inferiors.
11045
96f7a20f
YQ
110462013-05-17 Yao Qi <yao@codesourcery.com>
11047
11048 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11049 the right place.
11050
db0dfaa0
LM
110512013-05-16 Luis Machado <lgustavo@codesourcery.com>
11052
11053 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11054 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11055 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11056 PT_TEXT_END_ADDR guards. Update comments.
11057 (linux_target_op) <read_offsets>: Conditionally define to
11058 linux_read_offsets if the target is UCLIBC and if it defines
11059 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11060
68f5f838
SL
110612013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11062 Andrew Jenner <andrew@codesourcery.com>
11063
11064 * Makefile.in (SFILES): Add linux-nios2-low.c.
11065 (clean): Add action to delete nios2-linux.c.
11066 (nios2-linux.c): New rule.
11067 * configure.srv: Add nios2*-*-linux*.
11068 * linux-nios2-low.c: New.
11069
1ebff1fd
HAQ
110702013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11071
11072 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11073
f6150862
HZ
110742013-04-25 Hui Zhu <hui@codesourcery.com>
11075
11076 PR gdb/15186
f6150862
HZ
11077 * ax.c (ax_printf): Add fflush.
11078
614c279d
TT
110792013-04-22 Tom Tromey <tromey@redhat.com>
11080
11081 * Makefile.in (SFILES): Add filestuff.c.
11082 (OBS): Add filestuff.o.
11083 (filestuff.o): New target.
11084 * config.in, configure: Rebuild.
11085 * configure.ac: Check for fdwalk, pipe2.
11086
7d4e5717
PA
110872013-04-17 Pedro Alves <palves@redhat.com>
11088
11089 * configure.ac (USE_THREAD_DB): Delete variable.
11090 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11091 Don't AC_SUBST USE_THREAD_DB.
11092 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11093 * config.in, configure: Regenerate.
11094
d5c93e41
PA
110952013-04-16 Pedro Alves <palves@redhat.com>
11096
11097 * linux-low.h (struct lwp_info) <thread_known>: Move under
11098 the USE_THREAD_DB #ifdef.
11099
04f5fe89
PA
111002013-04-16 Pedro Alves <palves@redhat.com>
11101
11102 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11103 (linux-low.o): Delete rule.
11104 * linux-low.h: Always include "gdb_thread_db.h" instead of
11105 conditionally including thread_db.h.
11106 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11107 HAVE_THREAD_DB_H.
11108
480b27bf
JK
111092013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11110
11111 * Makefile.in (install-only): Fix make install regression.
11112
43662968
JK
111132013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11114
11115 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11116 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11117 installation.
11118 * gdbserver.1: Remove.
11119
3e74e146
PA
111202013-03-22 Pedro Alves <palves@redhat.com>
11121
11122 * linux-low.c (handle_extended_wait): Don't call
11123 linux_enable_event_reporting.
11124
a8347a2a
TT
111252013-03-15 Tony Theodore <tonyt@logyst.com>
11126
11127 PR build/9098:
11128 * Makefile.in (SHELL): Use @SHELL@.
11129
eeb56fa7
SDJ
111302013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11131
11132 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11133 compiler warning.
11134
4fa7e2ff
JB
111352013-03-13 Joel Brobecker <brobecker@adacore.com>
11136
11137 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11138 Remove extraneous NULL element.
11139
8ddb1965
YQ
111402013-03-13 Yao Qi <yao@codesourcery.com>
11141
11142 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11143 'V' block in trace frame.
11144
9accd112
MM
111452013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11146
11147 * target.h (struct target_ops): Add btrace ops.
11148 (target_supports_btrace): New macro.
11149 (target_enable_btrace): New macro.
11150 (target_disable_btrace): New macro.
11151 (target_read_btrace): New macro.
11152 * gdbthread.h (struct thread_info): Add btrace field.
11153 * server.c: Include btrace-common.h.
11154 (handle_btrace_general_set): New function.
11155 (handle_btrace_enable): New function.
11156 (handle_btrace_disable): New function.
11157 (handle_general_set): Call handle_btrace_general_set.
11158 (handle_qxfer_btrace): New function.
11159 (struct qxfer qxfer_packets[]): Add btrace entry.
11160 * inferiors.c (remove_thread): Disable btrace.
11161 * linux-low: Include linux-btrace.h.
11162 (linux_low_enable_btrace): New function.
11163 (linux_low_read_btrace): New function.
11164 (linux_target_ops): Add btrace ops.
11165 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11166 Add srv_linux_btrace=yes.
11167 (x86_64-*-linux*): Add linux-btrace.o.
11168 Add srv_linux_btrace=yes.
11169 * configure.ac: Define HAVE_LINUX_BTRACE.
11170 * config.in: Regenerated.
11171 * configure: Regenerated.
11172
5cc22e4c
MM
111732013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11174
11175 * server.c (handle_qxfer): Preserve error message if -3 is
11176 returned.
11177 (qxfer): Document the -3 return value.
11178
7c97f91e
MM
111792013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11180
11181 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11182 (linux_btrace_h): New variable.
11183 (linux-btrace.o): New rule.
11184
be9a119c 111852013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
11186 Hafiz Abid Qadeer <abidh@codesourcery.com>
11187
11188 * tracepoint.c (trace_buffer_size): New global.
11189 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11190 (init_trace_buffer): Change to one-argument function. Allocate
11191 trace buffer memory.
11192 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11193 handle QTBuffer:size packet.
11194 (cmd_bigqtbuffer_size): New function.
11195 (initialize_tracepoint): Call init_trace_buffer with
11196 DEFAULT_TRACE_BUFFER_SIZE.
11197 * server.c (handle_query): Add QTBuffer:size in the
11198 supported packets.
11199
e64f7499
YQ
112002013-03-07 Yao Qi <yao@codesourcery.com>
11201
11202 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11203 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11204 of -1.
11205 (cmd_qtsp): Adjust condition. Do post increment.
11206 Set cur_action and cur_step_action back to 0.
11207
f0ae6fc3
PA
112082013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11209
11210 PR server/15236
11211 * linux-low.c (linux_write_memory): Return early success if LEN is
11212 zero.
11213
b5b0b0af
CV
112142013-03-05 Corinna Vinschen <vinschen@redhat.de>
11215
334ad4a8 11216 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 11217
589bc927
TT
112182013-02-28 Tom Tromey <tromey@redhat.com>
11219
11220 * configure.ac: Invoke AC_SYS_LARGEFILE.
11221 * configure, config.in: Rebuild.
11222
dfe07582
CV
112232013-02-28 Corinna Vinschen <vinschen@redhat.com>
11224
11225 * win32-low.c: Throughout, fix format strings and casts of
11226 printf-like functions to avoid type related warnings on all
11227 platforms.
11228 (get_child_debug_event): Print dwDebugEventCode as hex since
11229 that's how it's usually documented.
11230
736cd585
YQ
112312013-02-28 Yao Qi <yao@codesourcery.com>
11232
11233 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11234 pulongest.
11235
e1f58301
JW
112362013-02-27 Jiong Wang <jiwang@tilera.com>
11237
11238 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11239 (reg-tilegx32.c): New rule.
11240 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11241 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11242 different register info initializer according to elf class.
11243 (init_registers_tilgx32): New function. The tilegx32 register info
11244 initializer.
11245 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11246 (tile_store_gregset): Likewise.
11247
d171ca78
YQ
112482013-02-27 Yao Qi <yao@codesourcery.com>
11249
11250 * server.c (process_point_options): Print debug message when
11251 debug_threads is true.
11252
282bbdf3
YQ
112532013-02-26 Yao Qi <yao@codesourcery.com>
11254
11255 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11256
aca22551
PA
112572013-02-19 Pedro Alves <palves@redhat.com>
11258 Kai Tietz <ktietz@redhat.com>
11259
11260 PR gdb/15161
11261
11262 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11263 instead of strtoul to extract address from packet.
11264 (process_serial_event) <'z'>: Likewise.
11265
4f3cee1c
YQ
112662013-02-18 Yao Qi <yao@codesourcery.com>
11267
11268 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11269
8e1d55a3
PA
112702013-02-14 Pedro Alves <palves@redhat.com>
11271
11272 Plug memory leak.
11273
11274 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11275 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11276
458820da
PA
112772013-02-14 Pedro Alves <palves@redhat.com>
11278
11279 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11280
baea0dae
PA
112812013-02-14 Pedro Alves <palves@redhat.com>
11282
11283 * tracepoint.c (save_string): Delete.
11284 (add_tracepoint_action): Use savestring instead of save_string.
11285
0b1afbb3
PA
112862013-02-12 Pedro Alves <palves@redhat.com>
11287
11288 * linux-xtensa-low.c: Ditto.
11289 * xtensa-xtregs.c: Ditto.
11290
8a4ac37e
PA
112912013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11292
11293 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11294 thread_db.
11295
148de6bb
MS
112962013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11297
11298 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11299 aarch64_num_wp_regs and aarch64_num_bp_regs to
11300 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11301
55fac6e0
MS
113022013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11303
11304 * linux-aarch64-low.c (ps_get_thread_area): Replace
11305 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11306
176eb98c
MS
113072013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11308 Marcus Shawcroft <marcus.shawcroft@arm.com>
11309 Nigel Stephens <nigel.stephens@arm.com>
11310 Yufeng Zhang <yufeng.zhang@arm.com>
11311
11312 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11313 (aarch64.c, aarch64-without-fpu.c): New targets.
11314 * configure.srv (aarch64*-*-linux*): New.
11315 * linux-aarch64-low.c: New file.
11316
56f7af9c
MS
113172013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11318
43aaf8b6 11319 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
11320 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11321 (dequeue_one_deferred_signal, linux_resume_one_thread)
11322 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11323 (linux_tracefork_grandchild, linux_test_for_tracefork)
11324 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11325 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11326 where the argument is 0.
11327
60f662b0
YQ
113282013-01-25 Yao Qi <yao@codesourcery.com>
11329
11330 * event-loop.c: Include "queue.h".
11331 (gdb_event_p): New typedef.
11332 (struct gdb_event) <next_event>: Remove.
11333 (event_queue): Change to QUEUE(gdb_event_p).
11334 (async_queue_event): Remove.
11335 (gdb_event_xfree): New.
11336 (initialize_event_loop): New.
11337 (process_event): Use API from QUEUE.
11338 (wait_for_event): Likewise.
11339 * server.c (main): Call initialize_event_loop.
11340 * server.h (initialize_event_loop): Declare.
11341
5ae4861a
YQ
113422013-01-18 Yao Qi <yao@codesourcery.com>
11343
11344 * ax.h (struct eval_agent_expr_context): New.
11345 (gdb_eval_agent_expr): Update declaration.
11346 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11347 TFRAME. Add new argument CTX.
11348 * server.h (struct eval_agent_expr_context): Declare.
11349 (agent_mem_read, agent_tsv_read): Update declaration.
11350 (agent_mem_read_string): Likewise.
11351 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11352 (add_traceframe_block): Add new argument TPOINT.
11353 Increase TPOINT->traceframe_usage.
11354 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11355 eval_tracepoint_agent_expr.
11356 (condition_true_at_tracepoint): Likewise.
11357 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11358 (agent_mem_read_string, agent_tsv_read): Likewise.
11359
85e00e85
YQ
113602013-01-16 Yao Qi <yao@codesourcery.com>
11361
11362 * linux-low.c (linux_resume_one_lwp): Don't check
11363 'lwp->bp_reinsert != 0'.
11364
4039cf45
JB
113652013-01-07 Joel Brobecker <brobecker@adacore.com>
11366 Pedro Alves <palves@redhat.com>
11367
11368 * lynx-low.c (ptrace_request_to_str): Define a temporary
11369 macro and use it to simplify this function's implementation.
11370
9044dee2
JB
113712013-01-07 Joel Brobecker <brobecker@adacore.com>
11372
11373 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11374 sets errno.
11375
e6352c8f
JB
113762013-01-07 Joel Brobecker <brobecker@adacore.com>
11377
11378 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11379
50681a27
JB
113802013-01-07 Joel Brobecker <brobecker@adacore.com>
11381
11382 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11383
3f6e77ef
JB
113842013-01-07 Joel Brobecker <brobecker@adacore.com>
11385
11386 * lynx-low.c (lynx_resume): Use the resume_info parameter
11387 to determine the ptid for the lynx_ptrace call, unless
11388 it is equal to minus_one_ptid, in which case we use the
11389 ptid of the current_inferior.
11390 (lynx_wait_1): After having received a thread create/exit
11391 event, resume the inferior's execution using the signaling
11392 thread's ptid, rather than the old ptid.
11393
7fda33ae
JB
113942013-01-07 Joel Brobecker <brobecker@adacore.com>
11395
11396 * lynx-low.c (lynx_resume): Delete variable ret.
11397
b9786c74
JB
113982013-01-01 Joel Brobecker <brobecker@adacore.com>
11399
11400 * gdbreplay.c (gdbreplay_version): Update copyright year.
11401 * server.c (gdbserver_version): Likewise.
11402
8b93d60f
JB
114032012-12-17 Joel Brobecker <brobecker@adacore.com>
11404
11405 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11406 new thread.
11407
037335a7
JB
114082012-12-17 Joel Brobecker <brobecker@adacore.com>
11409
11410 * lynx-low.c (ptrace_request_to_str): Add handling for
11411 PTRACE_GETTRACESIG.
11412
52d4cbd8
JB
114132012-12-17 Joel Brobecker <brobecker@adacore.com>
11414
11415 * lynx-low.c (lynx_attach): Delete variable new_process.
11416
ab8f6ca9
JB
114172012-12-17 Joel Brobecker <brobecker@adacore.com>
11418
11419 * lynx-low.c (lynx_create_inferior): Delete variable
11420 new_process.
11421
78cbc024
JB
114222012-12-17 Joel Brobecker <brobecker@adacore.com>
11423
11424 * lynx-low.c (ptrace_request_to_str): Do not handle
11425 PTRACE_GETTHREADLIST if this macro does not exist.
11426
14a00470
YQ
114272012-12-15 Yao Qi <yao@codesourcery.com>
11428
11429 * Makefile.in (OBS): Add notif.o.
11430 * notif.c, notif.h: New.
11431 * server.c: Include "notif.h".
11432 (struct vstop_notif) <next>: Remove.
11433 <base>: New field.
11434 (queue_stop_reply): Update.
11435 (push_event, send_next_stop_reply): Remove.
11436 (discard_queued_stop_replies): Update.
11437 (notif_stop): New variable.
11438 (handle_v_stopped): Remove.
11439 (handle_v_requests): Don't call handle_v_stopped. Call
11440 handle_ack_notif instead.
11441 (queue_stop_reply_callback): Call notif_event_enque instead
11442 of queue_stop_reply.
11443 (handle_status): Don't call send_next_stop_reply, call
11444 notif_write_event instead.
11445 (kill_inferior_callback): Likewise.
11446 (detach_or_kill_inferior_callback): Likewise.
11447 (main): Call initialize_notif.
11448 (process_serial_event): Call QUEUE_is_empty.
11449 (handle_target_event): Call notif_push instead of push event.
11450 * server.h (push_event): Remove declaration.
11451
61c125b9
TT
114522012-12-10 Tom Tromey <tromey@redhat.com>
11453
11454 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11455 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11456 macros.
11457 (.c.o): Rewrite.
11458 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11459 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11460 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11461 (amd64-linux-ipa.o, ax.o): Rewrite.
11462 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11463 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11464 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11465 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11466 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11467 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11468 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11469 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11470 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11471 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11472 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11473 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11474 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11475 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11476 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11477 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11478 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11479 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11480 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11481 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11482 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11483 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11484 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11485 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11486 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11487 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11488 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11489 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11490 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11491 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11492 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11493 (reg-tilegx.o): Remove.
11494 (all_object_files): New macro.
11495 Include .deps files.
11496 * aclocal.m4, configure: Rebuild.
11497 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11498 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11499 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11500
e90e9ad9
TT
115012012-12-05 Tom Tromey <tromey@redhat.com>
11502
11503 PR gdb/14917:
11504 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11505
02d403bf 115062012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
11507
11508 * configure.ac: Check for linux/perf_event.h.
11509 * config.in: Regenerated.
11510 * configure: Regenerated.
11511
0270a750
PA
115122012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11513
11514 * hostio.c (handle_readlink): Decrease buffer size
11515 parameter passed to readlink by one byte.
11516
8c29b58e
YQ
115172012-11-26 Yao Qi <yao@codesourcery.com>
11518
11519 * configure.ac (build_warnings): Append '-Wempty-body'.
11520 * configure: Regenerated.
11521 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11522 body.
11523
8bdce1ff
PM
115242012-11-15 Pierre Muller <muller@sourceware.org>
11525
11526 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11527 * config.in: Regenerate.
11528 * configure: Regenerate.
11529 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11530 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11531 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11532 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11533 header.
11534 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11535 instead of <sys/wait.h> header.
11536 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11537
02d403bf 115382012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11539
11540 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11541 (various make rules): Remove -DGDBSERVER
11542
fbd5db48
YQ
115432012-11-09 Yao Qi <yao@codesourcery.com>
11544
11545 * spu-low.c (current_ptid): Move it to ..
11546 * gdbthread.h: ... here. New.
11547 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11548 * server.c (myresume, process_serial_event): Likewise.
11549 * thread-db.c (thread_db_find_new_threads): Likewise.
11550 * tracepoint.c (run_inferior_command): Likewise.
11551
b3dc46ff
AB
115522012-10-01 Andrew Burgess <aburgess@broadcom.com>
11553
11554 * server.c (handle_search_memory_1): Include access length in
11555 warning message.
11556
07c04788
HPN
115572012-09-05 Michael Brandt <michael.brandt@axis.com>
11558
11559 * linux-crisv32-low.c: Fix compile errors.
11560
918d227b
YQ
115612012-09-04 Yao Qi <yao@codesourcery.com>
11562
11563 * tracepoint.c (cmd_qtsv): Adjust debug message.
11564 Don't check CUR_TPOINT.
11565
18c1b81a
YQ
115662012-08-28 Yao Qi <yao@codesourcery.com>
11567
11568 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11569 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11570 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11571 Remove declarations of xmalloc, xreallloc, xstrdup and
11572 freeargv.
11573 * Makefile.in (libiberty_h): New.
11574 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11575 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11576
dc82f37b
YQ
115772012-08-23 Yao Qi <yao@codesourcery.com>
11578
11579 * server.h: Remove declaration of 'xsnprintf'.
11580
406b1477
KS
115812012-08-22 Keith Seitz <keiths@redhat.com>
11582
11583 * server.h: Include build-gnulib-gbserver/config.h.
11584 * gdbreplay.c: Likewise.
11585
e6712ff1
DE
115862012-08-08 Doug Evans <dje@google.com>
11587
11588 * Makefile.in (SFILES): Add gdb_vecs.c.
11589 (OBS): Add gdb_vecs.o.
11590 (gdb_vecs_h, host_defs_h): New variables.
11591 (thread-db.o): Add $(gdb_vecs_h) dependency.
11592 (gdb_vecs.o): New rule.
11593 * thread-db.c: #include "gdb_vecs.h".
11594 (thread_db_load_search): Use a vector to iterate over path elements.
11595 Handle text appearing after "$pdir".
11596
11597 * configure.ac: Add check for strstr.
11598 * config.in: Regenerate.
11599 * configure: Regenerate.
11600
7c3270ae
UW
116012012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11602
11603 * hostio.c (handle_pread): If pread fails, fall back to attempting
11604 lseek/read.
11605 (handle_pwrite): Likewise for pwrite.
11606
b62e2b27
UW
116072012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11608
11609 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11610 between unsupported TYPE and unimplementable ADDR/LEN combination.
11611 (arm_insert_point): Act on new return value.
11612
78a99e91
PA
116132012-07-31 Pedro Alves <palves@redhat.com>
11614
11615 * server.c (process_point_options): Only skip tokens if we find
11616 one that is unrecognized. Don't treat 'X' specially while
11617 skipping unrecognized tokens.
11618
fcf303ab
UW
116192012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11620
11621 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11622 to 4-byte-align HW breakpoint addresses for Thumb.
11623
7255706c
YQ
116242012-07-27 Yao Qi <yao@codesourcery.com>
11625
11626 PR remote/14161.
11627
11628 * server.h: Declare gdb_agent_about_to_close.
11629 * target.c (kill_inferior): Include "agent.h".
11630 New. Send command 'kill'.
11631 * target.h (kill_inferior): Removed macro.
11632 * tracepoint.c (gdb_agent_about_to_close): New.
11633 (gdb_agent_helper_thread): Handle command 'close'.
11634 Wait endlessly until the inferior stops.
11635 Install gdb_agent_remove_socket to atexit hook.
11636 (agent_socket_name): New static variable.
11637 (gdb_agent_socket_init): Replace local variable 'name' with
11638 'agent_socket_name'.
11639 (gdb_agent_remove_socket): New.
11640
5a3f286f
YQ
116412012-07-27 Yao Qi <yao@codesourcery.com>
11642
11643 * server.c (process_point_options): Stop at 'X' when parsing.
11644
961bd387
ME
116452012-07-19 Michael Eager <eager@eagercon.com>
11646
a261b8f5 11647 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
11648 to hw_execute.
11649 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11650 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11651 hardware breakpoint.
11652
aa7c7447
JK
116532012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11654
11655 * gdbserver/linux-low.c (initialize_low): Call
11656 linux_ptrace_init_warnings.
11657
7f216e7c
DE
116582012-07-02 Doug Evans <dje@google.com>
11659
11660 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11661 pointer to int.
11662
d3ce09f5
SS
116632012-07-02 Stan Shebs <stan@codesourcery.com>
11664
11665 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11666 (ax.o): Add it to build rule.
11667 (ax-ipa.o): Ditto.
11668 (OBS): Add format.o.
11669 (IPA_OBS): Add format.o.
11670 * server.c (handle_query): Claim support for breakpoint commands.
11671 (process_point_options): Add command case.
11672 (process_serial_event): Leave running if there are printfs in
11673 effect.
11674 * mem-break.h (any_persistent_commands): Declare.
11675 (add_breakpoint_commands): Declare.
11676 (gdb_no_commands_at_breakpoint): Declare.
11677 (run_breakpoint_commands): Declare.
11678 * mem-break.c (struct point_command_list): New struct.
11679 (struct breakpoint): New field command_list.
11680 (any_persistent_commands): New function.
11681 (add_commands_to_breakpoint): New function.
11682 (add_breakpoint_commands): New function.
11683 (gdb_no_commands_at_breakpoint): New function.
11684 (run_breakpoint_commands): New function.
11685 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11686 locally.
11687 * ax.c: Include format.h.
11688 (ax_printf): New function.
11689 (gdb_eval_agent_expr): Add printf opcode.
11690
2f8f6aed
YQ
116912012-06-13 Yao Qi <yao@codesourcery.com>
11692
11693 * server.c (start_inferior): Remove duplicated writes to fields
11694 'last_resume_kind' and 'last_status' of 'current_inferior'.
11695
0c9070b3
YQ
116962012-06-12 Yao Qi <yao@codesourcery.com>
11697 Pedro Alves <palves@redhat.com>
11698
11699 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11700 comment.
11701 * server.c (handle_v_cont): Extend comment.
11702
c52daf70
YQ
117032012-06-11 Yao Qi <yao@codesourcery.com>
11704
11705 * linux-low.c (linux_attach): Add 'static'.
11706
d38bbb0a
YQ
117072012-06-06 Yao Qi <yao@codesourcery.com>
11708
11709 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11710
89dc0afd
JK
117112012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11712
11713 Fix gcc -flto compilation warning.
11714 * server.c (main): Make variable multi_mode and attach volatile.
11715
75f62ce7
TJB
117162012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11717
11718 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11719 if the platform doesn't know about it.
11720
65f479b6
PA
117212012-05-30 Jeff Kenton <jkenton@tilera.com>
11722
11723 * Makefile.in (SFILES): Add linux-tile-low.c.
11724 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11725 * configure.srv: Handle tilegx-*-linux*.
11726 * linux-tile-low.c: New file.
11727
0c5bf5a9
JK
117282012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11729
11730 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11731
a493e3e2
PA
117322012-05-24 Pedro Alves <palves@redhat.com>
11733
11734 PR gdb/7205
11735
43aaf8b6 11736 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11737
2ea28649
PA
117382012-05-24 Pedro Alves <palves@redhat.com>
11739
11740 PR gdb/7205
11741
11742 Replace target_signal with gdb_signal throughout.
11743
8d409d16
MR
117442012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11745
11746 * linux-low.c (linux_store_registers): Avoid the copying sequence
11747 when no data has been retrieved by ptrace.
11748
23512c01
MGD
117492012-05-22 Will Deacon <will.deacon@arm.com>
11750
11751 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11752 Include asm/ptrace.h.
11753 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11754 already defined.
11755
4934b29e
MR
117562012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11757
11758 * linux-low.c (linux_store_registers): Don't re-retrieve data
11759 with ptrace that has already been obtained from /proc. Always
11760 copy any data retrieved with ptrace to the buffer supplied.
11761
bde24c0a
PA
117622012-05-11 Yao Qi <yao@codesourcery.com>
11763 Pedro Alves <palves@redhat.com>
11764
11765 * linux-low.c (enum stopping_threads_kind): New.
11766 (stopping_threads): Change type to `enum stopping_threads_kind'.
11767 (handle_extended_wait): If stopping and suspending threads, leave
11768 the new_lwp suspended too.
11769 (linux_wait_for_event): Adjust.
11770 (stop_all_lwps): Set `stopping_threads' to
11771 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11772 whether we're suspending threads or just stopping them. Assert no
11773 recursion happens.
11774
623b6bdf
YQ
117752012-04-29 Yao Qi <yao@codesourcery.com>
11776
11777 * server.h: Move some code to ...
11778 * gdbthread.h: ... here. New.
11779 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11780 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11781 (nto-low.o, win32-low.o): Likewise.
11782 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11783 * regcache.c, remote-utils.c, server.c: Likewise.
11784 * target.c, tracepoint.c, win32-low.c: Likewise.
11785
f15f9948
TJB
117862012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11787
11788 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11789 (PTRACE_ARG4_TYPE): Likewise.
11790 (PTRACE_XFER_TYPE): Likewise.
11791 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11792 ptrace to PTRACE_ARG3_TYPE.
11793 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11794 (PTRACE_ARG4_TYPE): Likewise.
11795 (PTRACE_XFER_TYPE): Likewise.
11796 (linux_detach_one_lwp): Cast fourth argument of
11797 ptrace to long then PTRACE_ARG4_TYPE.
11798 (regsets_fetch_inferior_registers): Cast third argument of
11799 ptrace to long then PTRACE_ARG3_TYPE.
11800 (regsets_store_inferior_registers): Likewise.
11801
38ea300a
PA
118022012-04-20 Pedro Alves <palves@redhat.com>
11803
11804 * configure: Regenerate.
11805
c971b7fa
PA
118062012-04-19 Pedro Alves <palves@redhat.com>
11807
43aaf8b6 11808 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11809 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11810 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11811 (all, install-only, uninstall, clean-info, all-lib, clean): No
11812 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11813 (maintainer-clean realclean distclean): Use subdir_do.
11814 (subdir_do): New.
11815 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11816 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11817 * acinclude.m4: Include acx_configure_dir.m4.
11818 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11819 calls. Call AC_PROG_RANLIB. Configure gnulib using
11820 ACX_CONFIGURE_DIR.
11821 (GNULIB): New.
11822 (GNULIB_STDINT_H): Adjust.
11823 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11824 * gdbreplay.c: Include build-gnulib/config.h.
11825 * server.h: Likewise.
11826 * aclocal.m4: Regenerate.
11827 * config.in: Regenerate.
11828 * configure: Regenerate.
c971b7fa 11829
809277f8
PA
118302012-04-19 Pedro Alves <palves@redhat.com>
11831
11832 * Makefile.in (LIBGNU, INCGNU): Adjust.
11833 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11834 (all, install-only, uninstall, clean-info, all-lib, clean)
11835 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11836 * configure.ac: Adjust AC_OUTPUT output.
11837 * aclocal.m4: Regenerate.
11838 * configure: Regenerate.
11839
fd9bb8b8
PA
118402012-04-19 Pedro Alves <palves@redhat.com>
11841
11842 * Makefile.in (generated_files): New.
11843 (server_h): Remove the explicit dependency on config.h, and depend
11844 on $generated_files.
11845
1c298c66
PA
118462012-04-19 Pedro Alves <palves@redhat.com>
11847
11848 * Makefile.in (INCGNU): Add -Ignulib.
11849
57c4b50b
PA
118502012-04-19 Pedro Alves <palves@redhat.com>
11851
11852 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11853 (INCGNU): ... this, and spell out -I here.
11854 (GNULIB_LIB): Rename to ...
11855 (LIBGNU): ... this.
11856 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11857
1030e047
PA
118582012-04-19 Pedro Alves <palves@redhat.com>
11859
11860 * config.in: Regenerate.
11861
447d4319
PA
118622012-04-19 Pedro Alves <palves@redhat.com>
11863
11864 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11865 * server.h (memmem): Remove declaration.
11866 * config.in: Regenerate.
11867 * configure: Regenerate.
11868
aad9eab9
YQ
118692012-04-19 Yao Qi <yao@codesourcery.com>
11870
11871 * Makefile.in (SFILES): Add common/vec.c.
11872 (OBS): Add vec.o.
11873 (vec.o): New rule.
11874
3e10640f
YQ
118752012-04-19 Yao Qi <yao@codesourcery.com>
11876
11877 * remote-utils.c (prepare_resume_reply): Replace with macro
11878 target_core_of_thread.
11879 * server.c (handle_qxfer_threads_proper): Likewise.
11880 * target.h (traget_core_of_thread): New macro.
11881
71622373
PA
118822012-04-18 Pedro Alves <palves@redhat.com>
11883
11884 * aclocal.m4: Regenerate.
11885 * configure: Regenerate.
11886
80d26939
YQ
118872012-04-16 Yao Qi <yao@codesourcery.com>
11888
11889 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11890 duplicated on address.
11891
42476b70
YQ
118922012-04-16 Yao Qi <yao@codesourcery.com>
11893
11894 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11895 (struct tracepoint_action_ops) <send>: New field.
11896 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11897 (agent_expr_send, x_tracepoint_action_send): New.
11898 (l_tracepoint_action_send): New.
11899 (cmd_qtdp): Download and install tracepoint
11900 according to `use_agent'.
11901 (run_inferior_command): Add one more parameter `len'.
11902 Update callers.
11903 (tracepoint_send_agent): New.
11904 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11905
7bc83639
YQ
119062012-04-16 Yao Qi <yao@codesourcery.com>
11907
11908 * tracepoint.c (download_tracepoints): Moved to ...
11909 (cmd_qtstart): ... here.
11910
5f18041e
YQ
119112012-04-14 Yao Qi <yao@codesourcery.com>
11912
11913 * tracepoint.c: Include inttypes.h.
11914 (struct collect_memory_action): Use sized types.
11915 (struct tracepoint): Likewise.
11916 (cmd_qtdp, stop_tracing): Update print specifiers.
11917 (cmd_qtp, response_tracepoint): Likewise.
11918 (collect_data_at_tracepoint): Likewise.
11919 (collect_data_at_step): Likewise.
11920
55a8c076
YQ
119212012-04-14 Yao Qi <yao@codesourcery.com>
11922
11923 Import gnulib module inttypes.
11924 * aclocal.m4, config.in, configure: Regenerated.
11925
dc750257
YQ
119262012-04-14 Yao Qi <yao@codesourcery.com>
11927
11928 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11929 Makefile and config.status at last.
11930
0ab5faf9
YQ
119312012-04-13 Yao Qi <yao@codesourcery.com>
11932
11933 * tracepoint.c: Include stdint.h unconditionally.
11934
18f5fd81
TJB
119352012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11936
11937 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11938 on BFD_HAVE_SYS_PROCFS_TYPE.
11939 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11940 * configure: Regenerate.
11941 * config.in: Likewise.
11942
4d47af5c
L
119432012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11944
11945 * Makefile.in (clean): Also remove x32.c x32-linux.c
11946 x32-avx.c x32-avx-linux.c.
11947 (x32.o): New target.
11948 (x32.c): Likewise.
11949 (x32-linux.o): Likewise.
11950 (x32-linux.c): Likewise.
11951 (x32-avx.o): Likewise.
11952 (x32-avx.c): Likewise.
11953 (x32-avx-linux.o): Likewise.
11954 (x32-avx-linux.c): Likewise.
11955
11956 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11957 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11958 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11959 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11960 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11961 i386/x32-avx-linux.xml.
11962
11963 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11964 (init_registers_x32_avx_linux): Likwise.
11965 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11966 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11967
ecedbe58
PA
119682012-04-13 Pedro Alves <palves@redhat.com>
11969
11970 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11971 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11972 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11973 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11974 the sub-make.
11975
c92b5177
L
119762012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11977
11978 * linux-x86-low.c (compat_x32_clock_t): New.
11979 (compat_x32_siginfo_t): Likewise.
11980 (compat_x32_siginfo_from_siginfo): Likewise.
11981 (siginfo_from_compat_x32_siginfo): Likewise.
11982 (linux_is_elf64): Likewise.
11983 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11984 and siginfo_from_compat_x32_siginfo for x32.
11985 (x86_arch_setup): Set linux_is_elf64.
11986
214d508e
L
119872012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11988
11989 PR gdb/13969
11990 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11991 e_machine field.
11992 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11993 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11994 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11995 compatible with process.
11996
c9a1864a
YQ
119972012-04-12 Yao Qi <yao@codesourcery.com>
11998
11999 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12000 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12001 (install-only, install-info, clean): Handle sub dir gnulib.
12002 (all-lib, am--refresh): New targets.
12003 (memmem.o): Remove target.
12004 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12005 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12006 (AC_REPLACE_FUNCS): Remove memmem.
12007 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12008 (AC_OUTPUT): Generate Makefile in gnulib/.
12009 * aclocal.m4, config.in, configure: Regenerated.
12010
367ba2c2
MR
120112012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12012
12013 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12014
9d236627
PA
120152012-04-05 Pedro Alves <palves@redhat.com>
12016
12017 -Werror=strict-aliasing
12018
12019 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12020 pointer.
12021
111217b3
PA
120222012-04-04 Pedro Alves <palves@redhat.com>
12023
12024 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12025 (sparc_store_gregset_from_stack, sparc_store_gregset)
12026 (sparc_breakpoint_at): Fix formatting.
12027
8365dcf5
TJB
120282012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12029
12030 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12031 are available.
12032 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12033 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12034 * config.in: Regenerate.
12035 * configure: Likewise.
12036
689cc2ae
PA
120372012-03-29 Pedro Alves <palves@redhat.com>
12038
12039 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12040 Correct ptrace arguments.
12041
c14dfd32
PA
120422012-03-28 Pedro Alves <palves@redhat.com>
12043
12044 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12045 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12046 (IA64_FR1_REGNUM): New defines.
12047 (ia64_fetch_register): New.
12048 (the_low_target): Install it.
12049 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12050 field.
12051 * linux-low.c (linux_fetch_registers): Try the
12052 the_low_target.fetch_register hook first.
12053
12054 * linux-arm-low.c (the_low_target): Adjust.
12055 * linux-bfin-low.c (the_low_target): Adjust.
12056 * linux-cris-low.c (the_low_target): Adjust.
12057 * linux-crisv32-low.c (the_low_target): Adjust.
12058 * linux-m32r-low.c (the_low_target): Adjust.
12059 * linux-m68k-low.c (the_low_target): Adjust.
12060 * linux-mips-low.c (the_low_target): Adjust.
12061 * linux-ppc-low.c (the_low_target): Adjust.
12062 * linux-s390-low.c (the_low_target): Adjust.
12063 * linux-sh-low.c (the_low_target): Adjust.
12064 * linux-sparc-low.c (the_low_target): Adjust.
12065 * linux-tic6x-low.c (the_low_target): Adjust.
12066 * linux-x86-low.c (the_low_target): Adjust.
12067 * linux-xtensa-low.c (the_low_target): Adjust.
12068
63c88e13
PA
120692012-03-26 Pedro Alves <palves@redhat.com>
12070
12071 * server.c (handle_qxfer_libraries): Don't bail early if
12072 the_target->qxfer_libraries_svr4 is not NULL.
12073
fb723180
PA
120742012-03-26 Pedro Alves <palves@redhat.com>
12075
12076 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12077
0afae3cf
PA
120782012-03-23 Pedro Alves <palves@redhat.com>
12079
12080 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12081 "library-list-svr4" element's start tag when the the DSO list is
12082 empty.
12083
485f1ee4
PA
120842012-03-23 Pedro Alves <palves@redhat.com>
12085
12086 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12087 a variable whose type size is the same as the inferior's pointer
12088 size.
12089
a5362b9a
TS
120902012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12091
12092 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12093 struct siginfo.
12094 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12095 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12096 * linux-low.h: Include <signal.h>.
12097 (struct siginfo): Remove forward declaration.
12098 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12099 struct siginfo.
12100
d226c142
MF
121012012-03-21 Mike Frysinger <vapier@gentoo.org>
12102
12103 * .gitignore: Ignore more files.
12104
122f36ef
PA
121052012-03-19 Pedro Alves <palves@redhat.com>
12106 Jan Kratochvil <jan.kratochvil@redhat.com>
12107
12108 * server.c (cont_thread, general_thread): Add describing comments.
12109 (start_inferior): Clear `cont_thread'.
12110 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12111 of a process.
12112
fc3e5175
YQ
121132012-03-15 Yao Qi <yao@codesourcery.com>
12114
12115 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12116 handling to ...
12117 (cmd_qtdp): ... here.
12118
8d0d92cd
YQ
121192012-03-15 Yao Qi <yao@codesourcery.com>
12120
12121 * tracepoint.c (struct tracepoint_action_ops): New.
12122 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12123 (m_tracepoint_action_download): New.
12124 (r_tracepoint_action_download): New.
12125 (x_tracepoint_action_download): New.
12126 (l_tracepoint_action_download): New.
12127 (add_tracepoint_action): Install `action->ops' according type.
12128 (download_tracepoint_1): Move code `download' function pointer
12129 of various tracepoint_action_ops.
12130
87b0bb13
JK
121312012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12132
12133 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12134 linux_ptrace_attach_warnings.
12135
5f572dec
JK
121362012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12137
12138 * Makefile.in (linux-ptrace.o): New.
12139 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12140 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12141 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12142 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12143 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12144 of these targets.
12145 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12146
f4647387
YQ
121472012-03-08 Yao Qi <yao@codesourcery.com>
12148 Pedro Alves <palves@redhat.com>
12149
12150 Fix PR server/13392.
12151 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12152 offset of JMP insn.
12153 * tracepoint.c (remove_tracepoint): New.
12154 (cmd_qtdp): Call remove_tracepoint when failed to install.
12155
9b224c5e
PA
121562012-03-07 Pedro Alves <palves@redhat.com>
12157
12158 * linux-low.c (get_detach_signal): New.
12159 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12160 Pass on pending signals to PTRACE_DETACH. Check the result of the
12161 ptrace call.
12162 * server.c (program_signals, program_signals_p): New.
12163 (handle_general_set): Handle QProgramSignals.
12164 * server.h (program_signals, program_signals_p): Declare.
12165
e237a7e2
JK
121662012-03-05 Pedro Alves <palves@redhat.com>
12167 Jan Kratochvil <jan.kratochvil@redhat.com>
12168
12169 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12170 New comment why.
12171
5808517f
YQ
121722012-03-03 Yao Qi <yao@codesourcery.com>
12173
12174 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12175 agent_look_up_symbols.
12176
58b4daa5
YQ
121772012-03-03 Yao Qi <yao@codesourcery.com>
12178
12179 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12180 (linux-x86-low.o): Likewise.
12181 * server.h: Remove in_process_agent_loaded.
12182 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12183 common/agent.c.
12184 Update callers.
12185
8ffcbaaf
YQ
121862012-03-03 Yao Qi <yao@codesourcery.com>
12187
12188 * tracepoint.c (gdb_agent_capability): New global.
12189 (in_process_agent_loaded_ust): Renamed to
12190 `in_process_agent_supports_ust'.
12191 Update callers.
12192 (in_process_agent_supports_ust): Call agent_capability_check.
12193 (clear_installed_tracepoints): Assert that agent supports
12194 agent.
12195
d1feda86
YQ
121962012-03-03 Yao Qi <yao@codesourcery.com>
12197
12198 * linux-low.c (linux_supports_agent): New.
12199 (linux_target_ops): Initialize field `supports_agent' with
12200 linux_supports_agent.
12201 * target.h (struct target_ops) <supports_agent>: New.
12202 (target_supports_agent): New macro.
12203 * server.c (handle_general_set): Handle packet 'QAgent'.
12204 (handle_query): Send `QAgent+'.
12205 * Makefile.in (server.o): Depends on agent.h.
12206
2fa291ac
YQ
122072012-03-03 Yao Qi <yao@codesourcery.com>
12208
12209 * Makefile.in (OBS): Add agent.o.
12210 Add new rule for agent.o.
12211 Track dependence of tracepoint.c on agent.h.
12212 * tracepoint.c (run_inferior_command_1):
12213 (run_inferior_command): Call agent_run_command.
12214 (gdb_ust_connect_sync_socket): Deleted. Move it to
12215 common/agent.c.
12216 (resume_thread, stop_thread): Likewise.
12217 (gdb_ust_socket_init): Renamed to ...
12218 (gdb_agent_socket_init): ... New.
12219 (gdb_ust_thread): Renamed to ...
12220 (gdb_agent_helper_thread): ... New.
12221 (gdb_ust_init): Move some code to ...
12222 (gdb_agent_init): ... here. New.
12223 [HAVE_UST]: Call gdb_ust_init.
12224 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12225 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12226 * config.in, configure: Regenerated.
12227
05044653
PA
122282012-03-02 Pedro Alves <palves@redhat.com>
12229
12230 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12231 * linux-low.c (struct simple_pid_list): New.
12232 (stopped_pids): New a struct simple_pid_list pointer.
12233 (add_to_pid_list, pull_pid_from_list): New.
12234 (handle_extended_wait): Don't assume the first signal new children
12235 report is SIGSTOP. Adjust call to pull_pid_from_list.
12236 (linux_wait_for_lwp): Adjust.
12237
8d00225b
YQ
122382012-03-02 Yao Qi <yao@codesourcery.com>
12239
12240 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12241 debug log.
12242
19560ba5
YQ
122432012-03-02 Yao Qi <yao@codesourcery.com>
12244
12245 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12246 `stop_pc' and `tpoint'. Update caller.
12247
1faeff08
MR
122482012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12249
12250 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12251 * linux-low.c (use_linux_regsets): New macro.
12252 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12253 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12254 (linux_register_in_regsets): New function.
12255 (usr_fetch_inferior_registers): Skip registers covered by
12256 regsets.
12257 (usr_store_inferior_registers): Likewise.
12258 (usr_fetch_inferior_registers): New macro.
12259 (usr_store_inferior_registers): Likewise.
12260 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12261 (linux_store_registers): Likewise.
12262 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12263 prototype.
12264 (init_registers_mips64_dsp_linux): Likewise.
12265 (init_registers_mips_linux): New macro.
12266 (init_registers_mips_dsp_linux): Likewise.
12267 (mips_dsp_num_regs): Likewise.
12268 (DSP_BASE, DSP_CONTROL): New fallback macros.
12269 (mips_base_regs): New macro.
12270 (mips_regmap): Use it. Fix the size.
12271 (mips_dsp_regmap): New variable.
12272 (mips_dsp_regset_bitmap): Likewise.
12273 (mips_arch_setup): New function.
12274 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12275 than mips_regmap.
12276 (mips_cannot_store_register): Likewise.
12277 (the_low_target): Update .arch_setup, .num_regs and .regmap
12278 initializers. Add .regset_bitmap initializer.
12279 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12280 initializer.
12281 * linux-bfin-low.c (the_low_target): Likewise.
12282 * linux-cris-low.c (the_low_target): Likewise.
12283 * linux-crisv32-low.c (the_low_target): Likewise.
12284 * linux-ia64-low.c (the_low_target): Likewise.
12285 * linux-m32r-low.c (the_low_target): Likewise.
12286 * linux-m68k-low.c (the_low_target): Likewise.
12287 * linux-ppc-low.c (the_low_target): Likewise.
12288 * linux-s390-low.c (the_low_target): Likewise.
12289 * linux-sh-low.c (the_low_target): Likewise.
12290 * linux-sparc-low.c (the_low_target): Likewise.
12291 * linux-tic6x-low.c (the_low_target): Likewise.
12292 * linux-x86-low.c (the_low_target): Likewise.
12293 * linux-xtensa-low.c (the_low_target): Likewise.
12294 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12295 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12296 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12297 srv_xmlfiles.
12298 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12299 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12300
c03e6ccc
YQ
123012012-02-29 Yao Qi <yao@codesourcery.com>
12302 Pedro Alves <palves@redhat.com>
12303
12304 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12305 `step_over_finished' is true.
12306
644cebc9
PA
123072012-02-27 Pedro Alves <palves@redhat.com>
12308
12309 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12310 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12311
c14d7ab2
PA
123122012-02-27 Pedro Alves <palves@redhat.com>
12313
12314 PR server/9684
12315 * linux-low.c (pid_is_stopped): New.
12316 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12317
412c89dd
LM
123182012-02-25 Luis Machado <lgustavo@codesourcery.com>
12319
12320 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12321 of conditions.
12322
b745defe
MR
123232012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12324
12325 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12326
9f3a5c85
LM
123272012-02-24 Luis Machado <lgustavo@codesourcery>
12328
12329 * server.c (handle_query): Advertise support for target-side
12330 breakpoint condition evaluation.
12331 (process_point_options): New function.
12332 (process_serial_event): When inserting a breakpoint, check for
12333 a target-side condition that should be evaluated.
12334
12335 * mem-break.c: Include regcache.h and ax.h.
12336 (point_cond_list_t): New data structure.
12337 (breakpoint) <cond_list>: New field.
12338 (find_gdb_breakpoint_at): Make non-static.
12339 (delete_gdb_breakpoint_at): Clear any target-side
12340 conditions.
12341 (clear_gdb_breakpoint_conditions): New function.
12342 (add_condition_to_breakpoint): Likewise.
12343 (add_breakpoint_condition): Likewise.
12344 (gdb_condition_true_at_breakpoint): Likewise.
12345 (gdb_breakpoint_here): Return result directly instead
12346 of going through a local variable.
12347
12348 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12349 (clear_gdb_breakpoint_conditions): Likewise.
12350 (add_breakpoint_condition): Likewise.
12351 (gdb_condition_true_at_breakpoint): Likewise.
12352
12353 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12354 (need_step_over_p): Take target-side breakpoint condition into
12355 consideration.
12356
5e1dc496
LM
123572012-02-24 Luis Machado <lgustavo@codesourcery>
12358
12359 * server.h: Include tracepoint.h.
12360 (agent_mem_read, agent_get_trace_state_variable_value,
12361 agent_set_trace_state_variable_value,
12362 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12363 get_set_tsv_func_addr): New prototypes.
12364
12365 * ax.h: New include file.
12366 * ax.c: New source file.
12367
12368 * tracepoint.c: Include ax.h.
12369 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12370 agent_expr, eval_result_type): Move to ax.h.
12371 (parse_agent_expr): Rename to ...
12372 (gdb_parse_agent_expr): ... this, make it non-static and move
12373 to ax.h.
12374 (unparse_agent_expr) Rename to ...
12375 (gdb_unparse_agent_expr): ... this, make it non-static and move
12376 to ax.h.
12377 (eval_agent_expr): Rename to ...
12378 (eval_tracepoint_agent_expr): ... this.
12379 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12380 forward declarations.
12381 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12382 (agent_get_trace_state_variable_value): New function.
12383 (agent_set_trace_state_variable_value): New function.
12384 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12385 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12386 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12387 (condition_true_at_tracepoint): Likewise.
12388 (parse_agent_expr): Rename to ...
12389 (gdb_parse_agent_expr): ... this and move to ax.c.
12390 (unparse_agent_expr): Rename to ...
12391 (gdb_unparse_agent_expr): ... this and move to ax.c.
12392 (gdb_agent_op_name): Move to ax.c.
12393 (eval_agent_expr): Rename to ...
12394 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12395 and move to ax.c.
12396 (eval_tracepoint_agent_expr): New function.
12397 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 12398 non-static.
5e1dc496
LM
12399 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12400 ax.c.
12401 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12402 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12403 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12404 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12405 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12406 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12407 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12408 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12409 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12410 (compile_bytecodes): Remove forward declaration.
12411 (is_goto_target): Move to ax.c.
12412 (compile_bytecodes): Move to ax.c and call
12413 agent_get_trace_state_variable_value (...) and
12414 agent_set_trace_state_variable_value (...).
12415
12416 * Makefile.in: Update ax.c and IPA dependencies.
12417
277e4e52
PA
124182012-02-24 Pedro Alves <palves@redhat.com>
12419
12420 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12421 (cmd_bigqtbuffer_circular): ... this. Only handle
12422 'QTBuffer:circular:'.
12423 (handle_tracepoint_general_set): Adjust.
12424
bf4c19f7
YQ
124252012-02-16 Yao Qi <yao@codesourcery.com>
12426
12427 * inferiors.c: Move code to ...
12428 * dll.c: .... here. New.
12429 * server.h: Declare clear_dlls.
12430 * Makefile.in (SFILES): Add dll.c.
12431 (OBS): Add dll.o
12432 (dll.o): New rule.
12433
d73f2619
YQ
124342012-02-11 Yao Qi <yao@codesourcery.com>
12435
12436 * server.c: (handle_monitor_command): Add a new parameter
12437 `own_buf'.
12438 (handle_query): Update caller.
12439
f8255c2a
JB
124402012-02-09 Joel Brobecker <brobecker@adacore.com>
12441
12442 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12443 * configure, config.in: Regenerate.
12444 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12445 is not defined.
12446
da84f473
PA
124472012-02-02 Pedro Alves <palves@redhat.com>
12448
12449 Try SIGKILL first, then PTRACE_KILL.
12450 * linux-low.c (linux_kill_one_lwp): New.
12451 (linux_kill_one_lwp): Rename to ...
12452 (kill_one_lwp_callback): ... this. Use the new
12453 linux_kill_one_lwp.
12454
e886a173
PA
124552012-02-02 Pedro Alves <palves@redhat.com>
12456
12457 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12458 inferior.
12459
be07f1a2
PA
124602012-01-27 Pedro Alves <palves@redhat.com>
12461
12462 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12463 (elf_64_file_p): Make static.
12464 (linux_pid_exe_is_elf_64_file): New.
12465 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12466 Delete declarations.
12467 (linux_pid_exe_is_elf_64_file): Declare.
12468 * linux-x86-low.c (x86_arch_setup): Use
12469 linux_pid_exe_is_elf_64_file.
12470
d8301ad1
JK
124712012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12472
12473 * linux-low.c (linux_wait_for_event_1): Rename to ...
12474 (linux_wait_for_event): ... here and merge it with former
12475 linux_wait_for_event - new variable wait_ptid, use it.
12476 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12477
01b17894
PA
124782012-01-23 Pedro Alves <palves@redhat.com>
12479
12480 * server.c (main): Avoid yet another case of infinite loop while
12481 detaching/killing after a longjmp.
12482
e825046f
JK
124832012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12484
12485 Code cleanup.
12486 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12487
b9e7b9c3
UW
124882012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12489
12490 * hostio.c (handle_readlink): New function.
12491 (handle_vFile): Call it to handle "vFile:readlink" packets.
12492
901f9912
UW
124932012-01-20 Pedro Alves <palves@redhat.com>
12494 Ulrich Weigand <ulrich.weigand@linaro.org>
12495
12496 * server.c (handle_v_requests): Only support vAttach and vRun to
12497 start multiple processes when in extended protocol mode.
12498
fc1ab1a0
PA
124992012-01-17 Pedro Alves <palves@redhat.com>
12500
12501 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12502 memalign plus mprotect to allocate the scratch buffer.
12503
7d5d4e98
PA
125042012-01-13 Pedro Alves <palves@redhat.com>
12505
12506 * server.c (attach_inferior): Clear `cont_thread'.
12507
f128d5e9
PA
125082012-01-13 Pedro Alves <palves@redhat.com>
12509
12510 * server.c (main): Avoid infinite loop while detaching/killing
12511 after a longjmp.
12512
06db92f0
DE
125132012-01-09 Doug Evans <dje@google.com>
12514
12515 * server.c (start_inferior): Set last_ptid in --wrapper case.
12516
32d92999
YQ
125172012-01-06 Yao Qi <yao@codesourcery.com>
12518
12519 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12520 defined.
12521 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12522
5e0a92a9
YQ
125232012-01-04 Yao Qi <yao@codesourcery.com>
12524
12525 * tracepoint.c (cmd_qtdp): Print debug message
12526 for static tracepoint.
12527
ae639e8c
YQ
125282012-01-04 Yao Qi <yao@codesourcery.com>
12529
12530 * tracepoint.c (trace_vdebug): Differentiate debug message
12531 between gdbserver and IPA.
12532
f72429c5
YQ
125332012-01-03 Yao Qi <yao@codesourcery.com>
12534
12535 * tracepoint.c (tracepoint_was_hit): Don't collect for
12536 static tracepoint.
12537
12c3e59c
JB
125382012-01-02 Joel Brobecker <brobecker@adacore.com>
12539
12540 * terminal.h: Reformat copyright header.
12541
67827812
JB
125422012-01-02 Joel Brobecker <brobecker@adacore.com>
12543
12544 * server.c (gdbserver_version): Update copyright year.
12545 * gdbreplay.c (gdbreplay_version): Likewise.
12546
3e52c33d
JK
125472011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12548
12549 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12550
12551 Revert:
12552 2011-12-18 Hui Zhu <teawater@gmail.com>
12553 * linux-low.c (linux_create_inferior): Save return value to ret.
12554
66f1260e
HZ
125552011-12-18 Hui Zhu <teawater@gmail.com>
12556
12557 * linux-low.c (linux_create_inferior): Save return value to ret.
12558
e77616d7
DE
125592011-12-16 Doug Evans <dje@google.com>
12560
e7b06c57
DE
12561 * linux-low.c (linux_create_inferior): If stdio connection,
12562 redirect stdin from /dev/null, stdout to stderr.
12563 * remote-utils.c (remote_is_stdio): New static global.
12564 (remote_connection_is_stdio): New function.
12565 (remote_prepare): Handle stdio connection.
12566 (remote_open): Ditto.
12567 (remote_close): Don't close stdin for stdio connections.
12568 (read_prim,write_prim): New functions. Replace all calls to
12569 read/write to these.
12570 * server.c (main): Watch for "-" argument. Move call to
12571 remote_prepare before start_inferior.
12572 * server.h (STDIO_CONNECTION_NAME): New macro.
12573 (remote_connection_is_stdio): Declare.
12574
e77616d7
DE
12575 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12576 in debugging output.
12577
82067193
YQ
125782011-12-15 Yao Qi <yao@codesourcery.com>
12579
12580 * tracepoint.c: Include sys/syscall.h.
12581 (gdb_ust_thread): Remove preprocessor conditional.
12582
82bfbe7e
PA
125832011-12-14 Pedro Alves <pedro@codesourcery.com>
12584
12585 * linux-low.c (linux_detach_one_lwp): Call
12586 the_low_target.prepare_to_resume before detaching.
12587
712c6575
YQ
125882011-12-14 Yao Qi <yao@codesourcery.com>
12589
12590 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12591 of write.
12592
d54d1edf
YQ
125932011-12-14 Yao Qi <yao@codesourcery.com>
12594
12595 * i386-low.c (i386_low_stopped_data_address): Initialize local
12596 variable `control'.
12597
6210a125
PA
125982011-12-13 Pedro Alves <pedro@codesourcery.com>
12599
12600 PR remote/13492
12601
12602 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12603 DR_CONTROL unless necessary. Extend comments.
12604 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12605 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12606
2ece8244
YQ
126072011-12-13 Yao Qi <yao@codesourcery.com>
12608
12609 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12610 macros.
12611 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12612
784867a5
JK
126132011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12614
12615 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12616 Print new debug message for such case.
12617
6bf36717
JK
126182011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12619
12620 Fix overlapping memcpy.
12621 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12622 the read_inferior_memory transfer.
12623 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12624 write_inferior_memory transfer.
12625 (set_fast_tracepoint_jump): New variable buf. Use it for the
12626 read_inferior_memory and write_inferior_memory transfers.
12627 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12628 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12629 Use it for the write_inferior_memory transfer.
12630 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12631 buffers.
12632
50275556
MR
126332011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12634
12635 * linux-low.c (fetch_register, store_register): Make code
12636 consistent, fix formatting.
12637
7325beb4
MR
126382011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12639
12640 * linux-low.c (usr_store_inferior_registers): Factor out code
12641 to handle individual registers into...
12642 (store_register): ... this new function.
12643
c642a434
UW
126442011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12645
12646 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12647 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12648 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12649 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12650 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12651 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12652 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12653 (srv_xmlfiles): Add new XML files.
12654
12655 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12656 and <sys/uio.h>.
12657 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12658 (init_registers_s390_linux32v1): Add prototype.
12659 (init_registers_s390_linux32v2): Likewise.
12660 (init_registers_s390_linux64v1): Likewise.
12661 (init_registers_s390_linux64v2): Likewise.
12662 (init_registers_s390x_linux64v1): Likewise.
12663 (init_registers_s390x_linux64v2): Likewise.
12664 (s390_num_regs): Increment to 52.
12665 (s390_regmap): Add orig_r2 register.
12666 (s390_num_regs_3264): Increment to 68.
12667 (s390_regmap_3264): Add orig_r2 register.
12668 (s390_collect_ptrace_register): Handle orig_r2 register.
12669 (s390_supply_ptrace_register): Likewise.
12670 (s390_fill_last_break): New function.
12671 (s390_store_last_break): Likewise.
12672 (s390_fill_system_call): New function.
12673 (s390_store_system_call): Likewise.
12674 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12675 register sets.
12676 (s390_check_regset): New function.
12677 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12678 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12679 Update target_regsets for available register sets.
12680
2268b414
JK
126812011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12682 Jan Kratochvil <jan.kratochvil@redhat.com>
12683
12684 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12685 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12686 New.
12687 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12688 * linux-low.h (struct process_info_private): New member r_debug.
12689 * server.c (handle_qxfer_libraries): Call
12690 the_target->qxfer_libraries_svr4.
12691 (handle_qxfer_libraries_svr4): New function.
12692 (qxfer_packets): New entry "libraries-svr4".
12693 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12694 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12695 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12696 PACKET_qXfer_libraries_svr4.
12697
d6db1fab
UW
126982011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12699
12700 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12701 PSW address/mask between 8-byte and 16-byte formats.
12702 (s390_supply_ptrace_register): Likewise.
12703 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12704 basic addressing mode bit.
12705
242f5f1c
SS
127062011-11-24 Stan Shebs <stan@codesourcery.com>
12707
12708 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12709
f196051f
SS
127102011-11-17 Stan Shebs <stan@codesourcery.com>
12711
12712 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12713 (tracing_start_time): New global.
12714 (tracing_stop_time): New global.
12715 (tracing_user_name): New global.
12716 (tracing_notes): New global.
12717 (tracing_stop_note): New global.
12718 (cmd_qtstart): Set traceframe_usage, start_time.
12719 (stop_tracing): Set stop_time.
12720 (cmd_qtstatus): Report additional status.
12721 (cmd_qtp): New function.
12722 (handle_tracepoint_query): Call it.
12723 (cmd_qtnotes): New function.
12724 (handle_tracepoint_general_set): Call it.
12725 (get_timestamp): Rename from tsv_get_timestamp.
12726
405f8e94
SS
127272011-11-14 Stan Shebs <stan@codesourcery.com>
12728 Kwok Cheung Yeung <kcy@codesourcery.com>
12729
12730 * linux-x86-low.c (small_jump_insn): New.
12731 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12732 trampoline and error message, build a trampoline and issue a small
12733 jump instruction to it.
12734 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12735 trampoline and error message.
12736 (x86_get_min_fast_tracepoint_insn_len): New.
12737 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12738 * linux-low.h (struct linux_target_ops): Add arguments to
12739 install_fast_tracepoint_jump_pad operation, add new operation.
12740 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12741 arguments.
12742 (linux_get_min_fast_tracepoint_insn_len): New function.
12743 (linux_target_op): Add new operation.
12744 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12745 (gdb_trampoline_buffer_end): Ditto.
12746 (gdb_trampoline_buffer_error): Ditto.
12747 (struct ipa_sym_addresses): Add fields for new IPA variables.
12748 (symbol_list): Add entries for new IPA variables.
12749 (struct tracepoint): Add fields to hold the address range of the
12750 trampoline used by the tracepoint.
12751 (trampoline_buffer_head): New static variable.
12752 (trampoline_buffer_tail): Ditto.
12753 (claim_trampoline_space): New function.
12754 (have_fast_tracepoint_trampoline_buffer): New function.
12755 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12756 structure.
12757 (install_fast_tracepoint): Ditto, also add error buffer argument.
12758 (cmd_qtminftpilen): New function.
12759 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12760 (fast_tracepoint_from_trampoline_address): New function.
12761 (fast_tracepoint_collecting): Handle trampoline as part of jump
12762 pad space.
12763 (set_trampoline_buffer_space): New function.
12764 (initialize_tracepoint): Initialize new IPA variables.
12765 * target.h (struct target_ops): Add arguments to
12766 install_fast_tracepoint_jump_pad operation, add new
12767 get_min_fast_tracepoint_insn_len operation.
12768 (target_get_min_fast_tracepoint_insn_len): New.
12769 (install_fast_tracepoint_jump_pad): Add arguments.
12770 * server.h (IPA_BUFSIZ): Define.
12771 * linux-i386-ipa.c: Include extra header files.
12772 (initialize_fast_tracepoint_trampoline_buffer): New function.
12773 (initialize_low_tracepoint): Call it.
12774 * server.h (set_trampoline_buffer_space): Declare.
12775 (claim_trampoline_space): Ditto.
12776 (have_fast_tracepoint_trampoline_buffer): Ditto.
12777
1e4d1764
YQ
127782011-11-14 Yao Qi <yao@codesourcery.com>
12779
12780 * server.c (handle_query): Handle InstallInTrace for qSupported.
12781 * tracepoint.c (add_tracepoint): Sort list.
12782 (install_tracepoint, download_tracepoint): New.
12783 (cmd_qtdp): Call them to install and download tracepoints.
12784 (sort_tracepoints): Removed.
12785 (cmd_qtstart): Update.
12786
5c73ff4e
YQ
127872011-11-14 Yao Qi <yao@codesourcery.com>
12788
12789 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12790 * mem-break.h: Declare.
12791 * tracepoint.c (cmd_qtstart): Move some code to ...
12792 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12793 New.
12794 (download_tracepoints): Move some code to ...
12795 (download_tracepoint_1): ... here. New.
12796
86a30030
YQ
127972011-11-08 Yao Qi <yao@codesourcery.com>
12798
12799 * remote-utils.c (relocate_instruction): A comment fix.
12800
8d26e50c
JB
128012011-11-07 Joel Brobecker <brobecker@adacore.com>
12802
12803 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12804 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12805 dr_status_mirror and dr_control_mirror from debug_reg_state.
12806 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12807 (i386_initial_stuff): Remove use of deleted globals.
12808 (i386_get_thread_context, i386_set_thread_context,
12809 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12810 from debug_reg_state.
12811
a59306a3
YQ
128122011-11-05 Yao Qi <yao@codesourcery.com>
12813
12814 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12815 address as TPOINT's.
12816
3065dfb6
SS
128172011-11-02 Stan Shebs <stan@codesourcery.com>
12818
12819 * tracepoint.c (agent_mem_read_string): New function.
12820 (eval_agent_expr): Call it for tracenz.
12821 * server.c (handle_query): Report support for tracenz.
12822
fd0d8c7c
YQ
128232011-11-02 Yao Qi <yao@codesourcery.com>
12824
12825 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12826
609086b1
YQ
128272011-11-02 Yao Qi <yao@codesourcery.com>
12828
12829 * target.h: Fix a typo in comment.
12830
b9fd1791
PA
128312011-10-31 Pedro Alves <pedro@codesourcery.com>
12832
12833 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12834 clobber the breakpoints' shadows with fast tracepoint jumps.
12835 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12836 * target.c (write_inferior_memory): Also pass MYADDR down to
12837 check_mem_write.
12838
03583c20
UW
128392011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12840
12841 * configure.ac: Check support for personality routine.
12842 * configure: Regenerate.
12843 * config.in: Likewise.
12844 * linux-low.c: Include <sys/personality.h>.
12845 Define ADDR_NO_RANDOMIZE if necessary.
12846 (linux_create_inferior): Disable address space randomization when
12847 forking inferior, if requested.
12848 (linux_supports_disable_randomization): New function.
12849 (linux_target_ops): Install it.
12850 * server.h (disable_randomization): Declare.
12851 * server.c (disable_randomization): New global variable.
12852 (handle_general_set): Handle QDisableRandomization.
12853 (handle_query): Likewise for qSupported.
12854 (main): Support --disable-randomization and --no-disable-randomization
12855 command line arguments.
12856 * target.h (struct target_ops): Add supports_disable_randomization.
12857 (target_supports_disable_randomization): New macro.
12858
723b724b
MF
128592011-09-29 Mike Frysinger <vapier@gentoo.org>
12860
12861 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12862 ifdef check.
12863 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12864 [!PT_GETDSBT] (target_loadmap): New definition.
12865 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12866 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12867 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12868 and PT_GETDSBT to LINUX_LOADMAP.
12869 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12870 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12871
55329a5c 128722011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12873
12874 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12875 (arm_linux_hwbp_cap): New static variable.
12876 (arm_linux_get_hwbp_cap): Replace by ...
12877 (arm_linux_init_hwbp_cap): ... this new function.
12878 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12879 (arm_linux_get_hw_watchpoint_count): Likewise.
12880 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12881 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12882 (arm_prepare_to_resume): Use perror_with_name instead of error.
12883
55329a5c 128842011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12885
12886 * linux-arm-low.c: Include <signal.h>.
12887 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12888 (struct arm_linux_hwbp_cap): New data type.
12889 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12890 (struct arm_linux_hw_breakpoint): New data type.
12891 (MAX_BPTS, MAX_WPTS): Define.
12892 (struct arch_process_info, struct arch_lwp_info): New data types.
12893 (arm_linux_get_hwbp_cap): New function.
12894 (arm_linux_get_hw_breakpoint_count): Likewise.
12895 (arm_linux_get_hw_watchpoint_count): Likewise.
12896 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12897 (arm_hwbp_control_initialize): Likewise.
12898 (arm_hwbp_control_is_enabled): Likewise.
12899 (arm_hwbp_control_is_initialized): Likewise.
12900 (arm_hwbp_control_disable): Likewise.
12901 (arm_linux_hw_breakpoint_equal): Likewise.
12902 (arm_linux_hw_point_initialize): Likewise.
12903 (struct update_registers_data): New data structure.
12904 (update_registers_callback: New function.
12905 (arm_insert_point): Likewise.
12906 (arm_remove_point): Likewise.
12907 (arm_stopped_by_watchpoint): Likewise.
12908 (arm_stopped_data_address): Likewise.
12909 (arm_new_process): Likewise.
12910 (arm_new_thread): Likewise.
12911 (arm_prepare_to_resume): Likewise.
12912 (the_low_target): Register arm_insert_point, arm_remove_point,
12913 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12914 arm_new_thread, and arm_prepare_to_resume.
12915
6b9801d4
SS
129162011-09-15 Stan Shebs <stan@codesourcery.com>
12917
12918 * server.h (struct emit_ops): Add compare-goto fields.
12919 * tracepoint.c (gdb_agent_op_sizes): New table.
12920 (emit_eq_goto): New function.
12921 (emit_ne_goto): New function.
12922 (emit_lt_goto): New function.
12923 (emit_le_goto): New function.
12924 (emit_gt_goto): New function.
12925 (emit_ge_goto): New function.
12926 (is_goto_target): New function.
12927 (compile_bytecodes): Recognize special cases of compare-goto
12928 combinations and call specialized emitters for them.
12929 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12930 (amd64_emit_ne_goto): New function.
12931 (amd64_emit_lt_goto): New function.
12932 (amd64_emit_le_goto): New function.
12933 (amd64_emit_gt_goto): New function.
12934 (amd64_emit_ge_goto): New function.
12935 (amd64_emit_ops): Add the new functions.
12936 (i386_emit_eq_goto): New function.
12937 (i386_emit_ne_goto): New function.
12938 (i386_emit_lt_goto): New function.
12939 (i386_emit_le_goto): New function.
12940 (i386_emit_gt_goto): New function.
12941 (i386_emit_ge_goto): New function.
12942 (i386_emit_ops): Add the new functions.
12943
bf15cbda
SS
129442011-09-08 Stan Shebs <stan@codesourcery.com>
12945
12946 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12947 (i386_emit_epilogue): Restore %ebx.
12948
943ca1dd
JZ
129492011-08-31 Jie Zhang <jzhang918@gmail.com>
12950
12951 * server.c (step_thread): Remove definition.
12952 (process_serial_event): Don't handle Hs.
12953 * server.h (step_thread): Remove declaration.
12954 * target.c (set_desired_inferior): Remove use of step_thread.
12955
e3deef73
LM
129562011-08-24 Luis Machado <lgustavo@codesourcery.com>
12957
12958 * linux-low.c: Include linux-procfs.h.
12959 (linux_attach_lwp_1): Update comments.
12960 (linux_attach): Scan for existing threads when attaching to a
12961 process that is the tgid.
12962 * Makefile.in: Update dependencies.
12963
13da1c97
LM
129642011-08-24 Luis Machado <lgustavo@codesourcery.com>
12965
12966 * configure.srv: Add linux-procfs.o dependencies.
12967
881127c9
YQ
129682011-08-14 Yao Qi <yao@codesourcery.com>
12969
12970 * target.h (struct target_ops): Fix indent.
12971 * win32-low.c (win32_target_ops): Fix comment.
12972
58dbd541
YQ
129732011-08-14 Andrew Jenner <andrew@codesourcery.com>
12974 Yao Qi <yao@codesourcery.com>
12975
12976 * Makefile.in (clean): Remove tic6x-*.c files.
12977 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12978 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12979 (tic6x-c64xp-linux.c): Likewise.
12980 * configure.srv: Add support for tic6x-*-uclinux.
12981 * linux-tic6x-low.c: New.
12982 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12983
78d85199
YQ
129842011-08-14 Andrew Stubbs <ams@codesourcery.com>
12985 Yao Qi <yao@codesourcery.com>
12986
12987 * target.h (struct target_ops): Add read_loadmap.
12988 * linux-low.c (struct target_loadseg): New type.
12989 (struct target_loadmap): New type.
12990 (linux_read_loadmap): New function.
12991 (linux_target_ops): Add linux_read_loadmap.
12992 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12993 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12994 to NULL.
78d85199 12995
a959a88d
EZ
129962011-08-05 Eli Zaretskii <eliz@gnu.org>
12997
12998 * win32-low.c: Include <stdint.h>.
12999
1ced966e
PA
130002011-07-22 Pedro Alves <pedro@codesourcery.com>
13001
13002 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13003 to the inferior here.
13004 (i386_remove_aligned_watchpoint): Ditto.
13005 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13006 fit part of the watchpoint in the debug registers.
13007 (i386_update_inferior_debug_regs): New.
13008 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13009 registers, and only update the inferior on success.
13010 (i386_low_remove_watchpoint): Ditto.
13011
d26e3629
KY
130122011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13013
13014 * linux-low.c (compare_ints, unique, list_threads, show_process,
13015 linux_core_of_thread): Delete.
13016 (linux_target_ops): Change linux_core_of_thread to
13017 linux_common_core_of_thread.
13018 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13019 * utils.c (malloc_failure): Change type of argument.
13020 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13021 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13022 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13023 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13024 (IPA_OBJS): Add common-utils-ipa.o.
13025 (ptid_h, linux_osdata_h): New macros.
13026 (server_h): Add common/common-utils.h, common/xml-utils.h,
13027 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13028 common/ptid.h.
13029 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13030 ptid.o, buffer.o): New rules.
13031 (linux-low.o): Add common/linux-osdata.h as a dependency.
13032 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13033 * configure.ac: Add AC_HEADER_DIRENT check.
13034 * config.in: Regenerate.
13035 * configure: Regenerate.
13036 * remote-utils.c (xml_escape_text): Delete.
13037 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13038 buffer_xml_printf): Move to common/buffer.c.
13039 * server.c (main): Remove call to initialize_inferiors.
13040 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13041 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13042 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13043 internal_error, gdb_assert, gdb_assert_fail): Delete.
13044 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13045 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13046 common/buffer.h.
13047 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13048 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13049 initialize_inferiors): Delete.
13050
2275a1a7
PA
130512011-07-20 Pedro Alves <pedro@codesourcery.com>
13052
13053 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13054 symbol error.
13055
0a5b1e09
PA
130562011-05-31 Pedro Alves <pedro@codesourcery.com>
13057
13058 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13059 assertion.
13060 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13061
6938fd34
YQ
130622011-05-26 Yao Qi <yao@codesourcery.com>
13063
13064 * Makefile.in (thread-db.o): Track dependence to
13065 common/gdb_thread_db.h.
13066 * thread-db.c: include gdb_thread_db.h from right place.
13067
b481f9e0
TT
130682011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13069
13070 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13071 __FILE__ and __LINE__ to internal_error.
13072
98a5dd13
DE
130732011-05-13 Doug Evans <dje@google.com>
13074
13075 * thread-db.c (try_thread_db_load_from_sdir): New function.
13076 (try_thread_db_load_from_dir): New function.
13077 (thread_db_load_search): Handle $sdir, ignore $pdir.
13078 Remove trying of system directories if search of
13079 libthread-db-search-path fails, that is now done via $sdir.
13080
d248b706
KY
130812011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13082
13083 * server.c (handle_query): Add EnableDisableTracepoints to the list
13084 of supported features.
43aaf8b6 13085 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 13086 tracepoints.
43aaf8b6
PA
13087 (cmd_qtenable_disable): New.
13088 (cmd_qtstart): Install tracepoints even if disabled.
13089 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13090 receiving a QTEnable or QTDisable packet.
13091 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13092 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13093 tracepoints.
13094 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 13095
84e578fb
DE
130962011-05-10 Doug Evans <dje@google.com>
13097
13098 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13099
71f55dd8
DE
131002011-05-04 Doug Evans <dje@google.com>
13101
13102 * linux-low.c (linux_join): Skip process lookup.
13103 * spu-low.c (spu_join): Ditto.
13104 * server.c (join_inferiors_callback): Delete.
13105 (process_serial_event): For 'D' packet (detach) call join_inferior
13106 directly.
13107
4d393d60
JM
131082011-05-04 Joseph Myers <joseph@codesourcery.com>
13109
13110 * README: Don't mention xscale*-*-linux*.
13111 * configure.srv (xscale*-*-linux*): Don't handle target.
13112
b00ad6ff
NF
131132011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13114
13115 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13116 casting pointers.
13117 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13118 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13119 (i386_emit_void_call_2): Likewise.
13120
af96c192
YQ
131212011-04-26 Yao Qi <yao@codesourcery.com>
13122
43aaf8b6
PA
13123 * linux-low.c: Move common macros to linux-ptrace.h.
13124 Include linux-ptrace.h.
af96c192
YQ
13125 * Makefile.in (linux_ptrace_h): New.
13126 (linux-low.o): Depends on linux-ptrace.h.
13127
03f2bd59
JK
131282011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13129
13130 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13131 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13132 (remote_prepare): New function with most of the TCP code from ...
13133 (remote_open): ... here. Detect PORT here unconditionally. Move also
13134 setting transport_is_reliable.
13135 * server.c (run_once): New variable.
13136 (gdbserver_usage): Document it.
13137 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13138 the first run if RUN_ONCE.
13139 * server.h (run_once, remote_prepare): New declarations.
13140
7a9dd1b2
TT
131412011-04-19 Tom Tromey <tromey@redhat.com>
13142
13143 * win32-low.c (handle_load_dll): Remove duplicate "the".
13144
81239425
PM
131452011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13146
13147 Remove support for old Cygwin 1.5 versions.
13148 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13149 function to avoid warning.
13150 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13151 warning.
13152
9e0627f1
PM
131532011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13154
13155 * gdbserver/server.h (Macro _): Define it if not available.
13156
588eebee
MS
131572011-03-14 Michael Snyder <msnyder@vmware.com>
13158
348af9f7 13159 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 13160
43f70d4c
JB
131612011-03-10 Joel Brobecker <brobecker@adacore.com>
13162
13163 * Makefile.in (maintainer-clean realclean distclean): Remove
13164 "make ... subdir_do" command.
13165
348af9f7
MS
131662011-03-10 Michael Snyder <msnyder@vmware.com>
13167
13168 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13169
13170 * server.c (handle_v_run): Free alloced buffer on early return.
13171
e637a4f5
YQ
131722011-03-09 Yao Qi <yao@codesourcery.com>
13173
13174 Revert:
13175 2011-03-04 Yao Qi <yao@codesourcery.com>
13176
13177 * Makefile.in: Remove GNU make feature --directory.
13178
13179 2011-03-05 Yao Qi <yao@codesourcery.com>
13180
13181 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13182 (subdir_do): New make target. Copied from gdb/Makefile.
13183 (maintainer-clean, realclean, distclean, clean): Call corresponding
13184 make targets in common/Makefile.
13185
13186 2011-02-11 Yao Qi <yao@codesourcery.com>
13187
13188 * configure.ac: Call AC_PROG_RANLIB.
13189 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13190 * configure: Regenerate.
13191
e6edda56
JK
131922011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13193
13194 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13195
e5141119
JB
131962011-03-06 Yao Qi <yao@codesourcery.com>
13197
13198 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13199
64794aa4
JB
132002011-03-05 Yao Qi <yao@codesourcery.com>
13201
13202 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13203 (subdir_do): New make target. Copied from gdb/Makefile.
13204 (maintainer-clean, realclean, distclean, clean): Call corresponding
13205 make targets in common/Makefile.
13206
7a762829
YQ
132072011-03-04 Yao Qi <yao@codesourcery.com>
13208
13209 * Makefile.in: Remove GNU make feature --directory.
13210
348af9f7
MS
132112011-03-04 Michael Snyder <msnyder@vmware.com>
13212
13213 * server.c (queue_stop_reply): Call xmalloc not malloc.
13214
132152011-03-02 Michael Snyder <msnyder@vmware.com>
13216
13217 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13218
9f72fee2
MS
132192011-02-28 Michael Snyder <msnyder@vmware.com>
13220
588eebee
MS
13221 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13222 (cmd_qtframe): Ditto.
13223 (cmd_qtbuffer): Ditto.
13224 (cmd_bigqtbuffer): Ditto.
13225
9f72fee2
MS
13226 * utils.c (decimal2str): Initialize 'width' to nine, then
13227 don't mess with it.
13228
8040bd49
UW
132292011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13230
13231 * hostio.c (require_data): Free *data, not data.
13232
7e52cbd0
JK
132332011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13234
13235 * hostio.c (require_data): Use free, not xfree.
13236
9130f83e
MS
132372011-02-27 Michael Snyder <msnyder@vmware.com>
13238
4b812f4e
MS
13239 * server.c (handle_query): Discard unused value.
13240
9130f83e
MS
13241 * hostio.c (require_data): Free malloc memory before returning
13242 error.
13243
69d37113
MS
132442011-02-26 Michael Snyder <msnyder@vmware.com>
13245
13246 * linux-low.c (list_threads): Call closedir for dirent.
13247
35f5825a
MS
132482011-02-27 Michael Snyder <msnyder@vmware.com>
13249
2a589cef
MS
13250 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13251 a case statement falls through.
13252
0adea5f7
MS
13253 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13254
35f5825a
MS
13255 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13256 in comparison.
13257
238f1c74
MS
132582011-02-26 Michael Snyder <msnyder@vmware.com>
13259
13260 * utils.c (decimal2str): Eliminate dead code and dead param.
13261 (pulongest): Drop dead param from call to decimal2str.
13262 (plongest): Ditto.
13263
633ff500
JB
132642011-02-24 Joel Brobecker <brobecker@adacore.com>
13265
13266 Revert the following patch (not approved yet):
13267 2011-02-21 Hui Zhu <teawater@gmail.com>
13268 * tracepoint.c (tp_printf): New function.
13269 (eval_agent_expr): Handle gdb_agent_op_printf.
13270
f9c6ff72
HZ
132712011-02-21 Hui Zhu <teawater@gmail.com>
13272
13273 * tracepoint.c (tp_printf): New function.
13274 (eval_agent_expr): Handle gdb_agent_op_printf.
13275
94d5e490
TT
132762011-02-18 Tom Tromey <tromey@redhat.com>
13277
13278 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13279 (tracepoint.o): Likewise.
13280 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13281 (gdb_agent_op_names): Likewise.
13282
c7f96d2b
TT
132832011-02-18 Tom Tromey <tromey@redhat.com>
13284
13285 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13286 gdb_agent_op_rot>: New constants.
13287 (gdb_agent_op_names): Add pick and roll.
13288 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13289 cases.
13290
0feedb2c
JK
132912011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13292
13293 * aclocal.m4: Regenerated with aclocal-1.11.1.
13294
b3b9301e
PA
132952011-02-14 Pedro Alves <pedro@codesourcery.com>
13296
13297 * server.c (handle_qxfer_traceframe_info): New.
13298 (qxfer_packets): Register "traceframe-info".
13299 (handle_query): Report support for qXfer:traceframe-info:read+.
13300 * tracepoint.c (match_blocktype): New.
13301 (traceframe_find_block_type): Rename to ...
13302 (traceframe_walk_blocks): ... this. Add callback filter argument,
13303 and use it.
13304 (traceframe_find_block_type): New, reimplemented on top of
13305 traceframe_walk_blocks.
13306 (build_traceframe_info_xml): New.
13307 (traceframe_read_info): New.
13308 * server.h (traceframe_read_info): Declare.
13309
4f3e6fb7
YQ
133102011-02-11 Yao Qi <yao@codesourcery.com>
13311
13312 * configure.ac: Call AC_PROG_RANLIB.
13313 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13314 * configure: Regenerate.
13315
764880b7
PA
133162011-02-07 Pedro Alves <pedro@codesourcery.com>
13317
13318 * server.c (gdb_read_memory): Change return semantics to allow
13319 partial transfers.
13320 (handle_search_memory_1): Adjust.
13321 (process_serial_event) <'m' packet>: Handle partial transfers.
13322 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13323
1c79eb8a
PA
133242011-01-28 Pedro Alves <pedro@codesourcery.com>
13325
13326 * regcache.c (init_register_cache): Initialize
13327 regcache->register_status.
13328 (free_register_cache): Release regcache->register_status.
13329 (regcache_cpy): Copy register_status.
13330 (registers_to_string): Print 'x's for unavailable registers.
13331 (supply_register): Mark the register's status valid or
13332 unavailable, depending on whether a buffer was passed in or not.
13333 (supply_register_zeroed): New.
13334 (supply_regblock): Mark the registers' status valid or
13335 unavailable, depending on whether a buffer was passed in or not.
13336 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13337 (struct regcache): New `register_status' field.
13338 (supply_register_zeroed): Declare.
13339 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13340 supply_register_zeroed, rather than passing a NULL buffer to
13341 supply_register.
13342 * tracepoint.c (fetch_traceframe_registers): Update comment.
13343
85724a0e
PA
133442011-01-28 Pedro Alves <pedro@codesourcery.com>
13345
13346 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13347 buffer explicit.
13348
d08aafef
PA
133492011-01-25 Pedro Alves <pedro@codesourcery.com>
13350
13351 * server.h (decode_xfer_write): Change prototype.
13352 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13353 and don't extract the annex here.
13354 * server.c (decode_xfer_read): Remove `annex' parameter,
13355 and don't extract the annex here.
13356 (decode_xfer): New.
13357 (struct qxfer): New.
13358 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13359 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13360 (handle_qxfer_statictrace): New functions, abstracted out from
13361 handle_query, and made to use the struct qxfer interface.
13362 (handle_threads_qxfer_proper): Rename to ...
13363 (handle_qxfer_threads_proper): ... this.
13364 (handle_threads_qxfer): Rename to ...
13365 (handle_qxfer_threads): ... this. Adjust.
13366 (qxfer_packets): New array.
13367 (handle_qxfer): New function.
13368 (handle_query): Use handle_qxfer.
13369
493e2a69
MS
133702011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13371
13372 * gdbreplay.c: Shorten lines of >= 80 columns.
13373 * linux-low.c: Ditto.
13374 * linux-ppc-low.c: Ditto.
13375 * linux-s390-low.c: Ditto.
13376 * linux-sparc-low.c: Ditto.
13377 * linux-x86-low.c: Ditto.
13378 * linux-xtensa-low.c: Ditto.
13379 * mem-break.c: Ditto.
13380 * nto-low.c: Ditto.
13381 * regcache.h: Ditto.
13382 * remote-utils.c: Ditto.
13383 * server.c: Ditto.
13384 * server.h: Ditto.
13385 * thread-db.c: Ditto.
13386 * tracepoint.c: Ditto.
13387 * utils.c: Ditto.
13388 * win32-low.h: Ditto.
13389
44944448
JB
133902011-01-05 Joel Brobecker <brobecker@adacore.com>
13391
13392 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13393 update.
13394
71ce852c
JB
133952011-01-01 Joel Brobecker <brobecker@adacore.com>
13396
13397 * server.c (gdbserver_version): Update copyright year in version
13398 output.
13399 * gdbreplay.c (gdbreplay_version): Ditto.
13400
eb826dc6
MF
134012010-12-29 Jie Zhang <jie.zhang@analog.com>
13402
13403 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13404 * linux-bfin-low.c: New file.
13405 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13406 PT_DATA_ADDR for BFIN targets.
13407 * Makefile.in (SFILES): Add linux-bfin-low.c.
13408 (clean): Remove reg-bfin.c.
13409 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13410 * README: Mention supported Blackfin targets.
13411
39ab222a
MF
134122010-12-23 Mike Frysinger <vapier@gentoo.org>
13413
13414 * .gitignore: New file.
13415
a1f2ce7d
MF
134162010-11-16 Mike Frysinger <vapier@gentoo.org>
13417
13418 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13419
f474844c
JZ
134202010-10-22 Jie Zhang <jie@codesourcery.com>
13421
13422 * Makefile.in: Add FLAGS_TO_PASS variable.
13423 (install): Remove dependency of install-only and recursively
13424 invoke make for install-only.
13425
f1048712
DE
134262010-10-04 Doug Evans <dje@google.com>
13427
13428 * Makefile.in (uninstall): Use $(DESTDIR).
13429
b53a1623
PA
134302010-09-24 Pedro Alves <pedro@codesourcery.com>
13431
e6ee044d
PA
13432 PR gdb/11842
13433
b53a1623
PA
13434 * linux-x86-low.c (compat_siginfo_from_siginfo)
13435 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13436 si_code is < 0. Check for si_code == SI_TIMER before checking for
13437 si_code < 0.
13438
fa1bd1e4
JB
134392010-09-13 Joel Brobecker <brobecker@adacore.com>
13440
13441 * lynx-i386-low.c: New file.
13442 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13443
47fac8f8
JB
134442010-09-13 Joel Brobecker <brobecker@adacore.com>
13445
13446 * lynx-low.c (ptrace_request_to_str): Remove handling for
13447 request values that have been removed in LynxOS 5.x.
13448
1adfc54d
JB
134492010-09-13 Joel Brobecker <brobecker@adacore.com>
13450
13451 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13452 <ptrace.h>
13453
c2a66c29
NS
134542010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13455
13456 * configure.ac: Add --enable-inprocess-agent option.
13457 * configure: Rebuilt.
13458
32fcada3
YQ
134592010-09-06 Yao Qi <yao@codesourcery.com>
13460
13461 * linux-low.c (linux_kill): Remove unused variable.
13462 (linux_stabilize_threads): Likewise.
13463 * server.c (start_inferior): Likewise.
13464 (queue_stop_reply_callback): Likewise.
13465 * tracepoint.c (do_action_at_tracepoint): Likewise.
13466
0cccb683
YQ
134672010-09-06 Yao Qi <yao@codesourcery.com>
13468
13469 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13470 on return.
13471
423ec54c
JK
134722010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13473
13474 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13475
12ac6819
PA
134762010-09-06 Pedro Alves <pedro@codesourcery.com>
13477
13478 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13479 "$(IPA_DEPFILES)".
13480
8ed54b31
JB
134812010-09-01 Joel Brobecker <brobecker@adacore.com>
13482
13483 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13484 gdbserver/lynx-ppc-low.c: New files.
13485 * Makefile.in (lynx_low_h): New variable.
13486 (lynx-low.o, lynx-ppc-low.o): New rules.
13487 * configure.ac: On LynxOS, link with -lnetinet.
13488 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13489 * configure: regenerate.
13490
bb0116a4
JB
134912010-09-01 Joel Brobecker <brobecker@adacore.com>
13492
13493 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13494 * configure.ac: Add check for vasprintf and vsnprintf.
13495 * configure, config.in: Regenerate.
13496 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13497
a778ab81 134982010-09-01 Joel Brobecker <brobecker@adacore.com>
13499
13500 * gdbreplay.c: Move include of alloca.h up, next to include of
13501 malloc.h.
13502 * server.h: Add include of malloc.h.
13503 * mem-break.c: Remove include of malloc.h.
13504 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13505
8b034a19 135062010-09-01 Joel Brobecker <brobecker@adacore.com>
13507
13508 * Makefile.in (memmem.o): Build with -Wno-error.
13509
135102010-09-01 Joel Brobecker <brobecker@adacore.com>
13511
13512 * utils.c (xsnprintf): Make non-static.
13513 * server.h: Add xsnprintf declaration.
13514 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13515 replace calls to snprintf by calls to xsnprintf throughout.
13516
135172010-09-01 Joel Brobecker <brobecker@adacore.com>
13518
13519 * configure.ac: Add configure check for alloca.
13520 * configure, config.in: Regenerate.
13521 * server.h: Include alloca.h if it exists.
13522 * gdbreplay.c: Include alloca.h if it exists.
13523
1a981360
PA
135242010-08-28 Pedro Alves <pedro@codesourcery.com>
13525
13526 * linux-low.c (__SIGRTMIN): Define if not already defined.
13527 (linux_create_inferior): Check for __ANDROID__ rather than
13528 __SIGRTMIN.
13529 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13530 are already deferred.
13531 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13532 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13533 stopped and already has a pending signal to report.
13534 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13535 a pending signal to report or is moving out of a jump pad.
13536 (linux_init_signals): Check for __ANDROID__ rather than
13537 __SIGRTMIN.
13538
b4d51a55
PA
135392010-08-28 Pedro Alves <pedro@codesourcery.com>
13540
13541 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13542 debug_threads check. Avoid a linear search when not doing debug
13543 output.
13544
ec48365d
PA
135452010-08-27 Pedro Alves <pedro@codesourcery.com>
13546
13547 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13548 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13549 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13550 (process_event): Change local fd's type to gdb_fildes_t.
13551 (create_file_handler): Adjust prototype.
13552 (delete_file_handler): Adjust prototype.
13553 (handle_file_event): Adjust prototype. Use pfildes.
13554 (create_file_event): Adjsut prototype.
13555 * remote-utils.c (remote_desc, listen_desc): Change type to
13556 gdb_fildes_t.
13557 * server.h: New gdb_fildes_t typedef.
13558 [USE_WIN32API]: Include winsock2.h.
13559 (delete_file_handler, add_file_handler): Adjust prototypes.
13560 (pfildes): Declare.
13561 * utils.c (pfildes): New.
13562
854d88f0
PA
135632010-08-27 Pedro Alves <pedro@codesourcery.com>
13564
13565 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13566 * configure: Regenerate.
13567
0146f85b
PA
135682010-08-27 Pedro Alves <pedro@codesourcery.com>
13569
13570 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13571 (linux_done_accessing_memory): ... this.
13572 (linux_target_ops): Adjust.
13573 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13574 * nto-low.c (nto_target_ops): Adjust comment.
13575 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13576 * spu-low.c (spu_target_ops): Adjust comment.
13577 * target.h (target_ops): Rename unprepare_to_access_memory field
13578 to done_accessing_memory.
13579 (unprepare_to_access_memory): Rename to ...
13580 (done_accessing_memory): ... this.
13581
90d74c30
PA
135822010-08-26 Pedro Alves <pedro@codesourcery.com>
13583
13584 * linux-low.c (linux_prepare_to_access_memory): New.
13585 (linux_unprepare_to_access_memory): New.
13586 (linux_target_ops): Install them.
13587 * server.c (read_memory): Rename to ...
13588 (gdb_read_memory): ... this. Use
13589 prepare_to_access_memory/prepare_to_access_memory.
13590 (write_memory): Rename to ...
13591 (gdb_write_memory): ... this. Use
13592 prepare_to_access_memory/prepare_to_access_memory.
13593 (handle_search_memory_1): Adjust.
13594 (process_serial_event): Adjust.
13595 * target.h (struct target_ops): New fields
13596 prepare_to_access_memory and unprepare_to_access_memory.
13597 (prepare_to_access_memory, unprepare_to_access_memory): New.
13598 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13599 prepare_to_access_memory/prepare_to_access_memory.
13600 * nto-low.c (nto_target_ops): Adjust.
13601 * spu-low.c (spu_target_ops): Adjust.
13602 * win32-low.c (win32_target_ops): Adjust.
13603
fd467969
PA
136042010-08-26 Pedro Alves <pedro@codesourcery.com>
13605
13606 * Makefile.in (WARN_CFLAGS): Get it from configure.
13607 (WERROR_CFLAGS): New.
13608 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13609 * configure.ac: Introduce --enable-werror, which adds -Werror to
13610 the compiler command line. Enabled by default. Disable with
13611 --disable-werror. Add -Wdeclaration-after-statement
13612 Wpointer-arith and -Wformat-nonliteral to warning flags.
13613 * configure: Regenerate.
13614
331e2f5f
PA
136152010-08-26 Pedro Alves <pedro@codesourcery.com>
13616
13617 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13618
e581f2b4
PA
136192010-08-26 Pedro Alves <pedro@codesourcery.com>
13620
13621 * gdbreplay.c (remote_error): New.
13622 (gdbchar): New.
13623 (expect): Use gdbchar. Check for error reading from GDB.
13624 Clarify sync error output.
13625 (play): Check for errors writing to GDB.
13626 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13627 * remote-utils.c (getpkt): Check for errors writing to the remote
13628 descriptor.
13629
3c11dd79
PA
136302010-08-25 Pedro Alves <pedro@codesourcery.com>
13631
13632 * linux-low.c (linux_wait_1): Move non-debugging code out of
13633 `debug_threads' control.
13634
d20a8ad9
PA
136352010-08-25 Pedro Alves <pedro@codesourcery.com>
13636
13637 * linux-low.c (linux_wait_1): Don't set last_status here.
13638 * server.c (push_event, queue_stop_reply_callback): Assert we're
13639 not pushing a TARGET_WAITKIND_IGNORE event.
13640 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13641 (myresume, handle_target_event): Set the thread's last_resume_kind
13642 and last_status from the target returned status.
13643
964e4306
PA
136442010-08-25 Pedro Alves <pedro@codesourcery.com>
13645
13646 PR threads/10729
13647
13648 * linux-x86-low.c (update_debug_registers_callback): New.
13649 (i386_dr_low_set_addr): Use it.
13650 (i386_dr_low_get_addr): New.
13651 (i386_dr_low_set_control): Use update_debug_registers_callback.
13652 (i386_dr_low_get_control): New.
13653 (i386_dr_low_get_status): Adjust.
13654 * linux-low.c (linux_stop_lwp): New.
13655 * linux-low.h (linux_stop_lwp): Declare.
13656
13657 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13658 argument instead of a i386_debug_reg_state.
13659 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13660 a i386_debug_reg_state.
13661 (i386_insert_aligned_watchpoint): Adjust.
13662 (i386_remove_aligned_watchpoint): Adjust.
13663 (i386_low_stopped_data_address): Read the debug registers from the
13664 inferior instead of from the mirrors.
13665 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13666 (i386_dr_low_get_addr): Declare.
13667 (i386_dr_low_get_control): Declare.
13668 (i386_dr_low_get_status): Change prototype.
13669
13670 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13671 (i386_dr_low_get_addr): New.
13672 (i386_dr_low_get_control): New.
13673 (i386_dr_low_get_status): Adjust prototype. Return
13674 dr_status_mirror.
13675 (i386_initial_stuff): Clear dr_status_mirror and
13676 dr_control_mirror.
13677 (i386_get_thread_context): Adjust.
13678 (i386_set_thread_context): Adjust.
13679 (i386_thread_added): Adjust.
13680
5f21a75b
PA
136812010-08-24 Pedro Alves <pedro@codesourcery.com>
13682
13683 * linux-low.h (linux_thread_area): Delete declaration.
13684
3e4c1235
TS
136852010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13686
13687 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13688 after its termination.
13689
1971b033
PA
136902010-08-09 Pedro Alves <pedro@codesourcery.com>
13691
13692 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13693 (gdb_wants_all_stopped): Delete.
13694 (linux_wait_1): Don't call them.
13695 * server.c (handle_v_cont): Tag all threads as want-stopped.
13696 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13697 stopped as "client-wants-stopped".
13698
310444ac
PA
136992010-07-31 Pedro Alves <pedro@codesourcery.com>
13700
13701 * Makefile.in (signals_h): New.
13702 (server_h): Depend on it.
13703 (server.o): Don't depend on $(signals_def).
13704 (signals.o): Depend on $(signals_def).
13705
a19cae16
JK
137062010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13707
13708 * Makefile.in (signals_def): New.
13709 (server_h): Append include/gdb/signals.h and signals_def.
13710 (server.o): Append signals_def.
13711
30d50328
JK
137122010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13713
13714 * server.c (handle_target_event): Use target_signal_to_host for
13715 resume_info.sig initialization.
13716 * target.h (struct thread_resume) <sig>: New comment.
13717
5c3216e2
OS
137182010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13719
c6f46ca0
OS
13720 * server.c (handle_query): strcpy() the returned string from paddress()
13721 instead of sprintf().
5c3216e2
OS
13722 * utils.c (paddress): Return phex_nz().
13723
6bd31874
JB
137242010-07-07 Joel Brobecker <brobecker@adacore.com>
13725
13726 * server.c (handle_v_cont): Call mourn_inferior if process
13727 just exited.
13728 (myresume): Likewise.
13729
0fb4aa4b
PA
137302010-07-01 Pedro Alves <pedro@codesourcery.com>
13731
13732 Static tracepoints, and integration with UST.
13733
13734 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13735 * mem-break.c (uninsert_all_breakpoints)
13736 (reinsert_all_breakpoints): New.
13737 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13738 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13739 (gdb_agent_ust_loaded, helper_thread_id)
13740 (gdb_agent_helper_thread_id): New macros.
13741 (struct ipa_sym_addresses): Add addr_ust_loaded,
13742 addr_helper_thread_id, addr_cmd_buf.
13743 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13744 (in_process_agent_loaded_ust): New.
13745 (write_e_ust_not_loaded): New.
13746 (maybe_write_ipa_ust_not_loaded): New.
13747 (struct collect_static_trace_data_action): New.
13748 (enum tracepoint_type) <static_tracepoint>: New.
13749 (struct tracepoint) <handle>: Mention static tracepoints.
13750 (struct static_tracepoint_ctx): New.
13751 (CMD_BUF_SIZE): New.
13752 (add_tracepoint_action): Handle static tracepoint actions.
13753 (unprobe_marker_at): New.
13754 (clear_installed_tracepoints): Handle static tracepoints.
13755 (cmd_qtdp): Handle static tracepoints.
13756 (probe_marker_at): New.
13757 (cmd_qtstart): Handle static tracepoints.
13758 (response_tracepoint): Handle static tracepoints.
13759 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13760 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13761 (get_context_regcache): Handle static tracepoints.
13762 (do_action_at_tracepoint): Handle static tracepoint actions.
13763 (traceframe_find_block_type): Handle static trace data blocks.
13764 (traceframe_read_sdata): New.
13765 (download_tracepoints): Download static tracepoint actions.
13766 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13767 (GDB_PROBE_NAME): New.
13768 (ust_ops): New.
13769 (GET_UST_SYM): New.
13770 (USTF): New.
13771 (dlsym_ust): New.
13772 (ust_marker_to_static_tracepoint): New.
13773 (gdb_probe): New.
13774 (collect_ust_data_at_tracepoint): New.
13775 (gdb_ust_probe): New.
13776 (UNIX_PATH_MAX, SOCK_DIR): New.
13777 (gdb_ust_connect_sync_socket): New.
13778 (resume_thread, stop_thread): New.
13779 (run_inferior_command): New.
13780 (init_named_socket): New.
13781 (gdb_ust_socket_init): New.
13782 (cstr_to_hexstr): New.
13783 (next_st): New.
13784 (first_marker, next_marker): New.
13785 (response_ust_marker): New.
13786 (cmd_qtfstm, cmd_qtsstm): New.
13787 (unprobe_marker_at, probe_marker_at): New.
13788 (cmd_qtstmat, gdb_ust_thread): New.
13789 (gdb_ust_init): New.
13790 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13791 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13792 (ST_REGENTRY): New.
13793 (x86_64_st_collect_regmap): New.
13794 (X86_64_NUM_ST_COLLECT_GREGS): New.
13795 (AMD64_RIP_REGNUM): New.
13796 (supply_static_tracepoint_registers): New.
13797 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13798 (ST_REGENTRY): New.
13799 (i386_st_collect_regmap): New.
13800 (i386_NUM_ST_COLLECT_GREGS): New.
13801 (supply_static_tracepoint_registers): New.
13802 * server.c (handle_query): Handle qXfer:statictrace:read.
13803 <qSupported>: Report support for StaticTracepoints, and
13804 qXfer:statictrace:read features.
13805 * server.h (traceframe_read_sdata)
13806 (supply_static_tracepoint_registers): Declare.
13807 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13808 (unpack_varlen_hex): Include in IPA build.
13809 * Makefile.in (ustlibs, ustinc): New.
13810 (IPA_OBJS): Add remote-utils-ipa.o.
13811 ($(IPA_LIB)): Link -ldl and -lpthread.
13812 (UST_CFLAGS): New.
13813 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13814 * config.in, configure: Regenerate.
13815
9e4344e5
PA
138162010-06-20 Ian Lance Taylor <iant@google.com>
13817 Pedro Alves <pedro@codesourcery.com>
13818
13819 * linux-x86-low.c (always_true): Delete.
13820 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13821 trying to fool the compiler with always_true.
13822
c6beb2cb
PA
138232010-06-20 Pedro Alves <pedro@codesourcery.com>
13824
13825 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13826 conditions in gdbserver.
13827
d2ed6730
UW
138282010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13829
13830 * spu-low.c (spu_read_memory): Wrap around local store limit.
13831 (spu_write_memory): Likewise.
13832
4e29fb54
PA
138332010-06-15 Pedro Alves <pedro@codesourcery.com>
13834
13835 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13836 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13837 LONGEST uses.
13838 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13839 uses.
13840 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13841 uses with LONGEST uses.
13842
6a271cae
PA
138432010-06-14 Stan Shebs <stan@codesourcery.com>
13844 Pedro Alves <pedro@codesourcery.com>
13845
13846 Bytecode compiler.
13847
13848 * linux-x86-low.c: Include limits.h.
13849 (add_insns): New.
13850 (always_true): New.
13851 (EMIT_ASM): New.
13852 (EMIT_ASM32): New.
13853 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13854 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13855 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13856 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13857 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13858 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13859 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13860 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13861 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13862 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13863 (amd64_emit_void_call_2): New.
13864 (amd64_emit_ops): New.
13865 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13866 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13867 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13868 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13869 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13870 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13871 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13872 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13873 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13874 (i386_emit_stack_adjust, i386_emit_int_call_1)
13875 (i386_emit_void_call_2): New.
13876 (i386_emit_ops): New.
13877 (x86_emit_ops): New.
13878 (the_low_target): Install x86_emit_ops.
13879 * server.h (struct emit_ops): New.
13880 (get_raw_reg_func_addr): Declare.
13881 (current_insn_ptr, emit_error): Declare.
13882 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13883 (set_trace_state_variable_value): New defines.
13884 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13885 addr_get_trace_state_variable_value and
13886 addr_set_trace_state_variable_value.
13887 (symbol_list): New fields for get_raw_reg,
13888 get_trace_state_variable_value and set_trace_state_variable_value.
13889 (condfn): New typedef.
13890 (struct tracepoint): New field `compiled_cond'.
13891 (do_action_at_tracepoint): Clear compiled_cond.
13892 (get_trace_state_variable_value, set_trace_state_variable_value):
13893 Export in the IPA.
13894 (condition_true_at_tracepoint): If there's a compiled condition,
13895 run that.
13896 (current_insn_ptr, emit_error): New globals.
13897 (struct bytecode_address): New.
13898 (get_raw_reg_func_addr): New.
13899 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13900 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13901 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13902 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13903 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13904 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13905 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13906 (compile_tracepoint_condition, compile_bytecodes): New.
13907 * target.h (emit_ops): Forward declare.
13908 (struct target_ops): New field emit_ops.
13909 (target_emit_ops): New.
13910 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13911 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13912 * linux-low.c (linux_emit_ops): New.
13913 (linux_target_ops): Install it.
13914 * linux-low.h (struct linux_target_ops): New field emit_ops.
13915
92b72907
UW
139162010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13917
13918 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13919 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13920
fa593d66
PA
139212010-06-01 Pedro Alves <pedro@codesourcery.com>
13922 Stan Shebs <stan@codesourcery.com>
13923
13924 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13925 (all): Depend on $(extra_libraries).
13926 (install-only): Install the IPA.
13927 (IPA_OBJS, IPA_LIB): New.
13928 (clean): Remove the IPA lib.
13929 (IPAGENT_CFLAGS): New.
13930 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13931 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13932 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13933 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13934 * configure.ac: Check for atomic builtins support in the compiler.
13935 (IPA_DEPFILES, extra_libraries): Define.
13936 * configure.srv (ipa_obj): Add description.
13937 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13938 (i[34567]86-*-linux*): Set ipa_obj.
13939 (x86_64-*-linux*): Set ipa_obj.
13940 * linux-low.c (stabilizing_threads): New.
13941 (supports_fast_tracepoints): New.
13942 (linux_detach): Stabilize threads before detaching.
13943 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13944 the lwp is either not stabilizing, or is moving out of a jump pad.
13945 (linux_fast_tracepoint_collecting): New.
13946 (maybe_move_out_of_jump_pad): New.
13947 (enqueue_one_deferred_signal): New.
13948 (dequeue_one_deferred_signal): New.
13949 (linux_wait_for_event_1): If moving out of a jump pad, defer
13950 pending signals to later.
13951 (linux_stabilize_threads): New.
13952 (linux_wait_1): Check if threads need moving out of jump pads, and
13953 do it if so.
13954 (stuck_in_jump_pad_callback): New.
13955 (move_out_of_jump_pad_callback): New.
13956 (lwp_running): New.
13957 (linux_resume_one_lwp): Handle moving out of jump pads.
13958 (linux_set_resume_request): Dequeue deferred signals.
13959 (need_step_over_p): Also step over fast tracepoint jumps.
13960 (start_step_over): Also uninsert fast tracepoint jumps.
13961 (finish_step_over): Also reinsert fast tracepoint jumps.
13962 (linux_install_fast_tracepoint_jump): New.
13963 (linux_target_ops): Install linux_stabilize_threads and
13964 linux_install_fast_tracepoint_jump_pad.
13965 * linux-low.h (linux_target_ops) <get_thread_area,
13966 install_fast_tracepoint_jump_pad>: New fields.
13967 (struct lwp_info) <collecting_fast_tracepoint,
13968 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13969 (linux_get_thread_area): Declare.
13970 * linux-x86-low.c (jump_insn): New.
13971 (x86_get_thread_area): New.
13972 (append_insns): New.
13973 (push_opcode): New.
13974 (amd64_install_fast_tracepoint_jump_pad): New.
13975 (i386_install_fast_tracepoint_jump_pad): New.
13976 (x86_install_fast_tracepoint_jump_pad): New.
13977 (the_low_target): Install x86_get_thread_area and
13978 x86_install_fast_tracepoint_jump_pad.
13979 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13980 (struct fast_tracepoint_jump): New.
13981 (fast_tracepoint_jump_insn): New.
13982 (fast_tracepoint_jump_shadow): New.
13983 (find_fast_tracepoint_jump_at): New.
13984 (fast_tracepoint_jump_here): New.
13985 (delete_fast_tracepoint_jump): New.
13986 (set_fast_tracepoint_jump): New.
13987 (uninsert_fast_tracepoint_jumps_at): New.
13988 (reinsert_fast_tracepoint_jumps_at): New.
13989 (set_breakpoint_at): Use write_inferior_memory.
13990 (uninsert_raw_breakpoint): Use write_inferior_memory.
13991 (check_mem_read): Mask out fast tracepoint jumps.
13992 (check_mem_write): Mask out fast tracepoint jumps.
13993 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13994 (set_fast_tracepoint_jump): Declare.
13995 (delete_fast_tracepoint_jump)
13996 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13997 (reinsert_fast_tracepoint_jumps_at): Declare.
13998 * regcache.c: Don't compile many functions when building the
13999 in-process agent library.
14000 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14001 the register buffer in the heap.
14002 (free_register_cache): If the register buffer isn't owned by the
14003 regcache, don't free it.
14004 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14005 pre-existing register caches.
14006 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14007 type.
14008 (convert_ascii_to_int): : Constify `from' parameter type.
14009 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14010 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14011 the needed buffer in-place.
14012 (relocate_instruction): New.
14013 * server.c (handle_query) <qSymbols>: If the target supports
14014 tracepoints, give it a chance of looking up symbols. Report
14015 support for fast tracepoints.
14016 (handle_status): Stabilize threads.
14017 (process_serial_event): Adjust.
14018 * server.h (struct fast_tracepoint_jump): Forward declare.
14019 (struct process_info) <fast_tracepoint_jumps>: New field.
14020 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14021 (decode_X_packet, decode_M_packet): Adjust.
14022 (relocate_instruction): Declare.
14023 (in_process_agent_loaded): Declare.
14024 (tracepoint_look_up_symbols): Declare.
14025 (struct fast_tpoint_collect_status): Declare.
14026 (fast_tracepoint_collecting): Declare.
14027 (force_unlock_trace_buffer): Declare.
14028 (handle_tracepoint_bkpts): Declare.
14029 (initialize_low_tracepoint)
14030 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14031 * target.h (struct target_ops) <stabilize_threads,
14032 install_fast_tracepoint_jump_pad>: New fields.
14033 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14034 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14035 [HAVE_STDINT_H]: Include stdint.h.
14036 (trace_debug_1): Rename to ...
14037 (trace_vdebug): ... this.
14038 (trace_debug): Rename to ...
14039 (trace_debug_1): ... this. Add `level' parameter.
14040 (trace_debug): New.
14041 (ATTR_USED, ATTR_NOINLINE): New.
14042 (IP_AGENT_EXPORT): New.
14043 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14044 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14045 (about_to_request_buffer_space, trace_buffer_is_full)
14046 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14047 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14048 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14049 (traceframe_write_count, traceframes_created)
14050 (trace_state_variables)
14051 New renaming defines.
14052 (struct ipa_sym_addresses): New.
14053 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14054 (symbol_list): New.
14055 (ipa_sym_addrs): New.
14056 (all_tracepoint_symbols_looked_up): New.
14057 (in_process_agent_loaded): New.
14058 (write_e_ipa_not_loaded): New.
14059 (maybe_write_ipa_not_loaded): New.
14060 (tracepoint_look_up_symbols): New.
14061 (debug_threads) [IN_PROCESS_AGENT]: New.
14062 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14063 (UNKNOWN_SIDE_EFFECTS): New.
14064 (stop_tracing): New.
14065 (flush_trace_buffer): New.
14066 (stop_tracing_bkpt): New.
14067 (flush_trace_buffer_bkpt): New.
14068 (read_inferior_integer): New.
14069 (read_inferior_uinteger): New.
14070 (read_inferior_data_pointer): New.
14071 (write_inferior_data_pointer): New.
14072 (write_inferior_integer): New.
14073 (write_inferior_uinteger): New.
14074 (struct collect_static_trace_data_action): Delete.
14075 (enum tracepoint_type): New.
14076 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
14077 <actions_str, step_actions, step_actions_str>: Only include in
14078 GDBserver.
fa593d66
PA
14079 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14080 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14081 (tracepoints): Use IP_AGENT_EXPORT.
14082 (last_tracepoint): Don't include in the IPA.
14083 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14084 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14085 (alloced_trace_state_variables): New.
14086 (trace_state_variables): Use IP_AGENT_EXPORT.
14087 (traceframe_t): Delete unused variable.
14088 (circular_trace_buffer): Don't include in the IPA.
14089 (trace_buffer_start): Delete.
14090 (struct trace_buffer_control): New.
14091 (trace_buffer_free): Delete.
14092 (struct ipa_trace_buffer_control): New.
14093 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14094 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14095 New.
14096 (trace_buffer_ctrl): New.
14097 (TRACE_BUFFER_CTRL_CURR): New.
14098 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14099 Reimplement as macros.
14100 (trace_buffer_wrap): Delete.
14101 (traceframe_write_count, traceframe_read_count)
14102 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14103 (struct tracepoint_hit_ctx) <type>: New field.
14104 (struct fast_tracepoint_ctx): New.
14105 (memory_barrier): New.
14106 (cmpxchg): New.
14107 (record_tracepoint_error): Update atomically in the IPA.
14108 (clear_inferior_trace_buffer): New.
14109 (about_to_request_buffer_space): New.
14110 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14111 updating the same buffer.
14112 (add_tracepoint): Default the tracepoint's type to trap
14113 tracepoint, and orig_size to -1.
14114 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14115 internal variables.
14116 (create_trace_state_variable): New parameter `gdb'. Handle it.
14117 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14118 (cmd_qtdp): Handle fast tracepoints.
14119 (cmd_qtdv): Adjust.
14120 (max_jump_pad_size): New.
14121 (gdb_jump_pad_head): New.
14122 (get_jump_space_head): New.
14123 (claim_jump_space): New.
14124 (sort_tracepoints): New.
14125 (MAX_JUMP_SIZE): New.
14126 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14127 IPA.
14128 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14129 support. Upload fast traceframes, and delete internal IPA
14130 breakpoints.
14131 (stop_tracing_handler): New.
14132 (flush_trace_buffer_handler): New.
14133 (cmd_qtstop): Upload fast tracepoints.
14134 (response_tracepoint): Handle fast tracepoints.
14135 (tracepoint_finished_step): Upload fast traceframes. Set the
14136 tracepoint hit context's tracepoint type.
14137 (handle_tracepoint_bkpts): New.
14138 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14139 type. Add comment about fast tracepoints.
14140 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14141 non-existing action_str field.
14142 (get_context_regcache): Handle fast tracepoints.
14143 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14144 to the regcache.
14145 (fast_tracepoint_from_jump_pad_address): New.
14146 (fast_tracepoint_from_ipa_tpoint_address): New.
14147 (collecting_t): New.
14148 (force_unlock_trace_buffer): New.
14149 (fast_tracepoint_collecting): New.
14150 (collecting): New.
14151 (gdb_collect): New.
14152 (write_inferior_data_ptr): New.
14153 (target_tp_heap): New.
14154 (target_malloc): New.
14155 (download_agent_expr): New.
14156 (UALIGN): New.
14157 (download_tracepoints): New.
14158 (download_trace_state_variables): New.
14159 (upload_fast_traceframes): New.
14160 (IPA_FIRST_TRACEFRAME): New.
14161 (IPA_NEXT_TRACEFRAME_1): New.
14162 (IPA_NEXT_TRACEFRAME): New.
14163 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14164 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14165 (gdb_jump_pad_buffer_end): New.
14166 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14167 (initialize_tracepoint): Adjust.
14168 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14169 buffer. Initialize the low module.
14170 * utils.c (PREFIX, TOOLNAME): New.
14171 (malloc_failure): Use PREFIX.
14172 (error): In the IPA, an error causes an exit.
14173 (fatal, warning): Use PREFIX.
14174 (internal_error): Use TOOLNAME.
14175 (NUMCELLS): Increase to 10.
14176 * configure, config.in: Regenerate.
14177
d149dd1d
PA
141782010-06-01 Pedro Alves <pedro@codesourcery.com>
14179
14180 * server.c (handle_query) <qSupported>: Do two passes over the
14181 qSupported string to avoid nesting strtok.
14182
f6528abd
JK
141832010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14184
14185 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14186 (CDEPS): New.
14187 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14188 -Wl,--dynamic-list.
14189 * configure: Regenerate.
14190 * proc-service.list: New.
14191
ca2a87a0
JK
141922010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14193
14194 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14195 New comment.
14196
363a6e9f
OS
141972010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14198
14199 * gdbreplay.c (remote_open): Check error return from socket() call by
14200 its equality to -1 not by it being negative.
14201 * remote-utils.c (remote_open): Likewise.
14202
d23b6cb1
PA
142032010-05-23 Pedro Alves <pedro@codesourcery.com>
14204
14205 * config.h: Regenerate.
14206
28d3cf85
MK
142072010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14208
14209 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14210 doesn't provide PTRACE_GET_THREAD_AREA.
14211
fea36a59
MK
142122010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14213
14214 * linux-m68k-low.c: Include <asm/ptrace.h>
14215 (ps_get_thread_area): Implement.
14216
24b066ba
DE
142172010-05-03 Doug Evans <dje@google.com>
14218
14219 * event-loop.c (struct callback_event): New struct.
14220 (callback_list): New global.
14221 (append_callback_event, delete_callback_event): New functions.
14222 (process_callback): New function.
14223 (start_event_loop): Call it.
14224 * remote-utils.c (NOT_SCHEDULED): Define.
14225 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14226 moved out of readchar.
14227 (readchar): Rewrite. Call reschedule before returning.
14228 (reset_readchar): New function.
14229 (remote_close): Call it.
14230 (process_remaining, reschedule): New functions.
14231 * server.h (callback_handler_func): New typedef.
14232 (append_callback_event, delete_callback_event): Declare.
14233
9836d6ea
PA
142342010-05-03 Pedro Alves <pedro@codesourcery.com>
14235
14236 * proc-service.c (ps_pglobal_lookup): Use
14237 thread_db_look_up_one_symbol.
14238 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14239 parameter. Use it instead of all_symbols_looked_up.
14240 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14241 field.
14242 (all_symbols_looked_up): Don't declare.
14243 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14244 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14245 field.
14246 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14247 Set all_symbols_looked_up here.
14248 (thread_db_look_up_one_symbol): New.
14249 (thread_db_get_tls_address): Adjust.
14250 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14251 thread_db object on the heap, and tentatively set it in the
14252 process structure.
14253 (thread_db_init): Don't set all_symbols_looked_up here.
14254 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14255
7984d532
PA
142562010-05-03 Pedro Alves <pedro@codesourcery.com>
14257
14258 * linux-low.c (linux_kill, linux_detach): Adjust.
14259 (status_pending_p_callback): Remove redundant statement. Check
14260 for !TARGET_WAITIKIND_IGNORE, instead of
14261 TARGET_WAITKIND_STOPPED.
14262 (handle_tracepoints): Make sure LWP is locked. Adjust.
14263 (linux_wait_for_event_1): Adjust.
14264 (linux_cancel_breakpoints): New.
14265 (unsuspend_one_lwp): New.
14266 (unsuspend_all_lwps): New.
14267 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14268 (send_sigstop_callback): Change return type to int, add new
14269 `except' parameter and handle it.
14270 (suspend_and_send_sigstop_callback): New.
14271 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14272 pass them down. If SUSPEND, also increment the lwp's suspend
14273 count.
14274 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14275 (need_step_over_p): Don't consider suspended LWPs.
14276 (start_step_over): Adjust.
14277 (proceed_one_lwp): Change return type to int, add new `except'
14278 parameter and handle it.
14279 (unsuspend_and_proceed_one_lwp): New.
14280 (proceed_all_lwps): Use find_inferior instead of
14281 for_each_inferior.
14282 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14283 also decrement the suspend count of LWPs. Pass `except' down,
14284 instead of hacking its suspend count.
14285 (linux_pause_all): Add `freeze' parameter. Adjust.
14286 (linux_unpause_all): New.
14287 (linux_target_ops): Install linux_unpause_all.
14288 * server.c (handle_status): Adjust.
14289 * target.h (struct target_ops): New fields `unpause_all' and
14290 `cancel_breakpoints'. Add new parameter to `pause_all'.
14291 (pause_all): Add new `freeze' parameter.
14292 (unpause_all): New.
14293 (cancel_breakpoints): New.
14294 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14295 cancel breakpoints.
14296 (cmd_qtstart): Pause threads.
14297 (stop_tracing): Pause threads, and cancel breakpoints.
14298 * win32-low.c (win32_target_ops): Adjust.
14299
e471f25b
PA
143002010-05-03 Pedro Alves <pedro@codesourcery.com>
14301
14302 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14303 the inferior right away from here...
14304 (linux_wait_1): ... to here, and adjust to check the thread's
14305 last_resume_kind instead of the lwp's step or stop_expected flags.
14306
1915ef4f
PA
143072010-05-02 Pedro Alves <pedro@codesourcery.com>
14308
14309 * README: Use consistent `GDB' and `GDBserver' spellings.
14310
f9e39928
PA
143112010-05-02 Pedro Alves <pedro@codesourcery.com>
14312
14313 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14314 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14315 (linux_detach_one_lwp): Assume the lwp is stopped.
14316 (any_thread_of): Delete.
14317 (linux_detach): Stop all lwps here. Don't blindly delete all
14318 breakpoints.
14319 (delete_lwp_callback): New.
14320 (linux_mourn): Delete all lwps of the process that is gone.
14321 (linux_wait_1): Don't delete the last lwp of the process here.
14322 * mem-break.h (mark_breakpoints_out): Declare.
14323 * mem-break.c (mark_breakpoints_out): New.
14324 (free_all_breakpoints): Use it.
14325 * server.c (handle_target_event): If the process is gone, mark
14326 breakpoints out.
14327 * thread-db.c (struct thread_db) <create_bp>: New field.
14328 (thread_db_enable_reporting): Fix prototype. Store a thread event
14329 breakpoint reference in the thread_db struct.
14330 (thread_db_load_search): Clear the thread_db object.
14331 (try_thread_db_load_1): Ditto.
14332 (switch_to_process): New.
14333 (disable_thread_event_reporting): Use it.
14334 (remove_thread_event_breakpoints): New.
14335 (thread_db_detach, thread_db_mourn): Use it.
14336
1e7fc18c
PA
143372010-05-01 Pedro Alves <pedro@codesourcery.com>
14338
14339 * linux-low.c (linux_enable_event_reporting): New.
14340 (linux_wait_for_event_1, handle_extended_wait): Use it.
14341
02fc4de7
PA
143422010-04-30 Pedro Alves <pedro@codesourcery.com>
14343
14344 * linux-low.c (linux_kill_one_lwp, linux_kill)
14345 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14346 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14347 SIGSTOP even if the LWP is stopped.
14348 (send_sigstop_callback): New.
14349 (stop_all_lwps): Use send_sigstop_callback instead.
14350 (linux_resume_one_thread): Adjust.
14351 (proceed_one_lwp): Still proceed an LWP that the client has
14352 requested to stop, if we haven't reported it as stopped yet. Make
14353 sure that LWPs the client want stopped, have a pending SIGSTOP.
14354
bc3b5632
DE
143552010-04-26 Doug Evans <dje@google.com>
14356
ae1ada35
DE
14357 * server.c (handle_general_set): Make static.
14358
bc3b5632
DE
14359 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14360 Print received char after testing for error/eof instead of before.
14361 (input_interrupt): Tweak comment.
14362
65730243
DE
143632010-04-23 Doug Evans <dje@google.com>
14364
14365 * server.c (start_inferior): Print inferior argv if --debug.
14366
a8ae7dc0
AR
143672010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14368
14369 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14370 * nto-x86-low.c: Include server.h
14371
1c07cc19
PM
143722010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14373
14374 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14375 be consistent with other sources of this directory.
14376 (init_registers_amd64): Correct name of source file of this function
14377 in the comment.
14378
e0a61e09
PM
143792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14380
14381 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14382 64-bit executables.
14383
54709339
PM
143842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14385
14386 * win32-i386-low.c: Add 64-bit support.
14387 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14388 (init_registers_amd64): Declare.
14389 (mappings): Add 64-bit version of array.
14390 (init_windows_x86): New function.
14391 (the_low_target): Change init_arch field to init_windows_x86.
14392
e8f0053d
PM
143932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14394
14395 * win32-low.c: Adapt to support also 64-bit architecture.
14396 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14397 (get_image_name): Use SIZE_T type for local variable `done'.
14398 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14399 (toolhelp_get_dll_name): Idem.
14400 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14401 Use uintptr_t typecast to avoid warning.
14402 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14403 (handle_exception): Use phex_nz to avoid warning.
14404 (win32_wait): Remove unused local variable `process'.
14405
c481e77e
PM
144062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14407
14408 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14409 `amd64-avx.o'.
14410
12ea4b69
PM
144112010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14412
14413 * configure.ac: Use `ws2_32' library for srv_mingw.
14414 * configure: Regenerate.
14415 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14416 * remote-utils.c: Likewise.
14417
f6d1620c
L
144182010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14419
14420 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14421 if __x86_64__ is defined.
14422
8e642873
PM
144232010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14424
14425 * configure: Regenerate.
14426
711e434b
PM
144272010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14428
14429 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14430 * target.h (target_ops): New get_tib_address field.
14431 * win32-low.h (win32_thread_info): Add thread_local_base field.
14432 * win32-low.c (child_add_thread): Add tlb argument.
14433 Set thread_local_base field to TLB.
14434 (get_child_debug_event): Adapt to child_add_thread change.
14435 (win32_get_tib_address): New function.
14436 (win32_target_ops): Set get_tib_address field to
14437 win32_get_tib_address.
14438 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14439
505106cd
PA
144402010-04-12 Pedro Alves <pedro@codesourcery.com>
14441
505106cd
PA
14442 * linux-low.c (linux_mourn): Also remove the process.
14443 * server.c (handle_target_event): Don't remove the process here.
14444 * nto-low.c (nto_mourn): New.
14445 (nto_target_ops): Install it.
14446 * spu-low.c (spu_mourn): New.
14447 (spu_target_ops): Install it.
14448 * win32-low.c (win32_mourn): New.
14449 (win32_target_ops): Install it.
14450
e8470a06
PA
144512010-04-12 Pedro Alves <pedro@codesourcery.com>
14452
14453 * server.h (buffer_xml_printf): Remove redundant `;'.
14454
45ba0d02
PA
144552010-04-12 Pedro Alves <pedro@codesourcery.com>
14456
14457 * regcache.c (set_register_cache): Invalidate regcaches before
14458 changing the register cache layout.
14459 (regcache_invalidate_one): Allow a NULL regcache.
14460 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14461 regcaches before changing the register cache layout or the target
14462 regsets.
14463
59e04013
L
144642010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14465
14466 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14467 variable warning on Linux/x86-64.
14468
8336d594
PA
144692010-04-11 Pedro Alves <pedro@codesourcery.com>
14470
14471 GDBserver disconnected tracing support.
14472
14473 * linux-low.c (linux_remove_process): Delete.
14474 (add_lwp): Don't set last_resume_kind here.
14475 (linux_kill): Use `mourn'.
14476 (linux_detach): Use `thread_db_detach', and `mourn'.
14477 (linux_mourn): New.
14478 (linux_attach_lwp_1): Adjust comment.
14479 (linux_attach): last_resume_kind moved the thread_info; adjust.
14480 (status_pending_p_callback): Adjust.
14481 (linux_wait_for_event_1): Adjust.
14482 (count_events_callback, select_singlestep_lwp_callback)
14483 (select_event_lwp_callback, cancel_breakpoints_callback)
14484 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14485 (proceed_one_lwp): Adjust.
14486 (linux_async): Add debug output.
14487 (linux_thread_stopped): New.
14488 (linux_pause_all): New.
14489 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14490 linux_pause_all.
14491 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14492 (thread_db_free): Delete declaration.
14493 (thread_db_detach, thread_db_mourn): Declare.
14494 * thread-db.c (thread_db_init): Use thread_db_mourn.
14495 (thread_db_free): Delete, split in two.
14496 (disable_thread_event_reporting): New.
14497 (thread_db_detach): New.
14498 (thread_db_mourn): New.
14499
14500 * server.h (struct thread_info) <last_resume_kind>: New field.
14501 <attached>: Add comment.
14502 <gdb_detached>: New field.
14503 (handler_func): Change return type to int.
14504 (handle_serial_event, handle_target_event): Ditto.
14505 (gdb_connected): Declare.
14506 (tracing): Delete.
14507 (disconnected_tracing): Declare.
14508 (stop_tracing): Declare.
14509
14510 * server.c (handle_query) <qSupported>: Report support for
14511 disconnected tracing.
14512 (queue_stop_reply_callback): Account for running threads.
14513 (gdb_wants_thread_stopped): New.
14514 (gdb_wants_all_threads_stopped): New.
14515 (gdb_reattached_process): New.
14516 (handle_status): Clear the `gdb_detached' flag of all processes.
14517 In all-stop, stop all threads.
14518 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14519 (process_serial_event): If the remote connection breaks, or if an
14520 exit was forced with "monitor exit", force an event loop exit.
14521 Handle disconnected tracing on detach.
14522 (handle_serial_event): Adjust.
14523 (handle_target_event): If GDB isn't connected, forward events back
14524 to the inferior, unless the last process exited, in which case,
14525 exit gdbserver. Adjust interface.
14526
14527 * remote-utils.c (remote_open): Don't block in accept. Instead
14528 register an event loop source on the listen socket file
14529 descriptor. Refactor bits into ...
14530 (listen_desc): ... this new global.
14531 (gdb_connected): ... this new function.
14532 (enable_async_notification): ... this new function.
14533 (handle_accept_event): ... this new function.
14534 (remote_close): Clear remote_desc.
14535
14536 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14537
14538 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14539 New fields.
14540 (mourn_inferior): Define.
14541 (target_process_qsupported): Avoid the dangling else problem.
14542 (thread_stopped): Define.
14543 (pause_all): Define.
14544 (target_waitstatus_to_string): Declare.
14545 * target.c (target_waitstatus_to_string): New.
14546
14547 * tracepoint.c (tracing): Make extern.
14548 (disconnected_tracing): New.
14549 (stop_tracing): Make extern. Handle tracing stops due to GDB
14550 disconnecting.
14551 (cmd_qtdisconnected): New.
14552 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14553 (handle_tracepoint_general_set): Handle QTDisconnected.
14554
14555 * event-loop.c (event_handler_func): Change return type to int.
14556 (process_event): Bail out if the event handler wants the event
14557 loop to stop.
14558 (handle_file_event): Ditto.
14559 (start_event_loop): Bail out if the event handler wants the event
14560 loop to stop.
14561
14562 * nto-low.c (nto_target_ops): Adjust.
14563 * spu-low.c (spu_wait): Don't remove the process here.
14564 (spu_target_ops): Adjust.
14565 * win32-low.c (win32_wait): Don't remove the process here.
14566 (win32_target_ops): Adjust.
14567
5d267c4c
PA
145682010-04-11 Pedro Alves <pedro@codesourcery.com>
14569
14570 * regcache.c (realloc_register_cache): Invalidate inferior's
14571 regcache before recreating it.
14572
623ccd72
PA
145732010-04-09 Pedro Alves <pedro@codesourcery.com>
14574
14575 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14576
219f2f23
PA
145772010-04-09 Stan Shebs <stan@codesourcery.com>
14578 Pedro Alves <pedro@codesourcery.com>
14579
14580 * server.h (LONGEST): New.
14581 (struct thread_info) <while_stepping>: New field.
14582 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14583 Declare.
14584 (initialize_tracepoint, handle_tracepoint_general_set)
14585 (handle_tracepoint_query, tracepoint_finished_step)
14586 (tracepoint_was_hit, release_while_stepping_state_list):
14587 (current_traceframe): Declare.
14588 * server.c (handle_general_set): Handle tracepoint packets.
14589 (read_memory): New.
14590 (write_memory): New.
14591 (handle_search_memory_1): Use read_memory.
14592 (handle_query): Report support for conditional tracepoints, trace
14593 state variables, and tracepoint sources. Handle tracepoint
14594 queries.
14595 (main): Initialize the tracepoints module.
14596 (process_serial_event): Handle traceframe reads/writes.
14597
14598 * linux-low.c (handle_tracepoints): New.
14599 (linux_wait_1): Call it.
14600 (linux_resume_one_lwp): Handle while-stepping.
14601 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14602 (linux_target_ops): Install them.
14603 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14604 New field.
14605 * linux-x86-low.c (x86_supports_tracepoints): New.
14606 (the_low_target). Install it.
14607
14608 * mem-break.h (delete_breakpoint): Declare.
14609 * mem-break.c (delete_breakpoint): Make external.
14610
14611 * target.h (struct target_ops): Add `supports_tracepoints',
14612 `read_pc', and `write_pc' fields.
14613 (target_supports_tracepoints): Define.
14614 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14615 (phex_nz): New.
14616
14617 * regcache.h (struct regcache) <registers_owned>: New field.
14618 (init_register_cache, regcache_cpy): Declare.
14619 (regcache_read_pc, regcache_write_pc): Declare.
14620 (register_cache_size): Declare.
14621 (supply_regblock): Declare.
14622 * regcache.c (init_register_cache): New.
14623 (new_register_cache): Use it.
14624 (regcache_cpy): New.
14625 (register_cache_size): New.
14626 (supply_regblock): New.
14627 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 14628
219f2f23
PA
14629 * tracepoint.c: New.
14630
14631 * Makefile.in (OBS): Add tracepoint.o.
14632 (tracepoint.o): New rule.
14633
3a13a53b
L
146342010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14635
14636 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14637 (i386-mmx.o): New.
14638 (i386-mmx.c): Likewise.
14639 (i386-mmx-linux.o): Likewise.
14640 (i386-mmx-linux.c): Likewise.
14641
14642 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14643 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14644 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14645 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14646
14647 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14648 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14649 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14650
1570b33e
L
146512010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14652
14653 * Makefile.in (clean): Updated.
14654 (i386-avx.o): New.
14655 (i386-avx.c): Likewise.
14656 (i386-avx-linux.o): Likewise.
14657 (i386-avx-linux.c): Likewise.
14658 (amd64-avx.o): Likewise.
14659 (amd64-avx.c): Likewise.
14660 (amd64-avx-linux.o): Likewise.
14661 (amd64-avx-linux.c): Likewise.
14662
14663 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14664 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14665 (srv_amd64_regobj): Add amd64-avx.o.
14666 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14667 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14668 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14669 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14670 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14671 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14672 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14673
14674 * i387-fp.c: Include "i386-xstate.h".
14675 (i387_xsave): New.
14676 (i387_cache_to_xsave): Likewise.
14677 (i387_xsave_to_cache): Likewise.
14678 (x86_xcr0): Likewise.
14679
14680 * i387-fp.h (i387_cache_to_xsave): Likewise.
14681 (i387_xsave_to_cache): Likewise.
14682 (x86_xcr0): Likewise.
14683
14684 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14685 * linux-crisv32-low.c (target_regsets): Likewise.
14686 * linux-m68k-low.c (target_regsets): Likewise.
14687 * linux-mips-low.c (target_regsets): Likewise.
14688 * linux-ppc-low.c (target_regsets): Likewise.
14689 * linux-s390-low.c (target_regsets): Likewise.
14690 * linux-sh-low.c (target_regsets): Likewise.
14691 * linux-sparc-low.c (target_regsets): Likewise.
14692 * linux-xtensa-low.c (target_regsets): Likewise.
14693
14694 * linux-low.c: Include <sys/uio.h>.
14695 (regsets_fetch_inferior_registers): Support nt_type.
14696 (regsets_store_inferior_registers): Likewise.
14697 (linux_process_qsupported): New.
14698 (linux_target_ops): Add linux_process_qsupported.
14699
14700 * linux-low.h (regset_info): Add nt_type.
14701 (linux_target_ops): Add process_qsupported.
14702
14703 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14704 and <sys/uio.h>.
14705 (init_registers_i386_avx_linux): New.
14706 (init_registers_amd64_avx_linux): Likewise.
14707 (xmltarget_i386_linux_no_xml): Likewise.
14708 (xmltarget_amd64_linux_no_xml): Likewise.
14709 (PTRACE_GETREGSET): Likewise.
14710 (PTRACE_SETREGSET): Likewise.
14711 (x86_fill_xstateregset): Likewise.
14712 (x86_store_xstateregset): Likewise.
14713 (use_xml): Likewise.
14714 (x86_linux_update_xmltarget): Likewise.
14715 (x86_linux_process_qsupported): Likewise.
14716 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14717 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14718 init_registers_i386_linux here. Call
14719 x86_linux_update_xmltarget.
14720 (the_low_target): Add x86_linux_process_qsupported.
14721
14722 * server.c (handle_query): Call target_process_qsupported.
14723
14724 * target.h (target_ops): Add process_qsupported.
14725 (target_process_qsupported): New.
14726
fc7238bb
PA
147272010-04-03 Pedro Alves <pedro@codesourcery.com>
14728
14729 * inferiors.c (add_thread): Set last_status kind to
14730 TARGET_WAITKIND_IGNORE.
14731 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14732 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14733 (linux_wait_1): Move `thread' local definition to block that uses
14734 it. Don't NULL initialize `event_child'.
14735 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14736 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14737 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14738
bdabb078
PA
147392010-04-01 Pedro Alves <pedro@codesourcery.com>
14740
14741 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14742 an extended waitstatus, or by a watchpoint.
14743 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14744 thread was stepping or has been stopped by a watchpoint.
14745
d3bbe7a0
PA
147462010-04-01 Pedro Alves <pedro@codesourcery.com>
14747
14748 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14749 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14750 of another, then delete the previous, and validate all
14751 breakpoints.
14752 (validate_inserted_breakpoint): New.
14753 (delete_disabled_breakpoints): New.
14754 (validate_breakpoints): New.
14755 (check_mem_read): Validate breakpoints before trusting their
14756 shadow. Delete disabled breakpoints.
14757 (check_mem_write): Validate breakpoints before trusting they
14758 should be inserted. Delete disabled breakpoints.
14759 * mem-break.h (validate_breakpoints):
14760 * server.c (handle_query): Validate breakpoints when we see a
14761 qSymbol query.
14762
8b07ae33
PA
147632010-04-01 Pedro Alves <pedro@codesourcery.com>
14764
14765 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14766 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14767 if we could tell there's a GDB breakpoint at stop_pc.
14768 (need_step_over_p): Don't do a step over if we find a GDB
14769 breakpoint at the resume PC.
14770
14771 * mem-break.c (struct raw_breakpoint): New.
14772 (enum bkpt_type): New type `gdb_breakpoint'.
14773 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14774 fields. New field `raw'.
14775 (find_raw_breakpoint_at): New.
14776 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14777 breakpoint instead.
14778 (set_breakpoint_at): Adjust.
14779 (delete_raw_breakpoint): New.
14780 (release_breakpoint): New.
14781 (delete_breakpoint): Rename to...
14782 (delete_breakpoint_1): ... this. Add proc parameter. Use
14783 release_breakpoint. Return ENOENT.
14784 (delete_breakpoint): Reimplement.
14785 (find_breakpoint_at): Delete.
14786 (find_gdb_breakpoint_at): New.
14787 (delete_breakpoint_at): Delete.
14788 (set_gdb_breakpoint_at): New.
14789 (delete_gdb_breakpoint_at): New.
14790 (gdb_breakpoint_here): New.
14791 (set_reinsert_breakpoint): Use release_breakpoint.
14792 (uninsert_breakpoint): Rename to ...
14793 (uninsert_raw_breakpoint): ... this.
14794 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14795 (reinsert_raw_breakpoint): Change parameter type to
14796 raw_breakpoint.
14797 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14798 instead.
14799 (check_breakpoints): Adjust. Use release_breakpoint.
14800 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14801 (breakpoint_inserted_here): Ditto.
14802 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14803 Don't trust the breakpoint's shadow if it is not inserted.
14804 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14805 (delete_all_breakpoints): Adjust.
14806 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14807 use delete_breakpoint_1.
14808
14809 * mem-break.h (breakpoints_supported): Delete declaration.
14810 (set_gdb_breakpoint_at): Declare.
14811 (gdb_breakpoint_here): Declare.
14812 (delete_breakpoint_at): Delete.
14813 (delete_gdb_breakpoint_at): Declare.
14814
14815 * server.h (struct raw_breakpoint): Forward declare.
14816 (struct process_info): New field `raw_breakpoints'.
14817
14818 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14819 breakpoints.
14820
6bf5e0ba
PA
148212010-03-24 Pedro Alves <pedro@codesourcery.com>
14822
14823 * linux-low.c (status_pending_p_callback): Fix comment.
14824 (linux_wait_for_event_1): Move most of the internal breakpoint
14825 handling from here...
14826 (linux_wait_1): ... to here.
14827 (count_events_callback): New.
14828 (select_singlestep_lwp_callback): New.
14829 (select_event_lwp_callback): New.
14830 (cancel_breakpoints_callback): New.
14831 (select_event_lwp): New.
14832 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14833 priority to all LWPs that have had events that should be reported
14834 to the client. Cancel breakpoints when about to reporting the
14835 event to the client, not while stopping lwps. No longer cancel
14836 finished single-steps here.
14837 (cancel_finished_single_step): Delete.
14838 (cancel_finished_single_steps): Delete.
14839
414a389f
PA
148402010-03-24 Pedro Alves <pedro@codesourcery.com>
14841
14842 * mem-break.c (enum bkpt_type): New.
14843 (struct breakpoint): New field `type'.
14844 (set_breakpoint_at): Change return type to struct breakpoint
14845 pointer. Set type to `other_breakpoint' by default.
14846 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14847 in the breakpoint list.
14848 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14849 (reinsert_breakpoint): Rename to ...
14850 (reinsert_raw_breakpoint): ... this.
14851 (reinsert_breakpoints_at): Adjust.
14852 * mem-break.h (struct breakpoint): Declare.
14853 (set_breakpoint_at): Change return type to struct breakpoint
14854 pointer.
14855
2280c721
PA
148562010-03-24 Pedro Alves <pedro@codesourcery.com>
14857
14858 * server.c (handle_query): Assign, not compare.
14859
d50171e4
PA
148602010-03-24 Pedro Alves <pedro@codesourcery.com>
14861
14862 Teach linux gdbserver to step-over-breakpoints.
14863
14864 * linux-low.c (can_hardware_single_step): New.
14865 (supports_breakpoints): New.
14866 (handle_extended_wait): If stopping threads, read the stop pc of
14867 the new cloned LWP.
14868 (get_pc): New.
14869 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14870 low target doesn't support retrieving the PC.
14871 (add_lwp): Set last_resume_kind to resume_continue.
14872 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14873 (linux_attach): Don't clear stop_expected. Set the lwp's
14874 last_resume_kind to resume_stop.
14875 (linux_detach_one_lwp): Don't check for removed breakpoints.
14876 (check_removed_breakpoint): Delete.
14877 (status_pending_p): Rename to ...
14878 (status_pending_p_callback): ... this. Don't check for removed
14879 breakpoints. Don't consider threads that are stopped from GDB's
14880 perspective.
14881 (linux_wait_for_lwp): Always read the stop_pc here.
14882 (cancel_breakpoint): New.
14883 (step_over_bkpt): New global.
14884 (linux_wait_for_event_1): Implement stepping over breakpoints.
14885 (gdb_wants_lwp_stopped): New.
14886 (gdb_wants_all_stopped): New.
14887 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14888 single-step traps here. Store the thread's last reported target
14889 wait status.
14890 (send_sigstop): Don't clear stop_expected. Always set it,
14891 instead.
14892 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14893 (cancel_finished_single_step): New.
14894 (cancel_finished_single_steps): New.
14895 (wait_for_sigstop): Don't cancel finished single-step traps here.
14896 (linux_resume_one_lwp): Don't check for removed breakpoints.
14897 Don't set `step' on non-hardware step archs.
14898 (linux_set_resume_request): Ignore resume_stop requests if already
14899 stopping or stopped. Set the lwp's last_resume_kind.
14900 (resume_status_pending_p): Don't check for removed breakpoints.
14901 (need_step_over_p): New.
14902 (start_step_over): New.
14903 (finish_step_over): New.
14904 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14905 requests. Clear the thread's last reported target waitstatus.
14906 Don't use the `suspended' flag. Don't consider pending breakpoints.
14907 (linux_resume): Start a step-over if necessary.
14908 (proceed_one_lwp): New.
14909 (proceed_all_lwps): New.
14910 (unstop_all_lwps): New.
14911 * linux-low.h (struct lwp_info): Rewrite comment for the
14912 `suspended' flag. Add the `stop_pc' field. Delete the
14913 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14914 Add `'last_resume_kind' and `need_step_over' fields.
14915 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14916 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14917 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14918 (set_raw_breakpoint_at): New.
14919 (set_breakpoint_at): Rewrite to use it.
14920 (reinsert_breakpoint_handler): Delete.
14921 (set_reinsert_breakpoint): New.
14922 (reinsert_breakpoint_by_bp): Delete.
14923 (delete_reinsert_breakpoints): New.
14924 (uninsert_breakpoint): Rewrite.
14925 (uninsert_breakpoints_at): New.
14926 (reinsert_breakpoint): Rewrite.
14927 (reinsert_breakpoints_at): New.
14928 (check_breakpoints): Rewrite.
14929 (breakpoint_here): New.
14930 (breakpoint_inserted_here): New.
14931 (check_mem_read): Adjust.
14932 * mem-break.h (breakpoints_supported, breakpoint_here)
14933 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14934 (reinsert_breakpoint_by_bp): Delete declaration.
14935 (delete_reinsert_breakpoints): Declare.
14936 (reinsert_breakpoint): Delete declaration.
14937 (reinsert_breakpoints_at): Declare.
14938 (uninsert_breakpoint): Delete declaration.
14939 (uninsert_breakpoints_at): Declare.
14940 (check_breakpoints): Adjust prototype.
14941 * server.h: Adjust include order.
14942 (struct thread_info): Declare here. Add a `last_status' field.
14943
30ba68cb
MS
149442010-03-23 Michael Snyder <msnyder@vmware.com>
14945
14946 * server.c (crc32): New function.
14947 (handle_query): Add handling for 'qCRC:' request.
14948
b9a881c2
PA
149492010-03-23 Pedro Alves <pedro@codesourcery.com>
14950
14951 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14952 lwp had been stopped by a watchpoint.
14953
e92d13d5
PA
149542010-03-16 Pedro Alves <pedro@codesourcery.com>
14955
14956 * server.h (internal_error): Declare.
14957 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14958 * utils.c (internal_error): New function.
14959
64daa791
AS
149602010-03-15 Andreas Schwab <schwab@redhat.com>
14961
14962 * configure.srv: Fix typo setting srv_regobj.
14963
f52cd8cd
PA
149642010-03-15 Pedro Alves <pedro@codesourcery.com>
14965
14966 * linux-low.c (fetch_register): Avoid passing a non string literal
14967 format to `error'.
14968 (usr_store_inferior_registers): Ditto.
14969
93ae6fdc
PA
149702010-03-14 Pedro Alves <pedro@codesourcery.com>
14971
14972 * linux-low.c (linux_write_memory): Bail out early if peeking
14973 memory failed.
14974
c3adc08c
PA
149752010-03-14 Pedro Alves <pedro@codesourcery.com>
14976
14977 * linux-low.h (struct lwp_info): New fields
14978 `stopped_by_watchpoint' and `stopped_data_address'.
14979 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14980 here, and cache them in the lwp object.
14981 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14982 directly.
14983 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14984 field.
14985 (linux_stopped_by_watchpoint): Rewrite.
14986 (linux_stopped_data_address): Rewrite.
14987
bce522a2
PA
149882010-03-06 Simo Melenius <simo.melenius@iki.fi>
14989
14990 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14991 switching the current inferior, not before.
14992
90884b2b
L
149932010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14994
14995 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14996 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14997 i386-linux.c and amd64-linux.c.
14998 (reg-i386.o): Removed.
14999 (reg-i386.c): Likewise.
15000 (reg-i386-linux.o): Likewise.
15001 (reg-i386-linux.c): Likewise.
15002 (reg-x86-64.o): Likewise.
15003 (reg-x86-64.c): Likewise.
15004 (reg-x86-64-linux.o): Likewise.
15005 (reg-x86-64-linux.c): Likewise.
15006 (i386.o): New.
15007 (i386.c): Likewise.
15008 (i386-linux.o): Likewise.
15009 (i386-linux.c): Likewise.
15010 (amd64.o): Likewise.
15011 (amd64.c): Likewise.
15012 (amd64-linux.o): Likewise.
15013 (amd64-linux.c): Likewise.
15014
15015 * configure.srv (srv_i386_regobj): New.
15016 (srv_i386_linux_regobj): Likewise.
15017 (srv_amd64_regobj): Likewise.
15018 (srv_amd64_linux_regobj): Likewise.
15019 (srv_i386_32bit_xmlfiles): Likewise.
15020 (srv_i386_64bit_xmlfiles): Likewise.
15021 (srv_i386_xmlfiles): Likewise.
15022 (srv_amd64_xmlfiles): Likewise.
15023 (srv_i386_linux_xmlfiles): Likewise.
15024 (srv_amd64_linux_xmlfiles): Likewise.
15025 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15026 srv_xmlfiles to $srv_i386_xmlfiles.
15027 (i[34567]86-*-mingw32ce*): Likewise.
15028 (i[34567]86-*-mingw*): Likewise.
15029 (i[34567]86-*-nto*): Likewise.
15030 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15031 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15032 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15033 (x86_64-*-linux*): Likewise.
15034
15035 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15036 (init_registers_amd64_linux): New.
15037 (x86_arch_setup): Replace init_registers_x86_64_linux with
15038 init_registers_amd64_linux.
15039
193f13e6
MK
150402010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15041
15042 * configure.ac: Check for libdl. If it is not available link against
15043 static libthread_db.
15044 * configure: Regenerate.
15045
85d721b8
PA
150462010-02-22 Pedro Alves <pedro@codesourcery.com>
15047
15048 PR9605
15049
15050 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15051 handing a read watchpoint.
15052 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15053
6076632b
DE
150542010-02-12 Doug Evans <dje@google.com>
15055
15056 * linux-low.c (linux_supports_tracefork_flag): Document.
15057 (linux_look_up_symbols): Add comment.
15058
3327ccf7
L
150592010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15060
15061 * regcache.c (supply_register): Clear regcache if buf is NULL.
15062
0718675c 150632010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 15064 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
15065
15066 * inferiors.c (find_inferior): Add function documentation.
15067 (unloaded_dll): Handle the case where the unloaded dll has not
15068 been previously registered in the dll list.
15069
177321bd
DJ
150702010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15071
15072 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15073 (thumb2_breakpoint): New.
15074 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15075
2b009048
DJ
150762010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15077
15078 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15079 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15080 breakpoints.
15081
3be029c7
PA
150822010-01-21 Pedro Alves <pedro@codesourcery.com>
15083
15084 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15085
18f5de3b
JK
150862010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15087
15088 * linux-s390-low.c (s390_collect_ptrace_register)
15089 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15090
3743bb4f
DE
150912010-01-21 Doug Evans <dje@google.com>
15092
14ce3065
DE
15093 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15094 (PTRACE_ARG4_TYPE): New macro.
15095 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15096 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15097 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15098 (usr_store_inferior_registers): Ditto.
15099 (linux_read_memory, linux_write_memory): Ditto.
15100 (linux_test_for_tracefork): Ditto.
15101
3743bb4f
DE
15102 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15103 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15104
8b315be5
PA
151052010-01-21 Pedro Alves <pedro@codesourcery.com>
15106
15107 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15108 target.
15109
85492558
PA
151102010-01-21 Pedro Alves <pedro@codesourcery.com>
15111
15112 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15113 prototype to take a regcache. Adjust.
15114
442ea881
PA
151152010-01-20 Pedro Alves <pedro@codesourcery.com>
15116
15117 * regcache.h (struct thread_info): Forward declare.
15118 (struct regcache): New.
15119 (new_register_cache): Adjust prototype.
15120 (get_thread_regcache): Declare.
15121 (free_register_cache): Adjust prototype.
15122 (registers_to_string, registers_from_string): Ditto.
15123 (supply_register, supply_register_by_name, collect_register)
15124 (collect_register_as_string, collect_register_by_name): Ditto.
15125 * regcache.c (struct inferior_regcache_data): Delete.
15126 (get_regcache): Rename to ...
15127 (get_thread_regcache): ... this. Adjust. Switch inferior before
15128 fetching registers.
15129 (regcache_invalidate_one): Adjust.
15130 (regcache_invalidate): Fix prototype.
15131 (new_register_cache): Return the new register cache.
15132 (free_register_cache): Change prototype.
15133 (realloc_register_cache): Adjust.
15134 (registers_to_string): Change prototype to take a regcache. Adjust.
15135 (registers_from_string): Ditto.
15136 (register_data): Ditto.
15137 (supply_register): Ditto.
15138 (supply_register_by_name): Ditto.
15139 (collect_register): Ditto.
15140 (collect_register_as_string): Ditto.
15141 (collect_register_by_name): Ditto.
15142 * server.c (process_serial_event): Adjust.
15143 * linux-low.h (regset_fill_func, regset_store_func): Change
15144 prototype.
15145 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15146 Change prototype.
15147 * linux-low.c (get_stop_pc): Adjust.
15148 (check_removed_breakpoint): Adjust.
15149 (linux_wait_for_event): Adjust.
15150 (linux_resume_one_lwp): Adjust.
15151 (fetch_register): Add regcache parameter. Adjust.
15152 (usr_store_inferior_registers): Ditto.
15153 (regsets_fetch_inferior_registers): Ditto.
15154 (regsets_store_inferior_registers): Ditto.
15155 (linux_fetch_registers, linux_store_registers): Ditto.
15156 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15157 regcache. Adjust.
43aaf8b6
PA
15158 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15159 Ditto.
442ea881
PA
15160 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15161 prototype to take a regcache.
15162 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15163 * remote-utils.c (convert_ascii_to_int, outreg)
15164 (prepare_resume_reply): Change prototype to take a regcache.
15165 Adjust.
15166 * target.h (struct target_ops) <fetch_registers, store_registers>:
15167 Change prototype to take a regcache.
15168 (fetch_inferior_registers, store_inferior_registers): Change
15169 prototype to take a regcache. Adjust.
15170 * proc-service.c (ps_lgetregs): Adjust.
15171 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15172 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15173 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15174 take a regcache. Adjust.
15175 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15176 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15177 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15178 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15179 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15180 (cris_cannot_fetch_register):
15181 (cris_breakpoint_at): Change prototype to take a regcache.
15182 Adjust.
15183 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15184 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15185 to take a regcache. Adjust.
15186 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15187 Adjust.
15188 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15189 take a regcache. Adjust.
15190 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15191 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15192 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15193 * linux-mips-low.c (mips_get_pc):
15194 (mips_set_pc): Change prototype to take a regcache. Adjust.
15195 (mips_reinsert_addr): Adjust.
15196 (mips_collect_register): Change prototype to take a regcache.
15197 Adjust.
15198 (mips_supply_register):
15199 (mips_collect_register_32bit, mips_supply_register_32bit)
15200 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15201 (mips_store_fpregset): Ditto.
43aaf8b6
PA
15202 * linux-ppc-low.c (ppc_supply_ptrace_register)
15203 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
15204 (parse_spufs_run): Adjust.
15205 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15206 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15207 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15208 take a regcache. Adjust.
15209 * linux-s390-low.c (s390_collect_ptrace_register)
15210 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15211 (s390_set_pc): Change prototype to take a regcache. Adjust.
15212 (s390_arch_setup): Adjust.
15213 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15214 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15215 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15216 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15217 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15218 regcache. Adjust.
15219 (sparc_breakpoint_at): Adjust.
15220 * linux-xtensa-low.c (xtensa_fill_gregset):
15221 (xtensa_store_gregset):
15222 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15223 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15224 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15225 prototype to take a regcache. Adjust.
15226 * win32-arm-low.c (arm_fetch_inferior_register)
15227 (arm_store_inferior_register): Change prototype to take a
15228 regcache. Adjust.
15229 * win32-i386-low.c (i386_fetch_inferior_register)
15230 (i386_store_inferior_register): Change prototype to take a
15231 regcache. Adjust.
15232 * win32-low.c (child_fetch_inferior_registers)
15233 (child_store_inferior_registers): Change prototype to take a
15234 regcache. Adjust.
15235 (win32_wait): Adjust.
15236 (win32_fetch_inferior_registers): Change prototype to take a
15237 regcache. Adjust.
15238 (win32_store_inferior_registers): Adjust.
15239 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15240 store_inferior_register>: Change prototype to take a regcache.
15241
60c3d7b0
DE
152422010-01-20 Doug Evans <dje@google.com>
15243
15244 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15245 #ifdef.
15246 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 15247 (W_STOPCODE): Provide definition if missing.
60c3d7b0 15248
dc146f7c
VP
152492010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15250
15251 * linux-low.c (linux_core_of_thread): New.
15252 (compare_ints, show_process, list_threads): New.
15253 (linux_qxfer_osdata): Report threads and cores.
15254 (linux_target_op): Register linux_core_of_thread.
15255 * remote-utils.c (prepare_resume_reply): Report the core.
15256 (buffer_xml_printf): Support %d specifier.
15257 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15258 New.
15259 (handle_query): Handle qXfer:threads. Announce availability
15260 thereof.
15261 * target.h (struct target_ops): New field core_of_thread.
15262
7803799a
UW
152632010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15264
15265 * Makefile.in (clean): Remove new generated files.
15266 (reg-s390.o, reg-s390.c): Remove rules.
15267 (reg-s390x.o, reg-s390x.c): Likewise.
15268 (s390-linux32.o, s390-linux32.c): Add rules.
15269 (s390-linux64.o, s390-linux64.c): Likewise.
15270 (s390x-linux64.o, s390x-linux64.c): Likewise.
15271 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15272 * linux-s390-low.c: Include <elf.h>.
15273 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15274 (init_registers_s390): Remove prototype.
15275 (init_registers_s390x): Likewise.
15276 (init_registers_s390_linux32): Add prototype.
15277 (init_registers_s390_linux64): Likewise.
15278 (init_registers_s390x_linux64): Likewise.
15279 (s390_num_regs_3264): New define.
15280 (s390_regmap_3264): New global variable.
15281 (s390_cannot_fetch_register): Remove obsolete check.
15282 (s390_cannot_store_register): Likewise.
15283 (s390_collect_ptrace_register): Handle upper/lower register halves.
15284 (s390_supply_ptrace_register): Likewise.
15285 (s390_fill_gregset): Update to register number changes.
15286 (s390_get_hwcap): New routine.
15287 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15288 Install appropriate regmap and register set.
15289
6e7ffa39
JB
152902010-01-01 Joel Brobecker <brobecker@adacore.com>
15291
15292 * server.c (gdbserver_version): Update copyright year to 2010.
15293 * gdbreplay.c (gdbreplay_version): Likewise.
15294
957f3f49
DE
152952009-12-28 Doug Evans <dje@google.com>
15296
15297 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15298 elf/external.h. Include <elf.h> instead but only if necessary.
15299
ca5c370d
PA
153002009-12-28 Pedro Alves <pedro@codesourcery.com>
15301
15302 * linux-low.c (linux_remove_process): Remove `detaching'
15303 parameter. Don't release/detach from thread_db here.
15304 (linux_kill): Release/detach from thread_db here, ...
15305 (linux_detach): ... and here, before actually detaching.
15306 (linux_wait_1): ... and here, when a process exits.
15307 * thread-db.c (any_thread_of): New.
15308 (thread_db_free): Switch the current inferior to a thread of the
15309 passed in process.
15310
4ee62156
DE
153112009-12-21 Doug Evans <dje@google.com>
15312
d90e6a88
DE
15313 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15314
c5f62d5f
DE
15315 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15316 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15317 warning ifndef __NR_tkill. Move setting of errno there too.
15318 Delete unnecessary resetting of errno after syscall.
15319 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15320
10e86dd7
DE
15321 * configure.ac: Check for dladdr.
15322 * config.in: Regenerate.
15323 * configure: Regenerate.
15324 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15325 (try_thread_db_load): Update.
15326
4ee62156
DE
15327 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15328
00f515da
DE
153292009-12-18 Doug Evans <dje@google.com>
15330
e9464885
DE
15331 * event-loop.c: Include unistd.h if it exists.
15332
07d4f67e
DE
15333 * linux-low.c (my_waitpid): Move definition away from being in
15334 between linux_tracefork_child/linux_test_for_tracefork.
15335
00f515da
DE
15336 * gdb_proc_service.h (psaddr_t): Fix type.
15337 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15338 signature to match glibc.
15339
1de1badb
DE
153402009-12-16 Doug Evans <dje@google.com>
15341
15342 * linux-low.c (linux_read_memory): Fix argument to read.
15343
aeeb81d1
PA
153442009-11-26 Pedro Alves <pedro@codesourcery.com>
15345
15346 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15347 events, don't leave current_inferior pointing at null.
15348
10357975
PA
153492009-11-26 Pedro Alves <pedro@codesourcery.com>
15350
15351 * win32-low.c (LOG): Delete.
15352 (OUTMSG): Output to stderr.
15353 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15354 on compile time LOG macro.
15355 (win32_wait): Fix debug output.
15356
cf6e3471
PA
153572009-11-26 Pedro Alves <pedro@codesourcery.com>
15358
15359 * win32-low.c (win32_add_one_solib): If the dll name is
15360 "ntdll.dll", prepend the system directory to the dll path.
15361
0c85e18e
MK
153622009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15365
9ac544ce 153662009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 15367 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
15368
15369 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15370 * configure.ac: Check for __mcoldfire__ and set
15371 gdb_cv_m68k_is_coldfire.
15372 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15373 reg-cf.o and reg-m68k.o.
15374 * configure: Regenerated.
15375
fd7dd3e6
PA
153762009-11-16 Pedro Alves <pedro@codesourcery.com>
15377
15378 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15379 Pass it to thread_db_free.
15380 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15381 proper `detaching' argument to linux_remove_process.
15382 * linux-low.h (thread_db_free): Add `detaching' parameter.
15383 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15384 to thread_db_free.
15385 (thread_db_free): Add `detaching' parameter. Only
15386 call td_ta_clear_event if detaching from process.
15387
75aa492e
MK
153882009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15389
15390 * thread-db.c (thread_db_free): Fix typo.
15391
21e1bee4
PP
153922009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15393
15394 PR gdb/10838
15395 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15396
8838b45e
NS
153972009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15398
15399 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15400 with an i686 compiler.
15401 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15402 needed.
15403 * configure: Rebuilt.
15404
8a35fb51
SL
154052009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15406
15407 PR gdb/10783
15408
15409 * server.c (handle_search_memory_1): Correct read_addr initialization
15410 in loop for searching subsequent chunks.
15411
96f15937
PP
154122009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15413
15414 * configure.ac: New --with-libthread-db option.
15415 * thread-db.c: Allow direct dependence on libthread_db.
15416 (thread_db_free): Adjust.
15417 * config.in: Regenerate.
15418 * configure: Likewise.
889bf7c5 15419
5f7d1694
PP
154202009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15421
15422 PR gdb/10757
15423 * thread-db.c (attach_thread): New function.
15424 (maybe_attach_thread): Return success/failure.
15425 (find_new_threads_callback): Adjust.
889bf7c5
PA
15426 (thread_db_find_new_threads): Loop until no new threads.
15427
88e3b899
PA
154282009-10-13 Pedro Alves <pedro@codesourcery.com>
15429
15430 * proc-service.c (ps_lgetregs): Formatting.
15431
cdbfd419
PP
154322009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15433
15434 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15435 * configure.ac: Adjust.
15436 * linux-low.h (struct process_info_private): Move members to struct
15437 thread_db.
15438 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15439 * linux-low.c (linux_remove_process): Adjust.
15440 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15441 * server.c (handle_query): Move code ...
15442 (handle_monitor_command): ... here. New function.
15443 * target.h (struct target_ops): New member.
15444 * thread-db.c (struct thread_db): New.
15445 (libthread_db_search_path): New variable.
15446 (thread_db_create_event, thread_db_enable_reporting)
15447 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15448 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15449 (try_thread_db_load_1, dladdr_to_soname): New functions.
15450 (try_thread_db_load, thread_db_load_search): New functions.
15451 (thread_db_init): Search for libthread_db.
15452 (thread_db_free): New function.
15453 (thread_db_handle_monitor_command): Likewise.
15454 * config.in: Regenerate.
15455 * configure: Regenerate.
889bf7c5 15456
4168d2d6
UW
154572009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15458
15459 * spu-low.c (spu_kill): Wait for inferior to terminate.
15460 Call clear_inferiors.
15461 (spu_detach): Call clear_inferiors.
15462
81ecdfbb
RW
154632009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15464
15465 * aclocal.m4: Regenerate.
15466 * config.in: Likewise.
15467 * configure: Likewise.
15468
0b9ff2c0
UW
154692009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15470
15471 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15472 (parse_spufs_run): New function.
15473 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15474 (ppc_breakpoint_at): Handle SPU breakpoints.
15475
efcbbd14
UW
154762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15477
15478 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15479 (SPUFS_MAGIC): Define.
15480 (spu_enumerate_spu_ids): New function.
15481 (linux_qxfer_spu): New function.
15482 (linux_target_ops): Install linux_qxfer_spu.
15483
f4d9bade
UW
154842009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15485
15486 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15487 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15488 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15489 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15490 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15491 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15492 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15493 (init_registers_powerpc_cell32l): Add prototype.
15494 (init_registers_powerpc_cell64l): Likewise.
15495 (ppc_arch_setup): Detect Cell/B.E. architecture.
15496
96e946ca
RW
154972009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15498
15499 * Makefile.in (datarootdir): New variable.
15500
58d6951d
DJ
155012009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15502
15503 * linux-low.c (linux_write_memory): Update debugging output.
15504 * Makefile.in (clean): Add new descriptions.
15505 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15506 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15507 * configure.srv: Add new files for arm*-*-linux*.
15508 * linux-arm-low.c: Add new declarations.
15509 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15510 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15511 (HWCAP_VFPv3D16): New.
15512 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15513 instead of __IWMMXT__.
15514 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15515 (arm_arch_setup): New.
15516 (target_regsets): Remove #ifdef. Add VFP regset.
15517 (the_low_target): Use arm_arch_setup.
15518
12b42a12
DJ
155192009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15520
15521 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15522 the main thread again.
15523
ac8c974e
AR
155242009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15525
15526 Adding Neutrino gdbserver.
15527 * configure: Regenerated.
15528 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15529 * configure.srv (i[34567]86-*-nto*): New target.
15530 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15531 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15532 (nto_comctrl) [__QNX__]: New function.
15533 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15534
4424e0c3 155352009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
15536
15537 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15538 srv_tgtobj.
15539
912cf4ba
PA
155402009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15541 Pedro Alves <pedro@codesourcery.com>
15542
15543 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15544 don't support CONTEXT_EXTENDED_REGISTERS.
15545 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15546 (the_low_target): Install them.
15547 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15548 failing with ERROR_PIPE_NOT_CONNECTED.
15549
aa5ca48f
DE
155502009-06-30 Doug Evans <dje@google.com>
15551 Pierre Muller <muller@ics.u-strasbg.fr>
15552
15553 Add h/w watchpoint support to x86-linux, win32-i386.
15554 * Makefile.in (SFILES): Add i386-low.c
15555 (i386_low_h): Define.
15556 (i386-low.o): Add dependencies.
15557 (linux-x86-low.o): Add i386-low.h dependency.
15558 (win32-i386-low.o): Ditto.
15559 * i386-low.c: New file.
15560 * i386-low.h: New file.
15561 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15562 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15563 * linux-low.c (linux_add_process): Initialize arch_private.
15564 (linux_remove_process): Free arch_private.
15565 (add_lwp): Initialize arch_private.
15566 (delete_lwp): Free arch_private.
15567 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15568 provided.
15569 * linux-low.h (process_info_private): New member arch_private.
15570 (lwp_info): New member arch_private.
15571 (linux_target_ops): New members new_process, new_thread,
15572 prepare_to_resume.
15573 (ptid_of): New macro.
15574 * linux-x86-low.c: Include stddef.h, i386-low.h.
15575 (arch_process_info): New struct.
15576 (arch_lwp_info): New struct.
15577 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15578 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15579 (i386_dr_low_get_status): New function.
15580 (x86_insert_point, x86_remove_point): New functions.
15581 (x86_stopped_by_watchpoint): New function.
15582 (x86_stopped_data_address): New function.
15583 (x86_linux_new_process, x86_linux_new_thread): New functions.
15584 (x86_linux_prepare_to_resume): New function.
15585 (the_low_target): Add entries for insert_point, remove_point,
15586 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15587 prepare_to_resume.
15588 * server.c (debug_hw_points): New global.
15589 (monitor_show_help): Document set debug-hw-points.
15590 (handle_query): Process "set debug-hw-points".
15591 * server.h (debug_hw_points): Declare.
15592 (paddress): Declare.
15593 * utils.c (NUMCELLS, CELLSIZE): New macros.
15594 (get_sell, xsnprintf, paddress): New functions.
15595 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15596 remove_point, stopped_by_watchpoint, stopped_data_address.
15597 * win32-i386-low.c: Include i386-low.h.
15598 (debug_reg_state): Replaces dr.
15599 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15600 (i386_dr_low_get_status): New function.
15601 (i386_insert_point, i386_remove_point): New functions.
15602 (i386_stopped_by_watchpoint): New function.
15603 (i386_stopped_data_address): New function.
15604 (i386_initial_stuff): Update.
15605 (get_thread_context,set_thread_context,i386_thread_added): Update.
15606 (the_low_target): Add entries for insert_point,
15607 remove_point, stopped_by_watchpoint, stopped_data_address.
15608 * win32-low.c (win32_insert_watchpoint): New function.
15609 (win32_remove_watchpoint): New function.
15610 (win32_stopped_by_watchpoint): New function.
15611 (win32_stopped_data_address): New function.
15612 (win32_target_ops): Add entries for insert_watchpoint,
15613 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15614 * win32-low.h (win32_target_ops): New members insert_point,
15615 remove_point, stopped_by_watchpoint, stopped_data_address.
15616
d993e290
PA
156172009-06-25 Pedro Alves <pedro@codesourcery.com>
15618
15619 * server.c (process_serial_event): Re-return unsupported, not
15620 error, if the type isn't recognized. Re-allow supporting only
15621 insert or remove packets. Also call require_running for
15622 breakpoints. Add missing break statement to default case. Tidy.
15623 * target.h (struct target_ops): Rename insert_watchpoint to
15624 insert_point, and remove_watchpoint to remove_point.
15625
15626 * linux-low.h (struct linux_target_ops): Likewise.
15627 * linux-low.c (linux_insert_watchpoint): Rename to ...
15628 (linux_insert_point): ... this. Adjust.
15629 (linux_remove_watchpoint): Rename to ...
15630 (linux_remove_point): ... this. Adjust.
15631 (linux_target_ops): Adjust.
15632 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15633 (cris_insert_point): ... this.
15634 (cris_remove_watchpoint): Rename to ...
15635 (cris_remove_point): ... this.
15636 (the_low_target): Adjust.
15637
0f54c268
PM
156382009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15639
15640 * server.c (handle_v_kill): Pass signal_pid to
15641 kill_inferior if multi_process is zero.
15642
c6314022
AR
156432009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15644
15645 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15646 * target.h (target_ops): Comment for *_watchpoint to make it clear
15647 the functions can get types '0' and '1'.
15648
4463ce24
AR
156492009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15650
15651 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15652 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15653 * regcache.c (get_regcache): Likewise.
15654 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15655 * win32-low.c (child_fetch_inferior_registers): Remove check for
15656 regno 0.
15657
cf8fd78b
PA
156582009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15659 Pedro Alves <pedro@codesourcery.com>
15660
15661 * target.h (struct target_ops) <supports_multi_process>: New
15662 callback.
15663 (target_supports_multi_process): New.
15664 * server.c (handle_query): Even if GDB reports support, only
15665 enable multi-process if the target also supports it. Report
15666 multi-process support only if the target backend supports it.
15667 * linux-low.c (linux_supports_multi_process): New function.
15668 (linux_target_ops): Install it as target_supports_multi_process
15669 callback.
15670
47c0c975
DE
156712009-05-24 Doug Evans <dje@google.com>
15672
e09875d4
DE
15673 Global renaming of find_thread_pid to find_thread_ptid.
15674 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15675 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15676 All callers updated.
15677
e27d73f6
DE
15678 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15679 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15680 directly.
15681
47c0c975
DE
15682 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15683 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15684 (linux_resume_one_lwp): Ditto.
15685
2acc282a
DE
156862009-05-23 Doug Evans <dje@google.com>
15687
15688 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15689 from struct inferior_list_entry * to struct lwp_info *.
15690 All callers updated.
15691
9f1036c1
DE
156922009-05-13 Doug Evans <dje@google.com>
15693
15694 * linux-x86-low.c: Don't include assert.h.
15695 (x86_siginfo_fixup): Use fatal, not assert.
15696 (x86_arch_setup): Fix comment.
15697
d0722149
DE
156982009-05-12 Doug Evans <dje@google.com>
15699
15700 Biarch support for i386/amd64 gdbserver.
15701 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15702 Add linux-x86-low.c.
15703 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15704 (linux-x86-low.o): Add.
15705 * linux-x86-64-low.c: Delete.
15706 * linux-i386-low.c: Delete.
15707 * linux-x86-low.c: New file.
15708 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15709 linux-x86-low.o.
15710 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15711 linux-x86-low.o.
15712 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15713 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15714 (linux_child_pid_to_exec_file): New function.
15715 (elf_64_header_p, elf_64_file_p): New functions.
15716 (siginfo_fixup): New function.
15717 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15718 give target a chance to convert layout.
15719 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15720 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15721
fdeb2a12
DE
157222009-05-07 Doug Evans <dje@google.com>
15723
15724 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15725 (regsets_store_inferior_registers): Ditto.
15726
a6dbe5df
PA
157272009-05-06 Pedro Alves <pedro@codesourcery.com>
15728
15729 PR server/10048
15730
15731 * linux-low.c (must_set_ptrace_flags): Delete.
15732 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15733 of the global.
15734 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15735 `lwp->must_set_ptrace_flags' instead.
ba42693b 15736 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15737 (linux_wait_1): ... not here.
15738
5091eb23
DE
157392009-04-30 Doug Evans <dje@google.com>
15740
9f767825
DE
15741 * inferiors.c (started_inferior_callback): New function.
15742 (attached_inferior_callback): New function.
15743 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15744 * server.c (print_started_pid, print_attached_pid): New functions.
15745 (detach_or_kill_for_exit): New function.
15746 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15747 * server.h (have_started_inferiors_p): Declare.
15748 (have_attached_inferiors_p): Declare.
15749
5091eb23
DE
15750 * inferiors.c (remove_process): Fix memory leak, free process.
15751 * linux-low.c (linux_remove_process): New function.
15752 (linux_kill): Call it instead of remove_process.
15753 (linux_detach, linux_wait_1): Ditto.
15754
155c8968
PA
157552009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15756
15757 * configure.srv: Add x86 Windows CE target.
15758
7fe519cb
UW
157592009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15760
15761 * inferiors.c (get_thread_process): Make global.
15762 * server.h (get_thread_process): Add prototype.
15763 * thread-db.c (find_one_thread): Use get_thread_process
15764 instead of current_process.
15765 (thread_db_get_tls_address): Do not crash if called when
15766 thread layer is not yet initialized.
15767
5472f405
UW
157682009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15769
15770 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15771 * spu-low.c (current_tid): Rename to ...
15772 (current_ptid): ... this.
15773 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15774 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15775 ptid_get_lwp (current_ptid) instead of current_tid.
15776 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15777 instead of current_tid. Use find_process_pid to verify pid
15778 argument is valid. Pass proper argument to remove_process.
15779 (spu_thread_alive): Compare current_ptid instead of current_tid.
15780 (spu_resume): Likewise.
15781
55ac2b99
PA
157822009-04-02 Pedro Alves <pedro@codesourcery.com>
15783
15784 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15785 variable.
15786
95954743
PA
157872009-04-01 Pedro Alves <pedro@codesourcery.com>
15788
15789 Implement the multiprocess extensions, and add linux multiprocess
15790 support.
15791
15792 * server.h (ULONGEST): Declare.
15793 (struct ptid, ptid_t): New.
15794 (minus_one_ptid, null_ptid): Declare.
15795 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15796 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15797 (struct inferior_list_entry): Change `id' type from unsigned from
15798 to ptid_t.
15799 (struct sym_cache, struct breakpoint, struct
15800 process_info_private): Forward declare.
15801 (struct process_info): Declare.
15802 (current_process): Declare.
15803 (all_processes): Declare.
15804 (initialize_inferiors): Declare.
15805 (add_thread): Adjust to use ptid_t.
15806 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15807 (add_process, remove_process, find_thread_pid): Declare.
15808 (find_inferior_id): Adjust to use ptid_t.
15809 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15810 (multi_process): Declare.
15811 (push_event): Adjust to use ptid_t.
15812 (read_ptid, write_ptid): Declare.
15813 (prepare_resume_reply): Adjust to use ptid_t.
15814 (clear_symbol_cache): Declare.
15815 * inferiors.c (all_processes): New.
15816 (null_ptid, minus_one_ptid): New.
15817 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15818 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15819 (add_thread): Change unsigned long to ptid. Remove gdb_id
15820 parameter. Adjust.
15821 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15822 (gdb_id_to_thread): Rename to ...
15823 (find_thread_pid): ... this. Change unsigned long to ptid.
15824 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15825 (loaded_dll, pull_pid_from_list): Adjust.
15826 (add_process, remove_process, find_process_pid)
15827 (get_thread_process, current_process, initialize_inferiors): New.
15828 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15829 (struct target_waitstatus) <related_pid>: Ditto.
15830 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15831 return type to int.
15832 (struct target_ops) <join>: Add `pid' argument.
15833 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15834 (struct target_ops) <wait>: Add `ptid' field. Change return type
15835 to ptid.
15836 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15837 (mywait): Add `ptid' argument. Change return type to ptid_t.
15838 (target_pid_to_str): Declare.
15839 * target.c (set_desired_inferior): Adjust to use ptids.
15840 (mywait): Add new `ptid' argument. Adjust.
15841 (target_pid_to_str): New.
15842 * mem-break.h (free_all_breakpoints): Declare.
15843 * mem-break.c (breakpoints): Delelete.
15844 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15845 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15846 to use per-process breakpoint list.
15847 (free_all_breakpoints): New.
15848 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15849 (symbol_cache, all_symbols_looked_up): Delete.
15850 (hexchars): New.
15851 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15852 read_ptid): New.
15853 (prepare_resume_reply): Change ptid argument's type from unsigned
15854 long to ptid_t. Adjust. Implement W;process and X;process.
15855 (free_sym_cache, clear_symbol_cache): New.
15856 (look_up_one_symbol): Adjust to per-process symbol cache. *
15857 * server.c (cont_thread, general_thread, step_thread): Change type
15858 to ptid_t.
15859 (attached): Delete.
15860 (multi_process): New.
15861 (last_ptid): Change type to ptid_t.
15862 (struct vstop_notif) <ptid>: Change type to ptid_t.
15863 (queue_stop_reply, push_event): Change `ptid' argument's type to
15864 ptid_t.
15865 (discard_queued_stop_replies): Add `pid' argument.
15866 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15867 changes. Don't reference the `attached' global.
15868 (attach_inferior): Adjust to mywait interface changes.
15869 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15870 features. Handle and report "multiprocess+". Handle
15871 "qAttached:PID".
15872 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15873 changes.
15874 (handle_v_kill): New.
15875 (handle_v_stopped): Adjust to use target_pid_to_str.
15876 (handle_v_requests): Allow multiple attaches and runs when
15877 multiprocess extensions are in effect. Handle "vKill".
15878 (myresume): Adjust to use ptids.
15879 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15880 (handle_status): Adjust to discard_queued_stop_replies interface
15881 change.
15882 (first_thread_of, kill_inferior_callback)
15883 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15884 (main): Call initialize_inferiors. Adjust to use ptids, killing
15885 and detaching from all inferiors. Handle multiprocess packet
15886 variants.
15887 * linux-low.h: Include gdb_proc_service.h.
15888 (struct process_info_private): New.
15889 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15890 <lwpid_of>: Use ptid_get_lwp.
15891 (get_lwp_thread): Adjust.
15892 (struct lwp_info): Add `dead' member.
15893 (find_lwp_pid): Declare.
15894 * linux-low.c (thread_db_active): Delete.
15895 (new_inferior): Adjust comment.
15896 (inferior_pid): Delete.
15897 (linux_add_process): New.
15898 (handle_extended_wait): Adjust.
15899 (add_lwp): Change unsigned long to ptid.
15900 (linux_create_inferior): Add process to processes table. Adjust
15901 to use ptids. Don't set new_inferior here.
15902 (linux_attach_lwp): Rename to ...
15903 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15904 it. Adjust to use ptids.
15905 (linux_attach_lwp): New.
15906 (linux_attach): Add process to processes table. Don't set
15907 new_inferior here.
15908 (struct counter): New.
15909 (second_thread_of_pid_p, last_thread_of_process_p): New.
15910 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15911 multiple processes.
15912 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15913 processes. Remove process from process table.
15914 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15915 to multiple processes.
15916 (any_thread_of): New.
15917 (linux_detach): Add `pid' argument, and handle it. Remove process
15918 from processes table.
15919 (linux_join): Add `pid' argument. Handle it.
15920 (linux_thread_alive): Change unsighed long argument to ptid_t.
15921 Consider dead lwps as not being alive.
15922 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15923 threads we're not interested in.
15924 (same_lwp, find_lwp_pid): New.
15925 (linux_wait_for_lwp): Change `pid' argument's type from int to
15926 ptid_t. Adjust.
15927 (linux_wait_for_event): Rename to ...
15928 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15929 from int to ptid_t. Adjust.
15930 (linux_wait_for_event): New.
15931 (linux_wait_1): Add `ptid' argument. Change return type to
15932 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15933 that exit from the process table.
15934 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15935 Adjust.
15936 (mark_lwp_dead): New.
15937 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15938 stopping all threads, mark its main lwp as dead.
15939 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15940 ptids.
15941 (fetch_register, usr_store_inferior_registers)
15942 (regsets_fetch_inferior_registers)
15943 (regsets_store_inferior_registers, linux_read_memory)
15944 (linux_write_memory): Inline `inferior_pid'.
15945 (linux_look_up_symbols): Adjust to use per-process
15946 `thread_db_active'.
15947 (linux_request_interrupt): Adjust to use ptids.
15948 (linux_read_auxv): Inline `inferior_pid'.
15949 (initialize_low): Don't reference thread_db_active.
15950 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15951 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15952 (ps_getpid): Return the pid of the current inferior.
15953 * thread-db.c (proc_handle, thread_agent): Delete.
15954 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15955 per-process data.
15956 (find_one_thread): Change argument type to ptid_t. Adjust to
15957 per-process data.
15958 (maybe_attach_thread): Adjust to per-process data and ptids.
15959 (thread_db_find_new_threads): Ditto.
15960 (thread_db_init): Ditto.
15961 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15962 processes table. Adjust to use ptids.
15963 (spu_kill, spu_detach): Adjust interface. Remove process from
15964 processes table.
15965 (spu_join, spu_thread_alive): Adjust interface.
15966 (spu_wait): Adjust interface. Remove process from processes
15967 table. Adjust to use ptids.
15968 * win32-low.c (current_inferior_tid): Delete.
15969 (current_inferior_ptid): New.
15970 (debug_event_ptid): New.
15971 (thread_rec): Take a ptid. Adjust.
15972 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15973 (child_delete_thread): Ditto.
15974 (do_initial_child_stuff): Add `attached' argument. Add process to
15975 processes table.
15976 (child_fetch_inferior_registers, child_store_inferior_registers):
15977 Adjust.
15978 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15979 (win32_attach): Pass 1 to do_initial_child_stuff.
15980 (win32_kill): Adjust interface. Remove process from processes
15981 table.
15982 (win32_detach): Ditto.
15983 (win32_join): Adjust interface.
15984 (win32_thread_alive): Take a ptid.
15985 (win32_resume): Adjust to use ptids.
15986 (get_child_debug_event): Ditto.
15987 (win32_wait): Adjust interface. Remove exiting process from
15988 processes table.
15989
bd99dc85
PA
159902009-04-01 Pedro Alves <pedro@codesourcery.com>
15991
15992 Non-stop mode support.
15993
15994 * server.h (non_stop): Declare.
15995 (gdb_client_data, handler_func): Declare.
15996 (delete_file_handler, add_file_handler, start_event_loop):
15997 Declare.
15998 (handle_serial_event, handle_target_event, push_event)
15999 (putpkt_notif): Declare.
16000 * target.h (enum resume_kind): New.
16001 (struct thread_resume): Replace `step' field by `kind' field.
16002 (TARGET_WNOHANG): Define.
16003 (struct target_ops) <wait>: Add `options' argument.
16004 <supports_non_stop, async, start_non_stop>: New fields.
16005 (target_supports_non_stop, target_async): New.
16006 (start_non_stop): Declare.
16007 (mywait): Add `options' argument.
16008 * target.c (mywait): Add `options' argument. Print child exit
16009 notifications here.
16010 (start_non_stop): New.
16011 * server.c (non_stop, own_buf, mem_buf): New globals.
16012 (struct vstop_notif): New.
16013 (notif_queue): New global.
16014 (queue_stop_reply, push_event, discard_queued_stop_replies)
16015 (send_next_stop_reply): New.
16016 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16017 interface changes.
16018 (attach_inferior): In non-stop mode, don't wait for the target
16019 here.
16020 (handle_general_set): Handle QNonStop.
16021 (handle_query): When handling qC, return the current general
16022 thread, instead of the first thread of the list.
16023 (handle_query): If the backend supports non-stop mode, include
16024 QNonStop+ in the qSupported query response.
16025 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16026 and non-stop mode.
16027 (handle_v_attach, handle_v_run): Handle non-stop mode.
16028 (handle_v_stopped): New.
16029 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16030 (myresume): Adjust to use resume_kind. Handle non-stop.
16031 (queue_stop_reply_callback): New.
16032 (handle_status): Handle non-stop mode.
16033 (main): Clear non_stop flag on reconnection. Use the event-loop.
16034 Refactor serial protocol handling from here ...
16035 (process_serial_event): ... to this new function. When GDB
16036 selects any thread, select one here. In non-stop mode, wait until
16037 GDB acks all pending events before exiting.
16038 (handle_serial_event, handle_target_event): New.
16039 * remote-utils.c (remote_open): Install remote_desc in the event
16040 loop.
16041 (remote_close): Remove remote_desc from the event loop.
16042 (putpkt_binary): Rename to...
16043 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16044 (putpkt_binary): New as wrapper around putpkt_binary_1.
16045 (putpkt_notif): New.
16046 (prepare_resume_reply): In non-stop mode, don't change the
16047 general_thread.
16048 * event-loop.c: New.
16049 * Makefile.in (OBJ): Add event-loop.o.
16050 (event-loop.o): New rule.
16051
16052 * linux-low.h (pid_of): Moved here.
16053 (lwpid_of): New.
16054 (get_lwp_thread): Use lwpid_of.
16055 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16056 * linux-low.c (pid_of): Delete.
16057 (inferior_pid): Use lwpid_of.
16058 (linux_event_pipe): New.
16059 (target_is_async_p): New.
16060 (delete_lwp): New.
16061 (handle_extended_wait): Use lwpid_of.
16062 (add_lwp): Don't set lwpid field.
16063 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16064 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16065 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16066 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16067 first. Adjust to linux_wait_for_event interface changes. Use
16068 lwpid_of.
16069 (linux_detach): Don't delete the main lwp here.
16070 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16071 (status_pending_p): Don't consider explicitly suspended lwps.
16072 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16073 pointer. Add OPTIONS argument. Change return type to int. Use
16074 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16075 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16076 pointer. Add status pointer argument. Return a pid instead of a
16077 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16078 changes. In non-stop mode, don't switch to a random thread.
16079 (linux_wait): Rename to...
16080 (linux_wait_1): ... this. Add target_options argument, and handle
16081 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16082 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16083 clean exit and signal exit code. Don't stop all threads in
16084 non-stop mode. In all-stop mode, only stop all threads when
16085 reporting a stop to GDB. Handle explicit thread stop requests.
16086 (async_file_flush, async_file_mark): New.
16087 (linux_wait): New.
16088 (send_sigstop): Use lwpid_of.
16089 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16090 interface changes. In non-stop mode, don't switch to a random
16091 thread.
16092 (linux_resume_one_lwp): Use lwpid_of.
16093 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16094 (linux_resume_one_thread): ... this. Handle resume_stop. In
16095 non-stop mode, don't look for pending flag in all threads.
16096 (resume_status_pending_p): Don't consider explicitly suspended
16097 threads.
16098 (my_waitpid): Reimplement. Emulate __WALL.
16099 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16100 Use lwpid_of.
16101 (sigchld_handler, linux_supports_non_stop, linux_async)
16102 (linux_start_non_stop): New.
16103 (linux_target_ops): Register linux_supports_non_stop, linux_async
16104 and linux_start_non_stop.
16105 (initialize_low): Install SIGCHLD handler.
16106 * thread-db.c (thread_db_create_event, find_one_thread)
16107 (thread_db_get_tls_address): Use lwpid_of.
16108 * win32-low.c (win32_detach): Adjust to use resume_kind.
16109 (win32_wait): Add `options' argument.
16110 * spu-low.c (spu_resume): Adjust to use resume_kind.
16111 (spu_wait): Add `options' argument.
16112
5b1c542e
PA
161132009-04-01 Pedro Alves <pedro@codesourcery.com>
16114
16115 Decouple target code from remote protocol.
16116
16117 * target.h (enum target_waitkind): New.
16118 (struct target_waitstatus): New.
16119 (struct target_ops) <wait>: Return an unsigned long. Take a
16120 target_waitstatus pointer instead of a char pointer.
16121 (mywait): Likewise.
16122 * target.c (mywait): Change prototype to return an unsigned long.
16123 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16124 * server.h (thread_from_wait, old_thread_from_wait): Delete
16125 declarations.
16126 (prepare_resume_reply): Change prototype to take a
16127 target_waitstatus.
16128 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16129 (last_status, last_ptid): New.
16130 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16131 pid instead of a signal.
16132 (attach_inferior): Remove "status" and "signal" parameters.
16133 Adjust.
16134 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16135 not as an address.
16136 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16137 (handle_v_requests, myresume): Remove "status" and "signal"
16138 parameters. Adjust.
16139 (handle_status): New.
16140 (main): Delete local `status'. Adjust.
16141 * remote-utils.c: Include target.h.
16142 (prepare_resume_reply): Change prototype to take a
16143 target_waitstatus. Adjust.
16144
16145 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16146 interface.
16147 * spu-low.c (spu_wait): Adjust.
16148 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16149 Delete.
16150 (win32_wait): Adjust.
16151
2bd7c093
PA
161522009-04-01 Pedro Alves <pedro@codesourcery.com>
16153
16154 * target.h (struct thread_resume): Delete leave_stopped member.
16155 (struct target_ops): Add a `n' argument to the `resume' callback.
16156 * server.c (start_inferior): Adjust.
16157 (handle_v_cont, myresume): Adjust.
16158 * linux-low.c (check_removed_breakpoint): Adjust to resume
16159 interface change, and to removed leave_stopped field.
16160 (resume_ptr): Delete.
16161 (struct thread_resume_array): New.
16162 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16163 resume interface change.
16164 (linux_continue_one_thread, linux_queue_one_thread)
16165 (resume_status_pending_p): Check if the resume field is NULL
16166 instead of checking the leave_stopped member.
16167 (linux_resume): Adjust to the target resume interface change.
16168 * spu-low.c (spu_resume): Adjust to the target resume interface
16169 change.
16170 * win32-low.c (win32_detach, win32_resume): Ditto.
16171
c35fafde
PA
161722009-04-01 Pedro Alves <pedro@codesourcery.com>
16173
16174 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16175 flag.
16176 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16177 pending.
16178 (linux_continue_one_thread): Only preserve the stepping flag if
16179 there's a pending breakpoint.
16180
0a59d50b
PA
161812009-03-31 Pedro Alves <pedro@codesourcery.com>
16182
16183 * server.c (main): After the inferior having exited, call
16184 remote_close before exiting gdbserver.
16185
f04c6d38
TJB
161862009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16187
16188 Fix size of FPSCR in Power 7 processors.
16189 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16190 (PPC_FEATURE_HAS_DFP): New #define.
16191 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16192 size of the FPSCR.
16193
78e5cee6
PA
161942009-03-23 Pedro Alves <pedro@codesourcery.com>
16195
16196 * server.c (handle_query) Whitespace and formatting.
16197
1b3f6016
PA
161982009-03-22 Pedro Alves <pedro@codesourcery.com>
16199
16200 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16201 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16202 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16203 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16204 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16205 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16206 Makefile.in, configure.ac: Fix whitespace throughout.
16207 * configure: Regenerate.
16208
a07b2135
PA
162092009-03-22 Pedro Alves <pedro@codesourcery.com>
16210
16211 * inferiors.c (find_inferior): Make it safe for the callback
16212 function to delete the currently iterated inferior.
16213
67cc2626
PA
162142009-03-22 Pedro Alves <pedro@codesourcery.com>
16215
16216 * Makefile.in (linuw_low_h): Move higher.
16217 (thread-db.o): Depend on $(linux_low_h).
16218
54a0b537
PA
162192009-03-17 Pedro Alves <pedro@codesourcery.com>
16220
16221 Rename "process" to "lwp" throughout.
16222
16223 * linux-low.c (all_processes): Rename to...
16224 (all_lwps): ... this.
16225 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16226 (add_process): Rename to ...
16227 (add_lwp): ... this. Adjust.
16228 (linux_create_inferior): Adjust.
16229 (linux_attach_lwp): Adjust.
16230 (linux_attach): Adjust.
16231 (linux_kill_one_process): Rename to ...
16232 (linux_kill_one_lwp): ... this. Adjust.
16233 (linux_kill): Adjust.
16234 (linux_detach_one_process): Rename to ...
16235 (linux_detach_one_lwp): ... this. Adjust.
16236 (linux_detach): Adjust.
16237 (check_removed_breakpoint): Adjust.
16238 (status_pending_p): Adjust.
16239 (linux_wait_for_process): Rename to ...
16240 (linux_wait_for_lwp): ... this. Adjust.
16241 (linux_wait_for_event): Adjust.
16242 (send_sigstop): Adjust.
16243 (wait_for_sigstop): Adjust.
16244 (stop_all_processes): Rename to ...
16245 (stop_all_lwps): ... this.
16246 (linux_resume_one_process): Rename to ...
16247 (linux_resume_one_lwp): ... this. Adjust.
16248 (linux_set_resume_request, linux_continue_one_thread)
16249 (linux_queue_one_thread, resume_status_pending_p)
16250 (usr_store_inferior_registers, regsets_store_inferior_registers)
16251 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16252 Adjust.
16253 * linux-low.h (get_process): Rename to ...
16254 (get_lwp): ... this. Adjust.
16255 (get_thread_process): Rename to ...
16256 (get_thread_lwp): ... this. Adjust.
16257 (get_process_thread): Rename to ...
16258 (get_lwp_thread): ... this. Adjust.
16259 (struct process_info): Rename to ...
16260 (struct lwp_info): ... this.
16261 (all_processes): Rename to ...
16262 (all_lwps): ... this.
16263 * proc-service.c (ps_lgetregs): Adjust.
16264 * thread-db.c (thread_db_create_event, find_one_thread)
16265 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16266
0b16c5cf
PA
162672009-03-14 Pedro Alves <pedro@codesourcery.com>
16268
16269 * server.c (handle_query): Handle "qAttached".
16270
32de4b9d
NS
162712009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16272
16273 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16274 GPLv3, update license URL.
16275
2aecd87f
DE
162762009-03-01 Doug Evans <dje@google.com>
16277
93efd302 16278 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
16279 (server_h): Add gdb_signals.h.
16280 (signals.o): Update.
16281 * server.h (target_signal_from_host,target_signal_to_host_p)
16282 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16283
86b1f9c5
PM
162842009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16285
16286 * remote-utils.c (getpkt): Also generate remote-debug
16287 information if noack_mode is set.
16288
4aa995e1
PA
162892009-02-06 Pedro Alves <pedro@codesourcery.com>
16290
16291 * server.c (handle_query): Report qXfer:siginfo:read and
16292 qXfer:siginfo:write as supported and handle them.
16293 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16294 * linux-low.c (linux_xfer_siginfo): New.
16295 (linux_target_ops): Set it.
16296
62709adf
PA
162972009-01-26 Pedro Alves <pedro@codesourcery.com>
16298
16299 * server.c (gdbserver_usage): Mention --remote-debug.
16300 (main): Accept '--remote-debug' switch.
16301
aef93bd7
DE
163022009-01-18 Doug Evans <dje@google.com>
16303
16304 * regcache.c (new_register_cache): No need to check result of xcalloc.
16305 * server.c (handle_search_memory): Back out calls to xmalloc,
16306 result is checked and error is returned to user upon failure.
16307 (handle_query): Ditto. Add more checks for result of malloc.
16308 (handle_v_cont): Check result of malloc, report error back to
16309 user upon failure.
16310 (handle_v_run): Ditto. Call freeargv.
16311 * server.h (freeargv): Declare.
16312 * utils.c (freeargv): New fn.
16313
54363045
DE
163142009-01-15 Doug Evans <dje@google.com>
16315
f626972c
DE
16316 * gdbreplay.c (perror_with_name): Make arg const char *.
16317 * server.h (target_signal_to_name): Make return type const char *.
0842e787 16318 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 16319 * utils.c (perror_with_name): Make arg const char *.
54363045 16320
18aae699
PA
163212009-01-14 Pedro Alves <pedro@codesourcery.com>
16322
16323 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16324 when handling a EXIT_PROCESS_DEBUG_EVENT.
16325
ff703abe
JB
163262009-01-06 Joel Brobecker <brobecker@adacore.com>
16327
16328 * gdbreplay.c (gdbreplay_version): Update copyright year.
16329 * server.c (gdbserver_version): Likewise.
16330
f21cc1a2 163312009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
16332
16333 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 16334 (handle_extended_wait): Improve comment.
0e21c1ec 16335
bca929d3
DE
163362008-12-13 Doug Evans <dje@google.com>
16337
16338 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16339 * server.h (ATTR_MALLOC): New macro.
16340 (xmalloc,xcalloc,xstrdup): Declare.
16341 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16342 * inferiors.c: Ditto.
16343 * linux-low.c: Ditto.
16344 * mem-break.c: Ditto.
16345 * regcache.c: Ditto.
16346 * remote-utils.c: Ditto.
16347 * server.c: Ditto.
16348 * target.c: Ditto.
16349 * win32-low.c: Ditto.
16350
97438e3f
DE
163512008-12-12 Doug Evans <dje@google.com>
16352
896c7fbb
DE
16353 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16354 in debugging printf.
16355
97438e3f
DE
16356 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16357
e3b886f8
DE
163582008-12-09 Doug Evans <dje@google.com>
16359
16360 * linux-low.h (struct process_info): Delete member tid, unused.
16361 * thread-db.c (find_one_thread): Update.
16362 (maybe_attach_thread): Update.
16363
07e059b5
VP
163642008-12-02 Pedro Alves <pedro@codesourcery.com>
16365
889bf7c5
PA
16366 * target.h (struct target_ops): Add qxfer_osdata member.
16367 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16368 and dirent.h.
16369 (linux_qxfer_osdata): New functions.
16370 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16371 callback.
16372 * server.c (handle_query): Handle "qXfer:osdata:read:".
16373 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16374 (buffer_xml_printf): New functions.
16375 * server.h (struct buffer): New.
16376 (buffer_grow_str, buffer_grow_str0): New macros.
16377 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16378 (buffer_xml_printf): Declare.
07e059b5 16379
4cab47ab
DE
163802008-11-24 Doug Evans <dje@google.com>
16381
16382 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16383
f142445f
DJ
163842008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16385
16386 * server.c (handle_v_run): Always use the supplied argument list.
16387
d0107bb6 163882008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 16389
d0107bb6
BW
16390 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16391 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 16392
2c4ad781
TJB
163932008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16394
16395 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16396 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16397 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16398 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16399 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16400 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16401 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16402 XML target descriptions.
16403 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16404 when inferior is running on an ISA 2.05 or later processor. Add
16405 special case to return offset for full 64-bit slot of FPSCR when
16406 in 32-bits.
16407
dfb64f85
DJ
164082008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16409
16410 * Makefile.in (SFILES, clean): Added sparc64 files.
16411 (reg-sparc64.o, reg-sparc64.c): New.
16412 * configure.srv (sparc*-*-linux*): New configuration.
16413 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16414 syscall arguments for SPARC.
16415 (regsets_store_inferior_registers): Likewise.
16416 * linux-sparc-low.c: New file.
16417
66b6e1dd
DE
164182008-10-21 Doug Evans <dje@google.com>
16419
16420 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16421 (READLINE_DIR,READLINE_DEP): Delete.
16422 (INTERNAL_CFLAGS): Update.
16423 (LINTFLAGS): Update.
16424
9b710a42
PA
164252008-10-10 Pedro Alves <pedro@codesourcery.com>
16426
16427 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16428 whole argv from the last run, not just argv[0].
16429
5822d809
PA
164302008-09-08 Pedro Alves <pedro@codesourcery.com>
16431
16432 * regcache.c (new_register_cache): Return NULL if the register
16433 cache size isn't known yet.
16434 (free_register_cache): Avoid dereferencing a NULL regcache.
16435
74aac56f
DJ
164362008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16437
16438 * configure.srv: Merge MIPS and MIPS64.
16439
400b20f5
MR
164402008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16441
16442 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16443
677c5bb1
LM
164442008-08-18 Luis Machado <luisgpm@br.ibm.com>
16445
16446 * Makefile.in: Add required vsx dependencies.
16447
16448 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16449 Declare init_registers_powerpc_vsx32l.
16450 Declare init_registers_powerpc_vsx64l.
16451 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16452 (ppc_arch_setup): Check for VSX in hwcap.
16453 (ppc_fill_vsxregset): New function.
16454 (ppc_store_vsxregset): New function.
16455 Add new VSX entry in regset_info target_regsets.
16456
16457 * configure.srv: Add new VSX dependencies.
16458
a6f3e723
SL
164592008-08-12 Pedro Alves <pedro@codesourcery.com>
16460
16461 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16462 (remote_open): Set or clear transport_is_reliable.
16463 (putpkt_binary): Don't expect acks in noack mode.
16464 (getpkt): Don't send ack/nac in noack mode.
16465 * server.c (handle_general_set): Handle QStartNoAckMode.
16466 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16467 qSupported.
16468 (main): Reset noack_mode on every connection.
16469 * server.h (noack_mode): Declare.
16470
a417dc56
RW
164712008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16472
16473 * Makefile.in (GDBREPLAY_OBS): New variable.
16474 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16475
3221518c
UW
164762008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16477 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16480 (usr_store_inferior_registers): Likewise.
16481 (regsets_store_inferior_registers): Likewise.
16482
ec56be1b
PA
164832008-07-31 Rolf Jansen <rj@surtec.com>
16484 Pedro Alves <pedro@codesourcery.com>
16485
16486 * configure.ac: Check for memmem declaration.
16487 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16488 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16489 (disable_packet_qfThreadInfo): Unconditionally compile.
16490 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16491 * configure, config.in: Regenerate.
16492
2fe5e3ff
DE
164932008-07-28 Doug Kwan <dougkwan@google.com>
16494
16495 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16496 (linux_write_memory): Remove declaration of errno.
16497
836acd6d
UW
164982008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16499
16500 * linux-low.c (handle_extended_wait): Do not use "status"
16501 variable uninitialized.
16502
aeba519e
PA
165032008-07-07 Pedro Alves <pedro@codesourcery.com>
16504
16505 * server.c (handle_v_attach): Inhibit reporting dll changes.
16506
db42f210
PA
165072008-06-27 Pedro Alves <pedro@codesourcery.com>
16508
16509 * remote-utils.c (prepare_resume_reply): If requested, don't
16510 output "thread:TID" in the T stop reply.
16511
16512 * server.c (disable_packet_vCont, disable_packet_Tthread)
16513 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16514 (handle_query): If requested, disable support for qC, qfThreadInfo
16515 and qsThreadInfo.
16516 (handle_v_requests): If requested, disable support for vCont.
16517 (gdbserver_show_disableable): New.
16518 (main): Handle --disable-packet and --disable-packet=LIST.
16519
16520 * server.h (disable_packet_vCont, disable_packet_Tthread)
16521 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16522
8e4c5421
CD
165232008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16524
16525 * server.c (gdbserver_usage): Mention --version.
16526
6e23a804
DJ
165272008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16528
16529 * Makefile.in (gdbreplay.o): New rule.
16530
90aa6a40
JM
165312008-06-06 Joseph Myers <joseph@codesourcery.com>
16532
16533 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16534 message, not gdbserver.
16535
c16158bc 165362008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
16537 Nathan Sidwell <nathan@codesourcery.com>
16538 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16539
16540 * acinclude.m4: Include ../../config/acx.m4.
16541 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16542 * configure, config.in: Regenerate.
16543 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16544 * server.c (gdbserver_version): Print PKGVERSION.
16545 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16546 (main): Adjust gdbserver_usage calls.
16547 * gdbreplay.c (version, host_name): Add declarations.
16548 (gdbreplay_version, gdbreplay_usage): New.
16549 (main): Accept --version and --help options.
16550
aeb75bf5
DJ
165512008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16552
16553 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16554 (arm_breakpoint_at): Handle Thumb.
16555 (the_low_target): Add comment.
16556
76b233dd
UW
165572008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16558
16559 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16560
08388c79
DE
165612008-05-09 Doug Evans <dje@google.com>
16562
a3c83fae
DE
16563 * server.h (decode_search_memory_packet): Declare.
16564 * remote-utils.c (decode_search_memory_packet): New fn.
16565 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16566 (handle_search_memory): New fn.
16567 (handle_query): Process qSearch:memory packets.
16568
bb9c3d36
UW
165692008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16570
16571 * regcache.c (registers_length): Remove.
16572 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16573 full register packet.
16574 * regcache.h (registers_length): Remove prototype.
16575 * server.h (PBUFSIZ): Define to 16384.
16576
7284e1be
UW
165772008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16578
16579 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16580 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16581 powerpc-64l.o, and powerpc-altivec64l.o.
16582 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16583 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16584 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16585 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16586 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16587 to srv_xmlfiles.
16588
16589 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16590 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16591 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16592 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16593 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16594 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16595 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16596 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16597 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16598 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16599 (clean): Update.
16600
16601 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16602 (init_registers_powerpc_32l): ... this new prototype.
16603 (init_registers_powerpc_32): Remove, replace by ...
16604 (init_registers_powerpc_altivec32l): ... this new prototype.
16605 (init_registers_powerpc_e500): Remove, replace by ...
16606 (init_registers_powerpc_e500l): ... this new prototype.
16607 (init_registers_ppc64): Remove, replace by ...
16608 (init_registers_powerpc_64l): ... this new prototype.
16609 (init_registers_powerpc_64): Remove, replace by ...
16610 (init_registers_powerpc_altivec64l): ... this new prototype.
16611 (ppc_num_regs): Set to 73.
16612 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16613 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16614 (ppc_cannot_store_register): Handle orig_r3 and trap.
16615 (ppc_arch_setup): Update init_registers_... calls.
16616 (ppc_fill_gregset): Handle orig_r3 and trap.
16617
16618 * inferiors.c (clear_inferiors): Reset current_inferior.
16619
fdc59709
PB
166202008-04-23 Paolo Bonzini <bonzini@gnu.org>
16621
889bf7c5
PA
16622 * acinclude.m4: Add override.m4.
16623 * configure: Regenerate.
fdc59709 16624
c9b2f845
UW
166252008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16626
16627 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16628 initial call to init_register_ppc64.
16629
550512b8
UW
166302008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16631
43aaf8b6
PA
16632 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16633 single powerpc*-*-linux* case.
550512b8
UW
16634 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16635
b6430ec3
UW
166362008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16637
16638 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 16639 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
16640 from reg_xmlfiles.
16641 * linux-ppc-low.c: Include <elf.h>.
16642 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16643 (ppc_hwcap): New global variable.
16644 (ppc_regmap): Remove __SPE__ #ifdef sections.
16645 (ppc_regmap_e500): New global variable.
16646 (ppc_cannot_store_register): Update __SPE__ special case.
16647 (ppc_get_hwcap): New function.
16648 (ppc_arch_setup): Use it to determine whether inferior supports
16649 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16650 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16651 Do not access registers if target does not support AltiVec.
16652 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16653 Do not access registers if target does not support SPE.
16654 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16655
52fa2412
UW
166562008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * linux-low.c (disabled_regsets, num_regsets): New.
16659 (use_regsets_p): Delete.
16660 (linux_wait_for_process): Clear disabled_regsets.
16661 (regsets_fetch_inferior_registers): Check and set it.
16662 (regsets_store_inferior_registers): Likewise.
16663 (linux_fetch_registers, linux_store_registers): Do not use
16664 use_regsets_p.
16665 (initialize_low): Allocate disabled_regsets.
16666
e28b3332
DJ
166672008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16668
16669 * Makefile.in (LIBOBJS): New.
16670 (OBS): Use LIBOBJS.
16671 (memmem.o): New rule.
16672 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16673 * configure: Regenerated.
16674
4536995d
UW
166752008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16676
16677 * server.c (handle_query): Never return "unsupported" for
16678 qXfer:features:read queries.
16679
221c031f
UW
166802008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16681
16682 * server.c (get_features_xml): Fix inverted condition.
16683 (handle_query): Always support qXfer:feature:read.
16684
ccd213ac
DJ
166852008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16686
16687 * server.c (wrapper_argv): New.
16688 (start_inferior): Handle wrapper_argv. If set, expect an extra
16689 trap.
16690 (gdbserver_usage): Document --wrapper.
16691 (main): Parse --wrapper.
16692
6fe305f7
UW
166932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16694
16695 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16696 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16697 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16698 (ppc_set_pc): Likewise.
16699 (ppc_arch_setup): New function.
16700 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16701 of collect_register.
889bf7c5 16702 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16703
5b0a002e
UW
167042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16705
16706 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16707 instead of linux-ppc64-low.o.
16708 * linux-ppc64-low.c: Remove file.
16709 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16710 (linux-ppc64-low.o): Remove rule.
16711
16712 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16713 (init_registers_powerpc_64): Likewise.
16714 (ppc_regmap): Conditionally define depending on __powerpc64__.
16715 (ppc_cannot_store_register): Do not special-case "fpscr" when
16716 compiled on __powerpc64__.
16717 (ppc_collect_ptrace_register): New function.
16718 (ppc_supply_ptrace_register): New function.
16719 (ppc_breakpoint): Change type to "unsigned int".
16720 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16721 (the_low_target): Conditionally provide initializers for the
889bf7c5 16722 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16723 collect_ptrace_register and supply_ptrace_register members.
16724
9b4b61c8
UW
167252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16726
16727 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16728 * server.c (gdbserver_xmltarget): Define.
16729 (get_features_xml): Use it to replace "target.xml" and arch_string.
16730
16731 * configure.srv: Remove srv_xmltarget. Add XML files that were
16732 mentioned there to srv_xmlfiles instead. Remove conditional tests
16733 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16734 srv_xmlfiles and srv_regobj to include all possible choices.
16735 * configure.ac (srv_xmltarget): Remove.
16736 (srv_xmlfiles): Do not add "target.xml".
16737 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16738 checks for supplementary target information.
16739 * configure: Regenerate.
16740 * Makefile.in (XML_TARGET): Remove.
16741 (target.xml): Remove rule.
16742 (clean): Do not clean up target.xml.
16743 (.PRECIOUS): Do not mention target.xml.
16744
16745 * target.h (struct target_ops): Remove arch_string member.
16746 * linux-low.c (linux_arch_string): Remove.
16747 (linux_target_ops): Remove arch_string initializer.
16748 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16749 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16750 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16751 * spu-low.c (spu_arch_string): Remove.
16752 (spu_target_ops): Remove arch_string initializer.
16753 * win32-low.c (win32_arch_string): Remove.
16754 (win32_target_ops): Remove arch_string initializer.
16755 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16756 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16757 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16758
ee1a7ae4
UW
167592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16760
16761 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16762 by collect_ptrace_register and supply_ptrace_register hooks.
16763 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16764 instead of checking for the_low_target.left_pad_xfer.
16765 (usr_store_inferior_registers): Use collect_ptrace_register callback
16766 instead of checking for the_low_target.left_pad_xfer.
16767
16768 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16769 (s390_supply_ptrace_register): Likewise.
16770 (s390_fill_gregset): Call s390_collect_ptrace_register.
16771 (the_low_target): Update.
16772
16773 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16774 (ppc_supply_ptrace_register): Likewise.
16775 (the_low_target): Update.
16776
16777 * linux-i386-low.c (the_low_target): Update.
16778 * linux-x86-64-low.c (the_low_target): Update.
16779
d61ddec4
UW
167802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16781
16782 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16783 reg-s390.o and reg-s390x.o.
16784
16785 * linux-low.c (new_inferior): New global variable.
16786 (linux_create_inferior, linux_attach): Set it.
16787 (linux_wait_for_process): Call the_low_target.arch_setup after the
16788 target has stopped for the first time.
16789 (initialize_low): Do not call the_low_target.arch_setup.
16790
16791 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16792 (s390_set_pc): Likewise.
16793 (s390_arch_setup): New function.
16794 (the_low_target): Use s390_arch_setup as arch_setup routine.
16795
16796 * regcache.c (realloc_register_cache): New function.
16797 (set_register_cache): Call it for each existing regcache.
16798
d05b4ac3
UW
167992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16800
16801 * server.h (init_registers): Remove prototype.
16802
16803 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16804 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16805 instead of init_registers ().
16806 * linux-arm-low.c (init_registers_arm): Add prototype.
16807 (init_registers_arm_with_iwmmxt): Likewise.
16808 (the_low_target): Add initializer for arch_setup field.
16809 * linux-cris-low.c (init_registers_cris): Add prototype.
16810 (the_low_target): Add initializer for arch_setup field.
16811 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16812 (the_low_target): Add initializer for arch_setup field.
16813 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16814 (the_low_target): Add initializer for arch_setup field.
16815 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16816 (the_low_target): Add initializer for arch_setup field.
16817 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16818 (the_low_target): Add initializer for arch_setup field.
16819 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16820 (the_low_target): Add initializer for arch_setup field.
16821 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16822 (init_registers_mips64_linux): Likewise.
16823 (the_low_target): Add initializer for arch_setup field.
16824 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16825 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16826 (the_low_target): Add initializer for arch_setup field.
16827 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16828 (init_registers_powerpc_64): Likewise.
16829 (the_low_target): Add initializer for arch_setup field.
16830 * linux-s390-low.c (init_registers_s390): Add prototype.
16831 (init_registers_s390x): Likewise.
16832 (the_low_target): Add initializer for arch_setup field.
16833 * linux-sh-low.c (init_registers_sh): Add prototype.
16834 (the_low_target): Add initializer for arch_setup field.
16835 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16836 (the_low_target): Add initializer for arch_setup field.
16837 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16838 (the_low_target): Add initializer for arch_setup field.
16839
16840 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16841 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16842 instead of init_registers ().
16843 * win32-arm-low.c (init_registers_arm): Add prototype.
16844 (the_low_target): Add initializer for arch_setup field.
16845 * win32-i386-low.c (init_registers_i386): Add prototype.
16846 (the_low_target): Add initializer for arch_setup field.
16847
16848 * spu-low.c (init_registers_spu): Add prototype.
16849 (initialize_low): Call initialie_registers_spu () instead of
16850 initialize_registers ().
16851
fd96d250
PA
168522008-02-19 Pedro Alves <pedro@codesourcery.com>
16853
16854 * server.c (handle_v_requests): When handling the vRun and vAttach
16855 packets, if already debugging a process, don't kill it. Return an
16856 error instead.
16857
d41b6bb4
DJ
168582008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16859
16860 * server.c (handle_query): Correct length check.
16861
5ac588cf
PA
168622008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16863
16864 * win32-low.c (do_initial_child_stuff): Add process handle
16865 parameter. Set current_process_handle and current_process_id from the
16866 parameters. Clear globals.
16867 (win32_create_inferior): Don't set current_process_handle and
16868 current_process_id here. Instead pass them on the call to
16869 do_initial_child_stuff.
16870 (win32_attach): Likewise.
16871 (win32_clear_inferiors): New.
16872 (win32_kill): Don't close the current process handle or the
16873 current thread handle here. Instead call win32_clear_inferiors.
16874 (win32_detach): Don't open a new handle to the process. Call
16875 win32_clear_inferiors.
16876 (win32_join): Don't rely on current_process_handle; open a new
16877 handle using the process id.
16878 (win32_wait): Call win32_clear_inferiors when the inferior process
16879 has exited.
16880
ecd7ecbc
DJ
168812008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16882
16883 * server.c (monitor_show_help): Add "exit".
16884
1525d545
MG
168852008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16886
ecd7ecbc 16887 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16888 (clean): Add reg-xtensa.c.
16889 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16890 * configure.srv (xtensa*-*-linux*) New target.
16891 * linux-xtensa-low.c: New.
16892 * xtensa-xtregs.c: New.
1525d545 16893
59a016f0
PA
168942008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16895
16896 * hostio.c: Don't include errno.h.
16897 (errno_to_fileio_errno): Move to hostio-errno.
16898 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16899 error number outputting to the target->hostio_last_error callback.
16900 (hostio_packet_error): Use FILEIO_EINVAL directly.
16901 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16902 calls to hostio_error.
16903 * hostio-errno.c: New.
16904 * server.h (hostio_last_error_from_errno): Declare.
16905 * target.h (target_ops): Add hostio_last_error member.
16906 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16907 as hostio_last_error handler.
889bf7c5 16908 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16909 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16910 (wince_hostio_last_error): New functions.
16911 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16912 as hostio_last_error handler.
16913 (win32_target_ops) [!_WIN32_WCE]: Register
16914 hostio_last_error_from_errno as hostio_last_error handler.
16915 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16916 (hostio-errno.o): New rule.
16917 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16918 * configure.srv (srv_hostio_err_objs): New variable. Default to
16919 hostio-errno.o.
16920 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16921 * configure: Regenerate.
16922
2d717e4f
DJ
169232008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16924
16925 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16926 (linux_kill, linux_detach): Clean up the process list.
16927 * remote-utils.c (remote_open): Improve port number parsing.
16928 (putpkt_binary, input_interrupt): Only send interrupts if the target
16929 is running.
16930 * server.c (extended_protocol): Make static.
16931 (attached): Define earlier.
16932 (exit_requested, response_needed, program_argv): New variables.
16933 (target_running): New.
16934 (start_inferior): Clear attached here.
16935 (attach_inferior): Set attached here.
16936 (require_running): Define.
16937 (handle_query): Use require_running and target_running. Implement
16938 "monitor exit".
16939 (handle_v_attach, handle_v_run): New.
16940 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16941 (gdbserver_usage): Update.
16942 (main): Redo argument parsing. Handle --debug and --multi. Handle
16943 --attach along with other options or after the port. Save
16944 program_argv. Support no initial program. Resynchronize
16945 communication with GDB after an error. Handle "monitor exit".
16946 Use require_running and target_running. Always allow the extended
16947 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16948 restart in extended mode.
16949 * README: Refer to the GDB manual. Update --attach usage.
16950
7407e2de
AS
169512007-12-20 Andreas Schwab <schwab@suse.de>
16952
16953 * linux-low.c (STACK_SIZE): Define.
16954 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16955 (linux_test_for_tracefork): Likewise.
16956
b65d95c5
DJ
169572007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16958
16959 * linux-low.c (linux_wait_for_event): Update messages. Do not
16960 reinsert auto-delete breakpoints.
16961 * mem-break.c (struct breakpoint): Change return type of handler to
16962 int.
16963 (set_breakpoint_at): Update handler type.
16964 (reinsert_breakpoint_handler): Return 1 instead of calling
16965 delete_breakpoint.
16966 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16967 setting a new one.
16968 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16969 * mem-break.h (set_breakpoint_at): Update handler type.
16970 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16971 * win32-low.c (auto_delete_breakpoint): New.
16972 (get_child_debug_event): Use it.
16973
4e799345
DJ
169742007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16975
16976 * configure.ac: Check for pread and pwrite.
16977 * hostio.c (handle_pread): Fall back to lseek and read.
16978 (handle_pwrite): Fall back to lseek and write.
16979 * config.in, configure: Regenerated.
16980
27524b67
DJ
169812007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16982
16983 * server.c (myresume): Add own_buf argument.
16984 (main): Update calls.
16985
a20d5e98
DJ
169862007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16987
16988 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16989 * remote-utils.c (remote_open): Do not call disable_async_io.
16990 (block_async_io): Delete.
16991 (unblock_async_io): Make static.
16992 (initialize_async_io): New.
16993 * server.c (handle_v_cont): Handle async I/O here.
16994 (myresume): Likewise. Move other common resume tasks here...
16995 (main): ... from here. Call initialize_async_io. Disable async
16996 I/O before the main loop.
16997 * server.h (initialize_async_io): Declare.
16998 (block_async_io, unblock_async_io): Delete prototypes.
16999 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17000
b79d787e
DJ
170012007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17002
17003 * remote-utils.c (readchar): Allow binary data in received messages.
17004
d97903b2
PA
170052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17006
17007 * win32-low.c (attaching): New global.
17008 (win32_create_inferior): Clear the `attaching' global.
17009 (win32_attach): Set the `attaching' global.
17010 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17011 attaching. Only set a breakpoint at the entry point if not
17012 attaching.
17013
311de423
PA
170142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17015
17016 * server.c (main): Don't report dll events on the initial
17017 connection on attaches.
17018
6c2d16d2
PA
170192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17020
17021 * server.c (main): Relax numerical bases supported for the pid of
17022 the --attach command line argument.
17023
5ca906e6
PA
170242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17025
17026 * win32-low.c (win32_attach): Call OpenProcess before
17027 DebugActiveProcess, not after. Add last error output to error
17028 call.
17029
9c6c8194
PA
170302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17031
17032 * win32-low.c (win32_get_thread_context)
17033 (win32_set_thread_context): New functions.
17034 (thread_rec): Use win32_get_thread_context.
17035 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17036 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17037 field.
17038
4d5d1aaa
PA
170392007-12-03 Leo Zayas
17040 Pedro Alves <pedro_alves@portugalmail.pt>
17041
17042 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17043 global variables.
17044 (child_add_thread): Minor cleanup.
17045 (child_continue): Resume artificially suspended threads before
17046 calling ContinueDebugEvent.
17047 (suspend_one_thread): New.
17048 (fake_breakpoint_event): New.
17049 (get_child_debug_event): Change return type to int. Check here if
17050 gdb sent an interrupt request. If a soft interrupt was requested,
17051 fake a breakpoint event. Return 0 if there is no event to handle,
17052 and 1 otherwise.
17053 (win32_wait): Don't check here if gdb sent an interrupt request.
17054 Ensure there is a valid event to handle.
17055 (win32_request_interrupt): Add soft interruption method as last
17056 resort.
17057
c436e841
PA
170582007-12-03 Leo Zayas
17059 Pedro Alves <pedro_alves@portugalmail.pt>
17060
17061 * win32-low.h (win32_thread_info): Add descriptions to the
17062 structure members. Replace `suspend_count' counter by a
17063 `suspended' flag.
17064 * win32-low.c (thread_rec): Update condition of when to get the
17065 context from the inferior. Rely on ContextFlags being set if it
17066 has already been retrieved. Only suspend the inferior thread if
17067 we haven't already. Warn if that fails.
17068 (continue_one_thread): s/suspend_count/suspended/. Only call
17069 ResumeThread once. Warn if that fails.
17070
e7b5fa67
PA
170712007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17072
17073 * win32-low.c (win32_wait): Don't read from the inferior when it
17074 has already exited.
17075
a385171d
PA
170762007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17077
17078 * Makefile.in (win32_low_h): New variable.
17079 (win32-low.o): Add dependency on $(win32_low_h).
17080 (win32-arm-low.o, win32-i386-low.o): New rules.
17081
f80c84b3
DJ
170822007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17083
17084 * hostio.c: Correct copyright year.
17085
a6b151f1
DJ
170862007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17087
17088 * Makefile.in (OBS): Add hostio.o.
17089 (hostio.o): New rule.
17090 * server.h (handle_vFile): Declare.
17091 * hostio.c: New file.
17092 * server.c (handle_v_requests): Take packet_len and new_packet_len
17093 for binary packets. Call handle_vFile.
17094 (main): Update call to handle_v_requests.
17095
f9387fc3
DJ
170962007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17097
17098 * linux-low.c: Include <sched.h>.
17099
51c2684e
DJ
171002007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17101
17102 * linux-low.c (linux_tracefork_grandchild): New.
17103 (linux_tracefork_child): Use clone.
17104 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17105
75f83163
JB
171062007-10-31 Joel Brobecker <brobecker@adacore.com>
17107
17108 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17109
da5898ce
DJ
171102007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17111
17112 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17113
24a09b5f
DJ
171142007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17115
17116 * inferiors.c (change_inferior_id): Delete.
17117 (add_pid_to_list, pull_pid_from_list): New.
17118 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17119 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17120 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17121 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17122 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17123 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17124 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17125 (using_threads): Always set to 1.
17126 (handle_extended_wait): New.
17127 (add_process): Do not set TID.
17128 (linux_create_inferior): Set must_set_ptrace_flags.
17129 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17130 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17131 (linux_thread_alive): Rename TID argument to LWPID.
17132 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17133 (linux_wait_for_event): Do not use TID or check using_threads. Update
17134 call to dead_thread_notify. Call handle_extended_wait.
17135 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17136 (send_sigstop): Delete sigstop_sent.
17137 (wait_for_sigstop): Avoid TID.
17138 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17139 (linux_test_for_tracefork): New.
17140 (linux_lookup_signals): Use thread_db_active and
17141 linux_supports_tracefork_flag.
17142 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17143 * linux-low.h (get_process_thread): Avoid TID.
17144 (struct process_ifo): Move thread_known and tid to the end. Remove
17145 sigstop_sent.
17146 (linux_attach_lwp, thread_db_init): Update prototypes.
17147 * server.h (change_inferior_id): Delete prototype.
17148 (add_pid_to_list, pull_pid_from_list): New prototypes.
17149 * thread-db.c (thread_db_use_events): New.
17150 (find_first_thread): Rename to...
17151 (find_one_thread): ...this. Update callers and messages. Do not
17152 call fatal. Check thread_db_use_events. Do not call
17153 change_inferior_id or new_thread_notify.
17154 (maybe_attach_thread): Update. Do not call new_thread_notify.
17155 (thread_db_init): Set thread_db_use_events. Check use_events.
17156 * utils.c (fatal, warning): Correct message prefix.
17157
30ed0a8f
DJ
171582007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17159
17160 * Makefile.in (clean): Remove new files.
17161 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17162 (powerpc-64.o, powerpc-64.c): New rules.
17163 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17164 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17165 with SPE.
17166 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17167 SPE targets.
17168 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17169 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17170 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17171 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17172 (target_regsets): Add AltiVec and SPE register sets.
17173 * configure.ac: Check for AltiVec and SPE.
17174 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17175 (ppc_fill_vrregset, ppc_store_vrregset): New.
17176 (target_regsets): Add AltiVec register set.
17177 * configure: Regenerated.
17178
fd462a61
DJ
171792007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17180
17181 * linux-low.c (O_LARGEFILE): Define.
17182 (linux_read_memory): Use /proc/PID/mem.
17183 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17184 * configure, config.in: Regenerated.
17185
69f223ed
DJ
171862007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17187
17188 * linux-low.c (linux_wait_for_event): Do not pass signals while
17189 single-stepping.
17190
aec18585
PA
171912007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17192
17193 * win32-low.c (create_process): New.
17194 (win32_create_inferior): Use create_process instead of
17195 CreateProcess. If create_process failed retry appending an ".exe"
17196 suffix. Store the GetLastError result immediatelly after
17197 create_process calls and use it on the call to error.
17198
34d86ddd
PA
171992007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17200
17201 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17202
5a0e3bd0
JB
172032007-08-23 Joel Brobecker <brobecker@adacore.com>
17204
17205 * configure.ac: Switch license to GPLv3.
17206
f88c79e6
MS
172072007-08-01 Michael Snyder <msnyder@access-company.com>
17208
17209 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17210
6b3d9b83
PA
172112007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17212
17213 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17214 typedef.
17215 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17216 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17217 CloseToolhelp32Snapshot.
17218 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17219 CloseToolhelp32Snapshot.
17220
c588c53c
MS
172212007-07-27 Michael Snyder <michael.snyder@access-company.com>
17222
17223 * server.c (main): Check for inferior exit before main loop.
17224
aa0403d9
PA
172252007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17226
17227 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17228 instead of on tmp_desc.
17229
255e7678
DJ
172302007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17231 Daniel Jacobowitz <dan@codesourcery.com>
17232
17233 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17234 (add_thread): Minor cleanups.
17235 (clear_inferiors): Move lower in the file. Clear the DLL
17236 list.
17237 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17238 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17239 (xml_escape_text): New.
17240 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17241 for qSupported.
17242 (handle_v_cont): Report errors.
17243 (gdbserver_version): Update.
17244 (main): Correct size of own_buf. Do not report initial DLL events.
17245 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17246 (unloaded_dll, xml_escape_text): New.
17247 * win32-low.c (enum target_waitkind): Update comments.
17248 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17249 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17250 (win32_EnumProcessModules, win32_GetModuleInformation)
17251 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17252 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17253 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17254 (win32_Module32First, win32_Module32Next, load_toolhelp)
17255 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17256 (get_child_debug_event): Handle DLL events.
17257 (win32_wait): Likewise.
17258
0d37add9
DJ
172592007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17260
17261 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17262 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17263
45e2715e
PA
172642007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17265
17266 * win32-low.c (handle_output_debug_string): Ignore event if not
17267 waiting.
17268
c5674cf1
PA
172692007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17270
17271 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17272
2bbe3cc1
DJ
172732007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17274
17275 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17276
ae13219e
DJ
172772007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17278
17279 * inferiors.c (change_inferior_id): Add comment.
17280 * linux-low.c (check_removed_breakpoint): Add an early
17281 prototype. Improve debug output.
17282 (linux_attach): Doc update.
17283 (linux_detach_one_process, linux_detach): Clean up before releasing
17284 each process.
17285 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17286 * linux-low.h (struct process_info): Doc improvement.
17287 * mem-break.c (delete_all_breakpoints): New.
17288 * mem-break.h (delete_all_breakpoints): New prototype.
17289 * thread-db.c (find_first_thread): New.
17290 (thread_db_create_event): Call it instead of
17291 thread_db_find_new_threads. Clean up unused variables.
17292 (maybe_attach_thread): Remove first thread handling.
17293 (thread_db_find_new_threads): Use find_first_thread.
17294 (thread_db_get_tls_address): Likewise.
17295
4105de34
DJ
172962007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17297
17298 * thread-db.c (thread_db_find_new_threads): Add prototype.
17299 (thread_db_create_event): Check for the main thread before adding
17300 a new thread.
17301 (maybe_attach_thread): Only enable event reporting if TID == 0.
17302 (thread_db_get_tls_address): Check for new threads.
17303
2b876972
DJ
173042007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17305
17306 * linux-low.c (linux_create_inferior): Try execv before execvp.
17307 * spu-low.c (spu_create_inferior): Likewise.
17308
7a245884
DJ
173092007-06-13 Mike Frysinger <vapier@gentoo.org>
17310
17311 * linux-low.c (linux_create_inferior): Change execv to execvp.
17312 * spu-low.c (spu_create_inferior): Likewies.
17313
117ce543
DJ
173142007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17315
17316 * Makefile.in (clean): Clean new files instead of deleted ones.
17317 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17318 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17319 rules.
17320 * configure.srv: Specify XML files and new regformats for MIPS and
17321 MIPS64 GNU/Linux.
17322 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17323 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17324 an entry for the restart register.
17325 (mips_cannot_fetch_register, mips_cannot_store_register)
17326 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17327 register names to match the XML descriptions.
17328 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17329 restart register instead of $0.
17330
0e7f50da
UW
173312007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17332 Markus Deuling <deuling@de.ibm.com>
17333
17334 * remote-utils.c (decode_xfer_write): New function.
17335 * server.h (decode_xfer_write): Add prototype.
17336 * server.c (handle_query): Add PACKET_LEN argument. Support
17337 qXfer:spu:read and qXfer:spu:write packets.
17338 (main): Pass packet_len to handle_query.
17339 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17340 * target.h (target_ops): Add qxfer_spu.
17341
374c1d38
UW
173422007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17343
17344 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17345 accessing non-seekable spufs files.
17346
bb63802a
UW
173472007-05-16 Markus Deuling <deuling@de.ibm.com>
17348
889bf7c5 17349 * server.c (handle_query): Add reply for qC packet.
bb63802a 17350
7390519e
PA
173512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17352 Leo Zayas <lerele@champenstudios@com>
17353
17354 * server.h (check_remote_input_interrupt_request): New function.
17355 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17356 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17357 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17358 (check_remote_input_interrupt_request): New function.
17359 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 17360 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
17361 winapi_GenerateConsoleCtrlEvent): New typedefs.
17362 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17363 to 250 ms.
17364 (win32_wait): Check for remote interrupt request
17365 with check_remote_input_interrupt_request.
17366 (win32_request_interrupt): New function.
17367 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17368
34b34921
PA
173692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17370
17371 * win32-low.c (debug_registers_changed,
17372 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17373 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17374 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17375 (thread_rec): Get context using the low target.
17376 (child_add_thread): Call thread_added on the low target,
17377 which does the same thing.
17378 (regptr): Delete.
17379 (do_initial_child_stuff): Remove debug registers references.
17380 Set context using the low target. Resume threads after
17381 setting the contexts.
17382 (child_continue): Remove dead variable. Remove debug
17383 registers references.
17384 (child_fetch_inferior_registers): Go through the low target.
17385 (do_child_store_inferior_registers): Remove.
17386 (child_store_inferior_registers): Go through the low target.
17387 (win32_resume): Remove debug registers references.
17388 Set context using the low target.
17389 (handle_exception): Change return type to void. Don't record
17390 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17391 first chance exception.
889bf7c5 17392 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
17393 goto loop. Always return after waiting for debug event.
17394 (win32_wait): Convert to switch statement. Handle spurious
17395 events.
17396
17397 * win32-i386-low.c (debug_registers_changed,
17398 debug_registers_used): New.
17399 (initial_stuff): Rename to ...
17400 (i386_initial_stuff): ... this. Clear debug registers
17401 state variables.
17402 (store_debug_registers): Delete.
17403 (i386_get_thread_context): New.
17404 (load_debug_registers): Delete.
17405 (i386_set_thread_context): New.
17406 (i386_thread_added): New.
17407 (single_step): Rename to ...
17408 (i386_single_step): ... this.
17409 (do_fetch_inferior_registers): Rename to ...
17410 (i386_fetch_inferior_register): ... this.
17411 (i386_store_inferior_register): New.
17412 (the_low_target): Adapt to new interface.
17413
17414 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17415 (arm_get_thread_context): New.
17416 (arm_set_thread_context): New.
17417 (regptr): New.
17418 (do_fetch_inferior_registers): Rename to ...
17419 (arm_fetch_inferior_register): ... this.
17420 (arm_store_inferior_register): New.
17421 (arm_wince_breakpoint): Reimplement as unsigned long.
17422 (arm_wince_breakpoint_len): Define.
17423 (the_low_target): Adapt to new interface.
17424
17425 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17426 load_debug_registers. Add get_thread_context, set_thread_context,
17427 thread_added and store_inferior_register. Rename
17428 fetch_inferior_registers to fetch_inferior_register.
17429 (regptr): Remove declaration.
17430
dd6953e1
PA
174312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17432
17433 * linux-low.c (linux_detach): Change return type to int. Return 0.
17434 * spu-low.c (spu_detach): Likewise.
17435
444d6139
PA
174362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17437
17438 * target.h (target_ops): Change return type of detach to int.
17439 Add join.
17440 (join_inferior): New.
17441 * server.c (main): Don't skip detach support on mingw32.
17442 If the inferior doesn't support detaching return error.
17443 Call join_inferior instead of using waitpid.
17444 * linux-low.c (linux_join): New.
17445 (linux_target_op): Add linux_join.
17446 * spu-low.c (spu_join): New.
17447 (spu_target_ops): Add spu_join.
17448 * win32-low.c (win32_detach): Adapt to new interface.
17449 Reopen current_process_handle before detaching. Issue a child
17450 resume before detaching.
17451 (win32_join): New.
17452 (win32_target_op): Add win32_join.
17453
1d5315fe
PA
174542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17455
17456 * win32-low.c (win32-attach): Fix return value.
17457 * target.h (target_ops): Describe ATTACH return values.
17458
bf914831
PA
174592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17460
17461 * win32-low.c (GETPROCADDRESS): Define.
17462 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17463 (winapi_DebugSetProcessKillOnExit): Likewise.
17464 (win32_create_inferior): Force usage of ansi CreateProcessA.
17465 (win32_attach): Use GETPROCADDRESS.
17466 (win32_detach): Likewise.
17467
f72f3e60
PA
174682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17469
17470 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17471
ed50f18f
PA
174722007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17473
17474 * win32-low.c: Commit leftover changes from 2007-03-29.
17475
0c2ead7e
DJ
174762007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17477
17478 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17479 fields short instead of int. Add explicit padding.
17480 (i387_cache_to_fsave): Remove unnecessary casts.
17481 (i387_fsave_to_cache): Doc fix.
17482 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17483
73725ff3
DJ
174842007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17485
17486 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17487 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17488
d99f33d8
PA
174892007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17490
17491 * configure.srv (arm*-*-mingw32ce*): Move near the other
17492 arm targets.
17493
68070c10
PA
174942007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17495
2482afc6 17496 * configure.ac: Add errno checking.
68070c10
PA
17497 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17498 sys/file.h and malloc.h.
17499 (AC_CHECK_DECLS): Add perror.
17500 (srv_mingwce): Handle.
2482afc6 17501 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
17502 win32-i386-low.o to srv_tgtobj.
17503 (i[34567]86-*-mingw*): Likewise.
17504 (arm*-*-mingw32ce*): Add case.
17505 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17506 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17507 [__MINGW32CE__] (strerror): New function.
17508 [__MINGW32CE__] (errno): Define to GetLastError.
17509 [__MINGW32CE__] (COUNTOF): New macro.
17510 (remote_open): Remove extra close call.
17511 * mem-break.c (delete_breakpoint_at): New function.
17512 * mem-break.h (delete_breakpoint_at): Declare.
17513 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17514 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17515 [USE_WIN32API] (read, write): Add char* casts.
17516 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17517 * server.h: Include wincecompat.h on Windows CE.
17518 [HAVE_ERRNO_H]: Check.
17519 (perror): Declare if not declared.
17520 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17521 (perror_with_name): Remove errno declaration.
17522 * wincecompat.h: New.
17523 * wincecompat.c: New.
17524 * win32-low.h: New.
17525 * win32-arm-low.c: New.
17526 * win32-i386-low.c: New.
17527 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17528 (OUTMSG2): Make it safe.
17529 (_T): New macro.
17530 (COUNTOF): New macro.
17531 (NUM_REGS): Get it from the low target.
17532 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17533 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17534 (thread_rec): Let low target handle debug registers.
17535 (child_add_thread): Likewise.
17536 (child_init_thread_list): Likewise.
17537 (continue_one_thread): Likewise.
17538 (regptr): New.
17539 (do_child_fetch_inferior_registers): Move to ...
17540 * win32-i386-low.c: ... here, and rename to ...
17541 (do_fetch_inferior_registers): ... this.
889bf7c5 17542 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17543 Go through the low target.
17544 (do_child_store_inferior_registers): Use regptr.
17545 (strwinerror): New function.
17546 (win32_create_inferior): Handle Windows CE.
17547 Use strwinerror instead of strerror on Windows error
17548 codes. Add program to the error output.
17549 Don't close the main thread handle on Windows CE.
17550 (win32_attach): Use coredll.dll on Windows CE.
17551 (win32_kill): Close current process and current
17552 thread handles.
17553 (win32_detach): Use coredll.dll on Windows CE.
17554 (win32_resume): Let low target handle debug registers, and
17555 step request.
17556 (handle_exception): Add/Remove initial breakpoint. Avoid
17557 non-existant WSTOPSIG on Windows CE.
17558 (win32_read_inferior_memory): Cast to remove warning.
17559 (win32_arch_string): Go through the low target.
17560 (initialize_low): Call set_breakpoint_data with the low
17561 target's breakpoint.
17562 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17563 FOP_REGNUM, mappings): Move to ...
17564 * win32-i386-low.c: ... here.
17565 * win32-low.c (win32_thread_info): Move to ...
17566 * win32-low.h: ... here.
17567 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17568 win32-arm-low.c and wincecompat.c.
17569 (all:): Add $EXEEXT.
17570 (install-only:): Likewise.
17571 (gdbserver:): Likewise.
17572 (gdbreplay:): Likewise.
17573 * config.in: Regenerate.
17574 * configure: Regenerate.
17575
41093d81
PA
175762007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17577
17578 * win32-low.c: Rename typedef thread_info to
17579 win32_thread_info throughout.
17580
544afa54
PA
175812007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17582
17583 * win32-i386-low.c: Rename to ...
17584 * win32-low.c: ... this.
17585 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17586 * Makefile.in: Likewise.
17587
bce7165d
PA
175882007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17589
17590 * remote-utils.c (monitor_output): Constify msg parameter.
17591 * server.h (monitor_output): Likewise.
17592 * win32-i386-low.c (handle_output_debug_string): New.
17593 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17594 handle_output_debug_string.
17595 (get_child_debug_event): Likewise.
17596
506c7aa0
DJ
175972007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17598
17599 * server.c (main): Correct strtoul check.
17600
42c81e2a
DJ
176012007-03-27 Jon Ringle <jon@ringle.org>
17602
17603 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17604
9453113a
DJ
176052007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17606
17607 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17608
64a69107
DJ
176092007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17610
17611 * terminal.h: Check HAVE_SGTTY_H.
17612
176132007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
17614
17615 * remote-utils.c (remote_open): Print out the assigned port number.
17616
c74d0ad8
DJ
176172007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17618
17619 * remote-utils.c (monitor_output): New function.
17620 * server.c (debug_threads): Define here.
17621 (monitor_show_help): New function.
17622 (handle_query): Handle qRcmd.
17623 (main): Do not handle 'd' packet.
17624 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17625 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17626 of debug_threads.
17627
de7c3b4a
PA
176282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17629
17630 * Makefile.in (EXEEXT): New.
17631 (clean): Use $(EXEEXT).
17632
ef57601b
PA
176332007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17634
17635 * target.h (target_ops): Rename send_signal to request_interrupt,
17636 and remove enum target_signal parameter.
17637 * linux-low.c (linux_request_interrupt): Rename from
17638 linux_send_signal, and always send SIGINT.
17639 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17640 and always send SIGINT.
17641 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17642 of send_signal.
17643 (input_interrupt): Likewise.
17644
820f2bda
PA
176452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17646
17647 * server.c (get_features_xml): Check if target implemented
17648 arch_string.
17649 * win32-i386-low.c (win32_arch_string): New.
17650 (win32_target_ops): Add win32_arch_string as arch_string member.
17651
ab39bf24
UW
176522007-02-22 Markus Deuling <deuling@de.ibm.com>
17653
17654 * spu-low.c (spu_arch_string): New.
17655 (spu_target_ops): Add spu_arch_string.
17656
61ff6e04
DJ
176572007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17658
17659 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17660 * configure.ac: Do not check for terminal.h.
17661 * configure, config.in: Regenerated.
17662
fb1e4ffc
DJ
176632007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17664
17665 * Makefile.in (OBS): Add $(XML_BUILTIN).
17666 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17667 (clean): Update.
17668 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17669 (arm-with-iwmmxt.c): New.
17670 * config.in, configure: Regenerate.
17671 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17672 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17673 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17674 (arm*-*-linux*): Add iWMMXt and regset support.
17675 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17676 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17677 (arm_store_wmmxregset, target_regsets): New.
17678 * server.c (get_features_xml): Take annex argument. Check builtin
17679 XML documents.
17680 (handle_query): Handle multiple annexes.
17681
0f48aa01
DJ
176822007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17683
17684 * remote-utils.c [USE_WIN32API] (read, write): Define.
17685 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17686 write.
17687
23181151
DJ
176882007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17689
17690 * linux-i386-low.c (the_low_target): Set arch_string.
17691 * linux-x86-64-low.c (the_low_target): Likewise.
17692 * linux-low.c (linux_arch_string): New.
17693 (linux_target_ops): Add it.
17694 * linux-low.h (struct linux_target_ops): Add arch_string.
17695 * server.c (write_qxfer_response): Use const void * for DATA.
17696 (get_features_xml): New.
17697 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17698 * target.h (struct target_ops): Add arch_string method.
17699
9d606399
DJ
177002007-01-03 Denis Pilat <denis.pilat@st.com>
17701 Daniel Jacobowitz <dan@codesourcery.com>
17702
17703 * linux-low.c (linux_kill): Handle being called with no threads.
17704 * win32-i386-low.c (win32_kill): Likewise.
17705 (get_child_debug_event): Clear current_process_handle.
17706
177072006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17708 Daniel Jacobowitz <dan@codesourcery.com>
17709
17710 * remote-utils.c (remote_open): Check the type of specified
17711 serial port devices before opening them.
17712 * server.c (main): Kill the inferior if an error occurs during
17713 the first remote_open.
17714
a5e13d24
DJ
177152006-12-05 Markus Deuling <deuling@de.ibm.com>
17716
17717 * README: Update supported targets.
17718
186947f7
DJ
177192006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17720
17721 * Makefile.in (clean): Remove reg-mips64.c.
17722 (reg-mips64.c, reg-mips64.o): New rules.
17723 * configure.srv: Handle mips64. Include regset support for mips.
17724 * linux-mips-low.c (union mips_register): New.
17725 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17726 (mips_breakpoint, mips_breakpoint_at): Use int.
17727 (mips_collect_register, mips_supply_register)
17728 (mips_collect_register_32bit, mips_supply_register_32bit)
17729 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17730 (mips_store_fpregset, target_regsets): New.
17731 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17732
a13e2c95
UW
177332006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17734
17735 * configure.srv: Add target "spu*-*-*".
17736 * Makefile.in (clean): Remove reg-spu.c.
17737 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17738 * spu-low.c: New file.
17739
cb7283db
DJ
177402006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17741
17742 * configure.ac: Correct td_thr_tls_get_addr test.
17743 * configure: Regenerated.
17744
89be2091
DJ
177452006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17746
17747 * linux-low.c (linux_wait_for_event): Reformat. Use the
17748 pass_signals array.
17749 * remote-utils.c (decode_address_to_semicolon): New.
17750 * server.c (pass_signals, handle_general_set): New.
17751 (handle_query): Mention QPassSignals for qSupported.
17752 (main): Call handle_general_set.
17753 * server.h (pass_signals, decode_address_to_semicolon): New.
17754
000ef4f0
DJ
177552006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17756
17757 * server.c (handle_query): Correct error handling for read_auxv.
17758
b7149293
UW
177592005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17760
17761 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17762 and srv_linux_thread_db to yes.
17763 * linux-s390-low.c (s390_fill_gregset): New function.
17764 (target_regsets): Define data structure.
17765
dae5f5cf
DJ
177662006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17767
17768 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17769 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17770 * config.in, configure: Regenerated.
17771 * inferiors.c (gdb_id_to_thread): New function.
17772 (gdb_id_to_thread_id): Use it.
17773 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17774 * linux-low.h (struct process_info): Add th member.
17775 (thread_db_get_tls_address): New prototype.
17776 * remote-utils.c (decode_address): Make non-static.
17777 * server.c (handle_query): Handle qGetTLSAddr.
17778 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17779 * target.h (struct target_ops): Add get_tls_address.
17780 * thread-db.c (maybe_attach_thread): Save the thread handle.
17781 (thread_db_get_tls_address): New.
17782
32ca6d61
DJ
177832006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17784
17785 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17786 (linux_resume_one_process): Take a siginfo_t *. Update all
17787 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17788 (struct pending_signals): Add a siginfo_t.
17789 (linux_wait_for_process): Always set last_status.
17790 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17791 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17792 * linux-low.h (struct process_info): Add last_status.
17793
5ffff7c1
DJ
177942006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17795
17796 * remote-utils.c (try_rle): New function.
17797 (putpkt_binary): Use it.
17798
8695c747
DJ
177992006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17800
17801 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17802 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17803 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17804 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17805 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17806 point registers.
17807
290fadea
RS
178082006-08-08 Richard Sandiford <richard@codesourcery.com>
17809
17810 * server.c (terminal_fd): New variable.
17811 (old_foreground_pgrp): Likewise.
17812 (restore_old_foreground_pgrp): New function.
17813 (start_inferior): Record the terminal file descriptor in terminal_fd
17814 and its original foreground group in old_foreground_pgrp. Register
17815 restore_old_foreground_pgrp with atexit().
17816
9f2e1e63
DJ
178172006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17818
17819 * server.c (handle_query): Correct qPart to qXfer.
17820
b80864fb
DJ
178212006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17822
17823 * configure.ac: Check for more headers which are missing on
17824 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17825 * configure.srv: Add Cygwin and mingw32.
17826 * remote-utils.c: Don't include headers unconditionally which
17827 are missing on mingw32. Include <winsock.h> for mingw32.
17828 (remote_open): Adjust for mingw32 support. Flush
17829 standard error after writing to it.
17830 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17831 (unblock_async_io, enable_async_io, disable_async_io)
17832 (readchar, getpkt): Update for Winsock support.
17833 (prepare_resume_reply): Expect a protocol signal number.
17834 * server.c: Disable <sys/wait.h> on mingw32.
17835 (start_inferior): Adjust for mingw32 support. Flush
17836 standard error after writing to it.
17837 (attach_inferior): Likewise. Use protocol signal
17838 numbers.
17839 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17840 and names.
17841 * win32-i386-low.c: New file.
17842 * Makefile.in (XM_CLIBS): Set.
17843 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17844 (win32-i386-low.o): New dependency rule.
17845 * linux-low.c (linux_wait): Use target signal numbers.
17846 * target.h (struct target_ops): Doc fix.
17847 * server.h (target_signal_to_name): New prototype.
17848 * gdbreplay.c: Don't include headers unconditionally which
17849 are missing on mingw32. Include <winsock.h> for mingw32.
17850 (remote_close, remote_open): Adjust for Winsock support.
17851 * configure, config.in: Regenerated.
17852
0876f84a
DJ
178532006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17854
17855 * server.c (decode_xfer_read, write_qxfer_response): New.
17856 (handle_query): Take a packet length argument. Handle
17857 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17858 the qSupported response.
17859 (main): Update call to handle_query.
17860
01f9e8fa
DJ
178612006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17862
17863 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17864 (putpkt_binary): Renamed from putpkt and adjusted for binary
17865 data.
17866 (putpkt): New wrapper for putpkt_binary.
17867 (readchar): Don't mask off the high bit.
17868 (decode_X_packet): New function.
17869 * server.c (main): Call putpkt_binary if a handler sets the packet
17870 length. Save the length of the incoming packet. Handle 'X'.
17871 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17872
be2a5f71
DJ
178732006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17874
17875 * server.c (handle_query): Handle qSupported.
17876
ea025f5f
DJ
178772006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17878
17879 * remote-utils.c (all_symbols_looked_up): New variable.
17880 (look_up_one_symbol): Check it.
17881 * server.h (look_up_one_symbol): New declaration.
17882 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17883
9308fc88
DJ
178842006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17885
17886 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17887 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17888 (PTRACE_GET_THREAD_AREA): Define.
17889 (ps_get_thread_area): New function.
17890
52fb6437
NS
178912006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17892
17893 * configure.srv (m68k*-*-uclinux*): New target.
17894 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17895 (linux_resume_one_process): Remove extraneous cast.
17896 (linux_read_offsets): New.
17897 (linux_target_op): Add linux_read_offsets on mmuless systems.
17898 * server.c (handle_query): Add qOffsets logic.
17899 * target.h (struct target_ops): Add read_offsets.
17900
21b0f40c
DJ
179012006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17902
17903 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17904 (PTRACE_GET_THREAD_AREA): Define.
17905 (ps_get_thread_area): New function.
17906 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17907 (linux-x86-64-low.o): Update.
17908
0050a760
DJ
179092006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17910
17911 * configure.ac: Remove checks for prfpregset_t.
17912 * gdb_proc_service.h: New file.
17913 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17914 new "gdb_proc_service.h".
17915 * proc-service.c: Likewise.
17916 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17917 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17918 * Makefile.in (gdb_proc_service_h): Updated.
17919 * configure, config.in: Regenerated.
17920
b92a518e
DJ
179212006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17922
17923 * remote-utils.c (prepare_resume_reply): Move declaration
17924 of gdb_id_from_wait to the top of the block.
17925
545587ee
DJ
179262006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17927
17928 * linux-low.c (regsets_store_inferior_registers): Read the regset
17929 from the target before filling it.
17930
9db87ebd
DJ
179312006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17932
17933 * server.c (attach_inferior): Return SIGTRAP for a successful
17934 attach.
17935
dd24457d
DJ
179362006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17937
17938 * Makefile.in (OBS): Add version.o.
17939 (STAGESTUFF): Delete.
17940 (version.o): Add dependencies.
17941 (version.c): Replace rule.
17942 (clean): Remove version.c.
17943 * server.c (gdbserver_version): New.
17944 (gdbserver_usage): Use printf.
17945 (main): Handle --version and --help.
17946 * server.h (version, host_name): Add declarations.
17947
6f0f660e
EZ
179482005-12-23 Eli Zaretskii <eliz@gnu.org>
17949
889bf7c5
PA
17950 * linux-arm-low.c:
17951 * linux-arm-low.c:
17952 * inferiors.c:
17953 * i387-fp.h:
17954 * i387-fp.c:
17955 * gdbreplay.c:
17956 * regcache.c:
17957 * proc-service.c:
17958 * mem-break.h:
17959 * mem-break.c:
17960 * linux-x86-64-low.c:
17961 * linux-sh-low.c:
17962 * linux-s390-low.c:
17963 * linux-ppc64-low.c:
17964 * linux-ppc-low.c:
17965 * linux-mips-low.c:
17966 * linux-m68k-low.c:
17967 * linux-m32r-low.c:
17968 * linux-low.h:
17969 * linux-low.c:
17970 * linux-ia64-low.c:
17971 * linux-i386-low.c:
17972 * linux-crisv32-low.c:
17973 * thread-db.c:
17974 * terminal.h:
17975 * target.h:
17976 * target.c:
17977 * server.h:
17978 * server.c:
17979 * remote-utils.c:
17980 * regcache.h:
17981 * utils.c:
17982 * Makefile.in:
17983 * configure.ac:
6f0f660e
EZ
17984 * gdbserver.1: Add (C) after Copyright. Update the FSF
17985 address.
17986
9d1fb177
DJ
179872005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17988
17989 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17990 (arm_breakpoint_at): Recognize both breakpoints.
17991 (the_low_target): Use the correct breakpoint instruction.
17992
011a70c2
DJ
179932005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17994
17995 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17996 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17997 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17998 (the_low_target): Update.
17999
7fb85e41
AS
180002005-10-25 Andreas Schwab <schwab@suse.de>
18001
18002 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18003
18004 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18005 (ia64_num_regs): Reduce to 462.
18006
3db0444b
DJ
180072005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18008
18009 * acinclude.m4: Correct quoting.
18010 * aclocal.m4: Regenerated.
18011
18012 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18013 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18014 (thread_db_init): Call thread_db_err_str.
18015 * configure.ac: Check for TD_VERSION.
18016 * config.in, configure: Regenerated.
18017
bee0189a
DJ
180182005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18019
18020 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18021
e9d25b98
DJ
180222005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18023
18024 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18025 is not available. Define HAVE_PTRACE_GETREGS if it is.
18026 * config.in, configure: Regenerated.
18027 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18028 * linux-i386-low.c, linux-m68k-low.c: Update to use
18029 HAVE_PTRACE_GETREGS.
18030 * linux-low.c (regsets_fetch_inferior_registers)
18031 (regsets_store_inferior_registers): Only return 0 if we processed
18032 GENERAL_REGS.
18033 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18034 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18035
a06660f7
DJ
180362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18037
18038 * inferiors.c (struct thread_info): Add gdb_id.
18039 (add_thread): Add gdb_id argument.
18040 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18041 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18042 calls to add_thread.
18043 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18044 * server.c (handle_query): Use thread_to_gdb_id.
18045 (handle_v_cont, main): Use gdb_id_to_thread_id.
18046 * server.h (add_thread): Update prototype.
18047 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18048 prototypes.
18049
5a1f5858
DJ
180502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18051
18052 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18053 left-padded registers.
18054 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18055 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18056
e122f1f5
SE
180572005-07-01 Steve Ellcey <sje@cup.hp.com>
18058
18059 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18060 * configure: Regenerate.
18061 * config.in: Regenerate.
18062 * server.h (NEED_DECLARATION_STRERROR):
18063 Replace with !HAVE_DECL_STRERROR.
18064
d592fa2f
DJ
180652005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18066
18067 * linux-low.c (linux_wait, linux_send_signal): Don't test
18068 an unsigned long variable for > 0 if it could be MAX_ULONG.
18069 * server.c (myresume): Likewise.
18070 * target.c (set_desired_inferior): Likewise.
18071
ccbd4912
MK
180722005-06-13 Mark Kettenis <kettenis@gnu.org>
18073
18074 * configure.ac: Simplify and improve check for socklen_t.
18075 * configure, config.in: Regenerate.
18076
f450004a
DJ
180772005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18078
18079 * acconfig.h: Remove.
18080 * configure.ac: Add a test for socklen_t. Use three-argument
18081 AC_DEFINE throughout.
18082 * config.in: Regenerated using autoheader 2.59.
18083 * configure: Regenerated.
18084
18085 * gdbreplay.c (socklen_t): Provide a default.
18086 (remote_open): Use socklen_t.
18087 * remote-utils.c (socklen_t): Provide a default.
18088 (remote_open): Use socklen_t.
18089 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18090 unsigned char.
18091
18092 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18093 char for buffers.
18094 * linux-low.c (linux_read_memory, linux_write_memory)
18095 (linux_read_auxv): Likewise.
18096 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18097 (check_mem_write): Likewise.
18098 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18099 Likewise.
18100 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18101 (registers_from_string, register_data): Likewise.
18102 * server.c (handle_query, main): Likewise.
18103 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18104 (decode_M_packet): Likewise.
18105 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18106 * target.h (struct target_ops): Update read_memory, write_memory,
18107 and read_auxv.
18108 (read_inferior_memory, write_inferior_memory): Update.
18109 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18110 to unsigned char *.
18111 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18112 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18113 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18114 linux-s390-low.c, linux-sh-low.c: Update for changes in
18115 read_inferior_memory and the_low_target->breakpoint.
18116
eee84df1
DJ
181172005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18118
18119 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18120 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18121 * configure.srv: Add powerpc64-*-linux*.
18122 * linux-ppc64-low.c: New file.
18123
45b134e5
OF
181242005-05-23 Orjan Friberg <orjanf@axis.com>
18125
18126 * linux-cris-low.c: New file with support for CRIS.
18127 * linux-crisv32-low.c: Ditto for CRISv32.
18128 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18129 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 18130 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
18131 reg-crisv32.o, and reg-crisv32.c to make rules.
18132 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18133 recognized targets.
18134
48d93c75
UW
181352005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18136
18137 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18138 of sizeof (PTRACE_XFER_TYPE).
18139 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18140
e013ee27
OF
181412005-05-12 Orjan Friberg <orjanf@axis.com>
18142
889bf7c5 18143 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
18144 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18145 pointers for hardware watchpoint support.
18146 * linux-low.h (struct linux_target_ops): Ditto.
18147 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18148 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18149 to linux_target_ops.
18150 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18151 reply packet.
18152 * server.c (main): Recognize 'Z' and 'z' packets.
18153
b0ded00b
UW
181542005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18155
18156 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18157 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18158 (the_low_target): Add new members.
18159
8643e2ad
DJ
181602005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18161
18162 * proc-service.c (ps_lgetregs): Search all_processes instead of
18163 all_threads.
18164
fc620387
DJ
181652005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18166
18167 * server.c (start_inferior): Change return type to int.
18168 (attach_inferior): Change sigptr to int *.
18169 (handle_v_cont, handle_v_requests): Change signal to int *.
18170 (main): Change signal to int.
18171
181722005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
18173
18174 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18175 * configure.srv: Add m32r*-*-linux*.
18176 * linux-m32r-low.c: New file.
18177
e0e76420
DJ
181782005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18179
18180 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18181
a1928bad
DJ
181822005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18183
18184 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18185 Take unsigned long arguments for PIDs.
18186 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18187 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18188 (wait_for_sigstop, linux_resume_one_process)
18189 (regsets_fetch_inferior_registers, linux_send_signal)
18190 (linux_read_auxv): Likewise. Update the types of variables holding
18191 PIDs. Update format string specifiers.
18192 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18193 * remote-utils.c (prepare_resume_reply): Likewise.
18194 * server.c (cont_thread, general_thread, step_thread)
18195 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18196 unsigned long.
18197 (handle_query): Update format specifiers.
18198 (handle_v_cont, main): Use strtoul for thread IDs.
18199 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18200 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18201 (general_thread, step_thread, thread_from_wait)
18202 (old_thread_from_wait): Update.
18203 * target.h (struct thread_resume): Use unsigned long for THREAD.
18204 (struct target_ops): Use unsigned long for arguments to attach and
18205 thread_alive.
18206
dcdb98d2
DJ
182072005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18208
18209 * acinclude.m4: Include bfd/bfd.m4 directly.
18210 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18211 <agriffis@toolchain.org>.
18212 * aclocal.m4, configure: Regenerated.
18213
bec39cab
AC
182142005-01-07 Andrew Cagney <cagney@gnu.org>
18215
18216 * configure.ac: Rename configure.in, require autoconf 2.59.
18217 * configure: Re-generate.
18218
434c4c77
DJ
182192004-12-08 Daniel Jacobowitz <dan@debian.org>
18220
18221 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18222 LIBS when finished.
18223 * aclocal.m4: Regenerated.
18224 * configure: Regenerated.
18225
db1d3e1b
AS
182262004-11-21 Andreas Schwab <schwab@suse.de>
18227
18228 * linux-m68k-low.c (m68k_num_gregs): Define.
18229 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18230 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18231 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18232 (m68k_breakpoint_at): New. Add to the_low_target.
18233
18234 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18235 srv_linux_thread_db to yes.
18236
43360365
JB
182372004-10-20 Joel Brobecker <brobecker@gnat.com>
18238
18239 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18240 (ARCH_SET_FS): Likewise.
18241 (ARCH_GET_FS): Likewise.
18242 (ARCH_GET_GS): Likewise.
18243
fd500816
DJ
182442004-10-16 Daniel Jacobowitz <dan@debian.org>
18245
18246 * linux-i386-low.c (ps_get_thread_area): New.
18247 * linux-x86-64-low.c (ps_get_thread_area): New.
18248 * linux-low.c: Include <sys/syscall.h>.
18249 (linux_kill_one_process): Don't kill the first thread here.
18250 (linux_kill): Kill the first thread here.
18251 (kill_lwp): New function.
18252 (send_sigstop, linux_send_signal): Use it.
18253 * proc-service.c: Clean up #ifdefs.
18254 (fpregset_info): Delete.
18255 (ps_lgetregs): Update and enable implementation.
18256 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18257 implementations.
18258 * remote-utils.c (struct sym_cache, symbol_cache): New.
18259 (input_interrupt): Print a clearer message.
18260 (async_io_enabled): New variable.
18261 (enable_async_io, disable_async_io): Use it. Update comments.
18262 (look_up_one_symbol): Use the symbol cache.
18263 * thread-db.c (thread_db_look_up_symbols): New function.
18264 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18265
f6de3c42
DJ
182662004-10-16 Daniel Jacobowitz <dan@debian.org>
18267
18268 * configure.in: Test for -rdynamic.
18269 * configure: Regenerated.
18270 * Makefile (INTERNAL_LDFLAGS): New.
18271 (gdbserver, gdbreplay): Use it.
18272
2c0fc042
AC
182732004-09-02 Andrew Cagney <cagney@gnu.org>
18274
18275 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18276
075b3282
DJ
182772004-03-23 Daniel Jacobowitz <drow@mvista.com>
18278
18279 * linux-low.c (linux_wait): Clear all_processes list also.
18280
fa6a77dc
DJ
182812004-03-12 Daniel Jacobowitz <drow@mvista.com>
18282
18283 * linux-low.c: Include <errno.h>. Remove extern declaration of
18284 errno.
18285
6d782a97
DJ
182862004-03-12 Daniel Jacobowitz <drow@mvista.com>
18287
18288 * gdbreplay.c, server.h, utils.c: Update copyright years.
18289
3a7fb99b
DJ
182902004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18291
18292 * server.c (main): Print child status or termination signal from
18293 variable 'signal', not 'sig'.
18294
c3e735a6
DJ
182952004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18296
18297 * linux-low.c (linux_read_memory): Change return type to
18298 int. Check for and return error from ptrace().
18299 * target.c (read_inferior_memory): Change return type to int. Pass
18300 back return status from the_target->read_memory().
18301 * target.h (struct target_ops): Adapt *read_memory() prototype.
18302 Update comment.
18303 (read_inferior_memory): Adapt prototype.
18304 * server.c (main): Return an error packet if
18305 read_inferior_memory() returns an error.
18306
a59d1c82
DJ
183072004-03-04 Daniel Jacobowitz <drow@mvista.com>
18308
18309 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18310 Unify with other clean targets.
18311
dc3f8883
DJ
183122004-02-29 Daniel Jacobowitz <drow@mvista.com>
18313
18314 * server.c (handle_v_cont): Call set_desired_inferior.
18315
89a208da
DJ
183162004-02-29 Daniel Jacobowitz <drow@mvista.com>
18317
18318 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18319
62ea82f5
DJ
183202004-02-29 Daniel Jacobowitz <drow@mvista.com>
18321
18322 * linux-low.c (linux_wait): Unblock async I/O.
18323 (linux_resume): Block and enable async I/O.
18324 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18325 * server.h (block_async_io, unblock_async_io): Add prototypes.
18326
6910d122
DJ
183272004-02-29 Daniel Jacobowitz <drow@mvista.com>
18328
18329 * remote-utils.c (remote_open): Print a status notice after
18330 opening a TCP port.
18331 * server.c (attach_inferior): Print a status notice after
18332 attaching.
18333
183342004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
18335
18336 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18337
c89dc5d4
DJ
183382004-02-26 Daniel Jacobowitz <drow@mvista.com>
18339
18340 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18341 error packet.
18342 * server.c, target.h: Update copyright years.
18343
4b8dad4a
RM
183442004-02-25 Roland McGrath <roland@redhat.com>
18345
18346 * target.h (struct target_ops): New member `read_auxv'.
18347 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18348 * linux-low.c (linux_read_auxv): New function.
18349 (linux_target_ops): Initialize `read_auxv' member to that.
18350
d7446758
JB
183512004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18352
18353 Committed by Jim Blandy <jimb@redhat.com>.
18354
18355 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 18356 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
18357 instead of GPR_SIZE to distiguish s390 and s390x targets.
18358
5544ad89
DJ
183592004-01-31 Daniel Jacobowitz <drow@mvista.com>
18360
18361 * linux-low.c: Update copyright year.
18362 (check_removed_breakpoint): Clear pending_is_breakpoint.
18363 (linux_set_resume_request, linux_queue_one_thread)
18364 (resume_status_pending_p): New functions.
18365 (linux_continue_one_thread): Use process->resume.
18366 (linux_resume): Only resume threads if there are no pending events.
18367 * linux-low.h (struct process_info): Add resume request
18368 pointer.
18369
2a68b70e
DJ
183702004-01-30 Daniel Jacobowitz <drow@mvista.com>
18371
18372 * regcache.c (new_register_cache): Clear the allocated register
18373 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18374
64386c31
DJ
183752003-10-13 Daniel Jacobowitz <drow@mvista.com>
18376
18377 * linux-low.c (linux_resume): Take a struct thread_resume *
18378 argument.
18379 (linux_wait): Update call.
18380 (resume_ptr): New static variable.
18381 (linux_continue_one_thread): Renamed from
18382 linux_continue_one_process. Use resume_ptr.
18383 (linux_resume): Use linux_continue_one_thread.
18384 * server.c (handle_v_cont, handle_v_requests): New functions.
18385 (myresume): New function.
18386 (main): Handle 'v' case.
18387 * target.h (struct thread_resume): New type.
18388 (struct target_ops): Change argument of "resume" to struct
18389 thread_resume *.
18390 (myresume): Delete macro.
18391
c938e9b0
L
183922003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18393
18394 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18395 (uninstall): Support DESTDIR.
18396
7f313d07
BC
18397Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18398
18399 * configure.srv: Add xscale*linux copy of arm*linux entry.
18400
3b2fc2ea
DJ
184012003-07-24 Daniel Jacobowitz <drow@mvista.com>
18402
18403 * linux-arm-low.c (arm_reinsert_addr): New function.
18404 (the_low_target): Add arm_reinsert_addr.
18405
1c0a559e
MK
184062003-07-08 Mark Kettenis <kettenis@gnu.org>
18407
18408 * mem-break.c: Remove whitespace at end of file.
18409
43d5792c
DJ
184102003-06-28 Daniel Jacobowitz <drow@mvista.com>
18411
18412 * configure.in: Check whether we need to prototype strerror.
18413 * server.h: Optionally prototype strerror.
18414 * gdbreplay.c (perror_with_name): Use strerror.
18415 * linux-low.c (linux_attach_lwp): Use strerror.
18416 * utils.c (perror_with_name): Use strerror.
18417 * config.in, configure: Regenerated.
18418
c8a86edf
DJ
184192003-06-28 Daniel Jacobowitz <drow@mvista.com>
18420
18421 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18422 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18423
73d37363
DJ
184242003-06-20 Daniel Jacobowitz <drow@mvista.com>
18425
18426 * Makefile.in (SFILES): Update.
18427 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18428 low-sun3.c: Remove files.
18429
6ad8ae5c
DJ
184302003-06-17 Daniel Jacobowitz <drow@mvista.com>
18431
18432 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18433 (linux_detach_one_process, linux_detach): New functions.
18434 (linux_target_ops): Add linux_detach.
18435 * server.c (main): Handle 'D' packet.
18436 * target.h (struct target_ops): Add "detach" member.
18437 (detach_inferior): Define.
18438
1581182a
MK
184392003-06-13 Mark Kettenis <kettenis@gnu.org>
18440
18441 From Kelley Cook <kelleycook@wideopenwest.com>:
18442 * configure.srv: Accept i[34567]86 variants.
18443
e5379b03
DJ
184442003-06-05 Daniel Jacobowitz <drow@mvista.com>
18445
18446 * linux-low.c (linux_wait_for_event): Correct comment typos.
18447 (linux_resume_one_process): Call check_removed_breakpoint.
18448 (linux_send_signal): New function.
18449 (linux_target_ops): Add linux_send_signal.
18450 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18451 of kill.
18452 * target.h (struct target_ops): Add send_signal.
18453
2ff29de4
JB
184542003-05-29 Jim Blandy <jimb@redhat.com>
18455
18456 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18457 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18458 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18459 away part of the register's value.
18460
254787d4
DJ
184612003-03-26 Daniel Jacobowitz <drow@mvista.com>
18462
18463 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18464 (linux_wait_for_event, linux_init_signals): Likewise.
18465
94e10508
DJ
184662003-03-17 Daniel Jacobowitz <drow@mvista.com>
18467
18468 * configure.in: Check for stdlib.h.
18469 * configure: Regenerated.
18470 * config.in: Regenerated.
18471
4c0711e0
DJ
184722003-01-04 Andreas Schwab <schwab@suse.de>
18473
18474 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18475
ef66e766
AC
184762003-01-02 Andrew Cagney <ac131313@redhat.com>
18477
18478 * Makefile.in: Remove obsolete code.
18479
a1358604
DJ
184802002-11-20 Daniel Jacobowitz <drow@mvista.com>
18481
18482 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18483 defined(PT_FPR0_HI).
18484
23ce3b1c
DJ
184852002-11-17 Stuart Hughes <seh@zee2.com>
18486
18487 * linux-arm-low.c (arm_num_regs): Increase.
18488 (arm_regmap): Include status register.
18489
184902002-11-17 Daniel Jacobowitz <drow@mvista.com>
18491
18492 * linux-low.c (register_addr): Remove incorrect -1 check.
18493
a9fa9f7d
DJ
184942002-08-29 Daniel Jacobowitz <drow@mvista.com>
18495
18496 * linux-low.c (linux_create_inferior): Call setpgid. Return
18497 the new PID.
18498 (unstopped_p, linux_signal_pid): Remove.
18499 (linux_target_ops): Remove linux_signal_pid.
18500 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18501 global instead of target method.
18502 * target.h (struct target_ops): Remove signal_pid. Update comment
18503 for create_inferior.
18504 * server.c (signal_pid): New variable.
18505 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 18506 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
18507 (attach_inferior): Set signal_pid.
18508
17574093
DJ
185092002-08-23 Daniel Jacobowitz <drow@mvista.com>
18510
18511 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18512
185132002-08-20 Jim Blandy <jimb@redhat.com>
18514
18515 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18516 default for this.
18517
185182002-08-01 Andrew Cagney <cagney@redhat.com>
18519
18520 * Makefile.in: Make chill references obsolete.
18521
185222002-07-24 Kevin Buettner <kevinb@redhat.com>
18523
18524 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18525 * configure: Regenerate.
18526 * config.in: Regenerate.
18527
185282002-07-09 David O'Brien <obrien@FreeBSD.org>
18529
18530 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18531 (perror_with_name, remote_close, remote_open, expect, play): Static.
18532
185332002-07-04 Michal Ludvig <mludvig@suse.cz>
18534
4b8dad4a 18535 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
18536 byte offsets instead of an array of indexes.
18537 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18538
185392002-06-13 Daniel Jacobowitz <drow@mvista.com>
18540
18541 * regcache.c: Add comment.
18542
185432002-06-11 Daniel Jacobowitz <drow@mvista.com>
18544
18545 * thread-db.c: New file.
18546 * proc-service.c: New file.
18547 * acinclude.m4: New file.
18548 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18549 proc-service.o, and thread-db.o.
18550 (linux-low.o): Add USE_THREAD_DB.
18551 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18552 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18553 * aclocal.m4: Regenerated.
18554 * config.in: Regenerated.
18555 * configure: Regenerated.
18556 * configure.in: Check for proc_service.h, sys/procfs.h,
18557 thread_db.h, and linux/elf.h headrs.
18558 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18559 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18560 Check for -lthread_db and thread support.
18561 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18562 PowerPC, and SuperH.
18563 * i387-fp.c: Constify arguments.
18564 * i387-fp.h: Likewise.
18565 * inferiors.c: (struct thread_info): Renamed from
18566 `struct inferior_info'. Remove PID member. Use generic inferior
18567 list header. All uses updated.
18568 (inferiors, signal_pid): Removed.
18569 (all_threads): New variable.
18570 (get_thread): Define.
18571 (add_inferior_to_list): New function.
18572 (for_each_inferior): New function.
18573 (change_inferior_id): New function.
18574 (add_inferior): Removed.
18575 (remove_inferior): New function.
18576 (add_thread): New function.
18577 (free_one_thread): New function.
18578 (remove_thread): New function.
18579 (clear_inferiors): Use for_each_inferior and free_one_thread.
18580 (find_inferior): New function.
18581 (find_inferior_id): New function.
18582 (inferior_target_data): Update argument type.
18583 (set_inferior_target_data): Likewise.
18584 (inferior_regcache_data): Likewise.
18585 (set_inferior_regcache_data): Likewise.
18586 * linux-low.c (linux_bp_reinsert): Remove.
18587 (all_processes, stopping_threads, using_thrads)
18588 (struct pending_signals, debug_threads, pid_of): New.
18589 (inferior_pid): Replace with macro.
18590 (struct inferior_linux_data): Remove.
18591 (get_stop_pc, add_process): New functions.
18592 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18593 Use add_process and add_thread.
18594 (linux_attach_lwp): New function, based on old linux_attach. Use
18595 add_process and add_thread. Set stop_expected for new threads.
18596 (linux_attach): New function.
18597 (linux_kill_one_process): New function.
18598 (linux_kill): Kill all LWPs.
18599 (linux_thread_alive): Use find_inferior_id.
18600 (check_removed_breakpoints, status_pending_p): New functions.
18601 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18602 Update. Use WNOHANG. Wait for cloned processes also. Update process
18603 struct for the found process.
18604 (linux_wait_for_event): New function.
18605 (linux_wait): Use it. Support LWPs.
18606 (send_sigstop, wait_for_sigstop, stop_all_processes)
18607 (linux_resume_one_process, linux_continue_one_process): New functions.
18608 (linux_resume): Support LWPs.
18609 (REGISTER_RAW_SIZE): Remove.
18610 (fetch_register): Use register_size instead. Call supply_register.
18611 (usr_store_inferior_registers): Likewise. Call collect_register.
18612 Fix recursive case.
18613 (regsets_fetch_inferior_registers): Improve error message.
18614 (regsets_store_inferior_registers): Add debugging.
18615 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18616 (unstopped_p, linux_signal_pid): New functions.
18617 (linux_target_ops): Add linux_signal_pid.
18618 (linux_init_signals): New function.
18619 (initialize_low): Call it. Initialize using_threads.
18620 * regcache.c (inferior_regcache_data): Add valid
18621 flag.
18622 (get_regcache): Fetch registers lazily. Add fetch argument
18623 and update all callers.
18624 (regcache_invalidate_one, regcache_invalidate): New
18625 functions.
18626 (new_register_cache): Renamed from create_register_cache.
18627 Return the new regcache.
18628 (free_register_cache): Change argument to a void *.
18629 (registers_to_string, registers_from_string): Call get_regcache
18630 with fetch flag set.
18631 (register_data): Make static. Pass fetch flag to get_regcache.
18632 (supply_register): Call get_regcache with fetch flag clear.
18633 (collect_register): Call get_regcache with fetch flag set.
18634 (collect_register_as_string): New function.
18635 * regcache.h: Update.
18636 * remote-utils.c (putpkt): Flush after debug output and use
18637 stderr.
18638 Handle input interrupts while waiting for an ACK.
18639 (input_interrupt): Use signal_pid method.
18640 (getpkt): Flush after debug output and use stderr.
18641 (outreg): Use collect_register_as_string.
18642 (new_thread_notify, dead_thread_notify): New functions.
18643 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18644 and general_thread.
18645 (look_up_one_symbol): Flush after debug output.
18646 * server.c (step_thread, server_waiting): New variables.
18647 (start_inferior): Don't use signal_pid. Update call to mywait.
18648 (attach_inferior): Update call to mywait.
18649 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18650 (main): Don't fetch/store registers explicitly. Use
18651 set_desired_inferior. Support proposed ``Hs'' packet. Update
18652 calls to mywait.
18653 * server.h: Update.
18654 (struct inferior_list, struct_inferior_list_entry): New.
18655 * target.c (set_desired_inferior): New.
18656 (write_inferior_memory): Constify.
18657 (mywait): New function.
18658 * target.h: Update.
18659 (struct target_ops): New signal_pid method.
18660 (mywait): Removed macro, added prototype.
18661
18662 * linux-low.h (regset_func): Removed.
18663 (regset_fill_func, regset_store_func): New.
18664 (enum regset_type): New.
18665 (struct regset_info): Add type field. Use new operation types.
18666 (struct linux_target_ops): stop_pc renamed to get_pc.
18667 Add decr_pc_after_break and breakpoint_at.
18668 (get_process, get_thread_proess, get_process_thread)
18669 (strut process_info, all_processes, linux_attach_lwp)
18670 (thread_db_init): New.
18671
18672 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18673 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18674 (the_low_target): Add new members.
18675 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18676 (i386_store_fpxregset): Constify.
18677 (target_regsets): Add new kind identifier.
18678 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18679 (i386_set_pc): Add debugging.
18680 (i386_breakpoint_at): New function.
18681 (the_low_target): Add new members.
18682 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18683 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18684 (mips_breakpoint_at): New.
18685 (the_low_target): Add new members.
18686 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18687 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18688 (the_low_target): Add new members.
18689 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18690 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18691 (the_low_target): Add new members.
18692 * linux-x86-64-low.c (target_regsets): Add new kind
18693 identifier.
18694
186952002-05-15 Daniel Jacobowitz <drow@mvista.com>
18696
18697 From Martin Pool <mbp@samba.org>:
18698 * server.c (gdbserver_usage): New function.
18699 (main): Call it.
18700
187012002-05-14 Daniel Jacobowitz <drow@mvista.com>
18702
18703 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18704 stop_at -> stop_pc.
18705
187062002-05-04 Andrew Cagney <ac131313@redhat.com>
18707
18708 * Makefile.in: Remove obsolete code.
18709
187102002-04-24 Michal Ludvig <mludvig@suse.cz>
18711
18712 * linux-low.c (regsets_fetch_inferior_registers),
18713 (regsets_store_inferior_registers): Removed cast to int from
18714 ptrace() calls.
18715 * regcache.h: Added declaration of struct inferior_info.
18716
187172002-04-20 Daniel Jacobowitz <drow@mvista.com>
18718
18719 * inferiors.c (struct inferior_info): Add regcache_data.
18720 (add_inferior): Call create_register_cache.
18721 (clear_inferiors): Call free_register_cache.
18722 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18723 * regcache.c (struct inferior_regcache_data): New.
18724 (registers): Remove.
18725 (get_regcache): New function.
18726 (create_register_cache, free_register_cache): New functions.
18727 (set_register_cache): Don't initialize the register cache here.
18728 (registers_to_string, registers_from_string, register_data): Call
18729 get_regcache.
18730 * regcache.h: Add prototypes.
18731 * server.h: Likewise.
18732
187332002-04-20 Daniel Jacobowitz <drow@mvista.com>
18734
18735 * mem-break.c: New file.
18736 * mem-break.h: New file.
18737 * Makefile.in: Add mem-break.o rule; update server.h
18738 dependencies.
18739 * inferiors.c (struct inferior_info): Add target_data
18740 member.
18741 (clear_inferiors): Free target_data member if set.
18742 (inferior_target_data, set_inferior_target_data): New functions.
18743 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18744 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18745 * linux-low.c (linux_bp_reinsert): New variable.
18746 (struct inferior_linux_data): New.
18747 (linux_create_inferior): Use set_inferior_target_data.
18748 (linux_attach): Likewise. Call add_inferior.
18749 (linux_wait_for_one_inferior): New function.
18750 (linux_wait): Call it.
18751 (linux_write_memory): Add const.
18752 (initialize_low): Call set_breakpoint_data.
18753 * linux-low.h (struct linux_target_ops): Add breakpoint
18754 handling members.
18755 * server.c (attach_inferior): Remove extra add_inferior
18756 call.
18757 * server.h: Include mem-break.h. Update inferior.c
18758 prototypes.
18759 * target.c (read_inferior_memory)
18760 (write_inferior_memory): New functions.
18761 * target.h (read_inferior_memory)
18762 (write_inferior_memory): Change macros to prototypes.
18763 (struct target_ops): Update comments. Add const to write_memory
18764 definition.
18765
187662002-04-11 Daniel Jacobowitz <drow@mvista.com>
18767
18768 * linux-low.c (usr_store_inferior_registers): Support
18769 registers which are allowed to fail to store.
18770 * linux-low.h (linux_target_ops): Likewise.
18771 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18772 (ppc_cannot_store_register): FPSCR may not be storable.
18773
187742002-04-09 Daniel Jacobowitz <drow@mvista.com>
18775
18776 * server.h: Include <string.h> if HAVE_STRING_H.
18777 * ChangeLog: Correct paths in last ChangeLog entry.
18778
187792002-04-09 Daniel Jacobowitz <drow@mvista.com>
18780
18781 * linux-low.h: Remove obsolete prototypes.
18782 (struct linux_target_ops): New.
18783 (extern the_low_target): New.
18784 * linux-low.c (num_regs, regmap): Remove declarations.
18785 (register_addr): Use the_low_target explicitly.
18786 (fetch_register): Likewise.
18787 (usr_fetch_inferior_registers): Likewise.
18788 (usr_store_inferior_registers): Likewise.
18789 * linux-arm-low.c (num_regs): Remove.
18790 (arm_num_regs): Define.
18791 (arm_regmap): Renamed from regmap, made static.
18792 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18793 made static.
18794 (arm_cannot_store_register): Renamed from cannot_store_register,
18795 made static.
18796 (the_low_target): New.
18797 * linux-i386-low.c (num_regs): Remove.
18798 (i386_num_regs): Define.
18799 (i386_regmap): Renamed from regmap, made static.
18800 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18801 made static.
18802 (i386_cannot_store_register): Renamed from cannot_store_register,
18803 made static.
18804 (the_low_target): New.
18805 * linux-ia64-low.c (num_regs): Remove.
18806 (ia64_num_regs): Define.
18807 (ia64_regmap): Renamed from regmap, made static.
18808 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18809 made static.
18810 (ia64_cannot_store_register): Renamed from cannot_store_register,
18811 made static.
18812 (the_low_target): New.
18813 * linux-m68k-low.c (num_regs): Remove.
18814 (m68k_num_regs): Define.
18815 (m68k_regmap): Renamed from regmap, made static.
18816 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18817 made static.
18818 (m68k_cannot_store_register): Renamed from cannot_store_register,
18819 made static.
18820 (the_low_target): New.
18821 * linux-mips-low.c (num_regs): Remove.
18822 (mips_num_regs): Define.
18823 (mips_regmap): Renamed from regmap, made static.
18824 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18825 made static.
18826 (mips_cannot_store_register): Renamed from cannot_store_register,
18827 made static.
18828 (the_low_target): New.
18829 * linux-ppc-low.c (num_regs): Remove.
18830 (ppc_num_regs): Define.
18831 (ppc_regmap): Renamed from regmap, made static.
18832 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18833 made static.
18834 (ppc_cannot_store_register): Renamed from cannot_store_register,
18835 made static.
18836 (the_low_target): New.
18837 * linux-s390-low.c (num_regs): Remove.
18838 (s390_num_regs): Define.
18839 (s390_regmap): Renamed from regmap, made static.
18840 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18841 made static.
18842 (s390_cannot_store_register): Renamed from cannot_store_register,
18843 made static.
18844 (the_low_target): New.
18845 * linux-sh-low.c (num_regs): Remove.
18846 (sh_num_regs): Define.
18847 (sh_regmap): Renamed from regmap, made static.
18848 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18849 made static.
18850 (sh_cannot_store_register): Renamed from cannot_store_register,
18851 made static.
18852 (the_low_target): New.
18853 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18854 (the_low_target): New.
18855
188562002-04-09 Daniel Jacobowitz <drow@mvista.com>
18857
18858 * Makefile.in: Add stamp-h target.
18859 * configure.in: Create stamp-h.
18860 * configure: Regenerated.
18861
188622002-04-09 Daniel Jacobowitz <drow@mvista.com>
18863
18864 * inferiors.c: New file.
18865 * target.c: New file.
18866 * target.h: New file.
18867 * Makefile.in: Add target.o and inferiors.o. Update
18868 dependencies.
18869 * linux-low.c (inferior_pid): New static variable,
18870 moved from server.c.
18871 (linux_create_inferior): Renamed from create_inferior.
18872 Call add_inferior. Return 0 on success instead of a PID.
18873 (linux_attach): Renamed from myattach.
18874 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18875 (linux_thread_alive): Renamed from mythread_alive.
18876 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18877 child dies.
18878 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18879 (regsets_store_inferior_registers): Correct error message.
18880 Add missing ``return 0''.
18881 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18882 (linux_store_registers): Renamed from store_inferior_registers.
18883 (linux_read_memory): Renamed from read_inferior_memory.
18884 (linux_write_memory): Renamed from write_inferior_memory.
18885 (linux_target_ops): New structure.
18886 (initialize_low): Call set_target_ops ().
18887 * remote-utils.c (unhexify): New function.
18888 (hexify): New function.
18889 (input_interrupt): Send signals to ``signal_pid''.
18890 * server.c (inferior_pid): Remove.
18891 (start_inferior): Update create_inferior call.
18892 (attach_inferior): Call add_inferior.
18893 (handle_query): New function.
18894 (main): Call handle_query for `q' packets.
18895 * server.h: Include "target.h". Remove obsolete prototypes.
18896 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18897
188982002-04-09 Daniel Jacobowitz <drow@mvista.com>
18899
18900 * Makefile.in: Add WARN_CFLAGS. Update configury
18901 dependencies.
18902 * configure.in: Check for <string.h>
18903 * configure: Regenerate.
18904 * config.in: Regenerate.
18905 * gdbreplay.c: Include needed system headers.
18906 (remote_open): Remove strchr prototype.
18907 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18908 * regcache.c (supply_register): Change buf argument to const void *.
18909 (supply_register_by_name): Likewise.
18910 (collect_register): Change buf argument to void *.
18911 (collect_register_by_name): Likewise.
18912 * regcache.h: Add missing prototypes.
18913 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18914 * server.c (handle_query): New function.
18915 (attached): New static variable, moved out of main.
18916 (main): Quiet longjmp clobber warnings.
18917 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18918 * utils.c (error): Remove NORETURN.
18919 (fatal): Likewise.