13fd47d65e34cf4d862e4915694bbba631a02b33
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's hostio_last_error 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: Add "hostio.h" to includes.
9 (process_target::hostio_last_error): Define.
10
11 Update the derived classes and callers below.
12
13 * hostio.cc (hostio_error): Update.
14 * linux-low.cc: Remove "hostio.h" from includes.
15 (linux_target_ops): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 * nto-low.cc (nto_target_ops): Update.
18 * win32-low.h (class win32_process_target): Update.
19 * win32-low.cc (win32_target_ops): Update.
20 (wince_hostio_last_error): Turn into ...
21 (win32_process_target::hostio_last_error): ... this.
22
23 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
24
25 Turn process_stratum_target's get_tls_address op into a method of
26 process_target.
27
28 * target.h (struct process_stratum_target): Remove the target op.
29 (class process_target): Add the target op. Also add
30 'supports_get_tls_address'.
31 * target.cc (process_target::get_tls_address): Define.
32 (process_target::supports_get_tls_address): Define.
33
34 Update the derived classes and callers below.
35
36 * server.cc (handle_query): Update.
37 * linux-low.cc (linux_target_ops): Update.
38 (linux_process_target::supports_get_tls_address): Define.
39 (linux_process_target::get_tls_address): Define.
40 * linux-low.h (class linux_process_target): Update.
41 * lynx-low.cc (lynx_target_ops): Update.
42 * nto-low.cc (nto_target_ops): Update.
43 * win32-low.cc (win32_target_ops): Update.
44
45 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
46
47 Turn process_stratum_target's read_offsets op into a method of
48 process_target.
49
50 * target.h (struct process_stratum_target): Remove the target op.
51 (class process_target): Add the target op. Also add
52 'supports_read_offsets'.
53 * target.cc (process_target::read_offsets): Define.
54 (process_target::supports_read_offsets): Define.
55
56 Update the derived classes and callers below.
57
58 * server.cc (handle_query): Update.
59 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
60 (linux_target_ops): Update.
61 (linux_process_target::supports_read_offsets): Define.
62 (linux_read_offsets): Turn into ...
63 (linux_process_target::read_offsets): ... this.
64 * linux-low.h (class linux_process_target): Update.
65 * lynx-low.cc (lynx_target_ops): Update.
66 * nto-low.cc (nto_target_ops): Update.
67 * win32-low.cc (win32_target_ops): Update.
68
69 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
70
71 Turn process_stratum_target's stopped_by_watchpoint and
72 stopped_data_address ops into methods of process_target.
73
74 * target.h (struct process_stratum_target): Remove the target ops.
75 (class process_target): Add the target ops.
76 * target.cc (process_target::stopped_by_watchpoint): Define.
77 (process_target::stopped_data_address): Define.
78
79 Update the derived classes and callers below.
80
81 * remote-utils.cc (prepare_resume_reply): Update.
82 * linux-low.cc (linux_target_ops): Update.
83 (linux_stopped_by_watchpoint): Turn into ...
84 (linux_process_target::stopped_by_watchpoint): ... this.
85 (linux_stopped_data_address): Turn into ...
86 (linux_process_target::stopped_data_address): ... this.
87 * linux-low.h (class linux_process_target): Update.
88 * lynx-low.cc (lynx_target_ops): Update.
89 * nto-low.cc (nto_target_ops): Update.
90 (nto_stopped_by_watchpoint): Turn into ...
91 (nto_process_target::stopped_by_watchpoint): ... this.
92 (nto_stopped_data_address): Turn into ...
93 (nto_process_target::stopped_data_address): ... this.
94 * nto-low.h (class nto_process_target): Update.
95 * win32-low.cc (win32_target_ops): Update.
96 (win32_stopped_by_watchpoint): Turn into ...
97 (win32_process_target::stopped_by_watchpoint): ... this.
98 (win32_stopped_data_address): Turn into ...
99 (win32_process_target::stopped_data_address): ... this.
100 * win32-low.h (class win32_process_target): Update.
101
102 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
103
104 Turn process_stratum_target's supports_hardware_single_step op into
105 a 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_supports_hardware_single_step): Update the macro.
110 (target_can_do_hardware_single_step): Remove declaration.
111 * target.cc (process_target::supports_hardware_single_step): Define.
112 (target_can_do_hardware_single_step): Remove.
113
114 Update the derived classes and callers below.
115
116 * linux-low.h (class linux_process_target): Update.
117 * linux-low.cc (linux_target_ops): Update.
118 (linux_supports_hardware_single_step): Turn into ...
119 (linux_process_target::supports_hardware_single_step): ... this.
120 * lynx-low.h (class lynx_process_target): Update.
121 * lynx-low.cc (lynx_target_ops): Update.
122 (lynx_process_target::supports_hardware_single_step): Define.
123 * nto-low.h (class nto_process_target): Update.
124 * nto-low.cc (nto_target_ops): Update.
125 (nto_process_target::supports_hardware_single_step): Define.
126 * win32-low.h (class win32_process_target): Update.
127 * win32-low.cc (win32_target_ops): Update.
128 (win32_process_target::supports_hardware_single_step): Define.
129
130 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
131
132 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
133 ops into methods of process_target.
134
135 * target.h (struct process_stratum_target): Remove the target ops.
136 (class process_target): Add the target ops.
137 (target_stopped_by_hw_breakpoint): Update the macro.
138 (target_supports_stopped_by_hw_breakpoint): Update the macro.
139 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
140 (process_target::supports_stopped_by_hw_breakpoint): Define.
141
142 Update the derived classes and callers below.
143
144 * linux-low.cc (linux_target_ops): Update.
145 (linux_stopped_by_hw_breakpoint): Turn into ...
146 (linux_process_target::stopped_by_hw_breakpoint): ... this.
147 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
148 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
149 * linux-low.h (class linux_process_target): Update.
150 * lynx-low.cc (lynx_target_ops): Update.
151 * nto-low.cc (nto_target_ops): Update.
152 * win32-low.cc (win32_target_ops): Update.
153
154 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
155
156 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
157 ops into methods of process_target.
158
159 * target.h (struct process_stratum_target): Remove the target ops.
160 (class process_target): Add the target ops.
161 (target_stopped_by_sw_breakpoint): Update the macro.
162 (target_supports_stopped_by_sw_breakpoint): Update the macro.
163 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
164 (process_target::supports_stopped_by_sw_breakpoint): Define.
165
166 Update the derived classes and callers below.
167
168 * linux-low.cc (linux_target_ops): Update.
169 (linux_stopped_by_sw_breakpoint): Turn into ...
170 (linux_process_target::stopped_by_sw_breakpoint): ... this.
171 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
172 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
173 * linux-low.h (class linux_process_target): Update.
174 * lynx-low.cc (lynx_target_ops): Update.
175 * nto-low.cc (nto_target_ops): Update.
176 * win32-low.cc (win32_target_ops): Update.
177
178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
179
180 Turn process_stratum_target's insert_point and remove_point ops
181 into methods of process_target.
182
183 * target.h (struct process_stratum_target): Remove the target ops.
184 (class process_target): Add the target ops.
185 * target.cc (process_target::insert_point): Define.
186 (process_target::remove_point): Define.
187
188 Update the derived classes and callers below.
189
190 * mem-break.cc (set_raw_breakpoint_at): Update.
191 (delete_raw_breakpoint): Update.
192 (uninsert_raw_breakpoint): Update.
193 (reinsert_raw_breakpoint): Update.
194 * linux-low.cc (linux_target_ops): Update.
195 (linux_insert_point): Turn into ...
196 (linux_process_target::insert_point): ... this.
197 (linux_remove_point): Turn into ...
198 (linux_process_target::remove_point): ... this.
199 * linux-low.h (class linux_process_target): Update.
200 * lynx-low.cc (lynx_target_ops): Update.
201 * nto-low.cc (nto_target_ops): Update.
202 (nto_insert_point): Turn into ...
203 (nto_process_target::insert_point): ... this.
204 (nto_remove_point): Turn into ...
205 (nto_process_target::remove_point): ... this.
206 * nto-low.h (class nto_process_target): Update.
207 * win32-low.cc (win32_target_ops): Update.
208 (win32_insert_point): Turn into ...
209 (win32_process_target::insert_point): ... this.
210 (win32_remove_point): Turn into ...
211 (win32_process_target::remove_point): ... this.
212 * win32-low.h (class win32_process_target): Update.
213
214 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
215
216 Turn process_stratum_target's supports_z_point_type op into a
217 method of process_target.
218
219 * target.h (struct process_stratum_target): Remove the target op.
220 (class process_target): Add the target op.
221 * target.cc (process_target::supports_z_point_type): Define.
222
223 Update the derived classes and callers below.
224
225 * mem-break.cc (z_type_supported): Update.
226 * linux-low.cc (linux_target_ops): Update.
227 (linux_supports_z_point_type): Turn into ...
228 (linux_process_target::supports_z_point_type): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 * nto-low.cc (nto_target_ops): Update.
232 (nto_supports_z_point_type): Turn into ...
233 (nto_process_target::supports_z_point_type): ... this.
234 * nto-low.h (class nto_process_target): Update.
235 * win32-low.cc (win32_target_ops): Update.
236 (win32_supports_z_point_type): Turn into ...
237 (win32_process_target::supports_z_point_type): ... this.
238 * win32-low.h (class win32_process_target): Update.
239
240 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
241
242 Turn process_stratum_target's read_auxv op into a method of
243 process_target.
244
245 * target.h (class process_stratum_target): Remove the target op.
246 (struct process_target): Add the target op. Also add
247 'supports_read_auxv'.
248 * target.cc (process_target::read_auxv): Define.
249 (process_target::supports_read_auxv): Define.
250
251 Update the derived classes and callers below.
252
253 * server.cc (handle_qxfer_auxv): Update.
254 (handle_query): Update.
255 * linux-low.cc (linux_target_ops): Update.
256 (linux_process_target::supports_read_auxv): Define.
257 (linux_read_auxv): Turn into ...
258 (linux_process_target::read_auxv): ... this.
259 * linux-low.h (class linux_process_target): Update.
260 * lynx-low.cc (lynx_target_ops): Update.
261 * nto-low.cc (nto_target_ops): Update.
262 (nto_process_target::supports_read_auxv): Define.
263 (nto_read_auxv): Turn into ...
264 (nto_process_target::read_auxv): ... this.
265 * nto-low.h (class nto_process_target): Update.
266 * win32-low.cc (win32_target_ops): Update.
267
268 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
269
270 Turn process_stratum_target's request_interrupt op into a method of
271 process_target.
272
273 * target.h (struct process_stratum_target): Remove the target op.
274 (class process_target): Add the target op.
275
276 Update the derived classes and callers below.
277
278 * remote-utils.cc (putpkt_binary_1): Update.
279 (input_interrupt): Update.
280 (getpkt): Update.
281 * server.cc (handle_v_requests): Update.
282 * linux-low.cc (linux_target_ops): Update.
283 (linux_request_interrupt): Turn into ...
284 (linux_process_target::request_interrupt): ... this.
285 * linux-low.h (class linux_process_target): Update.
286 * lynx-low.cc (lynx_target_ops): Update.
287 (lynx_request_interrupt): Turn into ...
288 (lynx_process_target::request_interrupt): ... this.
289 * lynx-low.h (class lynx_process_target): Update.
290 * nto-low.cc (nto_target_ops): Update.
291 (nto_request_interrupt): Turn into ...
292 (nto_process_target::request_interrupt): ... this.
293 * nto-low.h (class nto_process_target): Update.
294 * win32-low.cc (win32_target_ops): Update.
295 (win32_request_interrupt): Turn into ...
296 (win32_process_target::request_interrupt): ... this.
297 * win32-low.h (class win32_process_target): Update.
298
299 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
300
301 Turn process_stratum_target's look_up_symbols op into a method of
302 process_target.
303
304 * target.h (struct process_stratum_target): Remove the target op.
305 (class process_target): Add the target op.
306 * target.cc (process_target::look_up_symbols): Define.
307
308 Update the derived classes and callers below.
309
310 * server.cc (handle_query): Update.
311 * linux-low.cc (linux_target_ops): Update.
312 (linux_look_up_symbols): Turn into ...
313 (linux_process_target::look_up_symbols): ... this.
314 * linux-low.h (class linux_process_target): Update.
315 * lynx-low.cc (lynx_target_ops): Update.
316 * nto-low.cc (nto_target_ops): Update.
317 * win32-low.cc (win32_target_ops): Update.
318
319 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
320
321 Turn process_stratum_target's read_memory and write_memory
322 ops into methods of process_target.
323
324 * target.h (struct process_stratum_target): Remove the target ops.
325 (class process_target): Add the target ops.
326
327 Update the derived classes and callers below.
328
329 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
330 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
331 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
332 (arm_get_syscall_trapinfo): Update.
333 * linux-cris-low.cc (cris_breakpoint_at): Update.
334 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
335 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
336 * linux-mips-low.cc (mips_breakpoint_at): Update.
337 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
338 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
339 * linux-sh-low.cc (sh_breakpoint_at): Update.
340 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
341 (sparc_store_gregset_from_stack): Update.
342 (sparc_breakpoint_at): Update.
343 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
344 * linux-tile-low.cc (tile_breakpoint_at): Update.
345 * linux-x86-low.cc (x86_breakpoint_at): Update.
346 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
347 * mem-brea.cc (insert_memory_breakpoint): Update.
348 (validate_inserted_breakpoint): Update.
349 * target.cc (read_inferior_memory): Update.
350 (target_write_memory): Update.
351 * linux-low.cc (linux_target_ops): Update.
352 (linux_read_memory): Make a wrapper around the read_memory target
353 op call.
354 (linux_process_target::read_memory): Rename from linux_read_memory.
355 (linux_write_memory): Turn into ...
356 (linux_process_target::write_memory): ... this.
357 * linux-low.h (class linux_process_target): Update.
358 * lynx-low.cc (lynx_target_ops): Update.
359 (lynx_read_memory): Turn into ...
360 (lynx_process_target::read_memory): ... this.
361 (lynx_write_memory): Turn into ...
362 (lynx_process_target::write_memory): ... this.
363 * lynx-low.h (class lynx_process_target): Update.
364 * nto-low.cc (nto_target_ops): Update.
365 (nto_read_memory): Turn into ...
366 (nto_process_target::read_memory): ... this.
367 (nto_write_memory): Turn into ...
368 (nto_process_target::write_memory): ... this.
369 * nto-low.h (class nto_process_target): Update.
370 * win32-low.cc (win32_target_ops): Update.
371 (win32_read_inferior_memory): Turn into ...
372 (win32_process_target::read_memory): ... this.
373 (win32_write_inferior_memory): Turn into ...
374 (win32_process_target::write_memory): ... this.
375 * win32-low.h (class win32_process_target): Update.
376
377 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
378
379 Turn process_stratum_target's prepare_to_access_memory and
380 done_accessing_memory ops into methods of process_target.
381
382 * target.h (struct process_stratum_target): Remove the target ops.
383 (class process_target): Add the target ops.
384 * target.cc (process_target::prepare_to_access_memory): Define.
385 (process_target::done_accessing_memory): Define.
386 (prepare_to_access_memory): Update.
387 (done_accessing_memory): Update.
388
389 Update the derived classes and callers below.
390
391 * linux-low.cc (linux_target_ops): Update.
392 (linux_prepare_to_access_memory): Turn into ...
393 (linux_process_target::prepare_to_access_memory): ... this.
394 (linux_done_accessing_memory): Turn into ...
395 (linux_process_target::done_accessing_memory): ... this.
396 * linux-low.h (class linux_process_target): Update.
397 * lynx-low.cc (lynx_target_ops): Update.
398 * nto-low.cc (nto_target_ops): Update.
399 * win32-low.cc (win32_target_ops): Update.
400
401 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
402
403 Turn process_stratum_target's fetch_registers and store_registers
404 ops into methods of process_target.
405
406 * target.h (struct process_stratum_target): Remove the target ops.
407 (class process_target): Add the target ops.
408 (fetch_inferior_registers): Update the macro.
409 (store_inferior_registers): Update the macro.
410
411 Update the derived classes and callers below.
412
413 * linux-low.cc (linux_target_ops): Update.
414 (linux_fetch_registers): Turn into ...
415 (linux_process_target::fetch_registers): ... this.
416 (linux_store_registers): Turn into ...
417 (linux_process_target::store_registers): ... this.
418 * linux-low.h (class linux_process_target): Update.
419 * lynx-low.cc (lynx_target_ops): Update.
420 (lynx_fetch_registers): Turn into ...
421 (lynx_process_target::fetch_registers): ... this.
422 (lynx_store_registers): Turn into ...
423 (lynx_process_target::store_registers): ... this.
424 * lynx-low.h (class lynx_process_target): Update.
425 * nto-low.cc (nto_target_ops): Update.
426 (nto_fetch_registers): Turn into ...
427 (nto_process_target::fetch_registers): ... this.
428 (nto_store_registers): Turn into ...
429 (nto_process_target::store_registers): ... this.
430 * nto-low.h (class nto_process_target): Update.
431 * win32-low.cc (win32_target_ops): Update.
432 (win32_fetch_inferior_registers): Turn into ...
433 (win32_process_target::fetch_registers): ... this.
434 (win32_store_inferior_registers): Turn into ...
435 (win32_process_target::store_registers): ... this.
436 * win32-low.h (class win32_process_target): Update.
437
438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
439
440 Turn process_stratum_target's wait op into a method of
441 process_target.
442
443 * target.h (struct process_stratum_target): Remove the target op.
444 (class process_target): Add the target op.
445
446 Update the derived classes and callers below.
447
448 * target.cc (target_wait): Update.
449 * linux-low.cc (linux_target_ops): Update.
450 (linux_wait): Turn into ...
451 (linux_process_target::wait): ... this.
452 * linux-low.h (class linux_process_target): Update.
453 * lynx-low.cc (lynx_target_ops): Update.
454 (lynx_wait): Turn into ...
455 (lynx_process_target::wait): ... this.
456 * lynx-low.h (class lynx_process_target): Update.
457 * nto-low.cc (nto_target_ops): Update.
458 (nto_wait): Turn into ...
459 (nto_process_target::wait): ... this.
460 * nto-low.h (class nto_process_target): Update.
461 * win32-low.cc (win32_target_ops): Update.
462 (win32_wait): Turn into ...
463 (win32_process_target::wait): ... this.
464 (do_initial_child_stuff): Update.
465 * win32-low.h (class win32_process_target): Update.
466
467 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
468
469 Turn process_stratum_target's resume op into a method of
470 process_target.
471
472 * target.h (struct process_stratum_target): Remove the target op.
473 (class process_target): Add the target op.
474
475 Update the derived classes and callers below.
476
477 * server.cc (resume): Update.
478 * target.cc (target_stop_and_wait): Update.
479 (target_continue_no_signal): Update.
480 (target_continue): Update.
481 * linux-low.cc (linux_target_ops): Update.
482 (linux_resume): Turn into ...
483 (linux_process_target::resume): ... this.
484 * linux-low.h (class linux_process_target): Update.
485 * lynx-low.cc (lynx_target_ops): Update.
486 (lynx_resume): Turn into ...
487 (lynx_process_target::resume): ... this.
488 * lynx-low.h (class lynx_process_target): Update.
489 * nto-low.cc (nto_target_ops): Update.
490 (nto_resume): Turn into ...
491 (nto_process_target::resume): ... this.
492 * nto-low.h (class nto_process_target): Update.
493 * win32-low.cc (win32_target_ops): Update.
494 (win32_resume): Turn into ...
495 (win32_process_target::resume): ... this.
496 (win32_process_target::detach): Update.
497 (do_initial_child_stuff): Update.
498 * win32-low.h (class win32_process_target): Update.
499
500 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
501
502 Turn process_stratum_target's thread_alive op into a method of
503 process_target.
504
505 * target.h (struct process_stratum_target): Remove the target op.
506 (class process_target): Add the target op.
507 (mythread_alive): Update the macro.
508
509 Update the derived classes and callers below.
510
511 * linux-low.cc (linux_target_ops): Update.
512 (linux_thread_alive): Turn into ...
513 (linux_process_target::thread_alive): ... this.
514 (wait_for_sigstop): Update.
515 * linux-low.h (class linux_process_target): Update.
516 * lynx-low.cc (lynx_target_ops): Update.
517 (lynx_thread_alive): Turn into ...
518 (lynx_process_target::thread_alive): ... this.
519 * lynx-low.h (class lynx_process_target): Update.
520 * nto-low.cc (nto_target_ops): Update.
521 (nto_thread_alive): Turn into ...
522 (nto_process_target::thread_alive): ... this.
523 * nto-low.h (class nto_process_target): Update.
524 * win32-low.cc (win32_target_ops): Update.
525 (win32_thread_alive): Turn into ...
526 (win32_process_target::thread_alive): ... this.
527 * win32-low.h (class win32_process_target): Update.
528
529 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
530
531 Turn process_stratum_target's join op into a method of
532 process_target.
533
534 * target.h (struct process_stratum_target): Remove the target op.
535 (class process_target): Add the target op.
536 (join_inferior): Update the macro.
537
538 Update the derived classes and callers below.
539
540 * linux-low.cc (linux_target_ops): Update.
541 (linux_join): Turn into ...
542 (linux_process_target::join): ... this.
543 * linux-low.h (class linux_process_target): Update.
544 * lynx-low.cc (lynx_target_ops): Update.
545 (lynx_join): Turn into ...
546 (lynx_process_target::join): ... this.
547 * lynx-low.h (class lynx_process_target): Update.
548 * nto-low.cc (nto_target_ops): Update.
549 (nto_process_target::join): Define.
550 * nto-low.h (class nto_process_target): Update.
551 * win32-low.cc (win32_target_ops): Update.
552 (win32_join): Turn into ...
553 (win32_process_target::join): ... this.
554 * win32-low.h (class win32_process_target): Update.
555
556 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
557
558 Turn process_stratum_target's mourn op into a method of
559 process_target.
560
561 * target.h (struct process_stratum_target): Remove the target op.
562 (class process_target): Add the target op.
563
564 Update the derived classes and callers below.
565
566 * target.cc (target_mourn_inferior): Update.
567 * linux-low.cc (linux_target_ops): Update.
568 (linux_mourn): Turn into ...
569 (linux_process_target::mourn): ... this.
570 (handle_extended_wait): Update.
571 (linux_process_target::kill): Update.
572 (linux_process_target::detach): Update.
573 * linux-low.h (class linux_process_target): Update.
574 * lynx-low.cc (lynx_target_ops): Update.
575 (lynx_mourn): Turn into ...
576 (lynx_process_target::mourn): ... this.
577 * lynx-low.h (class lynx_process_target): Update.
578 * nto-low.cc (nto_target_ops): Update.
579 (nto_mourn): Turn into ...
580 (nto_process_target::mourn): ... this.
581 * nto-low.h (class nto_process_target): Update.
582 * win32-low.cc (win32_target_ops): Update.
583 (win32_mourn): Turn into ...
584 (win32_process_target::mourn): ... this.
585 * win32-low.h (class win32_process_target): Update.
586
587 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
588
589 Turn process_stratum_target's detach op into a method of
590 process_target.
591
592 * target.h (struct process_stratum_target): Remove the target op.
593 (class process_target): Add the target op.
594 (detach_inferior): Update the macro.
595
596 Update the derived classes and callers below.
597
598 * linux-low.cc (linux_target_ops): Update.
599 (linux_detach): Turn into ...
600 (linux_process_target::detach): ... this.
601 * linux-low.h (class linux_process_target): Update.
602 * lynx-low.cc (lynx_target_ops): Update.
603 (lynx_detach): Turn into ...
604 (lynx_process_target::detach): ... this.
605 * lynx-low.h (class lynx_process_target): Update.
606 * nto-low.cc (nto_target_ops): Update.
607 (nto_detach): Turn into ...
608 (nto_process_target::detach): ... this.
609 * nto-low.h (class nto_process_target): Update.
610 * win32-low.cc (win32_target_ops): Update.
611 (win32_detach): Turn into ...
612 (win32_process_target::detach): ... this.
613 * win32-low.h (class win32_process_target): Update.
614
615 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
616
617 Turn process_stratum_target's kill op into a method of
618 process_target.
619
620 * target.h (struct process_stratum_target): Remove the target op.
621 (class process_target): Add the target op.
622
623 Update the derived classes and callers below.
624
625 * target.cc (kill_inferior): Update.
626 * linux-low.cc (linux_target_ops): Update.
627 (linux_kill): Turn into ...
628 (linux_process_target::kill): ... this.
629 * linux-low.h (class linux_process_target): Update.
630 * lynx-low.cc (lynx_target_ops): Update.
631 (lynx_kill): Turn into ...
632 (lynx_process_target::kill): ... this.
633 * lynx-low.h (class lynx_process_target): Update.
634 * nto-low.cc (nto_target_ops): Update.
635 (nto_kill): Turn into ...
636 (nto_process_target::kill): ... this.
637 * nto-low.h (class nto_process_target): Update.
638 * win32-low.cc (win32_target_ops): Update.
639 (win32_kill): Turn into ...
640 (win32_process_target::kill): ... this.
641 * win32-low.h (class win32_process_target): Update.
642
643 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
644
645 Turn process_stratum_target's attach op into a method of
646 process_target.
647
648 * target.h (struct process_stratum_target): Remove the target op.
649 (class process_target): Add the target op.
650 (myattach): Update the macro.
651
652 Update the derived classes and callers below.
653
654 * linux-low.cc (linux_target_ops): Update.
655 (linux_attach): Turn into ...
656 (linux_process_target::attach): ... this.
657 * linux-low.h (class linux_process_target): Update.
658 * lynx-low.cc (lynx_target_ops): Update.
659 (lynx_attach): Turn into ...
660 (lynx_process_target::attach): ... this.
661 * lynx-low.h (class lynx_process_target): Update.
662 * nto-low.cc (nto_target_ops): Update.
663 (nto_attach): Turn into ...
664 (nto_process_target::attach): ... this.
665 * nto-low.h (class nto_process_target): Update.
666 * win32-low.cc (win32_target_ops): Update.
667 (win32_attach): Turn into ...
668 (win32_process_target::attach): ... this.
669 * win32-low.h (class win32_process_target): Update.
670
671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
672
673 Turn process_stratum_target's post_create_inferior op into a method
674 of process_target.
675
676 * target.h (struct process_stratum_target): Remove the target op.
677 (class process_target): Add the target op.
678 (target_post_create_inferior): Update the macro.
679 * target.cc (process_target::post_create_inferior): Define.
680
681 Update the derived classes and callers below.
682
683 * linux-low.cc (linux_target_ops): Update.
684 (linux_post_create_inferior): Turn into ...
685 (linux_process_target::post_create_inferior): ... this.
686 * linux-low.h (class linux_process_target): Update.
687 * lynx-low.cc (lynx_target_ops): Update.
688 * nto-low.cc (nto_target_ops): Update.
689 * win32-low.cc (win32_target_ops): Update.
690
691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
692
693 Turn process_stratum_target's create_inferior op into a method of
694 process_target.
695
696 * target.h (struct process_stratum_target): Remove the target op.
697 (class process_target): Add the target op.
698 (create_inferior): Rename the macro to ...
699 (target_create_inferior): ... this.
700
701 Update the derived classes and callers below.
702
703 * server.cc (handle_v_run): Update.
704 (captured_main): Update.
705 (process_serial_event): Update.
706 * linux-low.cc (linux_target_ops): Update.
707 (linux_create_inferior): Turn into ...
708 (linux_process_target::create_inferior): ... this.
709 * linux-low.h (class linux_process_target): Update.
710 * lynx-low.cc (lynx_target_ops): Update.
711 (lynx_create_inferior): Turn into ...
712 (lynx_process_target::create_inferior): ... this.
713 * lynx-low.h (class lynx_process_target): Update.
714 * nto-low.cc (nto_target_ops): Update.
715 (nto_create_inferior): Turn into ...
716 (nto_process_target::create_inferior): ... this.
717 * nto-low.h (class nto_process_target): Update.
718 * win32-low.cc (win32_target_ops): Update.
719 (win32_create_inferior): Turn into ...
720 (win32_process_target::create_inferior): ... this.
721 * win32-low.h (class win32_process_target): Update.
722
723 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
724
725 * target.h (class process_target): New class definition.
726 (struct process_stratum_target) <pt>: New field with type
727 'process_target*'.
728 * linux-low.h (class linux_process_target): Define as a derived
729 class of 'process_target'.
730 * linux-low.cc (linux_target_ops): Add a linux_process_target*
731 as the 'pt' field.
732 * lynx-low.h (class lynx_process_target): Define as a derived
733 class of 'process_target'.
734 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
735 as the 'pt' field.
736 * nto-low.h (class nto_process_target): Define as a derived
737 class of 'process_target'.
738 * nto-low.cc (nto_target_ops): Add an nto_process_target*
739 as the 'pt' field.
740 * win32-low.h (class win32_process_target): Define as a derived
741 class of 'process_target'.
742 * win32-low.cc (win32_target_ops): Add a win32_process_target*
743 as the 'pt' field.
744
745 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
746
747 * configure: Regenerate.
748
749 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
750 Andrew Burgess <andrew.burgess@embecosm.com>
751
752 * linux-riscv-low.cc: New file.
753 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
754 and nat/riscv-linux-tdesc.c.
755 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
756 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
757 Define.
758
759 2020-02-14 Tom Tromey <tom@tromey.com>
760
761 * acinclude.m4: Don't include acx_configure_dir.m4.
762 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
763 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
764 (all, install-only, uninstall, clean-info, clean)
765 (maintainer-clean): Don't recurse.
766 (subdir_do, all-lib): Remove.
767 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
768 (GNULIB_H): Remove.
769 (generated_files): Update.
770 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
771 * configure: Rebuild.
772 * configure.ac: Don't configure gnulib or libiberty.
773 (GNULIB): Update.
774
775 2020-02-14 Eli Zaretskii <eliz@gnu.org>
776
777 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
778 preparing the command line for CreateProcess.
779 (win32_create_inferior): Reflect the program name in debugging
780 output that shows the process and its command line.
781
782 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
783
784 * Makefile.in: Rename source files from .c to .cc.
785 * %.c: Rename to %.cc.
786 * configure.ac: Rename server.c to server.cc.
787 * configure: Re-generate.
788
789 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
790
791 * Makefile.in: Rename gdbsupport source files from .c to .cc.
792
793 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
794
795 * win32-low.c (win32_create_inferior): Set signal_pid.
796
797 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
798 Pedro Alves <palves@redhat.com>
799
800 Skip building gdbserver in a cross-configuration.
801 * configure.srv: Set $gdbserver_host depending on whether $target
802 is $host. Use $gdbserver_host instead of $host.
803
804 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
805
806 * configure: Re-generate.
807
808 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
809
810 * configure: Re-generate.
811
812 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
813
814 * acinclude.m4: Update warning.m4 path.
815
816 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
817
818 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
819 (handle_exception): Set siginfo_er.
820 (win32_xfer_siginfo): New function.
821
822 2020-02-07 Tom Tromey <tom@tromey.com>
823 Pedro Alves <palves@redhat.com>
824
825 * README: Update build documentation.
826 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
827 host, not target.
828 * configure.ac: Update paths.
829 * configure: Rebuild.
830 * acinclude.m4: Update paths.
831 * Makefile.in: Update include paths.
832 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
833 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
834 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
835 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
836 (%-generated.c): Update paths.
837 * Move entire directory from ../gdb/gdbserver.
838
839 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
840
841 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
842
843 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
844
845 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
846 assignment instead of srv_linux_obj.
847
848 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
849
850 * server.c (handle_qxfer_libraries): Write segment-address with
851 paddress.
852
853 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
854
855 * Makefile.in (install-strip): New target.
856 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
857 * aclocal.m4: Regenerate.
858 * configure: Regenerate.
859 * configure.ac: Add AM_PROG_INSTALL_STRIP.
860
861 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
862
863 * Makefile.in (SFILES): Adjust paths to point to real files.
864 (OBS): Move waitstatus.o to target/waitstatus.o.
865 (TAGS): Transform paths appropriately.
866 (%.o): Rename to...
867 (nat/%.o): ... this pattern rule.
868 (%.o): Rename to...
869 (target/%.o): ... this pattern rule.
870 * configure.srv: Adjust paths throughout to include nat/ prefix
871 with the revant files.
872 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
873 * configure: Regenerate.
874
875 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
876
877 * Makefile.in (TAGS): Remove config files from the recipe.
878
879 2020-01-14 Tom Tromey <tom@tromey.com>
880
881 * configure: Rebuild.
882 * configure.ac: Remove any checks that were added to common.m4.
883 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
884 lib-link.m4.
885
886 2020-01-14 Tom Tromey <tom@tromey.com>
887
888 * server.h: Include config.h.
889 * gdbreplay.c: Include config.h.
890 * configure: Rebuild.
891 * configure.ac: Don't source common.host.
892 * acinclude.m4: Update path.
893 * Makefile.in (INCSUPPORT): New variable.
894 (INCLUDE_CFLAGS): Add INCSUPPORT.
895 (SFILES): Update paths.
896 (version-generated.c): Update path to create-version.sh.
897 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
898
899 2020-01-14 Tom Tromey <tom@tromey.com>
900
901 * configure.ac (LIBS): Use WIN32APILIBS.
902 (USE_WIN32API): Don't define.
903 * configure: Rebuild.
904
905 2020-01-14 Tom Tromey <tom@tromey.com>
906
907 * configure: Rebuild.
908
909 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
910
911 * Makefile.in (%-generated.c): Remove rule for files from
912 regformats/i386.
913
914 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
915
916 * configure: Re-generate.
917
918 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
919
920 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
921 Define to static.
922 * tracepoint.c (stop_tracing, flush_trace_buffer,
923 about_to_request_buffer_space, get_trace_state_variable_value,
924 set_trace_state_variable_value, gdb_collect): Add declaration.
925
926 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
927
928 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
929 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
930 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
931 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
932 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
933 static.
934
935 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
936
937 * inferiors.c: Include gdbsupport/common-inferior.h.
938
939 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
940
941 * hostio-errno.c: Include hostio.h.
942
943 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
944
945 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
946 prerequisite.
947
948 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
949
950 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
951 * linux-arm-tdesc.h: Include arch/arm.h.
952
953 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
954
955 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
956
957 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
958
959 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
960 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
961
962 2020-01-10 Pedro Alves <palves@redhat.com>
963
964 * fork-child.c (post_fork_inferior): Pass target down to
965 startup_inferior.
966 * inferiors.c (switch_to_thread): Add process_stratum_target
967 parameter.
968 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
969 * nto-low.c (nto_target_ops): Now a process_stratum_target.
970 * linux-low.c (linux_target_ops): Now a process_stratum_target.
971 * remote-utils.c (prepare_resume_reply): Pass the target to
972 switch_to_thread.
973 * target.c (the_target): Now a process_stratum_target.
974 (done_accessing_memory): Pass the target to switch_to_thread.
975 (set_target_ops): Ajust to use process_stratum_target.
976 * target.h (struct target_ops): Rename to ...
977 (struct process_stratum_target): ... this.
978 (the_target, set_target_ops): Adjust.
979 (prepare_to_access_memory): Adjust comment.
980 * win32-low.c (child_xfer_memory): Adjust to use
981 process_stratum_target.
982 (win32_target_ops): Now a process_stratum_target.
983
984 2020-01-06 Eli Zaretskii <eliz@gnu.org>
985 Pedro Alves <palves@redhat.com>
986
987 * win32-low.c (get_child_debug_event): Extract the fatal exception
988 from the exit status and convert to the equivalent Posix signal
989 number.
990 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
991 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
992
993 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
994
995 * Makefile.in: Use INSTALL_PROGRAM_ENV.
996
997 2020-01-01 Joel Brobecker <brobecker@adacore.com>
998
999 * server.c (gdbserver_version): Change copyright year to 2020.
1000 * gdbreplay.c (gdbreplay_version): Likewise.
1001
1002 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1003
1004 * configure: Regenerate.
1005 * configure.ac: Quote variable arguments of test.
1006
1007 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1008
1009 * Makefile.in: Fix build with GNU Make 3.81
1010
1011 2019-12-16 Tom Tromey <tromey@adacore.com>
1012
1013 * server.c (get_exec_file): Constify result.
1014
1015 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1016
1017 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1018 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1019 * config.in: Regenerate.
1020 * configure: Regenerate.
1021 * configure.ac: Don't check for strerror.
1022 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1023 Call safe_strerror instead of strerror.
1024 * server.h (strerror): Remove this now-unnecessary declaration.
1025 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1026 strerror.
1027 (gdb_agent_helper_thread): Likewise.
1028 * utils.c (perror_with_name): Likewise.
1029
1030 2019-11-26 Tom Tromey <tom@tromey.com>
1031
1032 * configure, config.in: Rebuild.
1033
1034 2019-11-26 Tom Tromey <tom@tromey.com>
1035
1036 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1037 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1038 gdb_sigmask.
1039 * configure, config.in: Rebuild.
1040
1041 2019-11-26 Tom Tromey <tom@tromey.com>
1042
1043 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1044 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1045 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1046 * acinclude.m4: Include ax_pthread.m4.
1047 * config.in, configure: Rebuild.
1048
1049 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1050
1051 * debug.c (debug_set_output): Call safe_strerror instead of
1052 strerror.
1053 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1054 (linux_kill_one_lwp): Likewise.
1055 (linux_detach_one_lwp): Likewise.
1056 (linux_wait_for_event_filtered): Likewise.
1057 (store_register): Likewise.
1058 * lynx-low.c (lynx_attach): Likewise.
1059 * mem-break.c (insert_memory_breakpoint): Likewise.
1060 (remove_memory_breakpoint): Likewise.
1061 (delete_fast_tracepoint_jump): Likewise.
1062 (set_fast_tracepoint_jump): Likewise.
1063 (uninsert_fast_tracepoint_jumps_at): Likewise.
1064 (reinsert_fast_tracepoint_jumps_at): Likewise.
1065 * nto-low.c (nto_xfer_memory): Likewise.
1066 (nto_resume): Likewise.
1067
1068 2019-11-20 Luis Machado <luis.machado@linaro.org>
1069
1070 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1071 instead of register count.
1072 * tdesc.c (tdesc_contains_feature): New function.
1073 * tdesc.h (tdesc_contains_feature): New prototype.
1074
1075 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1076
1077 * Makefile.in: Add safe-strerror.c.
1078 * configure: Regenerate.
1079 * configure.ac: Don't source common.host.
1080
1081 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1082
1083 * config.in: Regenerate.
1084 * configure: Regenerate.
1085
1086 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1087
1088 * ax.c (ax_printf): Handle size_t_arg.
1089
1090 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1091
1092 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1093 * mi/mi-main.c (output_cores): Likewise.
1094 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1095 (linux_xfer_osdata_modules): Likewise.
1096 * remote.c (register_remote_support_xml): Likewise.
1097 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1098 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1099
1100 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1101
1102 * configure: Regenerate.
1103 * configure.ac: Remove check for strerror_r.
1104
1105 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1106
1107 * config.in: Regenerate.
1108 * configure: Regenerate.
1109 * configure.ac: Also check for strerror_r.
1110
1111 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1112
1113 * ax.h (debug_agent): Remove duplicate declaration.
1114
1115 2019-10-26 Tom de Vries <tdevries@suse.de>
1116
1117 * linux-aarch64-low.c: Fix typos in comments.
1118 * linux-arm-low.c: Same.
1119 * linux-low.c: Same.
1120 * linux-ppc-low.c: Same.
1121 * proc-service.c: Same.
1122 * regcache.h: Same.
1123 * server.c: Same.
1124 * tracepoint.c: Same.
1125 * win32-low.c: Same.
1126
1127 2019-10-25 Tom Tromey <tromey@adacore.com>
1128
1129 * utils.c (xstrdup): Remove.
1130
1131 2019-10-23 Tom Tromey <tom@tromey.com>
1132
1133 * configure, config.in: Rebuild.
1134
1135 2019-10-23 Tom Tromey <tom@tromey.com>
1136
1137 * configure: Rebuild.
1138 * acinclude.m4: Use m4_include, not sinclude.
1139
1140 2019-10-17 Tom Tromey <tromey@adacore.com>
1141
1142 * configure: Rebuild.
1143 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1144 in AC_CONFIG_FILES invocation.
1145 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1146 invocation.
1147
1148 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1149
1150 * server.c: Include xml-builtin.h.
1151 (get_xml_features): Don't declare xml_builtins here.
1152
1153 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1154
1155 * Makefile.in: Remove references to vec-ipa.o.
1156
1157 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1158
1159 * Makefile.in: Remove references to vec.c.
1160
1161 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1162
1163 * server.c (server_waiting): Change to bool.
1164 (extended_protocol): Likewise.
1165 (response_needed): Likewise.
1166 (exit_requested): Likewise.
1167 (run_once): Likewise.
1168 (report_no_resumed): Likewise.
1169 (non_stop): Likewise.
1170 (disable_packet_vCont): Likewise.
1171 (disable_packet_Tthread): Likewise.
1172 (disable_packet_qC): Likewise.
1173 (disable_packet_qfThreadInfo): Likewise.
1174 (handle_general_set): Update.
1175 (handle_detach): Update.
1176 (handle_monitor_command): Update.
1177 (handle_query): Update.
1178 (captured_main): Update.
1179 (process_serial_event): Update.
1180 * server.h (server_waiting): Change to bool.
1181 (disable_packet_vCont): Likewise.
1182 (disable_packet_Tthread): Likewise.
1183 (disable_packet_qC): Likewise.
1184 (disable_packet_qfThreadInfo): Likewise.
1185 (run_once): Likewise.
1186 (non_stop): Likewise.
1187 * target.c (target_stop_and_wait): Update.
1188
1189 2019-10-02 Tom Tromey <tromey@adacore.com>
1190
1191 * Makefile.in (SFILES): Add common-inferior.c.
1192 (OBS): Add common-inferior.o.
1193 * server.c (startup_with_shell): Don't define.
1194
1195 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1196
1197 * linux-low.c (linux_low_read_btrace): Update for change to
1198 std::vector.
1199
1200 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1201
1202 * debug.c (debug_threads): Remove comment in favor of the header.
1203 * debug.h (using_threads): Add declaration.
1204 (debug_threads): Add comment.
1205 * linux-aarch64-low.c: Include debug.h and remove declaration of
1206 debug_threads.
1207 * nto-low.c: Likewise.
1208 * remote-utils.c: Likewise.
1209 * thread-db.c: Likewise.
1210
1211 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1212
1213 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1214 and powerpc-cell64l-ipa.o.
1215 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1216 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1217 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1218 (spu*-*-*): Remove.
1219
1220 * spu-low.c: Remove file.
1221
1222 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1223 (parse_spufs_run): Remove.
1224 (ppc_get_pc): Remove Cell/B.E. support.
1225 (ppc_set_pc): Likewise.
1226 (ppc_breakpoint_at): Likewise.
1227 (ppc_arch_setup): Likewise.
1228 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1229 tdesc_powerpc_cell32l.
1230 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1231 or init_registers_powerpc_cell32l.
1232 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1233 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1234 or init_registers_powerpc_cell32l.
1235 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1236 (init_registers_powerpc_cell32l): Remove prototype.
1237 (init_registers_powerpc_cell64l): Likewise.
1238
1239 * target.h (struct target_ops): Remove qxfer_spu member.
1240 * server.c (handle_qxfer_spu): Remove.
1241 (qxfer_packets): Remove entry for "spu".
1242 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1243 * linux-low.c (SPUFS_MAGIC): Remove.
1244 (spu_enumerate_spu_ids): Remove.
1245 (linux_qxfer_spu): Remove.
1246 (linux_target_ops): Remove qxfer_spu member.
1247 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1248 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1249 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1250
1251 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1252
1253 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1254 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1255 * config.in: Regenerate.
1256 * configure: Regenerate.
1257
1258 2019-08-15 Tom Tromey <tromey@adacore.com>
1259
1260 * target.c (target_write_memory): Use gdb::byte_vector.
1261
1262 2019-08-15 Tom Tromey <tromey@adacore.com>
1263
1264 * tracepoint.c (write_inferior_data_pointer)
1265 (write_inferior_integer, write_inferior_int8)
1266 (write_inferior_uinteger, m_tracepoint_action_download)
1267 (r_tracepoint_action_download, x_tracepoint_action_download)
1268 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1269 (download_agent_expr, download_tracepoint_1)
1270 (download_trace_state_variables, upload_fast_traceframes): Update.
1271 * server.c (gdb_write_memory): Update.
1272 * remote-utils.c (relocate_instruction): Update.
1273 * proc-service.c (ps_pdwrite): Update.
1274 * mem-break.c (remove_memory_breakpoint)
1275 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1276 (uninsert_fast_tracepoint_jumps_at)
1277 (reinsert_fast_tracepoint_jumps_at): Update.
1278 * linux-x86-low.c (append_insns)
1279 (i386_install_fast_tracepoint_jump_pad)
1280 (amd64_write_goto_address, i386_write_goto_address): Update.
1281 * linux-s390-low.c (append_insns, s390_write_goto_address):
1282 Update.
1283 * linux-ppc-low.c (ppc_relocate_instruction)
1284 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1285 (ppc_write_goto_address): Update.
1286 * linux-aarch64-low.c (append_insns): Update.
1287 * target.h (struct target_ops): Update.
1288 (write_inferior_memory): Don't declare.
1289 * target.c (target_write_memory): Rename from
1290 write_inferior_memory. Remove old target_write_memory.
1291
1292 2019-08-15 Tom Tromey <tromey@adacore.com>
1293
1294 * target.c (write_inferior_memory): Use std::vector.
1295
1296 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1297
1298 PR build/24886
1299 * configure.ac: Drop enable-libmcheck support.
1300 * configure, config.in: Rebuild.
1301 * acinclude.m4: Don't include it.
1302
1303 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1304
1305 * configure.srv: Remove Arm xml files.
1306
1307 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1308
1309 * configure.srv: Add new files. Remove xml generated files.
1310 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1311 registers.
1312 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1313 * linux-aarch32-tdesc.c: New file.
1314 * linux-aarch32-tdesc.h: New file.
1315 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1316 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1317 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1318 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1319 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1320 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1321 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1322 (arm_read_description): Call arm_linux_read_description.
1323 (initialize_low_arch): Don't init registers.
1324 * linux-arm-tdesc.c: New file.
1325 * linux-arm-tdesc.h: New file.
1326
1327 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1328
1329 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1330 Move counter inside for.
1331 (arm_read_description): Check ptrace earlier.
1332 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1333
1334 2019-07-09 Tom Tromey <tom@tromey.com>
1335
1336 * configure: Rebuild.
1337 * configure.ac: Change common to gdbsupport.
1338 * acinclude.m4: Change common to gdbsupport.
1339 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1340 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1341 common to gdbsupport.
1342 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1343 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1344 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1345 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1346 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1347 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1348 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1349 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1350 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1351 common to gdbsupport.
1352
1353 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1354
1355 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1356 defines.
1357 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1358
1359 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1360
1361 * configure.srv: Remove legacy xml.
1362 * linux-aarch64-low.c (initialize_low_arch): Remove
1363 initialize_low_tdesc call.
1364 * linux-aarch64-tdesc-selftest.c: Remove file.
1365 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1366 * linux-x86-low.c (initialize_low_arch): Remove
1367 initialize_low_tdesc call.
1368 * linux-x86-tdesc-selftest.c: Remove file.
1369 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1370
1371 2019-06-20 Tom de Vries <tdevries@suse.de>
1372
1373 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1374 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1375
1376 2019-06-19 Tom de Vries <tdevries@suse.de>
1377
1378 * debug.h (debug_write): Change return type to ssize_t.
1379 * debug.c (debug_write): Same.
1380
1381 2019-06-14 Tom Tromey <tom@tromey.com>
1382
1383 * configure.ac: Use new path to gnulib.
1384 * configure: Rebuild.
1385 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1386 to gnulib.
1387
1388 2019-06-11 Tom Tromey <tom@tromey.com>
1389
1390 * Makefile.in (SFILES): Add alloc.c.
1391 (OBS): Add alloc.o.
1392 (IPA_OBJS): Add alloc-ipa.o.
1393 (alloc-ipa.o): New target.
1394 (%.o: ../%.c): New pattern rule.
1395
1396 2019-06-10 Tom Tromey <tromey@adacore.com>
1397
1398 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1399 end warning with a newline.
1400 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1401 newline.
1402 * thread-db.c (attach_thread): Don't end warning with a newline.
1403 (thread_db_notice_clone): Likewise.
1404 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1405 newline.
1406 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1407 end warning with a newline.
1408
1409 2019-06-04 Pedro Alves <palves@redhat.com>
1410
1411 * server.c (captured_main): Use make_unique_xstrdup.
1412
1413 2019-06-02 Tom Tromey <tom@tromey.com>
1414
1415 * gdbreplay.c (fromhex): Remove.
1416 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1417
1418 2019-05-29 Tom Tromey <tromey@adacore.com>
1419
1420 * configure: Rebuild.
1421
1422 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1423
1424 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1425 sign extension code on 32-bit builds.
1426
1427 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1428
1429 * remote-utils.c:
1430 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1431
1432 2019-04-19 Tom Tromey <tom@tromey.com>
1433
1434 * server.c (struct vstop_notif): Derive from notif_event.
1435 <base>: Remove.
1436 (queue_stop_reply): Update.
1437 (remove_all_on_match_ptid): Change type. Rewrite.
1438 (discard_queued_stop_replies): Rewrite.
1439 (in_queued_stop_replies_ptid): Change type.
1440 (in_queued_stop_replies): Rewrite.
1441 (notif_stop): Update.
1442 (queue_stop_reply_callback): Update.
1443 (captured_main): Don't call initialize_notif.
1444 (push_stop_notification): Update.
1445 * notif.c (notif_write_event, handle_notif_ack)
1446 (notif_event_enque, notif_push): Update.
1447 (notif_event_xfree, initialize_notif): Remove.
1448 * notif.h (struct notif_event): Include <list>, not
1449 "common/queue.h".
1450 (struct notif_server) <queue>: Now a std::list.
1451 (notif_event_p): Remove typedef.
1452 (initialize_notif): Don't declare.
1453 (struct notif_event): Add virtual destructor.
1454
1455 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1456
1457 * ax.c (ax_vdebug): Call debug_printf.
1458 * debug.c (debug_write): New function.
1459 * debug.h (debug_write): New declaration.
1460 * linux-low.c (sigchld_handler): Call debug_write.
1461
1462 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1463
1464 * debug.c (debug_set_output): New function.
1465 (debug_vprintf): Send output to debug_file.
1466 (debug_flush): Likewise.
1467 * debug.h (debug_set_output): New declaration.
1468 * server.c (handle_monitor_command): Add debug-file option.
1469 (captured_main): Likewise.
1470
1471 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1472
1473 * debug.c (remote_debug): Add definition.
1474 * debug.h (remote_debug): Add declaration.
1475 * hostio.c (remote_debug): Remove declaration.
1476 * remote-utils.c (struct ui_file): Likewise.
1477 (remote_debug): Likewise.
1478 * remote-utils.h (remote_debug): Likewise,
1479 * server.c (remote_debug): Remove definition.
1480
1481 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1482
1483 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1484 when using a 64-bit gdbserver.
1485
1486 2019-04-09 Tom Tromey <tromey@adacore.com>
1487
1488 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1489
1490 2019-04-08 Tom Tromey <tom@tromey.com>
1491
1492 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1493 throw.
1494 (linux_resume_one_lwp): Likewise.
1495
1496 2019-04-08 Tom Tromey <tom@tromey.com>
1497
1498 * gdbreplay.c: Update.
1499 * linux-low.c: Update.
1500 * server.c: Update.
1501
1502 2019-04-08 Tom Tromey <tom@tromey.com>
1503
1504 * server.c: Use C++ exception handling.
1505 * linux-low.c: Use C++ exception handling.
1506 * gdbreplay.c: Use C++ exception handling.
1507
1508 2019-04-08 Tom Tromey <tom@tromey.com>
1509
1510 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1511 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1512 (captured_main, main): Update.
1513 * gdbreplay.c (main): Update.
1514
1515 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1516
1517 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1518 value in argument pointer, return 1 if the entry is found and 0
1519 otherwise. Move comment.
1520 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1521 * linux-low.h (linux_get_auxv): Declare.
1522 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1523
1524 2019-04-05 Tom Tromey <tromey@adacore.com>
1525
1526 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1527 variables.
1528
1529 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1530
1531 * linux-low.c (AT_HWCAP2): Add define if not already included.
1532
1533 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1534
1535 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1536 (aarch64_arch_setup): Call linux_get_hwcap.
1537 * linux-arm-low.c (arm_get_hwcap): Remove function.
1538 (arm_read_description): Call linux_get_hwcap.
1539 * linux-low.c (linux_get_auxv): New function.
1540 (linux_get_hwcap): Likewise.
1541 (linux_get_hwcap2): Likewise.
1542 * linux-low.h (linux_get_hwcap): New declaration.
1543 (linux_get_hwcap2): Likewise.
1544 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1545 (ppc_arch_setup): Call linux_get_hwcap.
1546 * linux-s390-low.c (s390_get_hwcap): Remove function.
1547 (s390_arch_setup): Call linux_get_hwcap.
1548
1549 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1550 Jiong Wang <jiong.wang@arm.com>
1551
1552 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1553 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1554 to fail.
1555 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1556
1557 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1558 Jiong Wang <jiong.wang@arm.com>
1559
1560 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1561 (aarch64_get_hwcap): New function.
1562 (aarch64_arch_setup): Read APIA hwcap.
1563
1564 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1565 Jiong Wang <jiong.wang@arm.com>
1566
1567 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1568 (initialize_low_tracepoint): Likewise.
1569 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1570 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1571 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1572 (aarch64_linux_read_description): Likewise.
1573 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1574
1575 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1576
1577 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1578 i386_create_target_description for 'segments' parameter.
1579 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1580 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1581 * win32-i386-low.c (i386_arch_setup): Likewise.
1582
1583 2019-03-12 Tom Tromey <tromey@adacore.com>
1584
1585 * linux-low.c (iterate_over_lwps): Update.
1586
1587 2019-03-06 Tom Tromey <tom@tromey.com>
1588
1589 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1590 (captured_main): Use SCOPE_EXIT.
1591
1592 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1593
1594 * configure.srv: Use '$enable_unittest' instead of '$development'
1595 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1596 case.
1597
1598 2019-02-27 Tom Tromey <tromey@adacore.com>
1599
1600 * gdbreplay.c (logchar): Handle \r\n.
1601
1602 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1603
1604 * linux-low.c (linux_attach): Add process before lwp.
1605 * server.c (attach_inferior): Check if already attached.
1606
1607 2019-02-07 Tom Tromey <tom@tromey.com>
1608
1609 * x86-tdesc.h: Rename include guard.
1610 * x86-low.h: Add include guard.
1611 * wincecompat.h: Rename include guard.
1612 * win32-low.h: Add include guard.
1613 * utils.h: Rename include guard.
1614 * tracepoint.h: Rename include guard.
1615 * tdesc.h: Rename include guard.
1616 * target.h: Rename include guard.
1617 * server.h: Rename include guard.
1618 * remote-utils.h: Rename include guard.
1619 * regcache.h: Rename include guard.
1620 * nto-low.h: Rename include guard.
1621 * notif.h: Add include guard.
1622 * mem-break.h: Rename include guard.
1623 * lynx-low.h: Add include guard.
1624 * linux-x86-tdesc.h: Add include guard.
1625 * linux-s390-tdesc.h: Add include guard.
1626 * linux-ppc-tdesc-init.h: Add include guard.
1627 * linux-low.h: Add include guard.
1628 * linux-aarch64-tdesc.h: Add include guard.
1629 * linux-aarch32-low.h: Add include guard.
1630 * inferiors.h: Rename include guard.
1631 * i387-fp.h: Rename include guard.
1632 * hostio.h: Rename include guard.
1633 * gdbthread.h: Rename include guard.
1634 * gdb_proc_service.h: Rename include guard.
1635 * event-loop.h: Rename include guard.
1636 * dll.h: Rename include guard.
1637 * debug.h: Rename include guard.
1638 * ax.h: Rename include guard.
1639
1640 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1641
1642 PR gdb/23985
1643 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1644 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1645
1646 2019-01-25 Tom Tromey <tom@tromey.com>
1647
1648 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1649
1650 2019-01-25 Tom Tromey <tom@tromey.com>
1651
1652 * win32-low.c: Fix common/ includes.
1653 * win32-i386-low.c: Fix common/ includes.
1654 * tracepoint.c: Fix common/ includes.
1655 * thread-db.c: Fix common/ includes.
1656 * target.h: Fix common/ includes.
1657 * symbol.c: Fix common/ includes.
1658 * spu-low.c: Fix common/ includes.
1659 * server.h: Fix common/ includes.
1660 * server.c: Fix common/ includes.
1661 * remote-utils.c: Fix common/ includes.
1662 * regcache.h: Fix common/ includes.
1663 * regcache.c: Fix common/ includes.
1664 * nto-x86-low.c: Fix common/ includes.
1665 * notif.h: Fix common/ includes.
1666 * mem-break.h: Fix common/ includes.
1667 * lynx-low.c: Fix common/ includes.
1668 * lynx-i386-low.c: Fix common/ includes.
1669 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1670 * linux-x86-low.c: Fix common/ includes.
1671 * linux-low.c: Fix common/ includes.
1672 * inferiors.h: Fix common/ includes.
1673 * i387-fp.c: Fix common/ includes.
1674 * hostio.c: Fix common/ includes.
1675 * hostio-errno.c: Fix common/ includes.
1676 * gdbthread.h: Fix common/ includes.
1677 * gdbreplay.c: Fix common/ includes.
1678 * fork-child.c: Fix common/ includes.
1679 * event-loop.c: Fix common/ includes.
1680 * ax.c:
1681 (enum gdb_agent_op): Fix common/ includes.
1682
1683 2019-01-21 Tom Tromey <tom@tromey.com>
1684
1685 * tracepoint.c: Fix includes.
1686 * remote-utils.c: Fix includes.
1687 * linux-x86-low.c: Fix includes.
1688
1689 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1690
1691 * gdbreplay.c (gdbreplay_version): Update copyright year in
1692 version message.
1693 * server.c (gdbserver_version): Likewise.
1694
1695 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1696
1697 * linux-low.c (add_lwp): Switch ordering.
1698
1699 2018-11-29 Tom Tromey <tom@tromey.com>
1700
1701 * win32-low.c (win32_join): Take pid, not process.
1702 * target.h (struct target_ops) <join>: Change argument type.
1703 (join_inferior): Change argument name.
1704 * spu-low.c (spu_join): Take pid, not process.
1705 * server.c (handle_detach): Preserve pid before destroying
1706 process.
1707 * lynx-low.c (lynx_join): Take pid, not process.
1708 * linux-low.c (linux_join): Take pid, not process.
1709
1710 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1711
1712 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1713 (aarch64_cannot_fetch_register): Likewise.
1714 (struct linux_target_ops): Update references.
1715
1716 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1717
1718 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1719
1720 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1721
1722 * configure.srv (ipa_ppc_linux_regobj): Add
1723 powerpc-isa207-htm-vsx32l-ipa.o and
1724 powerpc-isa207-htm-vsx64l-ipa.o.
1725 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1726 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1727 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1728 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1729 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1730 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1731 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1732 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1733 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1734 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1735 (init_registers_powerpc_isa207_htm_vsx32l)
1736 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1737 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1738 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1739 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1740 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1741 (ppc_store_tm_ctarregset): New functions.
1742 (ppc_regsets): Add entries for HTM regsets.
1743 (ppc_arch_setup): Set htm in features struct when needed. Set
1744 sizes for the HTM regsets.
1745 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1746 (initialize_low_arch): Call
1747 init_registers_powerpc_isa207_htm_vsx32l and
1748 init_registers_powerpc_isa207_htm_vsx64l.
1749 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1750 PPC_TDESC_ISA207_HTM_VSX.
1751 (initialize_low_tracepoint): Call
1752 init_registers_powerpc_isa207_htm_vsx32l and
1753 init_registers_powerpc_isa207_htm_vsx64l.
1754
1755 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1756
1757 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1758 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1759 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1760 (ppc_store_pmuregset): New functions.
1761 (ppc_regsets): Add entries for ebb and pmu regsets.
1762 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1763 pmu regsets are available. Set sizes for these regsets.
1764
1765 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1766
1767 * configure.srv (ipa_ppc_linux_regobj): Add
1768 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1769 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1770 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1771 rs6000/powerpc-isa207-vsx32l.xml, and
1772 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1773 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1774 <PPC_TDESC_ISA207_VSX>: New enum value.
1775 (init_registers_powerpc_isa207_vsx32l): Declare.
1776 (init_registers_powerpc_isa207_vsx64l): Declare.
1777 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1778 (ppc_store_tarregset): New function.
1779 (ppc_regsets): Add entry for the TAR regset.
1780 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1781 size for the TAR regsets.
1782 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1783 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1784 and init_registers_powerpc_isa207_vsx64l.
1785 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1786 (initialize_low_tracepoint): Call
1787 init_registers_powerpc_isa207_vsx32l and
1788 init_registers_powerpc_isa207_vsx64l.
1789
1790 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1791 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1792
1793 * configure.srv (ipa_ppc_linux_regobj): Add
1794 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1795 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1796 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1797 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1798 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1799 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1800 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1801 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1802 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1803 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1804 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1805 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1806 (ppc_hwcap): Add comment.
1807 (ppc_hwcap2): New global.
1808 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1809 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1810 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1811 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1812 when needed. Set sizes for the the DSCR and PPR regsets.
1813 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1814 (initialize_low_arch): Call
1815 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1816 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1817 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1818 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1819 (initialize_low_tracepoint): Call
1820 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1821 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1822
1823 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1824
1825 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1826
1827 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1828 Simon Marchi <simark@simark.ca>
1829
1830 * acinclude.m4: Include "../selftest.m4".
1831 * configure: Regenerate.
1832 * configure.ac: Use "GDB_AC_SELFTEST".
1833 * configure.srv: Use "$enable_unittests" instead of
1834 "$development" when checking whether unit tests have been
1835 enabled.
1836 * server.c (captured_main): Update message informing that
1837 selftests have been disabled.
1838
1839 2018-10-04 Tom Tromey <tom@tromey.com>
1840
1841 * configure: Rebuild.
1842
1843 2018-10-04 Tom Tromey <tom@tromey.com>
1844
1845 * server.c (handle_status): Rename inner "thread".
1846 (process_serial_event): Declare "res" in 'm' case.
1847 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1848 (iterate_over_lwps): Rename inner "thread".
1849 (linux_qxfer_libraries_svr4): Rename inner "len".
1850 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1851
1852 2018-10-01 Gary Benson <gbenson@redhat.com>
1853
1854 * gdb_proc_service.h: Moved common code to
1855 common/gdb_proc_service.h.
1856
1857 2018-10-01 Gary Benson <gbenson@redhat.com>
1858
1859 * gdb_proc_service.h: Synchronize comments and whitespace with
1860 GDB's version of this file.
1861
1862 2018-09-25 Tom Tromey <tom@tromey.com>
1863
1864 * configure: Rebuild.
1865 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1866
1867 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1868
1869 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1870 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1871 ($(IPA_LIB)): Sort IPA_OBJS.
1872
1873 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1874
1875 * Makefile.in: Remove references to $(ADD_DEPS).
1876
1877 2018-09-16 Tom Tromey <tom@tromey.com>
1878
1879 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1880 variables.
1881 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1882 variables.
1883
1884 2018-09-05 Tom Tromey <tom@tromey.com>
1885
1886 * configure: Rebuild.
1887
1888 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 PR build/23399
1891 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1892
1893 2018-08-27 Tom Tromey <tom@tromey.com>
1894
1895 PR build/23087:
1896 * configure: Rebuild.
1897
1898 2018-08-27 Tom Tromey <tom@tromey.com>
1899
1900 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1901 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1902 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1903 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1904 (s390x_emit_stack_adjust): Add casts to unsigned char.
1905
1906 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 PR gdb/23374
1909 PR gdb/23375
1910 * server.h (struct client_state) <disable_randomization>:
1911 Initialize to 1.
1912
1913 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1914
1915 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1916 variable.
1917 (mips_supply_ptrace_register): Likewise.
1918
1919 2018-07-22 Tom Tromey <tom@tromey.com>
1920
1921 * configure: Rebuild.
1922
1923 2018-07-22 Tom Tromey <tom@tromey.com>
1924
1925 * win32-low.c (win32_create_inferior): Remove unused variables.
1926 * gdbreplay.c (remote_open): Remove unused variable.
1927 * remote-utils.c (remote_prepare): Remove unused variable.
1928 * x86-tdesc.h (X86_TDESC_H): Define.
1929 (amd64_expedite_regs): Define conditionally.
1930 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1931 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1932 * remote-utils.c (readchar): Remove unused variable.
1933
1934 2018-07-13 Pedro Alves <palves@redhat.com>
1935
1936 * linux-low.c (linux_kill): Change parameter to process_info
1937 pointer instead of pid. Adjust.
1938 * lynx-low.c (lynx_kill): Likewise.
1939 * nto-low.c (nto_kill): Likewise.
1940 * spu-low.c (spu_kill): Likewise.
1941 * win32-low.c (win32_kill): Likewise.
1942 * server.c (handle_v_kill, kill_inferior_callback)
1943 (detach_or_kill_for_exit): Adjust.
1944 * target.c (kill_inferior): Change parameter to process_info
1945 pointer instead of pid. Adjust.
1946 * target.h (struct target_ops) <kill>: Change parameter to
1947 process_info pointer instead of pid. Adjust all implementations
1948 and callers.
1949 (kill_inferior): Likewise.
1950
1951 2018-07-13 Pedro Alves <palves@redhat.com>
1952
1953 * linux-low.c (linux_detach, linux_join): Change parameter to
1954 process_info pointer instead of pid. Adjust.
1955 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1956 * nto-low.c (nto_detach): Likewise.
1957 * spu-low.c (spu_detach, spu_join): Likewise.
1958 * win32-low.c (win32_detach, win32_join): Likewise.
1959 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1960 * target.h (struct target_ops) <detach, join>: Change parameter to
1961 process_info pointer instead of pid. Adjust all implementations
1962 and callers.
1963 (detach_inferior, join_inferior): Rename 'pid' parameter to
1964 'proc'.
1965
1966 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1967 Jan Kratochvil <jan.kratochvil@redhat.com>
1968 Paul Fertser <fercerpav@gmail.com>
1969 Tsutomu Seki <sekiriki@gmail.com>
1970
1971 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1972 (OBS): Add 'common/netstuff.o'.
1973 (GDBREPLAY_OBS): Likewise.
1974 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1975 (remote_open): Implement support for IPv6
1976 connections.
1977 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1978 and 'wspiapi.h'.
1979 (handle_accept_event): Accept connections from IPv6 sources.
1980 (remote_prepare): Handle IPv6-style hostnames; implement
1981 support for IPv6 connections.
1982 (remote_open): Implement support for printing connections from
1983 IPv6 sources.
1984
1985 2018-07-11 Pedro Alves <palves@redhat.com>
1986
1987 PR gdb/23377
1988 * mem-break.c (any_persistent_commands): Add process_info
1989 parameter and use it instead of relying on the current process.
1990 Change return type to bool.
1991 * mem-break.h (any_persistent_commands): Add process_info
1992 parameter and change return type to bool.
1993 * server.c (handle_detach): Remove require_running_or_return call.
1994 Look up the process_info for the process we're about to detach.
1995 If not found, return back error to GDB. Adjust
1996 any_persistent_commands call to pass down a process pointer.
1997
1998 2018-07-11 Pedro Alves <palves@redhat.com>
1999
2000 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2001 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2002 instead of collect_register_by_name.
2003 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2004 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2005
2006 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2007 Pedro Alves <palves@redhat.com>
2008
2009 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2010
2011 2018-07-03 Tom Tromey <tom@tromey.com>
2012
2013 * linux-low.c: Update.
2014 * lynx-low.c: Update.
2015 * mem-break.c: Update.
2016 * nto-low.c: Update.
2017 * remote-utils.c: Update.
2018 * server.c: Update.
2019 * spu-low.c: Update.
2020 * target.c: Update.
2021 * win32-low.c: Update.
2022
2023 2018-07-03 Tom Tromey <tom@tromey.com>
2024
2025 * server.c: Update.
2026
2027 2018-07-03 Tom Tromey <tom@tromey.com>
2028
2029 * linux-low.c: Update.
2030
2031 2018-07-03 Tom Tromey <tom@tromey.com>
2032
2033 * target.c: Update.
2034
2035 2018-07-03 Tom Tromey <tom@tromey.com>
2036
2037 * linux-low.c: Update.
2038 * linux-mips-low.c: Update.
2039 * lynx-low.c: Update.
2040 * nto-low.c: Update.
2041 * remote-utils.c: Update.
2042 * server.c: Update.
2043 * spu-low.c: Update.
2044 * target.c: Update.
2045 * thread-db.c: Update.
2046
2047 2018-07-03 Tom Tromey <tom@tromey.com>
2048
2049 * linux-low.c: Update.
2050 * linux-mips-low.c: Update.
2051 * lynx-low.c: Update.
2052 * mem-break.c: Update.
2053 * nto-low.c: Update.
2054 * remote-utils.c: Update.
2055 * server.c: Update.
2056 * spu-low.c: Update.
2057 * target.c: Update.
2058 * tracepoint.c: Update.
2059
2060 2018-07-03 Tom Tromey <tom@tromey.com>
2061
2062 * linux-low.c: Update.
2063 * linux-ppc-low.c: Update.
2064 * linux-x86-low.c: Update.
2065 * proc-service.c: Update.
2066 * server.c: Update.
2067 * spu-low.c: Update.
2068 * thread-db.c: Update.
2069 * win32-low.c: Update.
2070
2071 2018-07-03 Tom Tromey <tom@tromey.com>
2072
2073 * linux-low.c: Update.
2074 * lynx-low.c: Update.
2075 * nto-low.c: Update.
2076 * remote-utils.c: Update.
2077 * spu-low.c: Update.
2078 * thread-db.c: Update.
2079 * win32-low.c: Update.
2080
2081 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2082
2083 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2084 parameter in call to 'amd64_create_target_description'.
2085
2086 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2087
2088 * x86-tdesc.h: Remove executable permission flag.
2089
2090 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2091
2092 * configure.ac: Remove AC_PREREQ, add missing quoting.
2093 * configure: Re-generate.
2094 * config.in: Re-generate.
2095 * aclocal.m4: Re-generate.
2096
2097 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2098
2099 * tracepoint.h (current_traceframe): Remove declaration.
2100
2101 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2102
2103 * linux-aarch64-low.c (is_sve_tdesc): New function.
2104 (aarch64_sve_regs_copy_to_regcache): Likewise.
2105 (aarch64_sve_regs_copy_from_regcache): Likewise.
2106 (aarch64_regs_info): Add SVE checks.
2107 (initialize_low_arch): Initialize SVE.
2108
2109 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2110
2111 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2112
2113 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2114
2115 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2116 (initialize_low_tracepoint): Likewise
2117 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2118 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2119 param.
2120 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2121 checks.
2122 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2123
2124 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2125
2126 * server.h (PBUFSIZ): Increase size
2127
2128 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2129
2130 * regcache.c (regcache::raw_compare): New function.
2131 * regcache.h (regcache::raw_compare): New declaration.
2132
2133 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2134
2135 * regcache.c (new_register_cache): Use new.
2136 (free_register_cache): Use delete.
2137 (register_data): Use const.
2138 (supply_register): Move body inside regcache.
2139 (regcache::raw_supply): New override function.
2140 (collect_register): Move body inside regcache.
2141 (regcache::raw_collect): New override function.
2142 (regcache::get_register_status): New override function.
2143 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2144
2145 2018-06-09 Tom Tromey <tom@tromey.com>
2146
2147 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2148 declare queue.
2149 (event_queue): Use std::queue.
2150 (gdb_event_xfree): Remove.
2151 (initialize_event_loop, process_event, wait_for_event): Update.
2152
2153 2018-06-08 Stan Cox <scox@redhat.com>
2154
2155 * win32-low.c (win32_create_inferior): last_ptid and last_status
2156 moved to client_state.
2157
2158 2018-06-08 Pedro Alves <palves@redhat.com>
2159
2160 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2161 common/common-exceptions.o, common/common-utils.o,
2162 common/errors.o, common/print-utils.o and utils.o.
2163 * gdbreplay.c: Include "common-defs.h" instead of the two
2164 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2165 string.h or alloca.h.
2166 (perror_with_name): Delete.
2167 (remote_open): Use xstrdup instead of strdup.
2168 (main): Rename to ...
2169 (captured_main): ... this.
2170 (main): New.
2171
2172 2018-06-08 Tom Tromey <tom@tromey.com>
2173
2174 * linux-low.c (linux_low_read_btrace): Update.
2175
2176 2018-06-04 Stan Cox <scox@redhat.com>
2177
2178 * server.h (struct client_state): New.
2179 * server.c (cont_thread, general_thread, multi_process)
2180 (report_fork_events, report_vfork_events, report_exec_events)
2181 (report_thread_events, swbreak_feature, hwbreak_feature)
2182 (vCont_supported, disable_randomization, pass_signals)
2183 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2184 Moved to client_state.
2185 * remote-utils.c (remote_debug, noack_mode)
2186 (transport_is_reliable): Moved to client_state.
2187 * tracepoint.c (current_traceframe): Moved to client_state.
2188
2189 Update all callers.
2190 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2191 linux-low.c, remote-utils.h, target.c: Use client_state.
2192
2193 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2194
2195 * configure.srv: Add new c/h file.
2196
2197 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2198
2199 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2200 null VQ.
2201
2202 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2203
2204 * gdb.arch/mips-fpregset-core.exp: New test.
2205 * gdb.arch/mips-fpregset-core.c: New test source.
2206
2207 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2208
2209 PR server/23198
2210 * hostio.c (require_int): Do not report overflow for integers
2211 between 0xfffffff and 0x7fffffff.
2212
2213 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2214
2215 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2216 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2217 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2218 functions.
2219 (the_low_target): Wire them.
2220
2221 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2222
2223 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2224 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2225 mode. Call collect_register_by_name with vscr using
2226 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2227 (ppc_store_vrregset): Add and set vscr_offset variable as in
2228 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2229 vscr_offset.
2230
2231 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2232
2233 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2234 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2235 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2236
2237 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2238
2239 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2240 (ppc_store_vsxregset): Likewise.
2241 (ppc_fill_vrregset): Likewise.
2242 (ppc_store_vrregset): Likewise.
2243 (ppc_fill_evrregset): Likewise.
2244 (ppc_store_evrregset): Likewise.
2245 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2246 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2247 needed.
2248
2249 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2250
2251 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2252 wordsize of the inferior. Call ppc_linux_target_wordsize.
2253
2254 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2255
2256 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2257 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2258 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2259 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2260 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2261 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2262 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2263 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2264 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2265 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2266 (tdesc_powerpc_e500l): Remove.
2267 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2268 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2269 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2270 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2271 linux-ppc-tdesc.h.
2272 (ppc_arch_setup): Remove target description matching code. Fill a
2273 ppc_linux_features struct and call ppc_linux_match_description
2274 with it.
2275
2276 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2277
2278 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2279 width of the requested register exceeds the width of the
2280 `ptrace' data type.
2281 (mips_cannot_store_register): Likewise.
2282
2283 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2284
2285 * linux-mips-low.c (mips_fetch_register): New function. Update
2286 preceding comment.
2287 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2288 (the_low_target): Wire `mips_fetch_register'.
2289
2290 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2291
2292 * lynx-i386-low.c (LYNXOS_178): New macro.
2293 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2294 the layout on LynxOS-178.
2295 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2296 handle floating point registers that are not supported by
2297 LynxOS-178.
2298
2299 2018-05-10 Tom Tromey <tom@tromey.com>
2300
2301 * configure: Rebuild.
2302
2303 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2304
2305 PR server/23158:
2306 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2307 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2308 Use it to set the expedite_regs field in the given tdesc.
2309 * x86-tdesc.h: New file.
2310 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2311 Adjust following the addition of the new expedite_regs parameter
2312 to init_target_desc.
2313 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2314 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2315 (i386_linux_read_description, amd64_linux_read_description):
2316 Adjust following the addition of the new expedite_regs parameter
2317 to init_target_desc.
2318 * lynx-i386-low.c: #include "x86-tdesc.h".
2319 (lynx_i386_arch_setup): Adjust following the addition of the new
2320 expedite_regs parameter to init_target_desc.
2321 * nto-x86-low.c: #include "x86-tdesc.h".
2322 (nto_x86_arch_setup): Adjust following the addition of the new
2323 expedite_regs parameter to init_target_desc.
2324 * win32-i386-low.c: #include "x86-tdesc.h".
2325 (i386_arch_setup): Adjust following the addition of the new
2326 expedite_regs parameter to init_target_desc.
2327
2328 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2329
2330 PR server/23158:
2331 * win32-low.c (win32_create_inferior): Add call to my_wait
2332 setting last_status global.
2333
2334 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2335
2336 PR server/23158:
2337 * win32-low.c (create_process): Only call gdb_tilde_expand if
2338 inferior_cwd is not NULL.
2339
2340 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2341
2342 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2343 registers to the cache if their values have changed.
2344 (i387_xsave_to_cache): Provide default values for x87 control
2345 registers when these features are available, but disabled.
2346 * regcache.c (supply_register_by_name_zeroed): New function.
2347 * regcache.h (supply_register_by_name_zeroed): Declare new
2348 function.
2349
2350 2018-05-07 Tom Tromey <tom@tromey.com>
2351
2352 * configure: Rebuild.
2353
2354 2018-05-04 Tom Tromey <tom@tromey.com>
2355
2356 * configure: Rebuild.
2357
2358 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2359 Pedro Alves <palves@redhat.com>
2360
2361 * linux-aarch64-low.c (aarch64_stopped_data_address):
2362 Likewise.
2363
2364 2018-04-27 Tom Tromey <tom@tromey.com>
2365
2366 * configure: Rebuild.
2367
2368 2018-04-23 Tom Tromey <tom@tromey.com>
2369
2370 * configure: Rebuild.
2371
2372 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * Makefile.in (depcomp): Add "..".
2375 (all_deps_files): New and use it.
2376
2377 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2378
2379 * configure.srv (aarch64*-*-linux*): Don't include xml.
2380 (i[34567]86-*-cygwin*): Likewise.
2381 (i[34567]86-*-linux*): Likewise.
2382 (i[34567]86-*-lynxos*): Likewise.
2383 (i[34567]86-*-mingw32ce*): Likewise.
2384 (i[34567]86-*-mingw*): Likewise.
2385 (i[34567]86-*-nto*): Likewise.
2386 (tic6x-*-uclinux): Likewise.
2387 (x86_64-*-linux*): Likewise.
2388 (x86_64-*-mingw*): Likewise.
2389 (x86_64-*-cygwin*): Likewise.
2390
2391 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2392
2393 * tdesc.c: Remove xml parameter.
2394
2395 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2396
2397 * server.c (get_features_xml): Remove cast.
2398 * tdesc.c (void target_desc::accept): Fill in function.
2399 (tdesc_get_features_xml): Remove old xml creation.
2400 (print_xml_feature::visit_pre): Add xml vistor.
2401 * tdesc.h (struct target_desc): Make xmltarget mutable.
2402 (tdesc_get_features_xml): Remove declaration.
2403
2404 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2405
2406 * tdesc.c (tdesc_architecture_name): Add new function.
2407 (tdesc_osabi_name): Likewise.
2408 (tdesc_get_features_xml): Use new functions.
2409
2410 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2411
2412 * tdesc.c (tdesc_create_flags): Remove.
2413 (tdesc_add_flag): Likewise.
2414 (tdesc_named_type): Likewise.
2415 (tdesc_create_union): Likewise.
2416 (tdesc_create_struct): Likewise.
2417 (tdesc_create_vector): Likewise.
2418 (tdesc_add_bitfield): Likewise.
2419 (tdesc_add_field): Likewise.
2420 (tdesc_set_struct_size): Likewise.
2421
2422 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2423
2424 * tdesc.c (~target_desc): Remove implictly deleted items.
2425 (init_target_desc): Iterate all features.
2426 (tdesc_get_features_xml): Use vector.
2427 (tdesc_create_feature): Create feature.
2428 * tdesc.h (tdesc_feature) Remove
2429 (target_desc): Add features.
2430
2431 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2432
2433 * Makefile.in: Add common/tdesc.c
2434 * tdesc.c (init_target_desc): init all reg_defs from register
2435 vector.
2436 (tdesc_create_reg): Create tdesc_reg.
2437 * tdesc.h (tdesc_feature): Add register vector.
2438
2439 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2440
2441 * tdesc.h (struct target_desc) <features>: Change type to
2442 std::vector<std::string>.
2443 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2444 changes.
2445 (tdesc_get_features_xml): Likewise.
2446 (tdesc_create_feature): Likewise.
2447
2448 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2449
2450 * regcache.c (find_register_by_number): Return a ref.
2451 (find_regno): Use references.
2452 (register_size): Likewise.
2453 (register_data): Likewise.
2454 * tdesc.c (target_desc::~target_desc): Remove free calls.
2455 (target_desc::operator==): Use std::vector compare.
2456 (init_target_desc): Use reference.
2457 (tdesc_create_reg): Use reg constructors.
2458 * tdesc.h (struct target_desc): Replace pointer with object.
2459
2460 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2461
2462 * regcache.c (find_register_by_number): Make static.
2463 (find_regno): Use find_register_by_number
2464 * regcache.h (struct reg): Remove declaration.
2465
2466 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2467
2468 * tdesc.c (target_desc::~target_desc): Move to here.
2469 (target_desc::operator==): Likewise.
2470 * tdesc.h (target_desc::~target_desc): Move from here.
2471 (target_desc::operator==): Likewise.
2472
2473 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2474
2475 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2476
2477 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2478
2479 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2480 S390_TDESC_GS.
2481 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2482 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2483 and init_registers_s390_gs_linux64.
2484
2485 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2486
2487 * linux-s390-low.c (s390_fill_gs): Remove function.
2488 (s390_fill_gsbc): Remove function.
2489 (s390_regsets): Set fill functions for the guarded storage regsets
2490 to NULL.
2491
2492 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2493
2494 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2495 the word size. Add comment.
2496 (s390_get_wordsize): New function.
2497 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2498 pswm with it. Instead, use s390_get_wordsize to determine the
2499 word size first and derive the correct tdesc from that directly.
2500
2501 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2502
2503 * Makefile.in: Include silent-rules.mk.
2504 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2505 (COMPILE): Add ECHO_CXX.
2506 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2507 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2508 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2509 (version-generated.c): Add ECHO_GEN.
2510 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2511 (IPAGENT_COMPILE): Add ECHO_CXX.
2512 (%-generated.c): Add ECHO_REGDAT.
2513
2514 2018-03-14 Tom Tromey <tom@tromey.com>
2515
2516 PR cli/14977:
2517 * ax.c (ax_printf): Special case for NULL.
2518
2519 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2520
2521 * linux-low.c (linux_qxfer_libraries_svr4): Use
2522 xml_escape_text_append.
2523
2524 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2525
2526 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2527
2528 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2529
2530 * server.c (handle_general_set): Remove unnecessary xstrdup.
2531
2532 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2533
2534 * server.c (parse_debug_format_options): Adjust to
2535 delim_string_to_char_ptr_vec changes.
2536 * thread-db.c (thread_db_load_search): Adjust to
2537 dirnames_to_char_ptr_vec changes.
2538
2539 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2540
2541 * target.h (target_enable_btrace, target_disable_btrace)
2542 (target_read_btrace, target_read_btrace_conf): Turn macro into
2543 inline function. Throw error if target method is not defined.
2544 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2545 check for btrace target method. Be prepared to handle exceptions
2546 from btrace target methods.
2547
2548 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2549
2550 * server.c (captured_main): Change order of error message printed
2551 when the current working directory cannot be found.
2552
2553 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2554
2555 * server.c: Include "filenames.h" and "pathstuff.h".
2556 (program_name): Delete variable.
2557 (program_path): New anonymous class.
2558 (get_exec_wrapper): Use "program_path" instead of
2559 "program_name".
2560 (handle_v_run): Likewise.
2561 (captured_main): Likewise.
2562 (process_serial_event): Likewise.
2563
2564 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2565
2566 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2567 (OBJS): Add "pathstuff.o".
2568 * server.c (current_directory): New global variable.
2569 (captured_main): Initialize "current_directory".
2570
2571 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2572
2573 * tdesc.c: Use common/tdesc.h.
2574 * tdesc.h: Likewise.
2575
2576 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2577 Simon Marchi <simon.marchi@ericsson.com>
2578
2579 * Makefile.in: Switch order of make rules.
2580
2581 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2582
2583 * Makefile.in: Add common directory in build.
2584 * configure.ac: Add common reference.
2585 * configure: Regenerate.
2586
2587 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2588
2589 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2590 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2591 * spu-low.c (spu_target_ops): Likewise.
2592 * win32-low.c (win32_target_ops): Likewise.
2593 * server.c (supported_btrace_packets): Report packets unconditionally.
2594 * target.h (target_ops) <supports_btrace>: Remove.
2595 (target_supports_btrace): Remove.
2596
2597 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2598
2599 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2600 (handle_btrace_disable): Change return type to void. Use exceptions
2601 to report errors.
2602 (handle_btrace_general_set): Catch exception and copy message to
2603 return message.
2604
2605 2018-02-08 Tom Tromey <tom@tromey.com>
2606
2607 * linux-low.c (install_software_single_step_breakpoints): Use
2608 make_scoped_restore.
2609 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2610 (do_restore_current_thread_cleanup): Remove.
2611 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2612 declare.
2613
2614 2018-02-08 Tom Tromey <tom@tromey.com>
2615
2616 * mem-break.c (set_raw_breakpoint_at): Use
2617 gdb::unique_xmalloc_ptr.
2618
2619 2018-01-30 Pedro Alves <palves@redhat.com>
2620
2621 PR gdb/13211
2622 * target.c (target_terminal::terminal_state): Rename to ...
2623 (target_terminal::m_terminal_state): ... this.
2624
2625 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2626
2627 * linux-low.c (handle_extended_wait): Surround call to
2628 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2629
2630 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2633 linux_ptrace_attach_fail_reason_string now returning an
2634 std::string.
2635 (linux_attach): Likewise.
2636 * thread-db.c (attach_thread): Likewise.
2637
2638 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2639
2640 PR gdb/21559
2641 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2642 checking for fs_base/gs_base fields in struct user_regs_struct.
2643 * configure: Regenerate.
2644
2645 2018-01-16 Yao Qi <yao.qi@linaro.org>
2646
2647 PR gdb/18749
2648 * linux-low.c (fetch_register): Call supply_register instead of
2649 error.
2650
2651 2018-01-08 Yao Qi <yao.qi@linaro.org>
2652 Simon Marchi <simon.marchi@ericsson.com>
2653
2654 * Makefile.in (OBS): Remove selftest.o.
2655 * configure.ac: Set srv_selftest_objs if $development is true.
2656 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2657 * configure: Re-generated.
2658 * server.c (captured_main): Wrap variable selftest_filter with
2659 GDB_SELF_TEST.
2660
2661 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2662
2663 * server.c (parse_debug_format_options): Return std::string.
2664 (handle_monitor_command, captured_main): Adjust.
2665
2666 2018-01-05 Pedro Alves <palves@redhat.com>
2667
2668 PR gdb/18653
2669 * server.c (captured_main): Pass quiet=false to
2670 save_original_signals_state.
2671
2672 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2673
2674 * gdbreplay.c (gdbreplay_version): Update copyright year in
2675 version message.
2676 * server.c (gdbserver_version): Likewise.
2677
2678 2017-12-08 Tom Tromey <tom@tromey.com>
2679
2680 * ax.c (ax_printf): Update.
2681
2682 2017-12-07 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2685 aarch64_linux_read_description.
2686 * linux-amd64-ipa.c (idx2mask): New array.
2687 (get_ipa_tdesc): Move idx2mask out.
2688 (initialize_low_tracepoint): Initialize target descriptions.
2689 * linux-i386-ipa.c (idx2mask): New array.
2690 (get_ipa_tdesc): Move idx2mask out.
2691 (initialize_low_tracepoint): Initialize target descriptions.
2692
2693 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2694
2695 * tdesc.c (struct tdesc_type): Change return type.
2696 (tdesc_add_flag): Change parameter type.
2697 (tdesc_add_bitfield): Likewise.
2698 (tdesc_add_field): Likewise.
2699 (tdesc_set_struct_size): Likewise.
2700
2701 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2702
2703 * regcache.c (registers_to_string): Remove unused variable.
2704
2705 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2706
2707 * inferiors.c (for_each_inferior_with_data): Remove.
2708 * inferiors.h (for_each_inferior_with_data): Remove.
2709 * server.c (handle_qxfer_threads_worker): Change parameter type.
2710 (handle_qxfer_threads_proper): Use for_each_thread.
2711
2712 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2713
2714 * inferiors.c (for_each_inferior): Remove.
2715 (clear_inferiors): Use for_each_thread.
2716 * inferiors.h (for_each_inferior): Remove.
2717 * linux-low.c (linux_wait_for_event_filtered): Use
2718 for_each_thread.
2719 (linux_stabilize_threads): Likewise.
2720 * regcache.c (regcache_release): Likewise.
2721 * server.c (gdb_wants_all_threads_stopped): Likewise.
2722 (clear_pending_status_callback): Remove.
2723 (handle_status): Use for_each_thread.
2724 (captured_main): Likewise.
2725 * win32-low.c (child_init_thread_list): Likewise.
2726 (win32_clear_inferiors): Likewise.
2727 (fake_breakpoint_event): Likewise.
2728
2729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2730
2731 * inferiors.h (find_inferior): Remove.
2732 * inferiors.c (find_inferior): Remove.
2733
2734 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2735
2736 * linux-low.c (resume_status_pending_p): Update comment.
2737 (need_step_over_p): Update comment.
2738
2739 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2740
2741 * linux-low.c (proceed_one_lwp): Return void, change parameter
2742 type.
2743 (unsuspend_and_proceed_one_lwp): Likewise.
2744 (proceed_all_lwps): Use for_each_thread.
2745 (unstop_all_lwps): Likewise.
2746
2747 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2748
2749 * linux-low.c (linux_resume_one_thread): Return void, take
2750 parameter directly.
2751 (linux_resume): Use for_each_thread.
2752
2753 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2754
2755 * linux-low.c (send_sigstop_callback): Return void, change
2756 parameter type. Rename to...
2757 (send_sigstop): ... this.
2758 (suspend_and_send_sigstop_callback): Return void, change parameter
2759 type. Rename to...
2760 (suspend_and_send_sigstop): ... this.
2761 (stop_all_lwps): Use for_each_thread.
2762
2763 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2764
2765 * linux-low.c (lwp_running): Return bool, remove unused
2766 argument.
2767 (linux_stabilize_threads): Use find_thread.
2768
2769 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2770
2771 * linux-low.c (select_singlestep_lwp_callback): Remove.
2772 (count_events_callback): Remove.
2773 (select_event_lwp_callback): Remove.
2774 (select_event_lwp): Use find_thread/for_each_thread.
2775
2776 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2777
2778 * linux-low.c (not_stopped_callback): Return bool, take filter
2779 argument directly.
2780 (linux_wait_for_event_filtered): Use find_thread.
2781 (linux_wait_1): Likewise.
2782
2783 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2784
2785 * linux-low.c (same_lwp): Remove.
2786 (find_lwp_pid): Use find_thread.
2787
2788 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2789
2790 * linux-low.c (delete_lwp_callback): Remove.
2791 (linux_mourn): Use for_each_thread.
2792
2793 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2794
2795 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2796 args parameter, don't check for pid.
2797 (linux_detach): Use for_each_thread.
2798
2799 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2800
2801 * linux-low.c (struct counter): Remove.
2802 (second_thread_of_pid_p): Remove.
2803 (last_thread_of_process_p): Use find_thread.
2804
2805 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2806
2807 * inferiors.c (find_inferior_in_random): Remove.
2808 * inferiors.h (find_inferior_in_random): Remove.
2809 * linux-low.c (status_pending_p_callback): Return bool, accept
2810 parameter ptid directly.
2811 (linux_wait_for_event_filtered): Use find_thread_in_random.
2812 (linux_wait_1): Likewise.
2813
2814 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2815
2816 * inferiors.c (find_inferior_id): Remove.
2817 (find_thread_ptid): Move implemention from find_inferior_id to
2818 here.
2819 * inferiors.h (find_inferior_id): Remove.
2820 * server.c (handle_status): Use find_thread_ptid.
2821 (process_serial_event): Likewise.
2822 * thread-db.c (find_one_thread): Likewise.
2823 (thread_db_thread_handle): Likewise.
2824 * win32-low.c (thread_rec): Likewise.
2825 (child_delete_thread): Likewise.
2826 (win32_thread_alive): Likewise.
2827 (get_child_debug_event): Likewise.
2828
2829 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2830
2831 * linux-mips-low.c (update_watch_registers_callback): Return
2832 void, remove pid_p parameter, don't check for pid.
2833 (mips_insert_point, mips_remove_point): Use for_each_thread.
2834
2835 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2836
2837 * lynx.low (lynx_delete_thread_callback): Remove.
2838 (lynx_mourn): Use for_each_thread.
2839
2840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2841
2842 * regcache.c (regcache_invalidate_one): Remove.
2843 (regcache_invalidate_pid): use for_each_thread.
2844
2845 2017-11-26 Tom Tromey <tom@tromey.com>
2846
2847 * linux-low.c (linux_create_inferior): Update.
2848
2849 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2850
2851 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2852
2853 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2854
2855 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2856 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2857 * linux-aarch64-tdesc-selftest.c: New file.
2858 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2859
2860 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2861
2862 * configure.srv: Add new file.
2863 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2864 * linux-aarch64-tdesc-selftest.c: New file.
2865 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2866
2867 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2868
2869 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2870 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2871 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2872
2873 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2874
2875 * configure.srv: Add new files.
2876 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2877 aarch64_linux_read_description.
2878 * linux-aarch64-low.c (aarch64_linux_read_description):
2879 Merge with aarch64_arch_setup.
2880 (aarch64_arch_setup): Call aarch64_linux_read_description.
2881 * linux-aarch64-tdesc.c: New file.
2882 * linux-aarch64-tdesc.h: New file.
2883
2884 2017-11-24 Yao Qi <yao.qi@linaro.org>
2885
2886 * configure.srv: Set $srv_regobj for tic6x-linux.
2887 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2888 (tic6x_read_description): Move some code to tic6x_arch_setup.
2889 (tic6x_tdesc_test): New function.
2890 (initialize_low_arch): Call selftests::register_test.
2891
2892 2017-11-22 Yao Qi <yao.qi@linaro.org>
2893
2894 * remote-utils.c (prepare_resume_reply): Use memcpy.
2895
2896 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2897
2898 * linux-low.c (kill_one_lwp_callback): Return void, take
2899 argument directly, don't filter on pid.
2900 (linux_kill): Use for_each_thread.
2901
2902 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2903
2904 * linux-low.c (need_step_over_p): Return bool, remove dummy
2905 argument.
2906 (linux_resume, proceed_all_lwps): Use find_thread.
2907
2908 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2909
2910 * linux-low.c (resume_status_pending_p): Return bool, remove
2911 flag_p argument.
2912 (linux_resume): Use find_thread.
2913
2914 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2915
2916 * linux-low.c (struct thread_resume_array): Remove.
2917 (linux_set_resume_request): Return void, take arguments
2918 directly.
2919 (linux_resume): Use for_each_thread.
2920
2921 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2922
2923 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2924 return bool, remove data argument.
2925 (linux_stabilize_threads): Use find_thread.
2926
2927 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2928
2929 * linux-low.c (unsuspend_one_lwp): Remove.
2930 (unsuspend_all_lwps): Use for_each_thread, inline code from
2931 unsuspend_one_lwp.
2932
2933 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2934
2935 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2936 * linux-low.c (struct iterate_over_lwps_args): Remove.
2937 (iterate_over_lwps_filter): Remove.
2938 (iterate_over_lwps): Use find_thread.
2939
2940 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2941
2942 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2943 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2944 code from reset_lwp_ptrace_options_callback.
2945
2946 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2947
2948 * linux-arm-low.c (struct update_registers_data): Remove.
2949 (update_registers_callback): Return void, take arguments
2950 directly, don't check thread's pid.
2951 (arm_insert_point, arm_remove_point): Use for_each_thread.
2952
2953 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2954
2955 * win32-low.c (continue_one_thread): Return void, take argument
2956 directly.
2957 (child_continue): Use for_each_thread.
2958
2959 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2960
2961 * win32-i386-low.c (update_debug_registers_callback): Rename
2962 to ...
2963 (update_debug_registers): ... this, return void, remove pid_p arg.
2964 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2965
2966 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2967
2968 * inferiors.h (struct process_info): Add constructor, initialize
2969 fields..
2970 <syscalls_to_catch>: Change type to std::vector<int>.
2971 * inferiors.c (add_process): Allocate process_info with new.
2972 (remove_process): Free process_info with delete.
2973 * linux-low.c (handle_extended_wait): Adjust.
2974 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2975 * server.c (handle_general_set): Adjust.
2976
2977 2017-11-16 Pedro Alves <palves@redhat.com>
2978
2979 * remote-utils.c (remote_close): Block SIGIO signals instead of
2980 uninstalling the SIGIO handler.
2981
2982 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2983
2984 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2985
2986 2017-11-16 Yao Qi <yao.qi@linaro.org>
2987
2988 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2989 (tic6x_store_gregset): Likewise.
2990 (tic6x_usrregs_info): Move it up.
2991
2992 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2993
2994 * Makefile.in: Update arch rules.
2995 * configure.srv: Explicitly mark arch/ files.
2996
2997 2017-11-13 Andreas Schwab <schwab@suse.de>
2998
2999 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3000 function.
3001 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3002
3003 2017-11-06 Pedro Alves <palves@redhat.com>
3004
3005 * config.in, configure: Regenerate.
3006
3007 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3008
3009 * target.c (struct thread_search): Remove.
3010 (thread_search_callback): Remove.
3011 (prepare_to_access_memory): Use for_each_thread instead of
3012 find_inferior. Inline code from thread_search_callback.
3013
3014 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3015
3016 * server.c (struct visit_actioned_threads_data): Remove.
3017 (visit_actioned_threads): Change prototype to take arguments
3018 directly.
3019 (resume): Use find_thread instead of find_inferior.
3020
3021 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3022
3023 * server.c (queue_stop_reply_callback): Change prototype, return
3024 void.
3025 (find_status_pending_thread_callback): Remove.
3026 (handle_status): Replace find_inferior with find_thread and
3027 for_each_thread.
3028
3029 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3030
3031 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3032 with REGNO.
3033 (aarch64_store_gregset): Likewise.
3034 (aarch64_fill_fpregset): Likewise.
3035 (aarch64_store_fpregset): Likewise.
3036
3037 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3038
3039 * gdbthread.h (find_thread, for_each_thread): New functions.
3040 * inferiors.c (thread_of_pid): Remove.
3041 (find_any_thread_of_pid): Use find_thread.
3042 * linux-low.c (num_lwps): Use for_each_thread.
3043
3044 2017-10-17 Yao Qi <yao.qi@linaro.org>
3045
3046 * Makefile.in: Remove one rule.
3047 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3048
3049 2017-10-17 Yao Qi <yao.qi@linaro.org>
3050
3051 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3052 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3053
3054 2017-10-17 Yao Qi <yao.qi@linaro.org>
3055
3056 * configure.srv: Rename arm.o with arch/arm.o.
3057
3058 2017-10-17 Yao Qi <yao.qi@linaro.org>
3059
3060 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3061 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3062 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3063 (arch-i386.o, arch-amd64.o): Remove rules.
3064 (arch/%.o): New rule.
3065 Update POSTCOMPILE and COMPILE.pre.
3066 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3067 * configure: Re-generated.
3068 * configure.srv: Replace arch-i386.o with arch/i386.o.
3069 Replace arch-amd64.o with arch/amd64.o.
3070
3071 2017-10-16 Yao Qi <yao.qi@linaro.org>
3072
3073 * configure: Regenerated.
3074
3075 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3076
3077 * inferiors.h: (struct inferior_list): Remove.
3078 (struct inferior_list_entry); Remove.
3079 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3080 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3081 get_first_inferior): Remove.
3082 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3083 find_inferior_id, find_inferior_in_random): Change signature.
3084 * inferiors.c (all_threads): Change type to
3085 std::list<thread_info *>.
3086 (get_thread): Remove macro.
3087 (find_inferior, find_inferior_id): Change signature, implement
3088 using find_thread.
3089 (find_inferior_in_random): Change signature, implement using
3090 find_thread_in_random.
3091 (for_each_inferior, for_each_inferior_with_data): Change
3092 signature, implement using for_each_thread.
3093 (add_inferior_to_list, remove_inferior): Remove.
3094 (add_thread, get_first_thread, thread_of_pid,
3095 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3096 (get_first_inferior, one_inferior_p, clear_inferior_list):
3097 Remove.
3098 (clear_inferiors, get_thread_process): Update.
3099 * gdbthread.h: Include <list>.
3100 (struct thread_info) <entry>: Remove field.
3101 <id>: New field.
3102 (all_threads): Change type to std::list<thread_info *>.
3103 (get_first_inferior): Add doc.
3104 (find_thread, for_each_thread, find_thread_in_random): New
3105 functions.
3106 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3107 * linux-arm-low.c (update_registers_callback): Update.
3108 * linux-low.c (second_thread_of_pid_p): Update.
3109 (kill_one_lwp_callback, linux_detach_lwp_callback,
3110 delete_lwp_callback, status_pending_p_callback, same_lwp,
3111 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3112 iterate_over_lwps, not_stopped_callback,
3113 resume_stopped_resumed_lwps, count_events_callback,
3114 select_singlestep_lwp_callback, select_event_lwp_callback,
3115 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3116 suspend_and_send_sigstop_callback, wait_for_sigstop,
3117 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3118 lwp_running, linux_set_resume_request, resume_status_pending_p,
3119 need_step_over_p, start_step_over, linux_resume_one_thread,
3120 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3121 reset_lwp_ptrace_options_callback): Update.
3122 * linux-mips-low.c (update_watch_registers_callback): Update.
3123 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3124 Update.
3125 (free_register_cache_thread_one): Remove.
3126 (regcache_release): Update.
3127 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3128 handle_qxfer_threads_worker): Update.
3129 (handle_query): Update, use list iterator.
3130 (visit_actioned_threads, handle_pending_status,
3131 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3132 clear_pending_status_callback, set_pending_status_callback,
3133 find_status_pending_thread_callback, handle_status,
3134 process_serial_event): Update.
3135 * target.c (thread_search_callback): Update.
3136 * thread-db.c (thread_db_get_tls_address): Update.
3137 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3138 Update.
3139 * win32-i386-low.c (update_debug_registers_callback): Update.
3140 * win32-low.c (delete_thread_info, child_delete_thread,
3141 continue_one_thread, suspend_one_thread,
3142 get_child_debug_event): Adjust.
3143
3144 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3145
3146 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3147 * inferiors.h: Include <list>.
3148 (struct process_info) <entry>: Remove field.
3149 <pid>: New field.
3150 (pid_of): Change macro to function.
3151 (ptid_of, lwpid_of): Remove macro.
3152 (all_processes): Change type to std::list<process_info *>.
3153 (ALL_PROCESSES): Remove macro.
3154 (for_each_process, find_process): New function.
3155 * inferiors.c (all_processes): Change type to
3156 std::list<process_info *>.
3157 (find_thread_process): Adjust.
3158 (add_process): Likewise.
3159 (remove_process): Likewise.
3160 (find_process_pid): Likewise.
3161 (get_first_process): Likewise.
3162 (started_inferior_callback): Remove.
3163 (have_started_inferiors_p): Adjust.
3164 (attached_inferior_callback): Remove.
3165 (have_attached_inferiors_p): Adjust.
3166 * linux-low.c (check_zombie_leaders): Likewise.
3167 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3168 (x86_linux_update_xmltarget): Adjust.
3169 * server.c (handle_query): Likewise.
3170 (gdb_reattached_process): Remove.
3171 (handle_status): Adjust.
3172 (kill_inferior_callback): Likewise.
3173 (detach_or_kill_inferior): Remove.
3174 (print_started_pid): Likewise.
3175 (print_attached_pid): Likewise.
3176 (detach_or_kill_for_exit): Update.
3177 (process_serial_event): Likewise.
3178 * linux-arm-low.c (arm_new_fork): Likewise.
3179
3180 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3181
3182 * dll.h: Include <list>.
3183 (struct dll_info): Add constructor.
3184 <entry>: Remove field.
3185 (all_dlls): Change type to std::list<dll_info>.
3186 * dll.c: Include <algorithm>.
3187 (get_dll): Remove macro.
3188 (all_dlls): Change type to std::list<dll_info *>.
3189 (free_one_dll): Remove.
3190 (match_dll): Likewise.
3191 (loaded_dll): Adjust.
3192 (unloaded_dll): Adjust to all_dlls type change, use
3193 std::find_if. Inline code from match_dll.
3194 (clear_dlls): Adjust to all_dlls type change.
3195 * server.c (emit_dll_description): Remove.
3196 (handle_qxfer_libraries): Adjust to all_dlls type change,
3197 integrate emit_dll_description's functionality.
3198
3199 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3200
3201 * linux-low.h (struct linux_target_ops) <delete_process>: New
3202 field.
3203 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3204 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3205 (struct linux_target_ops): Add delete_process callback.
3206 * linux-arm-low.c (arm_delete_process): New.
3207 (struct linux_target_ops): Add delete_process callback.
3208 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3209 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3210 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3211 * linux-mips-low.c (mips_linux_delete_process): New.
3212 (struct linux_target_ops): Add delete_process callback.
3213 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3214 * linux-s390-low.c (struct linux_target_ops): Likewise.
3215 * linux-sh-low.c (struct linux_target_ops): Likewise.
3216 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3217 * linux-tile-low.c (struct linux_target_ops): Likewise.
3218 * linux-x86-low.c (x86_linux_delete_process): New.
3219 (struct linux_target_ops): Add delete_process callback.
3220 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3221
3222 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3223
3224 * linux-aarch64-low.c (the_low_target): Add thread delete
3225 callback.
3226 * linux-arm-low.c (arm_delete_thread): New function.
3227 (the_low_target): Add thread delete callback.
3228 * linux-bfin-low.c (the_low_target): Likewise.
3229 * linux-crisv32-low.c (the_low_target): Likewise.
3230 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3231 set.
3232 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3233 field.
3234 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3235 * linux-mips-low.c (mips_linux_delete_thread): New function.
3236 (the_low_target): Add thread delete callback.
3237 * linux-ppc-low.c (the_low_target): Likewise.
3238 * linux-s390-low.c (the_low_target): Likewise.
3239 * linux-sh-low.c (the_low_target): Likewise.
3240 * linux-tic6x-low.c (the_low_target): Likewise.
3241 * linux-tile-low.c (the_low_target): Likewise.
3242 * linux-x86-low.c (the_low_target): Likewise.
3243 * linux-xtensa-low.c (the_low_target): Likewise.
3244
3245 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3246
3247 * win32-low.c: Include "common-inferior.h".
3248
3249 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3250
3251 * inferiors.c (set_inferior_cwd): New function.
3252 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3253 (handle_query): Inform that QSetWorkingDir is supported.
3254 * win32-low.c (create_process): Pass the inferior's cwd to
3255 CreateProcess.
3256
3257 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3258
3259 * inferiors.c (current_inferior_cwd): New global variable.
3260 (get_inferior_cwd): New function.
3261 * inferiors.h (struct process_info) <cwd>: New field.
3262
3263 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3264
3265 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3266 (OBS): Add gdb_tilde_expand.o.
3267
3268 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3269
3270 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3271 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3272
3273 2017-09-29 Pedro Alves <palves@redhat.com>
3274
3275 * ax.c (gdb_parse_agent_expr): Constify.
3276 * ax.h (gdb_parse_agent_expr): Constify.
3277 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3278 Constify.
3279 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3280 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3281 * remote-utils.h (read_ptid): Constify.
3282 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3283 (process_point_options, process_serial_event): Constify.
3284 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3285 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3286 (cmd_qtbuffer): Constify.
3287
3288 2017-09-29 Pedro Alves <palves@redhat.com>
3289
3290 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3291 fails.
3292
3293 2017-09-29 Pedro Alves <palves@redhat.com>
3294
3295 * linux-low.c (handle_extended_wait): Pass parent thread instead
3296 of process to thread_db_notice_clone.
3297 * linux-low.h (thread_db_notice_clone): Replace parent process
3298 parameter with parent thread parameter.
3299 * thread-db.c (find_one_thread): Add comment.
3300 (thread_db_notice_clone): Replace parent process parameter with
3301 parent thread parameter. Temporarily switch to the parent thread.
3302
3303 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3304
3305 * gdbthread.h: Include "common-gdbthread.h".
3306 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3307 "if" when validating the ptid.
3308 * remote-utils.c: Include "gdbthread.h".
3309 (prepare_resume_reply): Use "switch_to_thread".
3310 * target.c (done_accessing_memory): Likewise.
3311
3312 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3313
3314 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3315 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3316 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3317 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3318 s390x-gs-linux64-ipa.o to ipa_obj.
3319 * linux-s390-low.c (HWCAP_S390_GS): New define.
3320 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3321 New functions.
3322 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3323 (s390_arch_setup): Check for guarded-storage support and choose
3324 appropriate tdesc.
3325 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3326 init_registers_s390x_gs_linux64.
3327 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3328 enum value.
3329 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3330 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3331
3332 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3333
3334 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3335
3336 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3337
3338 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3339 (thread_db_thread_handle): Declare.
3340 * linux-low.c (linux_target_ops): Initialize thread_handle.
3341 * server.c (handle_qxfer_threads_worker): Add support for
3342 "handle" attribute.
3343 * target.h (struct target_ops): Add new function pointer,
3344 thread_handle.
3345 (target_thread_handle): Define.
3346 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3347 field in lwp.
3348 (thread_db_thread_handle): New function.
3349
3350 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3351
3352 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3353 * linux-low.h (thread_db_notice_clone): Declare.
3354 * thread-db.c (thread_db_notice_clone): New function.
3355
3356 2017-09-21 Pedro Alves <palves@redhat.com>
3357
3358 * server.c (gdb_read_memory, handle_status, process_serial_event)
3359 (handle_serial_event, handle_target_event): Adjust to
3360 set_desired_thread prototype change.
3361 * target.c (set_desired_thread): Remove 'use_general' parameter
3362 and adjust.
3363 * target.h (set_desired_thread): Remove 'use_general' parameter.
3364
3365 2017-09-20 Tom Tromey <tom@tromey.com>
3366
3367 * target.c (target_terminal::terminal_state): Define.
3368 (target_terminal::init): Rename from target_terminal_init.
3369 (target_terminal::inferior): Rename from
3370 target_terminal_inferior.
3371 (target_terminal::ours): Rename from target_terminal_ours.
3372 (target_terminal::ours_for_output, target_terminal::info): New.
3373
3374 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3375
3376 * server.c (accumulate_file_name_length): Remove.
3377 (emit_dll_description): Adjust to std::string change.
3378 (handle_qxfer_libraries): Use std::string to hold document.
3379
3380 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3381
3382 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3383 return type of xml_escape_text.
3384 * server.c (emit_dll_description): Likewise.
3385
3386 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3387
3388 * server.c (captured_main): Accept argument for --selftest.
3389 Update run_tests call.
3390 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3391 when registering selftests.
3392
3393 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3394
3395 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3396 instead of "VEC" for "target_desc.reg_defs".
3397 (regcache_cpy): Likewise.
3398 (registers_to_string): Likewise.
3399 (registers_from_string): Likewise.
3400 (find_regno): Likewise.
3401 (supply_regblock): Likewise.
3402 (regcache_raw_read_unsigned): Likewise.
3403 * tdesc.c (init_target_desc): Likewise.
3404 (tdesc_create_reg): Likewise.
3405 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3406 (struct target_desc) <reg_defs>: Convert to "std::vector".
3407 (target_desc): Do not initialize "reg_defs".
3408 (~target_desc): Update code to use "std::vector" instead of "VEC"
3409 for "target_desc.reg_defs".
3410 (operator==): Likewise.
3411
3412 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3413
3414 * inferiors.h (thread_to_gdb_id): Remove.
3415 * inferiors.c (thread_to_gdb_id): Remove.
3416 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3417 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3418 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3419 Likewise.
3420 * nto-low.c (nto_fetch_registers, nto_store_registers,
3421 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3422
3423 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3424
3425 * inferiors.h (gdb_id_to_thread_id): Remove.
3426 * inferiors.c (gdb_id_to_thread_id): Remove.
3427 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3428 removal. Move pid declaration closer to where it's used.
3429
3430 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3431
3432 * server.c (handle_detach): New function.
3433 (process_serial_event): Move code out, call handle_detach.
3434
3435 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3436
3437 * server.c (require_running): Rename to ...
3438 (require_running_or_return): ... this ...
3439 (require_running_or_break): ... and this.
3440 (handle_query, process_serial_event): Adjust.
3441
3442 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3443
3444 * linux-low.c (linux_set_resume_request): Remove unused
3445 variables.
3446
3447 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3448
3449 * server.c (first_thread_of): Remove.
3450 (process_serial_event): Replace usage of first_thread_of with
3451 find_any_thread_of_pid.
3452 * tracepoint.c (same_process_p): Remove.
3453 (gdb_agent_about_to_close): Replace usage of same_process_p with
3454 find_any_thread_of_pid.
3455 * linux-x86-low.c (same_process_callback): Remove.
3456 (x86_arch_setup_process_callback): Replace usage of
3457 same_process_callback with find_any_thread_of_pid.
3458 * thread-db.c (any_thread_of): Remove.
3459 (switch_to_process): Replace usage of any_thread_of with
3460 find_any_thread_of_pid.
3461 * inferiors.c (thread_pid_matches_callback): Remove.
3462 (find_thread_process): Adjust to use find_any_thread_of_pid.
3463
3464 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3465
3466 * regcache.c (get_thread_regcache): Guard calls to "memset"
3467 with "!VEC_empty".
3468
3469 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3470
3471 * linux-low.c (handle_extended_wait): Use
3472 "allocate_target_description" instead of "XNEW".
3473 * linux-x86-low.c (initialize_low_arch): Likewise.
3474
3475 2017-09-05 Yao Qi <yao.qi@linaro.org>
3476
3477 * configure.srv (srv_i386_regobj): Remove.
3478 (srv_amd64_regobj): Remove.
3479 (srv_regobj): Set it to "" for x86 non-linux targets.
3480 * linux-x86-tdesc.c (i386_linux_read_description):
3481 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3482 (init_registers_i386): Remove the declaration.
3483 (tdesc_i386): Remove the declaration.
3484 (lynx_i386_arch_setup): Call i386_create_target_description.
3485 * nto-x86-low.c: Likewise.
3486 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3487 [!__x86_64__]: include arch/i386.h.
3488 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3489
3490 2017-09-05 Yao Qi <yao.qi@linaro.org>
3491
3492 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3493 i386/amd64-XXX-linux from it.
3494
3495 2017-09-05 Yao Qi <yao.qi@linaro.org>
3496
3497 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3498 false.
3499 (ipa_amd64_linux_regobj): Remove.
3500 (ipa_x32_linux_regobj): Remove.
3501
3502 2017-09-05 Yao Qi <yao.qi@linaro.org>
3503
3504 * Makefile.in (arch-amd64.o): New rule.
3505 * configure.srv: Append arch-amd64.o.
3506 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3507 (get_ipa_tdesc): Call amd64_linux_read_description.
3508 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3509 and init_registers_amd64_XXX.
3510 * linux-x86-low.c (x86_linux_read_description): Call
3511 amd64_linux_read_description.
3512 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3513 (initialize_low_arch): Don't call init_registers_x32_XXX and
3514 init_registers_amd64_XXX.
3515 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3516 and tdesc_amd64_XXX.
3517 [__x86_64__] (amd64_tdesc_test): New function.
3518 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3519 and init_registers_amd64_XXX.
3520 * linux-x86-tdesc.c: Include arch/amd64.h.
3521 (xcr0_to_tdesc_idx): New function.
3522 (i386_linux_read_description): New function.
3523 (amd64_get_ipa_tdesc_idx): New function.
3524 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3525 (amd64_get_ipa_tdesc): Declare.
3526
3527 2017-09-05 Yao Qi <yao.qi@linaro.org>
3528
3529 * configure.srv (srv_i386_linux_xmlfiles): Remove
3530 i386/i386-XXX-linux.xml from it.
3531
3532 2017-09-05 Yao Qi <yao.qi@linaro.org>
3533
3534 * configure.srv: Set srv_i386_linux_regobj empty if $development
3535 is false.
3536 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3537 initialize_low_tdesc.
3538 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3539 with #if initialize_low_tdesc.
3540 * linux-x86-tdesc-selftest.c: New file.
3541 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3542
3543 2017-09-05 Yao Qi <yao.qi@linaro.org>
3544
3545 * Makefile.in (arch-i386.o): New rule.
3546 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3547 (x86_64-*-linux*): Likewise.
3548 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3549 include arch/i386.h.
3550 (i386_linux_read_description): Remove code and call
3551 i386_create_target_description.
3552 * tdesc.c (allocate_target_description): New function.
3553 * tdesc.h (set_tdesc_architecture): Remove declaration.
3554 (set_tdesc_osabi): Likewise.
3555
3556 2017-09-05 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3559 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3560 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3561 .xmltarget.
3562 * server.c (get_features_xml): Call tdesc_get_features_xml.
3563 * tdesc.c (set_tdesc_architecture): New function.
3564 (set_tdesc_osabi): New function.
3565 (tdesc_get_features_xml): New function.
3566 (tdesc_create_feature): Add an argument.
3567 * tdesc.h (struct target_desc) <features>: New field.
3568 <arch, osabi>: New field.
3569 (~target_desc): xfree features, arch, and osabi.
3570 (target_desc::oerator==): Don't compare .xmltarget.
3571 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3572 (set_tdesc_osabi): Likewise.
3573 (tdesc_get_features_xml): Likewise.
3574
3575 2017-09-05 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-x86-tdesc.c: Include selftest.h.
3578 (i386_tdesc_test): New function.
3579 (initialize_low_tdesc): Call selftests::register_test.
3580 * tdesc.h: Include regdef.h.
3581 (target_desc): Override operator == and !=.
3582
3583 2017-09-05 Yao Qi <yao.qi@linaro.org>
3584
3585 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3586 (ipa_obj): Likewise.
3587 * linux-i386-ipa.c: Include common/x86-xstate.h
3588 (get_ipa_tdesc): Call i386_linux_read_description.
3589 (initialize_low_tracepoint): Don't call init_registers_XXX
3590 functions, call initialize_low_tdesc instead.
3591 * linux-x86-low.c (x86_linux_read_description): Call
3592 i386_linux_read_description.
3593 (initialize_low_arch): Don't call init_registers_i386_XXX
3594 functions, call initialize_low_tdesc.
3595 * linux-x86-tdesc.c: New file.
3596 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3597 (i386_get_ipa_tdesc_idx): Declare.
3598 (i386_get_ipa_tdesc): Declare.
3599 (initialize_low_tdesc): Declare.
3600
3601 2017-09-05 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3604 instead of 0.
3605
3606 2017-09-05 Yao Qi <yao.qi@linaro.org>
3607
3608 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3609 * regcache.c (get_thread_regcache): Use VEC_length.
3610 (init_register_cache): Likewise.
3611 (regcache_cpy): Likewise.
3612 (registers_to_string): Iterate reg_defs via VEC_iterate.
3613 (find_regno): Likewise.
3614 (find_register_by_number): Use VEC_index.
3615 (register_size): Call find_register_by_number.
3616 (register_data): Call find_register_by_number.
3617 (supply_regblock): Use VEC_length.
3618 (regcache_raw_read_unsigned): Likewise.
3619 * tdesc.c (init_target_desc): Iterate reg_defs via
3620 VEC_iterate.
3621 (default_description): Update initializer.
3622 (copy_target_description): Don't update field num_registers.
3623 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3624 <num_registers>: Remove.
3625
3626 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * Makefile.in (.SECONDARY): Define target.
3629
3630 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3631
3632 * linux-low.c (linux_wait_1): Adjust.
3633 * server.c (queue_stop_reply_callback): Adjust.
3634
3635 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3636
3637 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3638 QEnvironmentUnset and QEnvironmentReset packets.
3639 (handle_query): Inform remote that QEnvironmentHexEncoded,
3640 QEnvironmentUnset and QEnvironmentReset are supported.
3641
3642 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3643
3644 * inferiors.h (inferior_target_data): Rename to ...
3645 (thread_target_data): ... this.
3646 (inferior_regcache_data): Rename to ...
3647 (thread_regcache_data): ... this.
3648 (set_inferior_regcache_data): Rename to ...
3649 (set_thread_regcache_data): ... this.
3650 * inferiors.c (inferior_target_data): Rename to ...
3651 (thread_target_data): ... this.
3652 (inferior_regcache_data): Rename to ...
3653 (thread_regcache_data): ... this.
3654 (set_inferior_regcache_data): Rename to ...
3655 (set_thread_regcache_data): ... this.
3656 (free_one_thread): Update.
3657 * linux-low.h (get_thread_lwp): Update.
3658 * regcache.c (get_thread_regcache): Update.
3659 (regcache_invalidate_thread): Update.
3660 (free_register_cache_thread): Update.
3661 * win32-i386-low.c (update_debug_registers_callback): Update.
3662 (win32_get_current_dr): Update.
3663 * win32-low.c (thread_rec): Update.
3664 (delete_thread_info): Update.
3665 (continue_one_thread): Update.
3666 (suspend_one_thread): Update.
3667
3668 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3669
3670 * inferiors.c (set_inferior_target_data): Remove.
3671 * inferiors.h (set_inferior_target_data): Remove.
3672
3673 2017-08-18 Yao Qi <yao.qi@linaro.org>
3674
3675 * Makefile.in (OBS): Add selftest.o.
3676 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3677 * configure, config.in: Re-generated.
3678 * server.c: Include common/sefltest.h.
3679 (captured_main): Handle option --selftest.
3680
3681 2017-08-09 Yao Qi <yao.qi@linaro.org>
3682
3683 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3684 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3685 i386-avx-mpx.o and i386-mmx.o.
3686 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3687 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3688 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3689 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3690 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3691 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3692 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3693 i386/amd64-avx-mpx.xml.
3694
3695 2017-08-09 Yao Qi <yao.qi@linaro.org>
3696
3697 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3698 and x32-avx-avx512.o.
3699 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3700 i386/x32-avx-avx512.xml.
3701
3702 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3703
3704 * tracepoint.h (enum class fast_tpoint_collect_result): New
3705 enumeration.
3706 (fast_tracepoint_collecting): Change return type to
3707 fast_tpoint_collect_result.
3708 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3709 * linux-low.h: Include tracepoint.h.
3710 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3711 fast_tpoint_collect_result.
3712 * linux-low.c (handle_tracepoints): Adjust.
3713 (linux_fast_tracepoint_collecting): Change return type to
3714 fast_tpoint_collect_result.
3715 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3716 linux_wait_1, stuck_in_jump_pad_callback,
3717 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3718 proceed_one_lwp): Adjust to type change.
3719
3720 2017-07-10 Yao Qi <yao.qi@linaro.org>
3721
3722 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3723
3724 2017-06-29 Yao Qi <yao.qi@linaro.org>
3725
3726 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3727 Remove.
3728 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3729
3730 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3731
3732 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3733
3734 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3735
3736 * linux-low.c (linux_create_inferior): Adjust code to access the
3737 environment information via 'gdb_environ' class.
3738 * lynx-low.c (lynx_create_inferior): Likewise.
3739 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3740 (get_environ): Return a pointer to 'our_environ'.
3741 (captured_main): Initialize 'our_environ'.
3742 * server.h (get_environ): Adjust prototype.
3743 * spu-low.c (spu_create_inferior): Adjust code to access the
3744 environment information via 'gdb_environ' class.
3745
3746 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3747
3748 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3749 usage of "register" keyword.
3750
3751 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3752
3753 * configure: Re-generate.
3754
3755 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3756
3757 * configure: Re-generate.
3758
3759 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3760
3761 * Makefile.in (COMPILE.pre): Add "-x c++".
3762
3763 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3764
3765 * fork-child.c: Conditionally include <signal.h>.
3766
3767 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3768
3769 * server.c (handle_general_set): Handle new packet
3770 "QStartupWithShell".
3771 (handle_query): Add "QStartupWithShell" to the list of supported
3772 packets.
3773 (gdbserver_usage): Add help text explaining the
3774 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3775 options.
3776 (captured_main): Recognize and act upon the presence of the new
3777 CLI options.
3778
3779 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3780 Pedro Alves <palves@redhat.com>
3781
3782 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3783 * configure: Regenerate.
3784 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3785 "fork-inferior.o".
3786 (i[34567]86-*-lynxos*): Likewise.
3787 (spu*-*-*): Likewise.
3788 * fork-child.c: New file.
3789 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3790 and "environ.h".
3791 (linux_ptrace_fun): New function.
3792 (linux_create_inferior): Adjust function prototype to reflect
3793 change on "target.h". Adjust function code to use
3794 "fork_inferior".
3795 (linux_request_interrupt): Delete "signal_pid".
3796 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3797 (lynx_ptrace_fun): New function.
3798 (lynx_create_inferior): Adjust function prototype to reflect
3799 change on "target.h". Adjust function code to use
3800 "fork_inferior".
3801 * nto-low.c (nto_create_inferior): Adjust function prototype and
3802 code to reflect change on "target.h". Update comments.
3803 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3804 "common-terminal.h" and "environ.h".
3805 (terminal_fd): Moved to fork-child.c.
3806 (old_foreground_pgrp): Likewise.
3807 (restore_old_foreground_pgrp): Likewise.
3808 (last_status): Make it global.
3809 (last_ptid): Likewise.
3810 (our_environ): New variable.
3811 (startup_with_shell): Likewise.
3812 (program_name): Likewise.
3813 (program_argv): Rename to...
3814 (program_args): ...this.
3815 (wrapper_argv): New variable.
3816 (start_inferior): Delete function.
3817 (get_exec_wrapper): New function.
3818 (get_exec_file): Likewise.
3819 (get_environ): Likewise.
3820 (prefork_hook): Likewise.
3821 (post_fork_inferior): Likewise.
3822 (postfork_hook): Likewise.
3823 (postfork_child_hook): Likewise.
3824 (handle_v_run): Update code to deal with arguments coming from the
3825 remote host. Update calls from "start_inferior" to
3826 "create_inferior".
3827 (captured_main): Likewise. Initialize environment variable. Call
3828 "have_job_control".
3829 * server.h (post_fork_inferior): New prototype.
3830 (get_environ): Likewise.
3831 (last_status): Declare.
3832 (last_ptid): Likewise.
3833 (signal_pid): Likewise.
3834 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3835 (spu_ptrace_fun): New function.
3836 (spu_create_inferior): Adjust function prototype to reflect change
3837 on "target.h". Adjust function code to use "fork_inferior".
3838 * target.c (target_terminal_init): New function.
3839 (target_terminal_inferior): Likewise.
3840 (target_terminal_ours): Likewise.
3841 * target.h: Include <vector>.
3842 (struct target_ops) <create_inferior>: Update prototype.
3843 (create_inferior): Update macro.
3844 * utils.c (gdb_flush_out_err): New function.
3845 * win32-low.c (win32_create_inferior): Adjust function prototype
3846 and code to reflect change on "target.h".
3847
3848 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3849
3850 * inferiors.c (switch_to_thread): New function.
3851
3852 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3853
3854 * Makefile.in (SFILE): Add "common/job-control.c".
3855 (OBS): Add "job-control.o".
3856
3857 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3858
3859 * Makefile: Remove "@host_makefile_frag@".
3860
3861 2017-05-05 Pedro Alves <palves@redhat.com>
3862
3863 * configure: Regenerate.
3864
3865 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3866
3867 * configure: Regenerate.
3868
3869 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3870
3871 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3872 software_single_step change of return type to
3873 std::vector<CORE_ADDR>.
3874 * linux-low.c (install_software_single_step_breakpoints):
3875 Likewise.
3876 * linux-low.h (install_software_single_step_breakpoints):
3877 Likewise.
3878
3879 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3880
3881 * remote-utils.c: Include "gdb_termios.h" instead of
3882 "terminal.h".
3883 * terminal.h: Delete file.
3884
3885 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3886
3887 * server.c: Include <vector>.
3888 <program_argv, wrapper_argv>: Convert to std::vector.
3889 (start_inferior): Rewrite function to use C++.
3890 (handle_v_run): Likewise. Update code that calculates the argv
3891 based on the vRun packet; use C++.
3892 (captured_main): Likewise.
3893
3894 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3895
3896 * server.c (handle_v_cont): Initialize thread_resume::thread
3897 with null_ptid.
3898
3899 2017-04-05 Pedro Alves <palves@redhat.com>
3900
3901 * configure: Regenerate.
3902
3903 2017-04-05 Pedro Alves <palves@redhat.com>
3904
3905 * gdbreplay.c (sync_error): Constify.
3906 * linux-x86-low.c (push_opcode): Constify.
3907
3908 2017-04-05 Pedro Alves <palves@redhat.com>
3909
3910 * win32-low.c (get_child_debug_event)
3911 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3912 Report TARGET_WAITKIND_SPURIOUS instead.
3913
3914 2017-04-05 Pedro Alves <palves@redhat.com>
3915
3916 * remote-utils.c (remote_prepare, remote_open): Constify.
3917 * remote-utils.h (remote_prepare, remote_open): Constify.
3918 * server.c (captured_main): Constify 'port' handling.
3919
3920 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3921
3922 * Makefile.in (clean): Clear .deps.
3923
3924 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3925
3926 * .gitignore: Remove generated files, replace with wildcard.
3927 * (clean): Replace removal of generated files with wildcard.
3928 (version.c): Replace with...
3929 (version-generated.c): ...this.
3930 (xml-builtin.c): Replace with...
3931 (xml-builtin-generated.c): ...this.
3932 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3933 (%.c: *regformats*): Replace with...
3934 (%-generated.c: *regformats*): ...this.
3935
3936 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3937
3938 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3939 (xtensa_fill_gregset): Call collect_register_by_name for
3940 threadptr register.
3941 (xtensa_store_gregset): Call supply_register_by_name for
3942 threadptr register.
3943
3944 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3945
3946 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3947 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3948 (xtensa_store_gregset): Call supply_register for all registers in
3949 a0_regnum..a0_regnum + C0_NREGS range.
3950
3951 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3952
3953 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3954 (ax-ipa.o: ax.c): Remove.
3955 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3956 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3957 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3958 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3959 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3960
3961 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3962
3963 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3964 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3965 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3966 (errors-ipa.o: ../common/errors.c): Remove.
3967 (format-ipa.o: ../common/format.c): Remove.
3968 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3969
3970 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3971
3972 * Makefile.in (%-ipa.o: %.c): New rule.
3973 (tracepoint-ipa.o: tracepoint.c): Remove.
3974 (utils-ipa.o: utils.c): Remove.
3975 (remote-utils-ipa.o: remote-utils.c): Remove.
3976 (regcache-ipa.o: regcache.c): Remove.
3977 (i386-linux-ipa.o: i386-linux.c): Remove.
3978 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3979 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3980 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3981 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3982 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3983 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3984 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3985 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3986 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3987 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3988 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3989 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3990 (aarch64-ipa.o: aarch64.c): Remove.
3991 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3992 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3993 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3994 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3995 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3996 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3997 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3998 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3999 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4000 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4001 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4002 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4003 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4004 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4005 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4006 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4007 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4008 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4009 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4010 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4011 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4012 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4013 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4014 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4015 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4016 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4017 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4018 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4019 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4020 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4021 (tdesc-ipa.o: tdesc.c): Remove.
4022 (x32-linux-ipa.o: x32-linux.c): Remove.
4023 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4024 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4025
4026 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4027
4028 * Makefile.in (%.o: ../arch/%.c): New rule.
4029 (arm.o: ../arch/arm.c): Remove.
4030 (arm-linux.o: ../arch/arm-linux.c): Remove.
4031 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4032 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4033
4034 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4035
4036 * Makefile.in (%.o: ../nat/%.c): New rule.
4037 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4038 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4039 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4040 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4041 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4042 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4043 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4044 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4045 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4046 (linux-personality.o: ../nat/linux-personality.c): Remove.
4047 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4048 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4049 (x86-linux.o: ../nat/x86-linux.c): Remove.
4050 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4051 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4052
4053 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4054
4055 * Makefile.in (%.o: ../common/%.c): New rule.
4056 (signals.o: ../common/signals.c): Remove.
4057 (print-utils.o: ../common/print-utils.c): Remove.
4058 (rsp-low.o: ../common/rsp-low.c): Remove.
4059 (common-utils.o: ../common/common-utils.c): Remove.
4060 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4061 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4062 (vec.o: ../common/vec.c): Remove.
4063 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4064 (xml-utils.o: ../common/xml-utils.c): Remove.
4065 (ptid.o: ../common/ptid.c): Remove.
4066 (buffer.o: ../common/buffer.c): Remove.
4067 (format.o: ../common/format.c): Remove.
4068 (filestuff.o: ../common/filestuff.c): Remove.
4069 (agent.o: ../common/agent.c): Remove.
4070 (errors.o: ../common/errors.c): Remove.
4071 (environ.o: ../common/environ.c): Remove.
4072 (common-debug.o: ../common/common-debug.c): Remove.
4073 (cleanups.o: ../common/cleanups.c): Remove.
4074 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4075 (fileio.o: ../common/fileio.c): Remove.
4076 (common-regcache.o: ../common/common-regcache.c): Remove.
4077 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4078 (new-op.o: ../common/new-op.c): Remove.
4079 (btrace-common.o: ../common/btrace-common.c): Remove.
4080
4081 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4082
4083 * Makefile.in (%.o: ../target/%.c): New rule.
4084 (waitstatus.o: ../target/waitstatus.c): Remove.
4085
4086 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4087
4088 * Makefile.in
4089 (%.c: ../regformats/%.dat,
4090 (%.c: ../regformats/arm/%.dat,
4091 (%.c: ../regformats/i386/%.dat,
4092 (%.c: ../regformats/rs6000/%.dat): New rules.
4093 (aarch64.c): Remove.
4094 (reg-arm.c): Remove.
4095 (arm-with-iwmmxt.c): Remove.
4096 (arm-with-vfpv2.c): Remove.
4097 (arm-with-vfpv3.c): Remove.
4098 (arm-with-neon.c): Remove.
4099 (reg-bfin.c): Remove.
4100 (reg-cris.c): Remove.
4101 (reg-crisv32.c): Remove.
4102 (i386.c): Remove.
4103 (i386-linux.c): Remove.
4104 (i386-avx.c): Remove.
4105 (i386-avx-linux.c): Remove.
4106 (i386-avx-avx512.c): Remove.
4107 (i386-avx-avx512-linux.c): Remove.
4108 (i386-mpx.c): Remove.
4109 (i386-mpx-linux.c): Remove.
4110 (i386-avx-mpx-avx512-pku.c): Remove.
4111 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4112 (i386-avx-mpx.c): Remove.
4113 (i386-avx-mpx-linux.c): Remove.
4114 (i386-mmx.c): Remove.
4115 (i386-mmx-linux.c): Remove.
4116 (reg-ia64.c): Remove.
4117 (reg-m32r.c): Remove.
4118 (reg-m68k.c): Remove.
4119 (reg-cf.c): Remove.
4120 (mips-linux.c): Remove.
4121 (mips-dsp-linux.c): Remove.
4122 (mips64-linux.c): Remove.
4123 (mips64-dsp-linux.c): Remove.
4124 (nios2-linux.c): Remove.
4125 (powerpc-32.c): Remove.
4126 (powerpc-32l.c): Remove.
4127 (powerpc-altivec32l.c): Remove.
4128 (powerpc-cell32l.c): Remove.
4129 (powerpc-vsx32l.c): Remove.
4130 (powerpc-isa205-32l.c): Remove.
4131 (powerpc-isa205-altivec32l.c): Remove.
4132 (powerpc-isa205-vsx32l.c): Remove.
4133 (powerpc-e500l.c): Remove.
4134 (powerpc-64l.c): Remove.
4135 (powerpc-altivec64l.c): Remove.
4136 (powerpc-cell64l.c): Remove.
4137 (powerpc-vsx64l.c): Remove.
4138 (powerpc-isa205-64l.c): Remove.
4139 (powerpc-isa205-altivec64l.c): Remove.
4140 (powerpc-isa205-vsx64l.c): Remove.
4141 (s390-linux32.c): Remove.
4142 (s390-linux32v1.c): Remove.
4143 (s390-linux32v2.c): Remove.
4144 (s390-linux64.c): Remove.
4145 (s390-linux64v1.c): Remove.
4146 (s390-linux64v2.c): Remove.
4147 (s390-te-linux64.c): Remove.
4148 (s390-vx-linux64.c): Remove.
4149 (s390-tevx-linux64.c): Remove.
4150 (s390x-linux64.c): Remove.
4151 (s390x-linux64v1.c): Remove.
4152 (s390x-linux64v2.c): Remove.
4153 (s390x-te-linux64.c): Remove.
4154 (s390x-vx-linux64.c): Remove.
4155 (s390x-tevx-linux64.c): Remove.
4156 (tic6x-c64xp-linux.c): Remove.
4157 (tic6x-c64x-linux.c): Remove.
4158 (tic6x-c62x-linux.c): Remove.
4159 (reg-sh.c): Remove.
4160 (reg-sparc64.c): Remove.
4161 (reg-spu.c): Remove.
4162 (amd64.c): Remove.
4163 (amd64-linux.c): Remove.
4164 (amd64-avx.c): Remove.
4165 (amd64-avx-linux.c): Remove.
4166 (amd64-avx-avx512.c): Remove.
4167 (amd64-avx-avx512-linux.c): Remove.
4168 (amd64-mpx.c): Remove.
4169 (amd64-mpx-linux.c): Remove.
4170 (amd64-avx-mpx-avx512-pku.c): Remove.
4171 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4172 (amd64-avx-mpx.c): Remove.
4173 (amd64-avx-mpx-linux.c): Remove.
4174 (x32.c): Remove.
4175 (x32-linux.c): Remove.
4176 (x32-avx.c): Remove.
4177 (x32-avx-linux.c): Remove.
4178 (x32-avx-avx512.c): Remove.
4179 (x32-avx-avx512-linux.c): Remove.
4180 (reg-xtensa.c): Remove.
4181 (reg-tilegx.c): Remove.
4182 (reg-tilegx32.c): Remove.
4183
4184 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4185
4186 * Makefile.in (SFILES): Add "common/environ.c".
4187 (OBJS): Add "common/environ.h".
4188
4189 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4190
4191 * configure.ac: Check if the fs_base and gs_base members of
4192 `struct user_regs_struct' exist.
4193 * config.in: Regenerated.
4194 * configure: Likewise.
4195
4196 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4197
4198 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4199 target_read_memory.
4200 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4201 (get_next_pcs_syscall_next_pc): Likewise.
4202
4203 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4204
4205 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4206 * nto-x86-low.c: Likewise.
4207
4208 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4209
4210 * Makefile.in: Include disable-implicit-rules.mk.
4211
4212 2016-11-23 Pedro Alves <palves@redhat.com>
4213
4214 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4215 (debug_vprintf): Use std::chrono::steady_clock instead of
4216 gettimeofday. Use '.' instead of ':'.
4217 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4218 (get_timestamp): Use std::chrono::steady_clock instead of
4219 gettimeofday.
4220
4221 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4222
4223 * Makefile.in: Fix whitespace formatting.
4224
4225 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4226
4227 * Makefile.in (SFILES, OBS): Flatten list and order
4228 alphabetically.
4229
4230 2016-11-23 Pedro Alves <palves@redhat.com>
4231
4232 * event-loop.c (handle_file_event): Use warning.
4233 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4234 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4235 Use warning.
4236
4237 2016-11-23 Pedro Alves <palves@redhat.com>
4238
4239 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4240 output.
4241 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4242 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4243 debug_printf and debug_flush for debug output.
4244 * server.c (handle_general_set): Likewise.
4245 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4246 output.
4247
4248 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4249
4250 * Makefile.in (.c.o): Replace rule with ...
4251 (%.o: %.c): ... this one.
4252
4253 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4254
4255 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4256 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4257 make.
4258 * configure.ac: Remove checks for the make program.
4259 * configure: Re-generate.
4260
4261 2016-10-28 Pedro Alves <palves@redhat.com>
4262
4263 * Makefile.in (CXX_DIALECT): Get from configure.
4264 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4265 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4266 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4267 * config.in: Regenerate.
4268 * configure: Regenerate.
4269
4270 2016-10-27 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-low.c (linux_supports_range_stepping): Return true if
4273 can_software_single_step return true.
4274
4275 2016-10-27 Yao Qi <yao.qi@linaro.org>
4276
4277 * inferiors.c (find_inferior_in_random): New function.
4278 * inferiors.h (find_inferior_in_random): Declare.
4279 * linux-low.c (linux_wait_for_event_filtered): Call
4280 find_inferior_in_random instead of find_inferior.
4281
4282 2016-10-27 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-low.c (linux_wait_1): If single-step breakpoints are
4285 inserted, remove them.
4286
4287 2016-10-26 Pedro Alves <palves@redhat.com>
4288
4289 * linux-low.c (handle_extended_wait): Link parent/child fork
4290 threads.
4291 (linux_wait_1): Unlink them.
4292 (linux_set_resume_request): Ignore resume requests for
4293 already-resumed and unhandled fork child threads.
4294 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4295 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4296 New functions.
4297 (handle_v_requests) <vCont>: Don't call require_running.
4298 * server.h (in_queued_stop_replies): New declaration.
4299
4300 2016-10-24 Yao Qi <yao.qi@linaro.org>
4301
4302 PR server/20733
4303 * linux-aarch64-low.c (append_insns): Cast the return value to
4304 'uint32_t *'.
4305
4306 2016-10-10 Yao Qi <yao.qi@linaro.org>
4307
4308 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4309
4310 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4311
4312 * target.c (target_supports_multi_process): New function, moved
4313 from...
4314 * target.h (target_supports_multi_process): ... here. Remove
4315 macro.
4316
4317 2016-10-05 Tom Tromey <tom@tromey.com>
4318
4319 PR remote/20655:
4320 * tracepoint.c (handle_tracepoint_bkpts): Check
4321 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4322
4323 2016-10-05 Yao Qi <yao.qi@linaro.org>
4324
4325 * configure.srv: Update the path of arm-*.xml files.
4326
4327 2016-10-05 Terry Guo <terry.guo@arm.com>
4328 Yao Qi <yao.qi@linaro.org>
4329
4330 * Makefile.in: Adjust the path of rules.
4331 * configure.srv: Update the path of xml files.
4332 * regformats/arm-with-iwmmxt.dat: Regenerated.
4333 * regformats/arm-with-neon.dat: Likewise.
4334 * regformats/arm-with-vfpv2.dat: Likewise.
4335 * regformats/arm-with-vfpv3.dat Likewise.
4336
4337 2016-09-30 Yao Qi <yao.qi@linaro.org>
4338
4339 PR gdbserver/20627
4340 * target.c (target_stop_and_wait): Don't call
4341 target_continue_no_signal, use resume_stop instead.
4342
4343 2016-09-26 Yao Qi <yao.qi@linaro.org>
4344
4345 * linux-low.c (linux_wait_1): Call debug_exit.
4346
4347 2016-09-23 Pedro Alves <palves@redhat.com>
4348
4349 * Makefile.in (SFILES): Add common/new-op.c.
4350 (OBS): Add common/new-op.o.
4351 (new-op.o): New rule.
4352
4353 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4354
4355 * .gitinore: Ignore more files.
4356
4357 2016-09-21 Yao Qi <yao.qi@linaro.org>
4358
4359 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4360 23.
4361
4362 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4363
4364 * server.c (start_inferior): Call target_mourn_inferior instead of
4365 mourn_inferior; pass ptid_t argument to it.
4366 (resume): Likewise.
4367 (handle_target_event): Likewise.
4368 * target.c (target_mourn_inferior): New function.
4369 * target.h (mourn_inferior): Delete macro.
4370
4371 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4372
4373 * linux-low.c (lwp_is_stepping): New function.
4374
4375 2016-09-06 Carl Love <cel@us.ibm.com>
4376
4377 * server.c (start_inferior): Fixed comment, requested comment change
4378 didn't get updated correctly. Removed reference to ptrace () call as
4379 it is only true on Linux systems.
4380
4381 2016-09-06 Carl Love <cel@us.ibm.com>
4382
4383 * server.c (start_inferior): Do not call
4384 function target_post_create_inferior () if the
4385 inferior process has already exited.
4386
4387 2016-09-05 Pedro Alves <palves@redhat.com>
4388
4389 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4390 (COMPILE.pre, CC_LD): Use CXX directly.
4391 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4392 * acinclude.m4: Don't include build-with-cxx.m4.
4393 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4394 * configure: Regenerate.
4395
4396 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4397
4398 PR gdb/19495
4399 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4400 call writing data to own_buf.
4401
4402 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4403
4404 * target.c (mywait): Call target_wait instead of
4405 the_target->wait.
4406 (target_wait): New function.
4407
4408 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4409
4410 * server.c (start_inferior): New variable 'ptid'. Replace calls
4411 to the_target->resume by target_continue{,_no_signal}, depending
4412 on the case.
4413 * target.c (target_stop_and_wait): Call target_continue_no_signal
4414 instead of the_target->resume.
4415 (target_continue): New function.
4416
4417 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4418
4419 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4420
4421 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4422
4423 PR server/20491
4424 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4425 ps_prochandle.
4426 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4427 * linux-arm-low.c (ps_get_thread_area): Likewise.
4428 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4429 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4430 * linux-mips-low.c (ps_get_thread_area): Likewise.
4431 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4432 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4433 * linux-x86-low.c (ps_get_thread_area): Likewise.
4434 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4435
4436 2016-08-19 Pedro Alves <palves@redhat.com>
4437
4438 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4439
4440 2016-08-19 Pedro Alves <palves@redhat.com>
4441
4442 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4443 comment. Use memcpy instead of casting through unsigned long.
4444
4445 2016-08-19 Pedro Alves <palves@redhat.com>
4446
4447 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4448 allocating around 0x80000000.
4449
4450 2016-08-19 Pedro Alves <palves@redhat.com>
4451
4452 PR gdb/20415
4453 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4454 (x32-avx512-linux-ipa.o): New rules.
4455 * configure.ac (x86_64-*-linux*): New x32 check.
4456 * configure.srv (ipa_x32_linux_regobj): New.
4457 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4458 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4459 descriptions.
4460 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4461 descriptions.
4462 * configure: Regenerate.
4463
4464 2016-08-09 Pedro Alves <palves@redhat.com>
4465
4466 PR gdb/18653
4467 * Makefile.in (OBS): Add signals-state-save-restore.o.
4468 (signals-state-save-restore.o): New rule.
4469 * config.in: Regenerate.
4470 * configure: Regenerate.
4471 * linux-low.c: Include "signals-state-save-restore.h".
4472 (linux_create_inferior): Call
4473 restore_original_signals_state.
4474 * server.c: Include "dispositions-save-restore.h".
4475 (captured_main): Call save_original_signals_state.
4476
4477 2016-08-05 Pedro Alves <palves@redhat.com>
4478
4479 * configure: Regenerate.
4480
4481 2016-08-04 Yao Qi <yao.qi@linaro.org>
4482
4483 * linux-low.c (regsets_fetch_inferior_registers): Check
4484 errno is ESRCH or not.
4485
4486 2016-08-02 Yao Qi <yao.qi@linaro.org>
4487
4488 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4489 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4490 (thread_db_load_search): Update.
4491 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4492 td_ta_set_event and td_ta_event_getmsg.
4493
4494 2016-07-26 Pedro Alves <palves@redhat.com>
4495
4496 PR server/20414
4497 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4498 of unsigned long for 64-bit registers and use uint32_t instead of
4499 unsigned int for 32-bit registers.
4500
4501 2016-07-26 Pedro Alves <palves@redhat.com>
4502
4503 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4504 to 'ptrace'.
4505
4506 2016-07-21 Tom Tromey <tom@tromey.com>
4507
4508 * configure: Rebuild.
4509
4510 2016-07-21 Yao Qi <yao.qi@linaro.org>
4511
4512 * mem-break.c (find_gdb_breakpoint): Cast bp to
4513 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4514
4515 2016-07-21 Yao Qi <yao.qi@linaro.org>
4516
4517 * server.c (handle_v_requests): Support s and S actions
4518 if target_supports_software_single_step return true.
4519
4520 2016-07-21 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4523 is resume_step, call maybe_hw_step.
4524 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4525 and unstop them.
4526 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4527 breakpoints or not.
4528 (proceed_one_lwp): If resume request is resume_step, install
4529 reinsert breakpoints and call maybe_hw_step.
4530
4531 2016-07-21 Yao Qi <yao.qi@linaro.org>
4532
4533 * linux-low.c (proceed_one_lwp): Declare.
4534 (linux_resume_one_thread): Remove local variable 'step'.
4535 Lift code enqueue signal. Call proceed_one_lwp instead of
4536 linux_resume_one_lwp.
4537
4538 2016-07-21 Yao Qi <yao.qi@linaro.org>
4539
4540 * linux-low.c (linux_resume_one_thread): Call
4541 enqueue_pending_signal.
4542
4543 2016-07-21 Yao Qi <yao.qi@linaro.org>
4544
4545 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4546 * inferiors.c (do_restore_current_thread_cleanup): New function.
4547 (make_cleanup_restore_current_thread): Likewise.
4548 * linux-low.c (install_software_single_step_breakpoints): Call
4549 make_cleanup_restore_current_thread. Switch current_thread to
4550 thread.
4551
4552 2016-07-21 Yao Qi <yao.qi@linaro.org>
4553
4554 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4555 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4556 (clone_one_breakpoint): Likewise.
4557 (delete_reinsert_breakpoints): Change parameter to thread.
4558 Callers updated.
4559 (has_reinsert_breakpoints): Likewise.
4560 (uninsert_reinsert_breakpoints): Likewise.
4561 (reinsert_reinsert_breakpoints): Likewise.
4562 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4563 (delete_reinsert_breakpoints): Likewise.
4564 (reinsert_reinsert_breakpoints): Likewise.
4565 (uninsert_reinsert_breakpoints): Likewise.
4566 (has_reinsert_breakpoints): Likewise.
4567
4568 2016-07-21 Yao Qi <yao.qi@linaro.org>
4569
4570 * inferiors.c (get_thread_process): Make parameter const.
4571 * inferiors.h (get_thread_process): Update declaration.
4572 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4573 Add new parameters child_thread and parent_thread. Callers
4574 updated.
4575 * mem-break.h (clone_all_breakpoints): Update declaration.
4576
4577 2016-07-21 Yao Qi <yao.qi@linaro.org>
4578
4579 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4580 <command_list, handler>: Remove.
4581 (struct gdb_breakpoint): New.
4582 (struct other_breakpoint): New.
4583 (struct reinsert_breakpoint): New.
4584 (is_gdb_breakpoint): New function.
4585 (any_persistent_commands): Update command_list if
4586 is_gdb_breakpoint returns true.
4587 (set_breakpoint): Create breakpoints according to their types.
4588 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4589 (set_gdb_breakpoint_1): Likewise.
4590 (set_gdb_breakpoint): Likewise.
4591 (clear_breakpoint_conditions): Change parameter type to
4592 'struct gdb_breakpoint *'.
4593 (clear_breakpoint_commands): Likewise.
4594 (clear_breakpoint_conditions_and_commands): Likewise.
4595 (add_condition_to_breakpoint): Likewise.
4596 (add_breakpoint_condition): Likewise.
4597 (add_commands_to_breakpoint): Likewise.
4598 (check_breakpoints): Check other_breakpoint.
4599 (clone_one_breakpoint): Clone breakpopint according to its type.
4600 * mem-break.h (struct gdb_breakpoint): Declare.
4601 (set_gdb_breakpoint): Update declaration.
4602 (clear_breakpoint_conditions_and_commands): Likewise.
4603 (add_breakpoint_condition): Likewise.
4604 (add_breakpoint_commands): Likewise.
4605 * server.c (process_point_options): Change parameter type to
4606 'struct gdb_breakpoint *'.
4607
4608 2016-07-21 Yao Qi <yao.qi@linaro.org>
4609
4610 * mem-break.c (set_breakpoint_at): Rename it to ...
4611 (set_breakpoint_type_at): ... it.
4612 (set_breakpoint_at): Call set_breakpoint_type_at.
4613 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4614 * mem-break.h (set_breakpoint_at): Update comments.
4615
4616 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4617
4618 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4619 to buf parameter.
4620 (nios2_store_gregset): Likewise.
4621
4622 2016-07-01 Pedro Alves <palves@redhat.com>
4623 Antoine Tremblay <antoine.tremblay@ericsson.com>
4624
4625 * linux-low.c: Change interface to take the target lwp_info
4626 pointer directly and return void. Handle detaching from a zombie
4627 thread.
4628 (linux_detach_lwp_callback): New function.
4629 (linux_detach): Detach from the leader thread after detaching from
4630 the clone threads.
4631
4632 2016-06-28 Yao Qi <yao.qi@linaro.org>
4633
4634 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4635 for variable new_offset.
4636 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4637 (aarch64_ftrace_insn_reloc_cb): Likewise.
4638 (aarch64_ftrace_insn_reloc_tb): Likewise.
4639 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4640 PRIx64 instead of PRIx32.
4641
4642 2016-06-28 Yao Qi <yao.qi@linaro.org>
4643
4644 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4645 (the_low_target): Install arm_get_syscall_trapinfo.
4646
4647 2016-06-28 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4650 function.
4651 (the_low_target): Install aarch64_get_syscall_trapinfo.
4652
4653 2016-06-28 Yao Qi <yao.qi@linaro.org>
4654
4655 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4656 Callers updated.
4657 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4658 Remove parameter sysno.
4659 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4660 sysret.
4661
4662 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4663
4664 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4665 (s390_emit_ne_goto): Likewise.
4666 (s390_emit_lt_goto): Likewise.
4667 (s390_emit_le_goto): Likewise.
4668 (s390_emit_gt_goto): Likewise.
4669 (s390_emit_ge_goto): Likewise.
4670 (s390x_emit_eq_goto): Likewise.
4671 (s390x_emit_ne_goto): Likewise.
4672 (s390x_emit_lt_goto): Likewise.
4673 (s390x_emit_le_goto): Likewise.
4674 (s390x_emit_gt_goto): Likewise.
4675 (s390x_emit_ge_goto): Likewise.
4676 (s390_emit_ops_impl): Mark variable static.
4677 (s390x_emit_ops): Likewise.
4678
4679 2016-06-17 Yao Qi <yao.qi@linaro.org>
4680
4681 * linux-low.c (handle_extended_wait): Call
4682 uninsert_reinsert_breakpoints for the parent process. Remove
4683 reinsert breakpoints from the child process. Reinsert them to
4684 the parent process when vfork is done.
4685 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4686 (reinsert_reinsert_breakpoints): New function.
4687 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4688 (reinsert_reinsert_breakpoints): Declare.
4689
4690 2016-06-17 Yao Qi <yao.qi@linaro.org>
4691
4692 * linux-low.c (handle_extended_wait): If the parent is doing
4693 step-over, remove the reinsert breakpoints from the forked child.
4694
4695 2016-06-17 Yao Qi <yao.qi@linaro.org>
4696
4697 * linux-low.c (unsuspend_all_lwps): Declare.
4698 (linux_low_filter_event): If thread exited, call finish_step_over.
4699 If step-over is finished, unsuspend other threads.
4700
4701 2016-06-17 Yao Qi <yao.qi@linaro.org>
4702
4703 * linux-low.c (linux_resume_one_lwp_throw): Assert
4704 has_reinsert_breakpoints returns false.
4705 * mem-break.c (delete_disabled_breakpoints): Assert
4706 bp type isn't reinsert_breakpoint.
4707
4708 2016-06-17 Yao Qi <yao.qi@linaro.org>
4709
4710 * linux-low.c (maybe_hw_step): New function.
4711 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4712 (finish_step_over): Switch current_thread to lwp temporarily,
4713 and assert has_reinsert_breakpoints returns true.
4714 (proceed_one_lwp): Call maybe_hw_step.
4715 * mem-break.c (has_reinsert_breakpoints): New function.
4716 * mem-break.h (has_reinsert_breakpoints): Declare.
4717
4718 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4719
4720 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4721
4722 2016-05-17 Yao Qi <yao.qi@linaro.org>
4723
4724 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4725 instead of find_inferior.
4726
4727 2016-05-05 Yao Qi <yao.qi@linaro.org>
4728
4729 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4730 Initialize res to zero.
4731
4732 2016-05-05 Yao Qi <yao.qi@linaro.org>
4733
4734 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4735 to uint32_t.
4736
4737 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4738
4739 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4740 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4741 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4742
4743 2016-04-28 Par Olsson <par.olsson@windriver.com>
4744 Simon Marchi <simon.marchi@ericsson.com>
4745
4746 * tracepoint.c (write_inferior_int8): New function.
4747 (cmd_qtenable_disable): Write enable flag using
4748 write_inferior_int8.
4749
4750 2016-04-25 Yao Qi <yao.qi@linaro.org>
4751
4752 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4753 (need_step_over_p): Return zero if the LWP has pending signals
4754 can be delivered on software single step target.
4755
4756 2016-04-25 Yao Qi <yao.qi@linaro.org>
4757
4758 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4759 return instead of error.
4760
4761 2016-04-22 Yao Qi <yao.qi@linaro.org>
4762
4763 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4764 to 23.
4765
4766 2016-04-22 Yao Qi <yao.qi@linaro.org>
4767
4768 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4769 signal when stepping over breakpoint with software single
4770 step.
4771
4772 2016-04-21 Pedro Alves <palves@redhat.com>
4773
4774 * linux-s390-low.c (s390_collect_ptrace_register)
4775 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4776 add casts.
4777 (s390_check_regset): Use void * instead of gdb_byte *.
4778
4779 2016-04-20 Pedro Alves <palves@redhat.com>
4780
4781 * configure: Renegerate.
4782
4783 2016-04-20 Yao Qi <yao.qi@linaro.org>
4784
4785 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4786 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4787 number 16.
4788 (arm_store_gregset): Likewise.
4789
4790 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4791
4792 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4793 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4794 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4795 (amd64-avx-mpx-linux.c): New rules.
4796 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4797 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4798 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4799 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4800 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4801 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4802 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4803 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4804 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4805 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4806 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4807 * linux-x86-low.c (x86_linux_read_description): Add case for
4808 X86_XSTATE_AVX_MPX_MASK.
4809 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4810 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4811 init_registers_i386_avx_mpx_linux.
4812 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4813 (initialize_low_tracepoint): Call
4814 init_registers_i386_avx_mpx_linux.
4815 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4816 (initialize_low_tracepoint): Call
4817 init_registers_amd64_avx_mpx_linux.
4818 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4819 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4820 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4821 declarations.
4822
4823 2016-04-18 Pedro Alves <palves@redhat.com>
4824
4825 * configure: Regenerate.
4826
4827 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4828
4829 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4830 (aarch64_emit_sub): Likewise.
4831
4832 2016-04-12 Pedro Alves <palves@redhat.com>
4833
4834 * utils.c (prepare_to_throw_exception): Delete.
4835
4836 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4837
4838 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4839
4840 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4841
4842 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4843
4844 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4845
4846 * linux-aarch64-ipa.c: Add <elf.h> include.
4847 * linux-ppc-ipa.c: Add <elf.h> include.
4848 * linux-s390-ipa.c: Add <elf.h> include.
4849
4850 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4851
4852 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4853 (get_raw_reg_ptr): Likewise.
4854 (get_trace_state_variable_value_ptr): Likewise.
4855 (set_trace_state_variable_value_ptr): Likewise.
4856 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4857 char *.
4858
4859 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4860 Marcin Kościelnicki <koriakin@0x04.net>
4861
4862 PR/17221
4863 * linux-ppc-low.c (emit_insns): New function.
4864 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4865 (ppc_emit_prologue): New function.
4866 (ppc_emit_epilogue): New function.
4867 (ppc_emit_add): New function.
4868 (ppc_emit_sub): New function.
4869 (ppc_emit_mul): New function.
4870 (ppc_emit_lsh): New function.
4871 (ppc_emit_rsh_signed): New function.
4872 (ppc_emit_rsh_unsigned): New function.
4873 (ppc_emit_ext): New function.
4874 (ppc_emit_zero_ext): New function.
4875 (ppc_emit_log_not): New function.
4876 (ppc_emit_bit_and): New function.
4877 (ppc_emit_bit_or): New function.
4878 (ppc_emit_bit_xor): New function.
4879 (ppc_emit_bit_not): New function.
4880 (ppc_emit_equal): New function.
4881 (ppc_emit_less_signed): New function.
4882 (ppc_emit_less_unsigned): New function.
4883 (ppc_emit_ref): New function.
4884 (ppc_emit_const): New function.
4885 (ppc_emit_reg): New function.
4886 (ppc_emit_pop): New function.
4887 (ppc_emit_stack_flush): New function.
4888 (ppc_emit_swap): New function.
4889 (ppc_emit_stack_adjust): New function.
4890 (ppc_emit_call): New function.
4891 (ppc_emit_int_call_1): New function.
4892 (ppc_emit_void_call_2): New function.
4893 (ppc_emit_if_goto): New function.
4894 (ppc_emit_goto): New function.
4895 (ppc_emit_eq_goto): New function.
4896 (ppc_emit_ne_goto): New function.
4897 (ppc_emit_lt_goto): New function.
4898 (ppc_emit_le_goto): New function.
4899 (ppc_emit_gt_goto): New function.
4900 (ppc_emit_ge_goto): New function.
4901 (ppc_write_goto_address): New function.
4902 (ppc_emit_ops_impl): New static variable.
4903 (ppc64v1_emit_prologue): New function.
4904 (ppc64v2_emit_prologue): New function.
4905 (ppc64_emit_epilogue): New function.
4906 (ppc64_emit_add): New function.
4907 (ppc64_emit_sub): New function.
4908 (ppc64_emit_mul): New function.
4909 (ppc64_emit_lsh): New function.
4910 (ppc64_emit_rsh_signed): New function.
4911 (ppc64_emit_rsh_unsigned): New function.
4912 (ppc64_emit_ext): New function.
4913 (ppc64_emit_zero_ext): New function.
4914 (ppc64_emit_log_not): New function.
4915 (ppc64_emit_bit_and): New function.
4916 (ppc64_emit_bit_or): New function.
4917 (ppc64_emit_bit_xor): New function.
4918 (ppc64_emit_bit_not): New function.
4919 (ppc64_emit_equal): New function.
4920 (ppc64_emit_less_signed): New function.
4921 (ppc64_emit_less_unsigned): New function.
4922 (ppc64_emit_ref): New function.
4923 (ppc64_emit_const): New function.
4924 (ppc64v1_emit_reg): New function.
4925 (ppc64v2_emit_reg): New function.
4926 (ppc64_emit_pop): New function.
4927 (ppc64_emit_stack_flush): New function.
4928 (ppc64_emit_swap): New function.
4929 (ppc64v1_emit_call): New function.
4930 (ppc64v2_emit_call): New function.
4931 (ppc64v1_emit_int_call_1): New function.
4932 (ppc64v2_emit_int_call_1): New function.
4933 (ppc64v1_emit_void_call_2): New function.
4934 (ppc64v2_emit_void_call_2): New function.
4935 (ppc64_emit_if_goto): New function.
4936 (ppc64_emit_eq_goto): New function.
4937 (ppc64_emit_ne_goto): New function.
4938 (ppc64_emit_lt_goto): New function.
4939 (ppc64_emit_le_goto): New function.
4940 (ppc64_emit_gt_goto): New function.
4941 (ppc64_emit_ge_goto): New function.
4942 (ppc64v1_emit_ops_impl): New static variable.
4943 (ppc64v2_emit_ops_impl): New static variable.
4944 (ppc_emit_ops): New function.
4945 (linux_low_target): Wire in ppc_emit_ops.
4946
4947 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4948 Marcin Kościelnicki <koriakin@0x04.net>
4949
4950 PR/17221
4951 * Makefile.in: Add powerpc-*-ipa.o
4952 * configure.srv: Add ipa_obj for powerpc*-linux.
4953 * linux-ppc-ipa.c: New file.
4954 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4955 includes.
4956 (PPC_FIELD): New macro.
4957 (PPC_SEXT): New macro.
4958 (PPC_OP6): New macro.
4959 (PPC_BO): New macro.
4960 (PPC_LI): New macro.
4961 (PPC_BD): New macro.
4962 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4963 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4964 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4965 (ppc_get_thread_area): New function.
4966 (is_elfv2_inferior): New function.
4967 (gen_ds_form): New function.
4968 (GEN_STD): New macro.
4969 (GEN_STDU): New macro.
4970 (GEN_LD): New macro.
4971 (GEN_LDU): New macro.
4972 (gen_d_form): New function.
4973 (GEN_ADDI): New macro.
4974 (GEN_ADDIS): New macro.
4975 (GEN_LI): New macro.
4976 (GEN_LIS): New macro.
4977 (GEN_ORI): New macro.
4978 (GEN_ORIS): New macro.
4979 (GEN_LWZ): New macro.
4980 (GEN_STW): New macro.
4981 (GEN_STWU): New macro.
4982 (gen_xfx_form): New function.
4983 (GEN_MFSPR): New macro.
4984 (GEN_MTSPR): New macro.
4985 (GEN_MFCR): New macro.
4986 (GEN_MTCR): New macro.
4987 (GEN_SYNC): New macro.
4988 (GEN_LWSYNC): New macro.
4989 (gen_x_form): New function.
4990 (GEN_OR): New macro.
4991 (GEN_MR): New macro.
4992 (GEN_LWARX): New macro.
4993 (GEN_STWCX): New macro.
4994 (GEN_CMPW): New macro.
4995 (gen_md_form): New function.
4996 (GEN_RLDICL): New macro.
4997 (GEN_RLDICR): New macro.
4998 (gen_i_form): New function.
4999 (GEN_B): New macro.
5000 (GEN_BL): New macro.
5001 (gen_b_form): New function.
5002 (GEN_BNE): New macro.
5003 (GEN_LOAD): New macro.
5004 (GEN_STORE): New macro.
5005 (gen_limm): New function.
5006 (gen_atomic_xchg): New function.
5007 (gen_call): New function.
5008 (ppc_relocate_instruction): New function.
5009 (ppc_install_fast_tracepoint_jump_pad): New function.
5010 (ppc_get_min_fast_tracepoint_insn_len): New function.
5011 (ppc_get_ipa_tdesc_idx): New function.
5012 (the_low_target): Wire in the new functions.
5013 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5014 tdescs.
5015 * linux-ppc-tdesc.h: New file.
5016
5017 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5018
5019 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5020 (alloc_jump_pad_buffer): New function.
5021 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5022 (alloc_jump_pad_buffer): New function.
5023 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5024 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5025 (alloc_jump_pad_buffer): New function.
5026 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5027 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5028 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5029 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5030
5031 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5032
5033 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5034 * linux-amd64-ipa.c: Likewise.
5035 * linux-i386-ipa.c: Likewise.
5036 * linux-s390-ipa.c: Likewise.
5037 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5038 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5039 set_trace_state_variable_value_ptr.
5040 (struct ipa_sym_addresses): Likewise.
5041 (symbol_list): Likewise.
5042 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5043 accessing gdb_collect directly.
5044 (gdb_collect_ptr_type): New typedef.
5045 (get_raw_reg_ptr_type): New typedef.
5046 (get_trace_state_variable_value_ptr_type): New typedef.
5047 (set_trace_state_variable_value_ptr_type): New typedef.
5048 (gdb_collect_ptr): New global.
5049 (get_raw_reg_ptr): New global.
5050 (get_trace_state_variable_value_ptr): New global.
5051 (set_trace_state_variable_value_ptr): New global.
5052 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5053 accessing get_raw_reg directly.
5054 (get_get_tsv_func_addr): Likewise for
5055 get_trace_state_variable_value_ptr.
5056 (get_set_tsv_func_addr): Likewise for
5057 set_trace_state_variable_value_ptr.
5058 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5059
5060 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5061
5062 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5063
5064 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5065
5066 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5067 packets.
5068 (relocate_instruction): Remove own_buf.
5069 * server.c (own_buf): Make global.
5070 (handle_v_requests): Make global.
5071 * server.h (own_buf): New declaration.
5072 (handle_v_requests): New prototype.
5073
5074 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5075
5076 PR 18377
5077 * linux-s390-low.c (add_insns): New function.
5078 (s390_emit_prologue): New function.
5079 (s390_emit_epilogue): New function.
5080 (s390_emit_add): New function.
5081 (s390_emit_sub): New function.
5082 (s390_emit_mul): New function.
5083 (s390_emit_lsh): New function.
5084 (s390_emit_rsh_signed): New function.
5085 (s390_emit_rsh_unsigned): New function.
5086 (s390_emit_ext): New function.
5087 (s390_emit_log_not): New function.
5088 (s390_emit_bit_and): New function.
5089 (s390_emit_bit_or): New function.
5090 (s390_emit_bit_xor): New function.
5091 (s390_emit_bit_not): New function.
5092 (s390_emit_equal): New function.
5093 (s390_emit_less_signed): New function.
5094 (s390_emit_less_unsigned): New function.
5095 (s390_emit_ref): New function.
5096 (s390_emit_if_goto): New function.
5097 (s390_emit_goto): New function.
5098 (s390_write_goto_address): New function.
5099 (s390_emit_litpool): New function.
5100 (s390_emit_const): New function.
5101 (s390_emit_call): New function.
5102 (s390_emit_reg): New function.
5103 (s390_emit_pop): New function.
5104 (s390_emit_stack_flush): New function.
5105 (s390_emit_zero_ext): New function.
5106 (s390_emit_swap): New function.
5107 (s390_emit_stack_adjust): New function.
5108 (s390_emit_set_r2): New function.
5109 (s390_emit_int_call_1): New function.
5110 (s390_emit_void_call_2): New function.
5111 (s390_emit_eq_goto): New function.
5112 (s390_emit_ne_goto): New function.
5113 (s390_emit_lt_goto): New function.
5114 (s390_emit_le_goto): New function.
5115 (s390_emit_gt_goto): New function.
5116 (s390_emit_ge_goto): New function.
5117 (s390x_emit_prologue): New function.
5118 (s390x_emit_epilogue): New function.
5119 (s390x_emit_add): New function.
5120 (s390x_emit_sub): New function.
5121 (s390x_emit_mul): New function.
5122 (s390x_emit_lsh): New function.
5123 (s390x_emit_rsh_signed): New function.
5124 (s390x_emit_rsh_unsigned): New function.
5125 (s390x_emit_ext): New function.
5126 (s390x_emit_log_not): New function.
5127 (s390x_emit_bit_and): New function.
5128 (s390x_emit_bit_or): New function.
5129 (s390x_emit_bit_xor): New function.
5130 (s390x_emit_bit_not): New function.
5131 (s390x_emit_equal): New function.
5132 (s390x_emit_less_signed): New function.
5133 (s390x_emit_less_unsigned): New function.
5134 (s390x_emit_ref): New function.
5135 (s390x_emit_if_goto): New function.
5136 (s390x_emit_const): New function.
5137 (s390x_emit_call): New function.
5138 (s390x_emit_reg): New function.
5139 (s390x_emit_pop): New function.
5140 (s390x_emit_stack_flush): New function.
5141 (s390x_emit_zero_ext): New function.
5142 (s390x_emit_swap): New function.
5143 (s390x_emit_stack_adjust): New function.
5144 (s390x_emit_int_call_1): New function.
5145 (s390x_emit_void_call_2): New function.
5146 (s390x_emit_eq_goto): New function.
5147 (s390x_emit_ne_goto): New function.
5148 (s390x_emit_lt_goto): New function.
5149 (s390x_emit_le_goto): New function.
5150 (s390x_emit_gt_goto): New function.
5151 (s390x_emit_ge_goto): New function.
5152 (s390_emit_ops): New function.
5153 (struct linux_target_ops): Fill in emit_ops hook.
5154
5155 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5156
5157 PR 18377
5158 * Makefile.in: Add s390 IPA files.
5159 * configure.srv: Build IPA for s390.
5160 * linux-s390-ipa.c: New file.
5161 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5162 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5163 (tdesc_s390_linux32): Likewise.
5164 (init_registers_s390_linux32v1): Likewise.
5165 (tdesc_s390_linux32v1): Likewise.
5166 (init_registers_s390_linux32v2): Likewise.
5167 (tdesc_s390_linux32v2): Likewise.
5168 (init_registers_s390_linux64): Likewise.
5169 (tdesc_s390_linux64): Likewise.
5170 (init_registers_s390_linux64v1): Likewise.
5171 (tdesc_s390_linux64v1): Likewise.
5172 (init_registers_s390_linux64v2): Likewise.
5173 (tdesc_s390_linux64v2): Likewise.
5174 (init_registers_s390_te_linux64): Likewise.
5175 (tdesc_s390_te_linux64): Likewise.
5176 (init_registers_s390_vx_linux64): Likewise.
5177 (tdesc_s390_vx_linux64): Likewise.
5178 (init_registers_s390_tevx_linux64): Likewise.
5179 (tdesc_s390_tevx_linux64): Likewise.
5180 (init_registers_s390x_linux64): Likewise.
5181 (tdesc_s390x_linux64): Likewise.
5182 (init_registers_s390x_linux64v1): Likewise.
5183 (tdesc_s390x_linux64v1): Likewise.
5184 (init_registers_s390x_linux64v2): Likewise.
5185 (tdesc_s390x_linux64v2): Likewise.
5186 (init_registers_s390x_te_linux64): Likewise.
5187 (tdesc_s390x_te_linux64): Likewise.
5188 (init_registers_s390x_vx_linux64): Likewise.
5189 (tdesc_s390x_vx_linux64): Likewise.
5190 (init_registers_s390x_tevx_linux64): Likewise.
5191 (tdesc_s390x_tevx_linux64): Likewise.
5192 (have_hwcap_s390_vx): New static variable.
5193 (s390_arch_setup): Fill have_hwcap_s390_vx.
5194 (s390_get_thread_area): New function.
5195 (s390_ft_entry_gpr_esa): New const.
5196 (s390_ft_entry_gpr_zarch): New const.
5197 (s390_ft_entry_misc): New const.
5198 (s390_ft_entry_fr): New const.
5199 (s390_ft_entry_vr): New const.
5200 (s390_ft_main_31): New const.
5201 (s390_ft_main_64): New const.
5202 (s390_ft_exit_fr): New const.
5203 (s390_ft_exit_vr): New const.
5204 (s390_ft_exit_misc): New const.
5205 (s390_ft_exit_gpr_esa): New const.
5206 (s390_ft_exit_gpr_zarch): New const.
5207 (append_insns): New function.
5208 (s390_relocate_instruction): New function.
5209 (s390_install_fast_tracepoint_jump_pad): New function.
5210 (s390_get_min_fast_tracepoint_insn_len): New function.
5211 (s390_get_ipa_tdesc_idx): New function.
5212 (struct linux_target_ops): Wire in the above functions.
5213 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5214 * linux-s390-tdesc.h: New file.
5215
5216 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5217
5218 * linux-s390-low.c (s390_supports_tracepoints): New function.
5219 (struct linux_target_ops): Fill supports_tracepoints hook.
5220
5221 2016-03-18 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-low.c (lwp_signal_can_be_delivered): New function.
5224 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5225
5226 2016-03-18 Yao Qi <yao.qi@linaro.org>
5227
5228 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5229 0 if signal is enqueued. Remove 'signal' from one debugging
5230 message. Move one debugging message to some lines below.
5231 Remove code setting 'signal' to 0.
5232
5233 2016-03-18 Yao Qi <yao.qi@linaro.org>
5234
5235 * linux-low.c (linux_low_filter_event): Remove redundant
5236 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5237
5238 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5239
5240 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5241 (struct linux_target_ops): Wire in the above.
5242
5243 2016-03-03 Yao Qi <yao.qi@linaro.org>
5244
5245 * linux-low.c: Update comments to start_step_over.
5246
5247 2016-03-03 Yao Qi <yao.qi@linaro.org>
5248
5249 PR server/19736
5250 * linux-low.c (handle_extended_wait): Set child suspended
5251 if event_lwp->bp_reinsert isn't zero.
5252
5253 2016-03-02 Yao Qi <yao.qi@linaro.org>
5254
5255 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5256 enqueue_pending_signal.
5257
5258 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5259
5260 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5261 is actually loaded.
5262
5263 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5264
5265 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5266 (s390_regmap_3264) [!__s390x__]: New global.
5267 (s390_collect_ptrace_register): Skip map entries containing -1.
5268 (s390_supply_ptrace_register): Ditto.
5269 (s390_fill_gprs_high): New function.
5270 (s390_store_gprs_high): New function.
5271 (s390_regsets): Add NT_S390_HIGH_GPRS.
5272 (s390_get_hwcap): Enable on 31-bit.
5273 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5274 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5275 Detect NT_S390_HIGH_GPRS.
5276 (s390_usrregs_info_3264): Enable on 31-bit.
5277 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5278 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5279
5280 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5281
5282 PR gdb/13808
5283 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5284 * configure.srv: Ditto.
5285 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5286 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5287 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5288 (init_registers_amd64_linux): Remove prototype.
5289 (tdesc_amd64_linux): Remove declaration.
5290 (get_ipa_tdesc): New function.
5291 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5292 initialize remaining tdescs.
5293 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5294 (init_registers_i386_linux): Remove prototype.
5295 (tdesc_i386_linux): Remove declaration.
5296 (get_ipa_tdesc): New function.
5297 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5298 initialize remaining tdescs.
5299 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5300 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5301 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5302 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5303 (x86_get_ipa_tdesc_idx): New function.
5304 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5305 * linux-x86-tdesc.h: New file.
5306 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5307 (target_get_ipa_tdesc_idx): New macro.
5308 * tracepoint.c (ipa_tdesc_idx): New macro.
5309 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5310 (symbol_list): Add ipa_tdesc_idx.
5311 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5312 (ipa_tdesc): Remove.
5313 (ipa_tdesc_idx): New variable.
5314 (get_context_regcache): Use get_ipa_tdesc.
5315 (gdb_collect): Ditto.
5316 (gdb_probe): Ditto.
5317 * tracepoint.h (get_ipa_tdesc): New prototype.
5318 (ipa_tdesc): Remove.
5319
5320 2016-02-24 Pedro Alves <palves@redhat.com>
5321
5322 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5323 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5324 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5325 Factor out common code between the USE_SIGTRAP_SIGINFO and
5326 !USE_SIGTRAP_SIGINFO blocks.
5327 (linux_low_filter_event): Call save_stop_reason instead of
5328 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5329 Update comments.
5330 (linux_wait_1): Update comments.
5331
5332 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5333
5334 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5335 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5336 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5337 ppc_insert_point, ppc_remove_point.
5338
5339 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5340
5341 * linux-s390-low.c (s390_supports_z_point_type): New function.
5342 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5343
5344 2016-02-16 Yao Qi <yao.qi@linaro.org>
5345
5346 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5347 PC. Get pc from regcache_read_pc.
5348
5349 2016-02-12 Yao Qi <yao.qi@linaro.org>
5350
5351 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5352 or linux_get_pc_32bit.
5353 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5354
5355 2016-02-12 Yao Qi <yao.qi@linaro.org>
5356
5357 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5358 arm_linux_get_next_pcs_fixup.
5359
5360 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5361
5362 * tracepoint.c (x_tracepoint_action_download): Change
5363 write_inferior_data_ptr to write_inferior_data_pointer.
5364 (cmd_qtstart): Likewise.
5365 (write_inferior_data_ptr): Remove.
5366 (download_agent_expr): Change write_inferior_data_ptr to
5367 write_inferior_data_pointer.
5368 (download_tracepoint_1): Likewise.
5369 (download_tracepoint): Likewise.
5370 (download_trace_state_variables): Likewise.
5371
5372 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5373 Marcin Kościelnicki <koriakin@0x04.net>
5374
5375 * tracepoint.c (struct tracepoint_action_ops): Remove.
5376 (struct tracepoint_action): Remove ops.
5377 (m_tracepoint_action_download, r_tracepoint_action_download)
5378 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5379 size and offset accordingly.
5380 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5381 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5382 (tracepoint_action_send, tracepoint_action_download): New functions.
5383 Helpers for trace action handlers.
5384 (add_tracepoint_action): Remove setup actions ops.
5385 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5386
5387 2016-02-10 Yao Qi <yao.qi@linaro.org>
5388
5389 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5390
5391 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5392
5393 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5394 to AC_OUTPUT.
5395 * configure: Regenerate.
5396
5397 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5398
5399 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5400 void * to gdb_byte *.
5401 * linux-low.c (siginfo_fixup): Likewise.
5402 (linux_xfer_siginfo): Likewise.
5403 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5404 Likewise.
5405 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5406
5407 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5408
5409 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5410 to srv_tgtobj.
5411 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5412 to srv_tgtobj.
5413 * linux-x86-low.c [__x86_64__]: Include
5414 "nat/amd64-linux-siginfo.h".
5415 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5416 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5417 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5418 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5419 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5420 (cpt_si_fd, si_timerid, si_overrun): Move from
5421 nat/amd64-linux-siginfo.c.
5422 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5423
5424 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5425
5426 * server.c (skip_to_semicolon): Remove.
5427 (process_point_options): Use strchrnul instead of
5428 skip_to_semicolon.
5429
5430 2016-01-26 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5433 * linux-low.c (install_software_single_step_breakpoints): Don't
5434 call regcache_read_pc.
5435 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5436 argument pc.
5437
5438 2016-01-26 Yao Qi <yao.qi@linaro.org>
5439
5440 * linux-low.c (install_software_single_step_breakpoints): Call
5441 regcache_read_pc instead of get_pc.
5442
5443 2016-01-26 Yao Qi <yao.qi@linaro.org>
5444
5445 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5446 (unblock_async_io): Rename to ...
5447 (block_unblock_async_io): ... it. New function.
5448 (enable_async_io): Don't install SIGIO handler. Unblock it
5449 instead.
5450 (disable_async_io): Don't ignore SIGIO. Block it instead.
5451 (initialize_async_io): Install SIGIO handler. Don't call
5452 unblock_async_io.
5453
5454 2016-01-26 Yao Qi <yao.qi@linaro.org>
5455
5456 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5457 first character is '\003', call *the_target->request_interrupt.
5458
5459 2016-01-25 Yao Qi <yao.qi@linaro.org>
5460
5461 * remote-utils.c (new_thread_notify): Remove.
5462 (dead_thread_notify): Likewise.
5463 * remote-utils.h (new_thread_notify): Remove declaration.
5464 (dead_thread_notify): Likewise.
5465
5466 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5467
5468 * gdb.trace/pending.exp: Fix expected message on continue.
5469
5470 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5471
5472 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5473 it works properly on big-endian machines where sizeof (CORE_ADDR)
5474 != sizeof (void *).
5475
5476 2016-01-21 Pedro Alves <palves@redhat.com>
5477
5478 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5479 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5480 * configure: Regenerate.
5481
5482 2016-01-21 Yao Qi <yao.qi@linaro.org>
5483
5484 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5485 is_thumb and set it according to CPSR saved on the stack.
5486 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5487 arm_sigreturn_next_pc.
5488
5489 2016-01-18 Yao Qi <yao.qi@linaro.org>
5490
5491 * linux-low.c (linux_set_pc_64bit): New function.
5492 (linux_get_pc_64bit): New function.
5493 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5494 Declare.
5495 * linux-sparc-low.c (debug_threads): Remove declaration.
5496 (sparc_get_pc): Remove.
5497 (the_low_target): Use linux_get_pc_64bit instead of
5498 sparc_get_pc.
5499 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5500 (the_low_target): Use linux_get_pc_64bit and
5501 linux_set_pc_64bit.
5502
5503 2016-01-18 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-arm-low.c (debug_threads): Remove declaration.
5506 (arm_get_pc, arm_set_pc): Remove.
5507 (the_low_target): Use linux_get_pc_32bit and
5508 linux_set_pc_32bit.
5509 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5510 (the_low_target): Use linux_get_pc_32bit and
5511 linux_set_pc_32bit.
5512 * linux-cris-low.c (debug_threads): Remove declaration.
5513 (cris_get_pc, cris_set_pc,): Remove.
5514 (the_low_target): Use linux_get_pc_32bit and
5515 linux_set_pc_32bit.
5516 * linux-crisv32-low.c (debug_threads): Remove declaration.
5517 (cris_get_pc, cris_set_pc): Remove.
5518 (the_low_target): Use linux_get_pc_32bit and
5519 linux_set_pc_32bit.
5520 * linux-low.c: Include inttypes.h.
5521 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5522 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5523 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5524 (the_low_target): Use linux_get_pc_32bit and
5525 linux_set_pc_32bit.
5526 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5527 (the_low_target): Use linux_get_pc_32bit and
5528 linux_set_pc_32bit.
5529 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5530 (the_low_target): Use linux_get_pc_32bit and
5531 linux_set_pc_32bit.
5532 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5533 (the_low_target): Use linux_get_pc_32bit and
5534 linux_set_pc_32bit.
5535 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5536 (the_low_target): Use linux_get_pc_32bit and
5537 linux_set_pc_32bit.
5538
5539 2016-01-18 Gary Benson <gbenson@redhat.com>
5540
5541 * configure.ac (AC_FUNC_FORK): New check.
5542 * config.in: Regenerate.
5543 * configure: Likewise.
5544
5545 2016-01-14 Yao Qi <yao.qi@linaro.org>
5546
5547 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5548 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5549 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5550 arm_get_next_pcs_ctor.
5551
5552 2016-01-12 Josh Stone <jistone@redhat.com>
5553 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5554
5555 * inferiors.h: Include "gdb_vecs.h".
5556 (struct process_info): Add syscalls_to_catch.
5557 * inferiors.c (remove_process): Free syscalls_to_catch.
5558 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5559 syscall_return stops.
5560 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5561 * server.c (handle_general_set): Handle QCatchSyscalls.
5562 (handle_query): Report support for QCatchSyscalls.
5563 * target.h (struct target_ops): Add supports_catch_syscall.
5564 (target_supports_catch_syscall): New macro.
5565 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5566 (struct lwp_info): Add syscall_state.
5567 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5568 Maintain syscall_state and syscalls_to_catch across exec.
5569 (get_syscall_trapinfo): New function, proxy to the_low_target.
5570 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5571 (linux_low_filter_event): Toggle syscall_state entry/return for
5572 syscall traps, and set it ignored for all others.
5573 (gdb_catching_syscalls_p): New function.
5574 (gdb_catch_this_syscall_p): New function.
5575 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5576 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5577 (linux_supports_catch_syscall): New function.
5578 (linux_target_ops): Install it.
5579 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5580 (the_low_target): Install it.
5581
5582 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5583
5584 * acinclude.m4: Include new ../warning.m4 file.
5585 * configure: Regenerated.
5586 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5587
5588 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5589
5590 * ax.c (is_goto_target): Mark static.
5591 * linux-low.c (register_addr): Likewise.
5592 (linux_fetch_registers, linux_store_registers): Likewise.
5593 * mem-break.c (any_persistent_commands): Fix old prototype.
5594 (add_commands_to_breakpoint): Mark static.
5595 * regcache.c (find_register_by_name): Delete unused func.
5596 * remote-utils.c (hex_or_minus_one): Mark static.
5597 * server.c (monitor_show_help): Mark static.
5598 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5599 handle_v_requests): Likewise.
5600
5601 2016-01-12 Pedro Alves <palves@redhat.com>
5602
5603 Remove use of the registered trademark symbol throughout.
5604
5605 2016-01-08 Yao Qi <yao.qi@linaro.org>
5606
5607 * remote-utils.c (getpkt): If c is '\003', call target hook
5608 request_interrupt.
5609
5610 2016-01-06 Yao Qi <yao.qi@linaro.org>
5611
5612 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5613 linux-aarch32-low.c.
5614 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5615 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5616 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5617 (thumb2_breakpoint): Declare.
5618 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5619 linux-aarch32-low.h.
5620 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5621 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5622 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5623
5624 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5625
5626 * gdbreplay.c (gdbreplay_version): Change copyright year in
5627 version message.
5628 * server.c (gdbserver_version): Likewise.
5629
5630 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5631
5632 * server.c (crc32_table): Delete.
5633 (crc32): Use libiberty's xcrc32 function.
5634
5635 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5636
5637 * lynx-low.c (lynx_delete_thread_callback): New function.
5638 (lynx_mourn): Properly delete our process and all of its
5639 threads. Remove call to clear_inferiors.
5640
5641 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5642
5643 * target.c (thread_search_callback): Add check that
5644 the thread_stopped target callback is not NULL before
5645 calling it.
5646
5647 2015-12-21 Yao Qi <yao.qi@linaro.org>
5648
5649 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5650 arm breakpoint.
5651
5652 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5653
5654 * server.c (handle_query): Call target_supports_software_single_step.
5655
5656 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5657
5658 * linux-low.c (single_step): New function.
5659 (linux_resume_one_lwp_throw): Call single_step.
5660 (start_step_over): Likewise.
5661
5662 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5663
5664 * Makefile.in (SFILES): Append arch/arm-linux.c,
5665 arch/arm-get-next-pcs.c.
5666 (arm-linux.o): New rule.
5667 (arm-get-next-pcs.o): New rule.
5668 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5669 arm-linux.o.
5670 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5671 to linux-aarch32-low.c.
5672 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5673 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5674 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5675 (thumb2_breakpoint_len): Likewise.
5676 (arm_is_thumb_mode): Make non-static.
5677 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5678 from linux-aarch32-low.c.
5679 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5680 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5681 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5682 (thumb2_breakpoint_len): Likewise.
5683 (arm_is_thumb_mode): New declaration.
5684 * linux-arm-low.c: Include arch/arm-linux.h
5685 aarch/arm-get-next-pcs.h, sys/syscall.h.
5686 (get_next_pcs_ops): New struct.
5687 (get_next_pcs_addr_bits_remove): New function.
5688 (get_next_pcs_is_thumb): New function.
5689 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5690 (arm_sigreturn_next_pc): Likewise.
5691 (get_next_pcs_syscall_next_pc): Likewise.
5692 (arm_gdbserver_get_next_pcs): Likewise.
5693 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5694 Initialize.
5695 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5696 * server.h: Include gdb_vecs.h.
5697
5698 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5699
5700 * Makefile.in (SFILES): Append common/common-regcache.c.
5701 (OBS): Append common-regcache.o.
5702 (common-regcache.o): New rule.
5703 * regcache.c (init_register_cache): Initialize cache to
5704 REG_UNAVAILABLE.
5705 (regcache_raw_read_unsigned): New function.
5706 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5707 register_status enum.
5708
5709 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5710
5711 * linux-aarch64-low.c (the_low_targets): Rename
5712 breakpoint_reinsert_addr to get_next_pcs.
5713 * linux-arm-low.c (the_low_targets): Likewise.
5714 * linux-bfin-low.c (the_low_targets): Likewise.
5715 * linux-cris-low.c (the_low_targets): Likewise.
5716 * linux-crisv32-low.c (the_low_targets): Likewise.
5717 * linux-low.c (can_software_single_step): Likewise.
5718 (install_software_single_step_breakpoints): New function.
5719 (start_step_over): Use install_software_single_step_breakpoints.
5720 * linux-low.h: New CORE_ADDR vector.
5721 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5722 get_next_pcs.
5723 * linux-mips-low.c (the_low_targets): Likewise.
5724 * linux-nios2-low.c (the_low_targets): Likewise.
5725 * linux-sparc-low.c (the_low_targets): Likewise.
5726
5727 2015-12-17 Pedro Alves <palves@redhat.com>
5728
5729 * linux-low.c (linux_kill_one_lwp): Remove references to
5730 LinuxThreads.
5731 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5732 to 'kill'.
5733 (linux_init_signals): Delete.
5734 (initialize_low): Adjust.
5735 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5736
5737 2015-12-16 Pedro Alves <palves@redhat.com>
5738
5739 * configure.ac (compiler warning flags): When testing a
5740 -Wno-foo option, check whether -Wfoo works instead.
5741 * configure: Regenerate.
5742
5743 2015-12-11 Don Breazeal <donb@codesourcery.com>
5744
5745 * server.c (process_serial_event): Don't exit from gdbserver
5746 in remote mode if there are still active inferiors.
5747
5748 2015-12-11 Yao Qi <yao.qi@linaro.org>
5749
5750 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5751 arm_breakpoint_at if the process is 32-bit.
5752
5753 2015-12-11 Yao Qi <yao.qi@linaro.org>
5754
5755 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5756 arm breakpoint.
5757
5758 2015-12-07 Yao Qi <yao.qi@linaro.org>
5759
5760 * configure.srv: Append arm.o to srv_tgtobj for
5761 aarch64*-*-linux* target.
5762 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5763 from linux-arm-low.c.
5764 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5765 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5766 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5767 (thumb2_breakpoint_len): Likewise.
5768 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5769 (arm_breakpoint_kinds): Likewise.
5770 (arm_breakpoint_kind_from_pc): Likewise.
5771 (arm_sw_breakpoint_from_kind): Likewise.
5772 (arm_breakpoint_kind_from_current_state): Likewise.
5773 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5774 (arm_sw_breakpoint_from_kind): Declare.
5775 (arm_breakpoint_kind_from_current_state): Declare.
5776 (arm_breakpoint_at): Declare.
5777 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5778 arm_sw_breakpoint_from_kind if process is 32-bit.
5779 (aarch64_breakpoint_kind_from_pc): New function.
5780 (aarch64_breakpoint_kind_from_current_state): New function.
5781 (the_low_target): Initialize fields breakpoint_kind_from_pc
5782 and breakpoint_kind_from_current_state.
5783 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5784 linux-aarch32-low.c.
5785 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5786 (arm_breakpoint, arm_breakpoint_len): Likewise.
5787 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5788 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5789 (arm_is_thumb_mode): Likewise.
5790 (arm_breakpoint_at): Likewise.
5791 (arm_breakpoint_kind_from_pc): Likewise.
5792 (arm_sw_breakpoint_from_kind): Likewise.
5793 (arm_breakpoint_kind_from_current_state): Likewise.
5794
5795 Revert:
5796 2015-08-04 Yao Qi <yao.qi@linaro.org>
5797
5798 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5799 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5800 * server.c (extended_protocol): Remove "static".
5801 * server.h (extended_protocol): Declare it.
5802
5803 2015-12-04 Josh Stone <jistone@redhat.com>
5804
5805 * target.h (struct target_ops) <arch_setup>: Rename to ...
5806 (struct target_ops) <post_create_inferior>: ... this.
5807 (target_arch_setup): Rename to ...
5808 (target_post_create_inferior): ... this, calling post_create_inferior.
5809 * server.c (start_inferior): Update target_arch_setup calls to
5810 target_post_create_inferior.
5811 * linux-low.c (linux_low_ptrace_options): Forward declare.
5812 (linux_arch_setup): Update its comment for general use.
5813 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5814 (struct linux_target_ops): Use linux_post_create_inferior.
5815 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5816 to post_create_inferior.
5817 * nto-low.c (struct nto_target_ops): Likewise.
5818 * spu-low.c (struct spu_target_ops): Likewise.
5819 * win32-low.c (struct win32_target_ops): Likewise.
5820
5821 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5822
5823 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5824
5825 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5826
5827 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5828 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5829 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5830 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5831 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5832 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5833 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5835 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5836 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5837 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5838 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5839
5840 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5841
5842 * linux-low.c (linux_look_up_symbols): Don't call
5843 linux_supports_traceclone.
5844 * linux-low.h (thread_db_init): Remove use_events argument.
5845 * thread-db.c (thread_db_use_event): Remove global variable.
5846 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5847 (struct thread_db) <td_create_bp>: Remove field.
5848 (thread_db_create_event): Remove function.
5849 (thread_db_enable_reporting): Likewise.
5850 (find_one_thread): Don't check for thread_db_use_events.
5851 (attach_thread): Likewise.
5852 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5853 (try_thread_db_load_1): Don't check for thread_db_use_events.
5854 (thread_db_init): Remove use_events argument and thread events
5855 handling.
5856 (remove_thread_event_breakpoints): Remove function.
5857 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5858
5859 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5860
5861 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5862 New function.
5863 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5864 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5866 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5867 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5868 Initialize.
5869 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5870 New function.
5871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5872 * linux-low.c (can_hardware_single_step): Use
5873 supports_hardware_single_step.
5874 (can_software_single_step): New function.
5875 (start_step_over): Call can_software_single_step.
5876 (linux_supports_hardware_single_step): New function.
5877 (struct target_ops) <supports_software_single_step>: Initialize.
5878 * linux-low.h (struct linux_target_ops)
5879 <supports_hardware_single_step>: Initialize.
5880 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5881 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5882 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5883 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5884 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5886 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5887 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5888 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5889 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5890 Initialize.
5891 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5892 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5893 Initialize.
5894 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5895 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5896 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5897 New function.
5898 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5899 * target.h (struct target_ops): <supports_software_single_step>:
5900 New field.
5901 (target_supports_software_single_step): New macro.
5902
5903 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5904
5905 * linux-low.c (linux_wait_1): Fix pc advance condition.
5906 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5907 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5908
5909 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5910
5911 * linux-arm-low.c (arm_is_thumb_mode): New function.
5912 (arm_breakpoint_at): Use arm_is_thumb_mode.
5913 (arm_breakpoint_kind_from_current_state): New function.
5914 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5915 Initialize.
5916 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5917 (linux_breakpoint_kind_from_current_state): New function.
5918 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5919 * linux-low.h (struct linux_target_ops)
5920 <breakpoint_kind_from_current_state>: New field.
5921 * target.h (struct target_ops): Likewise.
5922 (target_breakpoint_kind_from_current_state): New macro.
5923
5924 2015-11-30 Pedro Alves <palves@redhat.com>
5925
5926 * linux-low.c (linux_resume): Wake up the event loop before
5927 returning.
5928
5929 2015-11-30 Pedro Alves <palves@redhat.com>
5930
5931 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5932 check.
5933 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5934 to -1.
5935 * target.c (struct thread_search): New structure.
5936 (thread_search_callback): New function.
5937 (prev_general_thread): New global.
5938 (prepare_to_access_memory, done_accessing_memory): New functions.
5939 * target.h (prepare_to_access_memory, done_accessing_memory):
5940 Replace macros with function declarations.
5941
5942 2015-11-30 Pedro Alves <palves@redhat.com>
5943
5944 PR 14618
5945 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5946 report TARGET_WAITKIND_NO_RESUMED.
5947 * remote-utils.c (prepare_resume_reply): Handle
5948 TARGET_WAITKIND_NO_RESUMED.
5949 * server.c (report_no_resumed): New global.
5950 (handle_query) <qSupported>: Handle "no-resumed+". Report
5951 "no-resumed+" support.
5952 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5953 return error if the client doesn't support no-resumed events.
5954 (push_stop_notification): New function.
5955 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5956 events if the client supports them.
5957
5958 2015-11-30 Pedro Alves <palves@redhat.com>
5959
5960 * linux-low.c (thread_still_has_status_pending_p): Don't check
5961 vCont;t here.
5962 (lwp_resumed): New function.
5963 (status_pending_p_callback): Return early if the LWP is not
5964 supposed to be resumed.
5965
5966 2015-11-30 Pedro Alves <palves@redhat.com>
5967
5968 * linux-low.c (handle_extended_wait): Assert that the LWP's
5969 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5970 thread create events, leave the new child's status pending.
5971 (linux_low_filter_event): If GDB wants to hear about thread exit
5972 events, leave the LWP marked dead and don't delete it.
5973 (linux_wait_for_event_filtered): Don't check for thread exit.
5974 (filter_exit_event): New function.
5975 (linux_wait_1): Use it, when returning an exit event.
5976 (linux_resume_one_lwp_throw): Assert that the LWP's
5977 waitstatus is TARGET_WAITKIND_IGNORE.
5978 * remote-utils.c (prepare_resume_reply): Handle
5979 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5980 * server.c (report_thread_events): New global.
5981 (handle_general_set): Handle QThreadEvents.
5982 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5983 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5984 TARGET_WAITKIND_THREAD_EXITED.
5985 * server.h (report_thread_events): Declare.
5986
5987 2015-11-30 Pedro Alves <palves@redhat.com>
5988
5989 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5990 the thread's last_resume_kind was resume_stop.
5991
5992 2015-11-30 Pedro Alves <palves@redhat.com>
5993
5994 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5995 before returning.
5996
5997 2015-11-30 Pedro Alves <palves@redhat.com>
5998
5999 * server.c (handle_v_requests): Handle vCtrlC.
6000
6001 2015-11-30 Pedro Alves <palves@redhat.com>
6002
6003 * gdbthread.h (find_any_thread_of_pid): Declare.
6004 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6005 functions.
6006 * server.c (handle_query): If current_thread is NULL, look for
6007 another thread of the selected process.
6008
6009 2015-11-26 Daniel Colascione <dancol@dancol.org>
6010 Simon Marchi <simon.marchi@ericsson.com>
6011
6012 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6013 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6014 name in reply.
6015 * target.h (struct target_ops) <thread_name>: New field.
6016 (target_thread_name): New macro.
6017
6018 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6019
6020 * regcache.h (regcache_invalidate_pid): Add declaration.
6021 * regcache.c (regcache_invalidate_pid): New function, extracted
6022 from regcache_invalidate.
6023 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6024 Add trivial documentation comment.
6025 * lynx-low.c: Use regcache_invalidate_pid instead of
6026 regcache_invalidate.
6027
6028 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6029
6030 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6031 and Elf64_auxv_t if the target is Android.
6032
6033 2015-11-22 Doug Evans <xdje42@gmail.com>
6034
6035 * target.h: #include <sys/types.h>.
6036
6037 2015-11-19 Pedro Alves <palves@redhat.com>
6038
6039 * linux-low.c (linux_process_qsupported): Change prototype.
6040 Adjust.
6041 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6042 Change prototype.
6043 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6044 and adjust to loop over all features.
6045 * server.c (handle_query) <qSupported>: Adjust to call
6046 target_process_qsupported once, passing it a vector of unprocessed
6047 features.
6048 * target.h (struct target_ops) <process_qsupported>: Change
6049 prototype.
6050 (target_process_qsupported): Adjust.
6051
6052 2015-11-19 Pedro Alves <palves@redhat.com>
6053
6054 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6055 mode.
6056 * configure: Regenerate.
6057
6058 2015-11-19 Pedro Alves <palves@redhat.com>
6059
6060 * configure: Regenerate.
6061
6062 2015-11-19 Yao Qi <yao.qi@linaro.org>
6063
6064 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6065 type to uint32_t.
6066
6067 2015-11-19 Yao Qi <yao.qi@linaro.org>
6068
6069 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6070 (struct aarch64_operand): Move enum out.
6071
6072 2015-11-19 Yao Qi <yao.qi@linaro.org>
6073
6074 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6075 struct user_fpsimd_state *.
6076 (aarch64_store_fpregset): Likewise.
6077
6078 2015-11-19 Yao Qi <yao.qi@linaro.org>
6079
6080 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6081 struct user_pt_regs *.
6082 (aarch64_store_gregset): Likewise.
6083
6084 2015-11-18 Pedro Alves <palves@redhat.com>
6085
6086 * Makefile.in (all_object_files): Add $IPA_OBJS.
6087
6088 2015-11-17 Pedro Alves <palves@redhat.com>
6089
6090 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6091 GDB_SIGNAL_0 and gdb_signal_to_string.
6092
6093 2015-11-17 Pedro Alves <palves@redhat.com>
6094
6095 * win32-low.c (handle_output_debug_string): Remove parameter.
6096 (win32_kill): Remove our_status local and adjust call to
6097 handle_output_debug_string.
6098 (get_child_debug_event): Adjust call to
6099 handle_output_debug_string.
6100
6101 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6102
6103 * linux-mips-low.c (mips_fill_gregset): Add cast.
6104 (mips_store_gregset): Likewise.
6105 (mips_fill_fpregset): Likewise.
6106 (mips_store_fpregset): Likewise.
6107
6108 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6109
6110 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6111 priv.
6112
6113 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6114
6115 * linux-mips-low.c (mips_linux_new_thread): Change type of
6116 watch_type to enum target_hw_bp_type.
6117
6118 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6119
6120 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6121 Change return type to arm_hwbp_type.
6122
6123 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6124
6125 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6126 (arm_store_gregset): Likewise.
6127 * linux-arm-low.c (arm_get_hwcap): Likewise.
6128 (arm_read_description): Likewise.
6129
6130 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6131
6132 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6133
6134 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6135
6136 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6137 (ppc_fill_vsxregset): Likewise.
6138 (ppc_store_vsxregset): Likewise.
6139 (ppc_fill_vrregset): Likewise.
6140 (ppc_store_vrregset): Likewise.
6141 (ppc_fill_evrregset): Likewise.
6142 (ppc_store_evrregset): Likewise.
6143
6144 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6145
6146 * linux-ppc-low.c (ppc_usrregs_info): Remove
6147 forward-declaration.
6148 (ppc_arch_setup): Move lower in file.
6149
6150 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6151
6152 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6153 (ps_pdwrite): Likewise.
6154
6155 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6156
6157 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6158 to after assert checks.
6159
6160 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6161
6162 * proc-service.c (ps_pdread): Add/adjust casts.
6163 (ps_pdwrite): Add/adjust casts.
6164
6165 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6166
6167 * server.c (handle_search_memory_1): Cast return value of
6168 memmem.
6169
6170 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6171
6172 * server.c (write_qxfer_response): Change type of data to
6173 gdb_byte *.
6174
6175 2015-10-29 Pedro Alves <palves@redhat.com>
6176
6177 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6178
6179 2015-10-29 Pedro Alves <palves@redhat.com>
6180
6181 * tracepoint.c (clear_installed_tracepoints): Add casts.
6182
6183 2015-10-29 Pedro Alves <palves@redhat.com>
6184
6185 * server.c (handle_v_cont, process_serial_event): Add enum
6186 gdb_signal casts to signal parsing code.
6187
6188 2015-10-29 Pedro Alves <palves@redhat.com>
6189
6190 * linux-low.h (NULL_REGSET): Define.
6191 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6192 * linux-arm-low.c (arm_regsets): Likewise.
6193 * linux-crisv32-low.c (cris_regsets): Likewise.
6194 * linux-m68k-low.c (m68k_regsets): Likewise.
6195 * linux-mips-low.c (mips_regsets): Likewise.
6196 * linux-nios2-low.c (nios2_regsets): Likewise.
6197 * linux-ppc-low.c (ppc_regsets): Likewise.
6198 * linux-s390-low.c (s390_regsets): Likewise.
6199 * linux-sh-low.c (sh_regsets): Likewise.
6200 * linux-sparc-low.c (sparc_regsets): Likewise.
6201 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6202 * linux-tile-low.c (tile_regsets): Likewise.
6203 * linux-x86-low.c (x86_regsets): Likewise.
6204 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6205
6206 2015-10-29 Pedro Alves <palves@redhat.com>
6207
6208 * linux-low.h (NULL_REGSET): Define.
6209 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6210 * linux-arm-low.c (arm_regsets): Likewise.
6211 * linux-crisv32-low.c (cris_regsets): Likewise.
6212 * linux-m68k-low.c (m68k_regsets): Likewise.
6213 * linux-mips-low.c (mips_regsets): Likewise.
6214 * linux-nios2-low.c (nios2_regsets): Likewise.
6215 * linux-ppc-low.c (ppc_regsets): Likewise.
6216 * linux-s390-low.c (s390_regsets): Likewise.
6217 * linux-sh-low.c (sh_regsets): Likewise.
6218 * linux-sparc-low.c (sparc_regsets): Likewise.
6219 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6220 * linux-tile-low.c (tile_regsets): Likewise.
6221 * linux-x86-low.c (x86_regsets): Likewise.
6222 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6223
6224 2015-10-26 Doug Evans <dje@google.com>
6225
6226 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6227
6228 2015-10-26 Doug Evans <dje@google.com>
6229
6230 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6231
6232 2015-10-26 Doug Evans <dje@google.com>
6233
6234 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6235 for debug_printf.
6236 (attach_thread, find_new_threads_callback): Ditto.
6237
6238 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6239
6240 * mem-break.h (set_breakpoint_data): Remove.
6241
6242 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6243
6244 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6245 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6246 (initialize_low): Remove set_breakpoint_data call.
6247 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6248 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6249 (initialize_low): Remove set_breakpoint_data call.
6250 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6251 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6252 (initialize_low): Remove set_breakpoint_data call.
6253
6254 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6255
6256 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6257 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6258 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6259 * target.h (target_breakpoint_kind_from_pc): New macro.
6260
6261 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6262
6263 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6264 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6265 the default breakpoint kind.
6266
6267 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6268
6269 * linux-arm-low.c (arm_supports_z_point_type): Add software
6270 breakpoint support.
6271
6272 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6273
6274 * linux-arm-low.c: Refactor breakpoint definitions.
6275 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6276 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6277
6278 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6279
6280 * Makefile.in: Add arm.c/o.
6281 * configure.srv: Likewise.
6282 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6283 (arm_breakpoint_kind_from_pc): New function.
6284 (arm_sw_breakpoint_from_kind): Return proper kind.
6285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6286
6287 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6288
6289 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6290 removal.
6291 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6292 (struct raw_breakpoint) <size>: Remove.
6293 (struct raw_breakpoint) <kind>: Add.
6294 (bp_size): New function.
6295 (bp_opcode): Likewise.
6296 (find_raw_breakpoint_at): Adjust for kind.
6297 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6298 (remove_memory_breakpoint): Adjust for kind call bp_size.
6299 (set_raw_breakpoint_at): Adjust for kind.
6300 (set_breakpoint): Likewise.
6301 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6302 (delete_raw_breakpoint): Adjust for kind.
6303 (delete_breakpoint): Likewise.
6304 (find_gdb_breakpoint): Likewise.
6305 (set_gdb_breakpoint_1): Likewise.
6306 (set_gdb_breakpoint): Likewise.
6307 (delete_gdb_breakpoint_1): Likewise.
6308 (delete_gdb_breakpoint): Likewise.
6309 (uninsert_raw_breakpoint): Likewise.
6310 (reinsert_raw_breakpoint): Likewise.
6311 (set_breakpoint_data): Remove.
6312 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6313 (check_mem_read): Adjust for kind call bp_size.
6314 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6315 (clone_one_breakpoint): Adjust for kind.
6316 * mem-break.h (set_gdb_breakpoint): Likewise.
6317 (delete_gdb_breakpoint): Likewise.
6318 * server.c (process_serial_event): Likewise.
6319
6320 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6321
6322 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6323 (struct linux_target_ops) <breakpoint>: Remove.
6324 (struct linux_target_ops) <breakpoint_len>: Remove.
6325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6327 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6328 (arm_sw_breakpoint_from_kind): New function.
6329 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6330 (struct linux_target_ops) <breakpoint>: Remove.
6331 (struct linux_target_ops) <breakpoint_len>: Remove.
6332 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6333 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6334 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6335 (struct linux_target_ops) <breakpoint>: Remove.
6336 (struct linux_target_ops) <breakpoint_len>: Remove.
6337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6338 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6339 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6340 (struct linux_target_ops) <breakpoint>: Remove.
6341 (struct linux_target_ops) <breakpoint_len>: Remove.
6342 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6344 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6345 and sw_breakpoint_from_kind to increment the pc.
6346 (linux_breakpoint_kind_from_pc): New function.
6347 (linux_sw_breakpoint_from_kind): New function.
6348 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6349 (initialize_low): Call breakpoint_kind_from_pc and
6350 sw_breakpoint_from_kind to replace breakpoint_data/len.
6351 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6352 New field.
6353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6354 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6355 (struct linux_target_ops) <breakpoint>: Remove.
6356 (struct linux_target_ops) <breakpoint_len>: Remove.
6357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6359 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6360 (struct linux_target_ops) <breakpoint>: Remove.
6361 (struct linux_target_ops) <breakpoint_len>: Remove.
6362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6363 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6364 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6365 (struct linux_target_ops) <breakpoint>: Remove.
6366 (struct linux_target_ops) <breakpoint_len>: Remove.
6367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6369 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6370 (struct linux_target_ops) <breakpoint>: Remove.
6371 (struct linux_target_ops) <breakpoint_len>: Remove.
6372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6374 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6375 (struct linux_target_ops) <breakpoint>: Remove.
6376 (struct linux_target_ops) <breakpoint_len>: Remove.
6377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6379 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6380 (struct linux_target_ops) <breakpoint>: Remove.
6381 (struct linux_target_ops) <breakpoint_len>: Remove.
6382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6384 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6385 (struct linux_target_ops) <breakpoint>: Remove.
6386 (struct linux_target_ops) <breakpoint_len>: Remove.
6387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6389 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6390 (struct linux_target_ops) <breakpoint>: Remove.
6391 (struct linux_target_ops) <breakpoint_len>: Remove.
6392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6394 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6395 (struct linux_target_ops) <breakpoint>: Remove.
6396 (struct linux_target_ops) <breakpoint_len>: Remove.
6397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6399 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6400 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6401 (struct linux_target_ops) <breakpoint>: Remove.
6402 (struct linux_target_ops) <breakpoint_len>: Remove.
6403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6405 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6406 (struct linux_target_ops) <breakpoint>: Remove.
6407 (struct linux_target_ops) <breakpoint_len>: Remove.
6408 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6410
6411 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6412
6413 * linux-cris-low.c (cris_get_pc): Remove void arg.
6414
6415 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6416
6417 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6418 variable name.
6419
6420 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6421
6422 * inferiors.c (thread_pid_matches_callback): New function.
6423 (find_thread_process): New function.
6424 (remove_thread): Reset current_thread.
6425 (remove_process): Assert threads have been removed first.
6426
6427 2015-10-15 Yao Qi <yao.qi@linaro.org>
6428
6429 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6430 if it is 3.
6431 (aarch64_remove_point): Likewise.
6432 * regcache.c (regcache_register_size): New function.
6433
6434 2015-10-12 Yao Qi <yao.qi@linaro.org>
6435
6436 * linux-aarch64-low.c: Update all callers as emit_load_store
6437 is renamed to aarch64_emit_load_store.
6438
6439 2015-10-12 Yao Qi <yao.qi@linaro.org>
6440
6441 * linux-aarch64-low.c: Update all callers of function renaming
6442 from emit_insn to aarch64_emit_insn.
6443
6444 2015-10-12 Yao Qi <yao.qi@linaro.org>
6445
6446 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6447 arch/aarch64-insn.h.
6448 (struct aarch64_memory_operand): Likewise.
6449 (ENCODE): Likewise.
6450 (emit_insn): Move to arch/aarch64-insn.c.
6451 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6452 (emit_load_store): Move to arch/aarch64-insn.c.
6453 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6454 (can_encode_int32): Remove.
6455
6456 2015-10-12 Yao Qi <yao.qi@linaro.org>
6457
6458 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6459 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6460 (aarch64_relocate_instruction): Likewise.
6461 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6462 (struct aarch64_insn_visitor): Likewise.
6463
6464 2015-10-12 Yao Qi <yao.qi@linaro.org>
6465
6466 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6467 (struct aarch64_insn_visitor): New.
6468 (struct aarch64_insn_relocation_data): New.
6469 (aarch64_ftrace_insn_reloc_b): New function.
6470 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6471 (aarch64_ftrace_insn_reloc_cb): Likewise.
6472 (aarch64_ftrace_insn_reloc_tb): Likewise.
6473 (aarch64_ftrace_insn_reloc_adr): Likewise.
6474 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6475 (aarch64_ftrace_insn_reloc_others): Likewise.
6476 (visitor): New.
6477 (aarch64_relocate_instruction): Use visitor.
6478
6479 2015-10-12 Yao Qi <yao.qi@linaro.org>
6480
6481 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6482 int. Add argument buf.
6483 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6484 aarch64_relocate_instruction.
6485
6486 2015-10-12 Yao Qi <yao.qi@linaro.org>
6487
6488 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6489 argument insn. Remove local variable insn. Don't call
6490 target_read_uint32.
6491 (aarch64_install_fast_tracepoint_jump_pad): Call
6492 target_read_uint32.
6493
6494 2015-09-30 Yao Qi <yao.qi@linaro.org>
6495
6496 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6497 (emit_load_store_pair): Likewise.
6498
6499 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6500
6501 * dll.c (match_dll): Add cast(s).
6502 (unloaded_dll): Likewise.
6503 * linux-low.c (second_thread_of_pid_p): Likewise.
6504 (delete_lwp_callback): Likewise.
6505 (count_events_callback): Likewise.
6506 (select_event_lwp_callback): Likewise.
6507 (linux_set_resume_request): Likewise.
6508 * server.c (accumulate_file_name_length): Likewise.
6509 (emit_dll_description): Likewise.
6510 (handle_qxfer_threads_worker): Likewise.
6511 (visit_actioned_threads): Likewise.
6512 * thread-db.c (any_thread_of): Likewise.
6513 * tracepoint.c (same_process_p): Likewise.
6514 (match_blocktype): Likewise.
6515 (build_traceframe_info_xml): Likewise.
6516
6517 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6518
6519 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6520 assignment.
6521 (gdb_unparse_agent_expr): Likewise.
6522 * hostio.c (require_data): Likewise.
6523 (handle_pread): Likewise.
6524 * linux-low.c (disable_regset): Likewise.
6525 (fetch_register): Likewise.
6526 (store_register): Likewise.
6527 (get_dynamic): Likewise.
6528 (linux_qxfer_libraries_svr4): Likewise.
6529 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6530 (set_fast_tracepoint_jump): Likewise.
6531 (uninsert_fast_tracepoint_jumps_at): Likewise.
6532 (reinsert_fast_tracepoint_jumps_at): Likewise.
6533 (validate_inserted_breakpoint): Likewise.
6534 (clone_agent_expr): Likewise.
6535 * regcache.c (init_register_cache): Likewise.
6536 * remote-utils.c (putpkt_binary_1): Likewise.
6537 (decode_M_packet): Likewise.
6538 (decode_X_packet): Likewise.
6539 (look_up_one_symbol): Likewise.
6540 (relocate_instruction): Likewise.
6541 (monitor_output): Likewise.
6542 * server.c (handle_search_memory): Likewise.
6543 (handle_qxfer_exec_file): Likewise.
6544 (handle_qxfer_libraries): Likewise.
6545 (handle_qxfer): Likewise.
6546 (handle_query): Likewise.
6547 (handle_v_cont): Likewise.
6548 (handle_v_run): Likewise.
6549 (captured_main): Likewise.
6550 * target.c (write_inferior_memory): Likewise.
6551 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6552 * tracepoint.c (init_trace_buffer): Likewise.
6553 (add_tracepoint_action): Likewise.
6554 (add_traceframe): Likewise.
6555 (add_traceframe_block): Likewise.
6556 (cmd_qtdpsrc): Likewise.
6557 (cmd_qtdv): Likewise.
6558 (cmd_qtstatus): Likewise.
6559 (response_source): Likewise.
6560 (response_tsv): Likewise.
6561 (cmd_qtnotes): Likewise.
6562 (gdb_collect): Likewise.
6563 (initialize_tracepoint): Likewise.
6564
6565 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6566
6567 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6568 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6569 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6570 <NOP>: New.
6571 (enum aarch64_condition_codes): New enum.
6572 (w0): New static global.
6573 (fp): Likewise.
6574 (lr): Likewise.
6575 (struct aarch64_memory_operand) <type>: New
6576 MEMORY_OPERAND_POSTINDEX type.
6577 (postindex_memory_operand): New helper function.
6578 (emit_ret): New function.
6579 (emit_load_store_pair): New function, factored out of emit_stp
6580 with support for MEMORY_OPERAND_POSTINDEX.
6581 (emit_stp): Rewrite using emit_load_store_pair.
6582 (emit_ldp): New function.
6583 (emit_load_store): Likewise.
6584 (emit_ldr): Mention post-index instruction in comment.
6585 (emit_ldrh): New function.
6586 (emit_ldrb): New function.
6587 (emit_ldrsw): Mention post-index instruction in comment.
6588 (emit_str): Likewise.
6589 (emit_subs): New function.
6590 (emit_cmp): Likewise.
6591 (emit_and): Likewise.
6592 (emit_orr): Likewise.
6593 (emit_orn): Likewise.
6594 (emit_eor): Likewise.
6595 (emit_mvn): Likewise.
6596 (emit_lslv): Likewise.
6597 (emit_lsrv): Likewise.
6598 (emit_asrv): Likewise.
6599 (emit_mul): Likewise.
6600 (emit_sbfm): Likewise.
6601 (emit_sbfx): Likewise.
6602 (emit_ubfm): Likewise.
6603 (emit_ubfx): Likewise.
6604 (emit_csinc): Likewise.
6605 (emit_cset): Likewise.
6606 (emit_nop): Likewise.
6607 (emit_ops_insns): New helper function.
6608 (emit_pop): Likewise.
6609 (emit_push): Likewise.
6610 (aarch64_emit_prologue): New function.
6611 (aarch64_emit_epilogue): Likewise.
6612 (aarch64_emit_add): Likewise.
6613 (aarch64_emit_sub): Likewise.
6614 (aarch64_emit_mul): Likewise.
6615 (aarch64_emit_lsh): Likewise.
6616 (aarch64_emit_rsh_signed): Likewise.
6617 (aarch64_emit_rsh_unsigned): Likewise.
6618 (aarch64_emit_ext): Likewise.
6619 (aarch64_emit_log_not): Likewise.
6620 (aarch64_emit_bit_and): Likewise.
6621 (aarch64_emit_bit_or): Likewise.
6622 (aarch64_emit_bit_xor): Likewise.
6623 (aarch64_emit_bit_not): Likewise.
6624 (aarch64_emit_equal): Likewise.
6625 (aarch64_emit_less_signed): Likewise.
6626 (aarch64_emit_less_unsigned): Likewise.
6627 (aarch64_emit_ref): Likewise.
6628 (aarch64_emit_if_goto): Likewise.
6629 (aarch64_emit_goto): Likewise.
6630 (aarch64_write_goto_address): Likewise.
6631 (aarch64_emit_const): Likewise.
6632 (aarch64_emit_call): Likewise.
6633 (aarch64_emit_reg): Likewise.
6634 (aarch64_emit_pop): Likewise.
6635 (aarch64_emit_stack_flush): Likewise.
6636 (aarch64_emit_zero_ext): Likewise.
6637 (aarch64_emit_swap): Likewise.
6638 (aarch64_emit_stack_adjust): Likewise.
6639 (aarch64_emit_int_call_1): Likewise.
6640 (aarch64_emit_void_call_2): Likewise.
6641 (aarch64_emit_eq_goto): Likewise.
6642 (aarch64_emit_ne_goto): Likewise.
6643 (aarch64_emit_lt_goto): Likewise.
6644 (aarch64_emit_le_goto): Likewise.
6645 (aarch64_emit_gt_goto): Likewise.
6646 (aarch64_emit_ge_got): Likewise.
6647 (aarch64_emit_ops_impl): New static global variable.
6648 (aarch64_emit_ops): New target function, return
6649 &aarch64_emit_ops_impl.
6650 (struct linux_target_ops): Install it.
6651
6652 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6653
6654 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6655 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6656 aarch64-ipa.o.
6657 * linux-aarch64-ipa.c: New file.
6658 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6659 and endian.h.
6660 (aarch64_get_thread_area): New target method.
6661 (extract_signed_bitfield): New helper function.
6662 (aarch64_decode_ldr_literal): New function.
6663 (enum aarch64_opcodes): New enum.
6664 (struct aarch64_register): New struct.
6665 (struct aarch64_operand): New struct.
6666 (x0): New static global.
6667 (x1): Likewise.
6668 (x2): Likewise.
6669 (x3): Likewise.
6670 (x4): Likewise.
6671 (w2): Likewise.
6672 (ip0): Likewise.
6673 (sp): Likewise.
6674 (xzr): Likewise.
6675 (aarch64_register): New helper function.
6676 (register_operand): Likewise.
6677 (immediate_operand): Likewise.
6678 (struct aarch64_memory_operand): New struct.
6679 (offset_memory_operand): New helper function.
6680 (preindex_memory_operand): Likewise.
6681 (enum aarch64_system_control_registers): New enum.
6682 (ENCODE): New macro.
6683 (emit_insn): New helper function.
6684 (emit_b): New function.
6685 (emit_bcond): Likewise.
6686 (emit_cb): Likewise.
6687 (emit_tb): Likewise.
6688 (emit_blr): Likewise.
6689 (emit_stp): Likewise.
6690 (emit_ldp_q_offset): Likewise.
6691 (emit_stp_q_offset): Likewise.
6692 (emit_load_store): Likewise.
6693 (emit_ldr): Likewise.
6694 (emit_ldrsw): Likewise.
6695 (emit_str): Likewise.
6696 (emit_ldaxr): Likewise.
6697 (emit_stxr): Likewise.
6698 (emit_stlr): Likewise.
6699 (emit_data_processing_reg): Likewise.
6700 (emit_data_processing): Likewise.
6701 (emit_add): Likewise.
6702 (emit_sub): Likewise.
6703 (emit_mov): Likewise.
6704 (emit_movk): Likewise.
6705 (emit_mov_addr): Likewise.
6706 (emit_mrs): Likewise.
6707 (emit_msr): Likewise.
6708 (emit_sevl): Likewise.
6709 (emit_wfe): Likewise.
6710 (append_insns): Likewise.
6711 (can_encode_int32_in): New helper function.
6712 (aarch64_relocate_instruction): New function.
6713 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6714 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6715 (struct linux_target_ops): Install aarch64_get_thread_area,
6716 aarch64_install_fast_tracepoint_jump_pad and
6717 aarch64_get_min_fast_tracepoint_insn_len.
6718
6719 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6720
6721 * Makefile.in (aarch64-insn.o): New rule.
6722 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6723
6724 2015-09-21 Yao Qi <yao.qi@linaro.org>
6725
6726 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6727
6728 2015-09-21 Yao Qi <yao.qi@linaro.org>
6729
6730 * tracepoint.c (max_jump_pad_size): Remove.
6731
6732 2015-09-18 Yao Qi <yao.qi@linaro.org>
6733
6734 * linux-aarch64-low.c: Don't include sys/uio.h.
6735 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6736
6737 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6738
6739 * tracepoint.c (eval_result_type): Change prototype.
6740 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6741
6742 2015-09-15 Pedro Alves <palves@redhat.com>
6743
6744 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6745 Check whether to report exec events instead of checking whether
6746 multiprocess is enabled.
6747
6748 2015-09-15 Pedro Alves <palves@redhat.com>
6749
6750 PR remote/18965
6751 * remote-utils.c (prepare_resume_reply): Merge
6752 TARGET_WAITKIND_VFORK_DONE switch case with the
6753 TARGET_WAITKIND_FORKED case.
6754
6755 2015-09-15 Yao Qi <yao.qi@linaro.org>
6756
6757 * server.c (handle_query): Check string comparison using
6758 "else if" instead of "if".
6759
6760 2015-09-15 Yao Qi <yao.qi@linaro.org>
6761
6762 * server.c (vCont_supported): New global variable.
6763 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6764 matches. Append ";vContSupported+" to own_buf.
6765 (handle_v_requests): Append ";s;S" to own_buf if target supports
6766 hardware single step or vCont_supported is false.
6767 (capture_main): Set vCont_supported to zero.
6768
6769 2015-09-15 Yao Qi <yao.qi@linaro.org>
6770
6771 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6772 it to ...
6773 (linux_supports_hardware_single_step): ... New function.
6774 (linux_target_ops): Update.
6775 * lynx-low.c (lynx_target_ops): Set field
6776 supports_hardware_single_step to target_can_do_hardware_single_step.
6777 * nto-low.c (nto_target_ops): Likewise.
6778 * spu-low.c (spu_target_ops): Likewise.
6779 * win32-low.c (win32_target_ops): Likewise.
6780 * target.c (target_can_do_hardware_single_step): New function.
6781 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6782 Remove. <supports_hardware_single_step>: New field.
6783 (target_supports_conditional_breakpoints): Remove.
6784 (target_supports_hardware_single_step): New macro.
6785 (target_can_do_hardware_single_step): Declare.
6786 * server.c (handle_query): Use target_supports_hardware_single_step
6787 instead of target_supports_conditional_breakpoints.
6788
6789 2015-09-15 Yao Qi <yao.qi@linaro.org>
6790
6791 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6792 function.
6793 (struct linux_target_ops the_low_target): Install
6794 aarch64_linux_siginfo_fixup.
6795
6796 2015-09-11 Don Breazeal <donb@codesourcery.com>
6797 Luis Machado <lgustavo@codesourcery.com>
6798
6799 * linux-low.c (linux_mourn): Static declaration.
6800 (linux_arch_setup): Move in front of
6801 handle_extended_wait.
6802 (linux_arch_setup_thread): New function.
6803 (handle_extended_wait): Handle exec events. Call
6804 linux_arch_setup_thread. Make event_lwp argument a
6805 pointer-to-a-pointer.
6806 (check_zombie_leaders): Do not check stopped threads.
6807 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6808 (linux_low_filter_event): Add lwp and thread for exec'ing
6809 non-leader thread if leader thread has been deleted.
6810 Refactor code into linux_arch_setup_thread and call it.
6811 Pass child lwp pointer by reference to handle_extended_wait.
6812 (linux_wait_for_event_filtered): Update comment.
6813 (linux_wait_1): Prevent clobbering exec event status.
6814 (linux_supports_exec_events): New function.
6815 (linux_target_ops) <supports_exec_events>: Initialize new member.
6816 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6817 new member.
6818 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6819 * server.c (report_exec_events): New global variable.
6820 (handle_query): Handle qSupported query for exec-events feature.
6821 (captured_main): Initialize report_exec_events.
6822 * server.h (report_exec_events): Declare new global variable.
6823 * target.h (struct target_ops) <supports_exec_events>: New
6824 member.
6825 (target_supports_exec_events): New macro.
6826 * win32-low.c (win32_target_ops) <supports_exec_events>:
6827 Initialize new member.
6828
6829 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6830
6831 * linux-low.c (linux_low_enable_btrace): Remove.
6832 (linux_target_ops): Replace linux_low_enable_btrace with
6833 linux_enable_btrace.
6834
6835 2015-09-03 Yao Qi <yao.qi@linaro.org>
6836
6837 * linux-aarch64-low.c (aarch64_insert_point): Call
6838 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6839 returns true.
6840
6841 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6842
6843 * linux-low.c (check_stopped_by_breakpoint): Use
6844 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6845
6846 2015-08-27 Pedro Alves <palves@redhat.com>
6847
6848 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6849
6850 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6851
6852 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6853 the XNEW-family equivalent.
6854 (compile_bytecodes): Likewise.
6855 * dll.c (loaded_dll): Likewise.
6856 * event-loop.c (append_callback_event): Likewise.
6857 (create_file_handler): Likewise.
6858 (create_file_event): Likewise.
6859 * hostio.c (handle_open): Likewise.
6860 * inferiors.c (add_thread): Likewise.
6861 (add_process): Likewise.
6862 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6863 * linux-arm-low.c (arm_new_process): Likewise.
6864 (arm_new_thread): Likewise.
6865 * linux-low.c (add_to_pid_list): Likewise.
6866 (linux_add_process): Likewise.
6867 (handle_extended_wait): Likewise.
6868 (add_lwp): Likewise.
6869 (enqueue_one_deferred_signal): Likewise.
6870 (enqueue_pending_signal): Likewise.
6871 (linux_resume_one_lwp_throw): Likewise.
6872 (linux_resume_one_thread): Likewise.
6873 (linux_read_memory): Likewise.
6874 (linux_write_memory): Likewise.
6875 * linux-mips-low.c (mips_linux_new_process): Likewise.
6876 (mips_linux_new_thread): Likewise.
6877 (mips_add_watchpoint): Likewise.
6878 * linux-x86-low.c (initialize_low_arch): Likewise.
6879 * lynx-low.c (lynx_add_process): Likewise.
6880 * mem-break.c (set_raw_breakpoint_at): Likewise.
6881 (set_breakpoint): Likewise.
6882 (add_condition_to_breakpoint): Likewise.
6883 (add_commands_to_breakpoint): Likewise.
6884 (clone_agent_expr): Likewise.
6885 (clone_one_breakpoint): Likewise.
6886 * regcache.c (new_register_cache): Likewise.
6887 * remote-utils.c (look_up_one_symbol): Likewise.
6888 * server.c (queue_stop_reply): Likewise.
6889 (start_inferior): Likewise.
6890 (queue_stop_reply_callback): Likewise.
6891 (handle_target_event): Likewise.
6892 * spu-low.c (fetch_ppc_memory): Likewise.
6893 (store_ppc_memory): Likewise.
6894 * target.c (set_target_ops): Likewise.
6895 * thread-db.c (thread_db_load_search): Likewise.
6896 (try_thread_db_load_1): Likewise.
6897 * tracepoint.c (add_tracepoint): Likewise.
6898 (add_tracepoint_action): Likewise.
6899 (create_trace_state_variable): Likewise.
6900 (cmd_qtdpsrc): Likewise.
6901 (cmd_qtro): Likewise.
6902 (add_while_stepping_state): Likewise.
6903 * win32-low.c (child_add_thread): Likewise.
6904 (get_image_name): Likewise.
6905
6906 2015-08-25 Yao Qi <yao.qi@linaro.org>
6907
6908 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6909
6910 2015-08-25 Yao Qi <yao.qi@linaro.org>
6911
6912 * Makefile.in (aarch64-linux.o): New rule.
6913 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6914 srv_tgtobj.
6915 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6916 (aarch64_init_debug_reg_state): Make it extern.
6917 (aarch64_linux_prepare_to_resume): Remove.
6918
6919 2015-08-25 Yao Qi <yao.qi@linaro.org>
6920
6921 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6922 lwp_arch_private_info and ptid_of_lwp.
6923
6924 2015-08-25 Yao Qi <yao.qi@linaro.org>
6925
6926 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6927 Find proc_info by find_process_pid. All callers updated.
6928
6929 2015-08-25 Yao Qi <yao.qi@linaro.org>
6930
6931 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6932 Remove.
6933 (debug_reg_change_callback): Remove.
6934 (aarch64_notify_debug_reg_change): Remove.
6935
6936 2015-08-25 Yao Qi <yao.qi@linaro.org>
6937
6938 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6939 Call current_lwp_ptid.
6940
6941 2015-08-25 Yao Qi <yao.qi@linaro.org>
6942
6943 * linux-aarch64-low.c (debug_reg_change_callback): Use
6944 debug_printf.
6945
6946 2015-08-25 Yao Qi <yao.qi@linaro.org>
6947
6948 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6949
6950 2015-08-25 Yao Qi <yao.qi@linaro.org>
6951
6952 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6953
6954 2015-08-25 Yao Qi <yao.qi@linaro.org>
6955
6956 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6957 the code.
6958
6959 2015-08-25 Yao Qi <yao.qi@linaro.org>
6960
6961 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6962 Remove.
6963 (debug_reg_change_callback): Remove argument entry and add argument
6964 lwp. Remove local variable thread. Don't print thread id in the
6965 debugging output. Don't check whether pid of thread equals to pid.
6966 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6967 iterate_over_lwps instead find_inferior.
6968
6969 2015-08-24 Pedro Alves <palves@redhat.com>
6970
6971 * inferiors.c (get_first_process): New function.
6972 * inferiors.h (get_first_process): New declaration.
6973 * remote-utils.c (read_ptid): Default to the first process in the
6974 list, instead of to the current thread's process.
6975
6976 2015-08-24 Pedro Alves <palves@redhat.com>
6977
6978 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6979 * event-loop.c: Likewise.
6980 * remote-utils.c: Likewise.
6981 * tracepoint.c: Likewise.
6982
6983 2015-08-24 Pedro Alves <palves@redhat.com>
6984
6985 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6986 ptid_get_lwp.
6987
6988 2015-08-21 Pedro Alves <palves@redhat.com>
6989
6990 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6991 instead of literal 1.
6992
6993 2015-08-21 Pedro Alves <palves@redhat.com>
6994
6995 * tdesc.c (default_description): Explicitly zero-initialize.
6996
6997 2015-08-21 Pedro Alves <palves@redhat.com>
6998
6999 PR gdb/18749
7000 * inferiors.c (remove_thread): Discard any pending stop reply for
7001 this thread.
7002 * server.c (remove_all_on_match_pid): Rename to ...
7003 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7004 instead of a pid.
7005 (discard_queued_stop_replies): Change parameter to a ptid. Now
7006 extern.
7007 (handle_v_kill, kill_inferior_callback, captured_main)
7008 (process_serial_event): Adjust.
7009 * server.h (discard_queued_stop_replies): Declare.
7010
7011 2015-08-21 Pedro Alves <palves@redhat.com>
7012
7013 * linux-low.c (wait_for_sigstop): Always switch to no thread
7014 selected if the previously current thread dies.
7015 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7016 process instead of the current thread's.
7017 * remote-utils.c (input_interrupt): Don't check if there's no
7018 current thread.
7019 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7020 current thread to the general thread fails, error out.
7021 (handle_qxfer_auxv, handle_qxfer_libraries)
7022 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7023 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7024 (handle_query): Check if there's a thread selected instead of
7025 checking whether there's any thread in the thread list.
7026 (handle_qxfer_threads, handle_qxfer_btrace)
7027 (handle_qxfer_btrace_conf): Don't error out early if there's no
7028 thread in the thread list.
7029 (handle_v_cont, myresume): Don't set the current thread to the
7030 continue thread.
7031 (process_serial_event) <Hg handling>: Also set thread_id if the
7032 previous general thread is still alive.
7033 (process_serial_event) <g/G handling>: If setting the current
7034 thread to the general thread fails, error out.
7035 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7036 thread's lwp instead of the current thread's.
7037 * target.c (set_desired_thread): If the desired thread was not
7038 found, leave the current thread pointing to NULL. Return an int
7039 (boolean) indicating success.
7040 * target.h (set_desired_thread): Change return type to int.
7041
7042 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7043
7044 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7045 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7046 #includes.
7047 (ps_get_thread_area): New function.
7048
7049 2015-08-19 Gary Benson <gbenson@redhat.com>
7050
7051 * hostio.c (handle_pread): Do not attempt to read more data
7052 than hostio_reply_with_data can fit in a packet.
7053
7054 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7055
7056 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7057
7058 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7059
7060 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7061
7062 2015-08-06 Pedro Alves <palves@redhat.com>
7063
7064 * tracepoint.c (expr_eval_result): Now an int.
7065
7066 2015-08-06 Pedro Alves <palves@redhat.com>
7067
7068 * gdbthread.h (struct regcache): Forward declare.
7069 (struct thread_info) <regcache_data>: Now a struct regcache
7070 pointer.
7071 * inferiors.c (inferior_regcache_data)
7072 (set_inferior_regcache_data): Now work with struct regcache
7073 pointers.
7074 * inferiors.h (struct regcache): Forward declare.
7075 (inferior_regcache_data, set_inferior_regcache_data): Now work
7076 with struct regcache pointers.
7077 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7078 (free_register_cache_thread): Remove struct regcache pointer
7079 casts.
7080
7081 2015-08-06 Pedro Alves <palves@redhat.com>
7082
7083 * server.c (captured_main): On error, print the exception message
7084 to stderr, and if run_once is set, throw a quit.
7085
7086 2015-08-06 Pedro Alves <palves@redhat.com>
7087
7088 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7089 the current thread.
7090
7091 2015-08-06 Pedro Alves <palves@redhat.com>
7092
7093 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7094 reading beyond the passed in buffer length.
7095
7096 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7097
7098 * tracepoint.c (symbol_list) <required>: Remove.
7099
7100 2015-08-06 Pedro Alves <palves@redhat.com>
7101
7102 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7103 count if stopping and suspending threads.
7104 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7105 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7106 (linux_detach): Complete an ongoing step-over.
7107 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7108 throughout.
7109 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7110 (linux_wait_1): If passing a signal to the inferior after
7111 finishing a step-over, unsuspend and re-resume all lwps. If we
7112 see a single-step event but the thread should be continuing, don't
7113 pass the trap to gdb.
7114 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7115 internal_error instead of gdb_assert.
7116 (enqueue_pending_signal): New function.
7117 (check_ptrace_stopped_lwp_gone): Add debug output.
7118 (start_step_over): Use internal_error instead of gdb_assert.
7119 (complete_ongoing_step_over): New function.
7120 (linux_resume_one_thread): Don't resume a suspended thread.
7121 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7122 it stepping.
7123
7124 2015-08-06 Pedro Alves <palves@redhat.com>
7125
7126 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7127 (linux_thread_alive): Use lwp_is_marked_dead.
7128 (extended_event_reported): Delete.
7129 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7130 instead of extended_event_reported.
7131 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7132 as well.
7133 (lwp_is_marked_dead): New function.
7134 (lwp_running): Use lwp_is_marked_dead.
7135 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7136 comment.
7137
7138 2015-08-06 Pedro Alves <palves@redhat.com>
7139
7140 * linux-low.c (linux_wait_1): Move fork event output out of the
7141 !report_to_gdb check. Pass event_child->waitstatus to
7142 target_waitstatus_to_string instead of ourstatus.
7143
7144 2015-08-04 Yao Qi <yao.qi@linaro.org>
7145
7146 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7147 if current_thread is 32 bit.
7148
7149 2015-08-04 Yao Qi <yao.qi@linaro.org>
7150
7151 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7152 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7153 * server.c (extended_protocol): Remove "static".
7154 * server.h (extended_protocol): Declare it.
7155
7156 2015-08-04 Yao Qi <yao.qi@linaro.org>
7157
7158 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7159 both aarch64 and aarch32.
7160 (aarch64_set_pc): Likewise.
7161
7162 2015-08-04 Yao Qi <yao.qi@linaro.org>
7163
7164 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7165 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7166 arm-with-neon.xml to srv_xmlfiles.
7167 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7168 (is_64bit_tdesc): New function.
7169 (aarch64_linux_read_description): New function.
7170 (aarch64_arch_setup): Call aarch64_linux_read_description.
7171 (regs_info): Rename to regs_info_aarch64.
7172 (aarch64_regs_info): Return right regs_info.
7173 (initialize_low_arch): Call initialize_low_arch_aarch32.
7174
7175 2015-08-04 Yao Qi <yao.qi@linaro.org>
7176
7177 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7178 * linux-aarch32-low.c: New file.
7179 * linux-aarch32-low.h: New file.
7180 * linux-arm-low.c (arm_fill_gregset): Move it to
7181 linux-aarch32-low.c.
7182 (arm_store_gregset): Likewise.
7183 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7184 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7185 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7186 (regs_info): Rename to regs_info_arm.
7187 (arm_regs_info): Return regs_info_aarch32 if
7188 have_ptrace_getregset is 1 and target description is
7189 arm_with_neon or arm_with_vfpv3.
7190 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7191 Call initialize_low_arch_aarch32 instead.
7192
7193 2015-08-04 Yao Qi <yao.qi@linaro.org>
7194
7195 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7196 * linux-low.c: ... here.
7197 * linux-low.h (have_ptrace_getregset): Declare it.
7198
7199 2015-08-04 Pedro Alves <palves@redhat.com>
7200
7201 * thread-db.c (struct thread_db): Use new typedefs.
7202 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7203 CHK calls.
7204 (disable_thread_event_reporting): Cast result of dlsym to
7205 destination function pointer type.
7206 (thread_db_mourn): Use td_ta_delete_ftype.
7207
7208 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7209
7210 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7211 arch variant.
7212 (CDX_BREAKPOINT): Define for R2.
7213 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7214 (the_low_target): Add comments.
7215
7216 2015-07-30 Yao Qi <yao.qi@linaro.org>
7217
7218 * linux-arm-low.c (arm_hwcap): Remove it.
7219 (arm_read_description): New local variable arm_hwcap. Don't
7220 set arm_hwcap to zero.
7221
7222 2015-07-30 Yao Qi <yao.qi@linaro.org>
7223
7224 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7225 Use regcache->tdesc instead.
7226 (arm_store_wmmxregset): Likewise.
7227 (arm_fill_vfpregset): Likewise.
7228 (arm_store_vfpregset): Likewise.
7229
7230 2015-07-30 Yao Qi <yao.qi@linaro.org>
7231
7232 * linux-arm-low.c: Include arch/arm.h.
7233 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7234 (arm_store_gregset): Likewise.
7235
7236 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7237
7238 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7239 ptrace's 4th parameter.
7240
7241 2015-07-27 Yao Qi <yao.qi@linaro.org>
7242
7243 * configure.srv (case aarch64*-*-linux*): Don't set
7244 srv_linux_usrregs.
7245
7246 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7247
7248 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7249 sys/ptrace.h.
7250 * linux-arm-low.c: Likewise.
7251 * linux-cris-low.c: Likewise.
7252 * linux-crisv32-low.c: Likewise.
7253 * linux-low.c: Likewise.
7254 * linux-m68k-low.c: Likewise.
7255 * linux-mips-low.c: Likewise.
7256 * linux-nios2-low.c: Likewise.
7257 * linux-s390-low.c: Likewise.
7258 * linux-sparc-low.c: Likewise.
7259 * linux-tic6x-low.c: Likewise.
7260 * linux-tile-low.c: Likewise.
7261 * linux-x86-low.c: Likewise.
7262
7263 2015-07-24 Pedro Alves <palves@redhat.com>
7264
7265 * config.in: Regenerate.
7266 * configure: Regenerate.
7267
7268 2015-07-24 Pedro Alves <palves@redhat.com>
7269
7270 * acinclude.m4: Include ../ptrace.m4.
7271 * configure.ac: Call GDB_AC_PTRACE.
7272 * config.in, configure: Regenerate.
7273
7274 2015-07-24 Yao Qi <yao.qi@linaro.org>
7275
7276 * linux-low.c (linux_create_inferior): Remove setting to
7277 proc->priv->new_inferior.
7278 (linux_attach): Likewise.
7279 (linux_low_filter_event): Likewise.
7280 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7281
7282 2015-07-24 Yao Qi <yao.qi@linaro.org>
7283
7284 * linux-low.c (linux_arch_setup): New function.
7285 (linux_low_filter_event): If proc->tdesc is NULL and
7286 proc->attached is true, call the_low_target.arch_setup.
7287 Otherwise, keep status pending, and return.
7288 (linux_resume_one_lwp_throw): Don't call get_pc if
7289 thread->while_stepping isn't NULL. Don't call
7290 get_thread_regcache if proc->tdesc is NULL.
7291 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7292 (linux_target_ops): Install arch_setup.
7293 * server.c (start_inferior): Call the_target->arch_setup.
7294 * target.h (struct target_ops) <arch_setup>: New field.
7295 (target_arch_setup): New marco.
7296 * lynx-low.c (lynx_target_ops): Update.
7297 * nto-low.c (nto_target_ops): Update.
7298 * spu-low.c (spu_target_ops): Update.
7299 * win32-low.c (win32_target_ops): Update.
7300
7301 2015-07-24 Yao Qi <yao.qi@linaro.org>
7302
7303 * linux-low.c (linux_add_process): Don't set
7304 proc->priv->new_inferior.
7305 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7306 (linux_attach): Likewise.
7307
7308 2015-07-24 Yao Qi <yao.qi@linaro.org>
7309
7310 * server.c (start_inferior): Code refactor.
7311
7312 2015-07-24 Yao Qi <yao.qi@linaro.org>
7313
7314 * server.c (process_serial_event): Set general_thread.
7315
7316 2015-07-21 Yao Qi <yao.qi@linaro.org>
7317
7318 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7319 aarch64_linux_get_debug_reg_capacity.
7320
7321 2015-07-17 Yao Qi <yao.qi@linaro.org>
7322
7323 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7324 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7325 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7326 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7327 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7328 (AARCH64_HWP_ALIGNMENT): Likewise.
7329 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7330 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7331 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7332 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7333 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7334 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7335 (struct aarch64_debug_reg_state): Likewise.
7336 (struct arch_lwp_info): Likewise.
7337 (aarch64_align_watchpoint): Likewise.
7338 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7339 (aarch64_watchpoint_length): Likewise.
7340 (aarch64_point_encode_ctrl_reg): Likewise
7341 (aarch64_point_is_aligned): Likewise.
7342 (aarch64_align_watchpoint): Likewise.
7343 (aarch64_linux_set_debug_regs):
7344 (aarch64_dr_state_insert_one_point): Likewise.
7345 (aarch64_dr_state_remove_one_point): Likewise.
7346 (aarch64_handle_breakpoint): Likewise.
7347 (aarch64_handle_aligned_watchpoint): Likewise.
7348 (aarch64_handle_unaligned_watchpoint): Likewise.
7349 (aarch64_handle_watchpoint): Likewise.
7350
7351 2015-07-17 Yao Qi <yao.qi@linaro.org>
7352
7353 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7354 and don't aarch64_get_debug_reg_state. All callers update.
7355 (aarch64_handle_aligned_watchpoint): Likewise.
7356 (aarch64_handle_unaligned_watchpoint): Likewise.
7357 (aarch64_handle_watchpoint): Likewise.
7358 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7359 (aarch64_remove_point): Likewise.
7360
7361 2015-07-17 Yao Qi <yao.qi@linaro.org>
7362
7363 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7364 debug_printf.
7365 (aarch64_handle_unaligned_watchpoint): Likewise.
7366
7367 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7368
7369 Revert the previous 3 commits:
7370 Move gdb_regex* to common/
7371 Move linux_find_memory_regions_full & co.
7372 gdbserver build-id attribute generator
7373
7374 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7375 Jan Kratochvil <jan.kratochvil@redhat.com>
7376
7377 gdbserver build-id attribute generator.
7378 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7379 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7380 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7381 (find_phdr): New.
7382 (get_dynamic): Use find_pdhr to traverse program headers.
7383 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7384 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7385 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7386 (get_hex_build_id): New.
7387 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7388 to reply XML document.
7389
7390 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7391 Jan Kratochvil <jan.kratochvil@redhat.com>
7392
7393 * target.c: Include target/target-utils.h and fcntl.h.
7394 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7395 (target_fileio_read_stralloc): New functions.
7396
7397 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7398
7399 * Makefile.in (OBS): Add gdb_regex.o.
7400 (gdb_regex.o): New.
7401 * config.in: Rebuilt.
7402 * configure: Rebuilt.
7403
7404 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7405 Jan Kratochvil <jan.kratochvil@redhat.com>
7406
7407 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7408 * Makefile.in (OBS): Add target-utils.o.
7409 (linux-maps.o, target-utils.o): New.
7410 * configure.srv (srv_linux_obj): Add linux-maps.o.
7411
7412 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7413
7414 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7415 function, return 1.
7416 (the_low_target): Install it.
7417
7418 2015-07-14 Pedro Alves <palves@redhat.com>
7419
7420 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7421 Instead, ignore ECHILD, and throw an error for other errnos.
7422
7423 2015-07-10 Pedro Alves <palves@redhat.com>
7424
7425 * event-loop.c (struct callback_event) <data>: Change type to
7426 gdb_client_data instance instead of gdb_client_data pointer.
7427 (append_callback_event): Adjust.
7428
7429 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7430
7431 * linux-aarch64-low.c: Add comments for each linux_target_ops
7432 method. Remove comments already covered in target_ops and
7433 linux_target_ops definitions.
7434 (the_low_target): Add comments for each unimplemented method.
7435
7436 2015-07-09 Yao Qi <yao.qi@linaro.org>
7437
7438 * linux-aarch64-low.c (aarch64_regmap): Remove.
7439 (aarch64_usrregs_info): Remove.
7440 (regs_info): Set field usrregs to NULL.
7441
7442 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7443
7444 * linux-low.c: Include "rsp-low.h"
7445 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7446 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7447 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7448 (handle_btrace_enable_pt): New.
7449 (handle_btrace_general_set): Support "pt".
7450 (handle_btrace_conf_general_set): Support "pt:size".
7451
7452 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7453
7454 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7455 Z_PACKET_SW_BP.
7456
7457 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7458
7459 * linux-aarch64-low.c: Remove comment about endianness.
7460 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7461 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7462 memcmp.
7463
7464 2015-06-24 Gary Benson <gbenson@redhat.com>
7465
7466 * linux-i386-ipa.c (stdint.h): Do not include.
7467 * lynx-i386-low.c (stdint.h): Likewise.
7468 * lynx-ppc-low.c (stdint.h): Likewise.
7469 * mem-break.c (stdint.h): Likewise.
7470 * thread-db.c (stdint.h): Likewise.
7471 * tracepoint.c (stdint.h): Likewise.
7472 * win32-low.c (stdint.h): Likewise.
7473
7474 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7475
7476 * server.c (write_qxfer_response): Update call to
7477 remote_escape_output.
7478
7479 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7480 Jan Kratochvil <jan.kratochvil@redhat.com>
7481
7482 Merge multiple hex conversions.
7483 * gdbreplay.c (tohex): Rename to 'fromhex'.
7484 (logchar): Use fromhex.
7485
7486 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7487
7488 * server.c (handle_qxfer_libraries): Set `version' attribute for
7489 <library-list>.
7490
7491 2015-06-10 Gary Benson <gbenson@redhat.com>
7492
7493 * target.h (struct target_ops) <multifs_open>: New field.
7494 <multifs_unlink>: Likewise.
7495 <multifs_readlink>: Likewise.
7496 * linux-low.c (nat/linux-namespaces.h): New include.
7497 (linux_target_ops): Initialize the_target->multifs_open,
7498 the_target->multifs_unlink and the_target->multifs_readlink.
7499 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7500 * hostio.c (hostio_fs_pid): New static variable.
7501 (hostio_handle_new_gdb_connection): New function.
7502 (handle_setfs): Likewise.
7503 (handle_open): Use the_target->multifs_open as appropriate.
7504 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7505 (handle_readlink): Use the_target->multifs_readlink as
7506 appropriate.
7507 (handle_vFile): Handle vFile:setfs packets.
7508 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7509 after target_handle_new_gdb_connection.
7510
7511 2015-06-10 Gary Benson <gbenson@redhat.com>
7512
7513 * configure.ac (AC_CHECK_FUNCS): Add setns.
7514 * config.in: Regenerate.
7515 * configure: Likewise.
7516 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7517 (linux-namespaces.o): New rule.
7518 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7519
7520 2015-06-09 Gary Benson <gbenson@redhat.com>
7521
7522 * hostio.c (handle_open): Process mode argument with
7523 fileio_to_host_mode.
7524
7525 2015-06-01 Yao Qi <yao.qi@linaro.org>
7526
7527 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7528 * linux-x86-low.c: Likewise.
7529
7530 2015-05-28 Don Breazeal <donb@codesourcery.com>
7531
7532 * linux-low.c (handle_extended_wait): Initialize
7533 thread_info.last_resume_kind for new fork children.
7534
7535 2015-05-15 Pedro Alves <palves@redhat.com>
7536
7537 * target.h (target_handle_new_gdb_connection): Rewrite using if
7538 wrapped in do/while.
7539
7540 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7541
7542 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7543 * configure, config.in: Regenerate.
7544 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7545 Declare typedef.
7546
7547 2015-05-12 Don Breazeal <donb@codesourcery.com>
7548
7549 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7550 PTRACE_EVENT_VFORK_DONE.
7551 (linux_low_ptrace_options, extended_event_reported): Add vfork
7552 events.
7553 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7554 and "vforkdone" for RSP 'T' Stop Reply Packet.
7555 * server.h (report_vfork_events): Declare
7556 global variable.
7557
7558 2015-05-12 Don Breazeal <donb@codesourcery.com>
7559
7560 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7561 (the_low_target) <new_fork>: Initialize new member.
7562 * linux-arm-low.c (arm_new_fork): New function.
7563 (the_low_target) <new_fork>: Initialize new member.
7564 * linux-low.c (handle_extended_wait): Call new target function
7565 new_fork.
7566 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7567 * linux-mips-low.c (mips_add_watchpoint): New function
7568 extracted from mips_insert_point.
7569 (the_low_target) <new_fork>: Initialize new member.
7570 (mips_linux_new_fork): New function.
7571 (mips_insert_point): Call mips_add_watchpoint.
7572 * linux-x86-low.c (x86_linux_new_fork): New function.
7573 (the_low_target) <new_fork>: Initialize new member.
7574
7575 2015-05-12 Don Breazeal <donb@codesourcery.com>
7576
7577 * linux-low.c (handle_extended_wait): Implement return value,
7578 rename argument 'event_child' to 'event_lwp', handle
7579 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7580 (linux_low_ptrace_options): New function.
7581 (linux_low_filter_event): Call linux_low_ptrace_options,
7582 use different argument fo linux_enable_event_reporting,
7583 use return value from handle_extended_wait.
7584 (extended_event_reported): New function.
7585 (linux_wait_1): Call extended_event_reported and set
7586 status to report fork events.
7587 (linux_write_memory): Add pid to debug message.
7588 (reset_lwp_ptrace_options_callback): New function.
7589 (linux_handle_new_gdb_connection): New function.
7590 (linux_target_ops): Initialize new structure member.
7591 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7592 * lynx-low.c: Initialize new structure member.
7593 * remote-utils.c (prepare_resume_reply): Implement stop reason
7594 "fork" for "T" stop message.
7595 * server.c (handle_query): Call handle_new_gdb_connection.
7596 * server.h (report_fork_events): Declare global flag.
7597 * target.h (struct target_ops) <handle_new_gdb_connection>:
7598 New member.
7599 (target_handle_new_gdb_connection): New macro.
7600 * win32-low.c: Initialize new structure member.
7601
7602 2015-05-12 Don Breazeal <donb@codesourcery.com>
7603
7604 * mem-break.c (APPEND_TO_LIST): Define macro.
7605 (clone_agent_expr): New function.
7606 (clone_one_breakpoint): New function.
7607 (clone_all_breakpoints): New function.
7608 * mem-break.h: Declare new functions.
7609
7610 2015-05-12 Don Breazeal <donb@codesourcery.com>
7611
7612 * linux-low.c (linux_supports_fork_events): New function.
7613 (linux_supports_vfork_events): New function.
7614 (linux_target_ops): Initialize new structure members.
7615 (initialize_low): Call linux_check_ptrace_features.
7616 * lynx-low.c (lynx_target_ops): Initialize new structure
7617 members.
7618 * server.c (report_fork_events, report_vfork_events):
7619 New global flags.
7620 (handle_query): Add new features to qSupported packet and
7621 response.
7622 (captured_main): Initialize new global variables.
7623 * target.h (struct target_ops) <supports_fork_events>:
7624 New member.
7625 <supports_vfork_events>: New member.
7626 (target_supports_fork_events): New macro.
7627 (target_supports_vfork_events): New macro.
7628 * win32-low.c (win32_target_ops): Initialize new structure
7629 members.
7630
7631 2015-05-12 Gary Benson <gbenson@redhat.com>
7632
7633 * server.c (handle_qxfer_exec_file): Use current process
7634 if annex is empty.
7635
7636 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7637
7638 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7639 Remove HAVE_PTRACE_GETREGS conditionals.
7640 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7641 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7642
7643 2015-05-08 Yao Qi <yao.qi@linaro.org>
7644
7645 * linux-low.c (linux_supports_conditional_breakpoints): New
7646 function.
7647 (linux_target_ops): Install new target method.
7648 * lynx-low.c (lynx_target_ops): Install NULL hook for
7649 supports_conditional_breakpoints.
7650 * nto-low.c (nto_target_ops): Likewise.
7651 * spu-low.c (spu_target_ops): Likewise.
7652 * win32-low.c (win32_target_ops): Likewise.
7653 * server.c (handle_query): Check
7654 target_supports_conditional_breakpoints.
7655 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7656 New field.
7657 (target_supports_conditional_breakpoints): New macro.
7658
7659 2015-05-06 Pedro Alves <palves@redhat.com>
7660
7661 PR server/18081
7662 * server.c (start_inferior): If the process exits, mourn it.
7663
7664 2015-04-21 Gary Benson <gbenson@redhat.com>
7665
7666 * hostio.c (fileio_open_flags_to_host): Factored out to
7667 fileio_to_host_openflags in common/fileio.c. Single use
7668 updated.
7669
7670 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7671
7672 * linux-xtensa-low.c (xtensa_fill_gregset)
7673 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7674 XCHAL_HAVE_LOOP.
7675
7676 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7677
7678 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7679 (regs_info): Replace usrregs pointer with NULL.
7680
7681 2015-04-17 Gary Benson <gbenson@redhat.com>
7682
7683 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7684 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7685 * server.c (handle_qxfer_exec_file): New function.
7686 (qxfer_packets): Add exec-file entry.
7687 (handle_query): Report qXfer:exec-file:read as supported packet.
7688
7689 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7690
7691 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7692
7693 2015-04-09 Gary Benson <gbenson@redhat.com>
7694
7695 * hostio-errno.c (errno_to_fileio_error): Remove function.
7696 Update caller to use remote_fileio_to_fio_error.
7697
7698 2015-04-09 Yao Qi <yao.qi@linaro.org>
7699
7700 * linux-low.c (linux_insert_point): Call
7701 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7702 (linux_remove_point): Call remove_memory_breakpoint if type is
7703 raw_bkpt_type_sw.
7704 * linux-x86-low.c (x86_insert_point): Don't call
7705 insert_memory_breakpoint.
7706 (x86_remove_point): Don't call remove_memory_breakpoint.
7707
7708 2015-04-01 Pedro Alves <palves@redhat.com>
7709 Cleber Rosa <crosa@redhat.com>
7710
7711 * server.c (gdbserver_usage): Reorganize and extend the usage
7712 message.
7713
7714 2015-03-24 Pedro Alves <palves@redhat.com>
7715
7716 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7717 output. Also dump TRAP_TRACE.
7718 (linux_low_filter_event): In debug output, distinguish a
7719 resume_stop SIGSTOP from a delayed SIGSTOP.
7720
7721 2015-03-24 Gary Benson <gbenson@redhat.com>
7722
7723 * linux-x86-low.c (x86_linux_new_thread): Moved to
7724 nat/x86-linux.c.
7725 (x86_linux_prepare_to_resume): Likewise.
7726
7727 2015-03-24 Gary Benson <gbenson@redhat.com>
7728
7729 * Makefile.in (x86-linux-dregs.o): New rule.
7730 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7731 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7732 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7733 (x86_linux_dr_get): Likewise.
7734 (x86_linux_dr_set): Likewise.
7735 (update_debug_registers_callback): Likewise.
7736 (x86_linux_dr_set_addr): Likewise.
7737 (x86_linux_dr_get_addr): Likewise.
7738 (x86_linux_dr_set_control): Likewise.
7739 (x86_linux_dr_get_control): Likewise.
7740 (x86_linux_dr_get_status): Likewise.
7741 (x86_linux_update_debug_registers): Likewise.
7742
7743 2015-03-24 Gary Benson <gbenson@redhat.com>
7744
7745 * linux-x86-low.c (x86_linux_update_debug_registers):
7746 New function, factored out from...
7747 (x86_linux_prepare_to_resume): ...this.
7748
7749 2015-03-24 Gary Benson <gbenson@redhat.com>
7750
7751 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7752 (x86_linux_dr_set): Likewise.
7753 (update_debug_registers_callback): Likewise.
7754 (x86_linux_dr_set_addr): Likewise.
7755 (x86_linux_dr_get_addr): Likewise.
7756 (x86_linux_dr_set_control): Likewise.
7757 (x86_linux_dr_get_control): Likewise.
7758 (x86_linux_dr_get_status): Likewise.
7759 (x86_linux_prepare_to_resume): Likewise.
7760
7761 2015-03-24 Gary Benson <gbenson@redhat.com>
7762
7763 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7764 Use perror_with_name. Pass string through gettext.
7765 (x86_linux_dr_set): Likewise.
7766
7767 2015-03-24 Gary Benson <gbenson@redhat.com>
7768
7769 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7770 (x86_linux_dr_set_addr): ...this.
7771 (x86_dr_low_get_addr): Rename to...
7772 (x86_linux_dr_get_addr): ...this.
7773 (x86_dr_low_set_control): Rename to...
7774 (x86_linux_dr_set_control): ...this.
7775 (x86_dr_low_get_control): Rename to...
7776 (x86_linux_dr_get_control): ...this.
7777 (x86_dr_low_get_status): Rename to...
7778 (x86_linux_dr_get_status): ...this.
7779 (x86_dr_low): Update with new function names.
7780
7781 2015-03-24 Gary Benson <gbenson@redhat.com>
7782
7783 * Makefile.in (x86-linux.o): New rule.
7784 * configure.srv: Add x86-linux.o to relevant targets.
7785 * linux-low.c (lwp_set_arch_private_info): New function.
7786 (lwp_arch_private_info): Likewise.
7787 * linux-x86-low.c: Include nat/x86-linux.h.
7788 (arch_lwp_info): Removed structure.
7789 (update_debug_registers_callback):
7790 Use lwp_set_debug_registers_changed.
7791 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7792 and lwp_set_debug_registers_changed.
7793 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7794
7795 2015-03-24 Gary Benson <gbenson@redhat.com>
7796
7797 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7798 * linux-arm-low.c (arm_new_thread): Likewise.
7799 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7800 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7801 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7802 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7803
7804 2015-03-24 Gary Benson <gbenson@redhat.com>
7805
7806 * linux-low.c (ptid_of_lwp): New function.
7807 (lwp_is_stopped): Likewise.
7808 (lwp_stop_reason): Likewise.
7809 * linux-x86-low.c (update_debug_registers_callback):
7810 Use lwp_is_stopped.
7811 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7812 lwp_stop_reason.
7813
7814 2015-03-24 Gary Benson <gbenson@redhat.com>
7815
7816 * linux-low.h (linux_stop_lwp): Remove declaration.
7817
7818 2015-03-24 Gary Benson <gbenson@redhat.com>
7819
7820 * linux-low.h: Include nat/linux-nat.h.
7821 * linux-low.c (iterate_over_lwps_args): New structure.
7822 (iterate_over_lwps_filter): New function.
7823 (iterate_over_lwps): Likewise.
7824 * linux-x86-low.c (update_debug_registers_callback):
7825 Update signature to what iterate_over_lwps expects.
7826 Remove PID check that iterate_over_lwps now performs.
7827 (x86_dr_low_set_addr): Use iterate_over_lwps.
7828 (x86_dr_low_set_control): Likewise.
7829
7830 2015-03-24 Gary Benson <gbenson@redhat.com>
7831
7832 * linux-x86-low.c (x86_debug_reg_state): New function.
7833 (x86_linux_prepare_to_resume): Use the above.
7834
7835 2015-03-24 Gary Benson <gbenson@redhat.com>
7836
7837 * linux-low.c (current_lwp_ptid): New function.
7838 * linux-x86-low.c: Include nat/linux-nat.h.
7839 (x86_dr_low_get_addr): Use current_lwp_ptid.
7840 (x86_dr_low_get_control): Likewise.
7841 (x86_dr_low_get_status): Likewise.
7842
7843 2015-03-20 Pedro Alves <palves@redhat.com>
7844
7845 * tracepoint.c (cmd_qtstatus): Make "str" const.
7846
7847 2015-03-20 Pedro Alves <palves@redhat.com>
7848
7849 * server.c (handle_general_set): Make "req_str" const.
7850
7851 2015-03-19 Pedro Alves <palves@redhat.com>
7852
7853 * linux-low.c (linux_resume_one_lwp): Rename to ...
7854 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7855 instead call perror_with_name.
7856 (check_ptrace_stopped_lwp_gone): New function.
7857 (linux_resume_one_lwp): Reimplement as wrapper around
7858 linux_resume_one_lwp_throw that swallows errors if the LWP is
7859 gone.
7860
7861 2015-03-19 Pedro Alves <palves@redhat.com>
7862
7863 * linux-low.c (count_events_callback, select_event_lwp_callback):
7864 No longer check whether the thread has resume_stop as last resume
7865 kind.
7866
7867 2015-03-19 Pedro Alves <palves@redhat.com>
7868
7869 * linux-low.c (count_events_callback, select_event_lwp_callback):
7870 Use the lwp's status_pending_p field, not the thread's.
7871
7872 2015-03-19 Pedro Alves <palves@redhat.com>
7873
7874 * linux-low.c (select_event_lwp_callback): Update comments to
7875 no longer mention SIGTRAP.
7876
7877 2015-03-18 Gary Benson <gbenson@redhat.com>
7878
7879 * server.c (handle_query): Do not report vFile:fstat as supported.
7880
7881 2015-03-11 Gary Benson <gbenson@redhat.com>
7882
7883 * hostio.c (sys/types.h): New include.
7884 (sys/stat.h): Likewise.
7885 (common-remote-fileio.h): Likewise.
7886 (handle_fstat): New function.
7887 (handle_vFile): Handle vFile:fstat packets.
7888
7889 2015-03-11 Gary Benson <gbenson@redhat.com>
7890
7891 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7892 struct stat.st_blocks and struct stat.st_blksize.
7893 * configure: Regenerate.
7894 * config.in: Likewise.
7895 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7896 (OBS): Add common-remote-fileio.o.
7897 (common-remote-fileio.o): New rule.
7898
7899 2015-03-09 Pedro Alves <palves@redhat.com>
7900
7901 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7902 'struct sockaddr' pointer in 'accept' call.
7903
7904 2015-03-09 Pedro Alves <palves@redhat.com>
7905
7906 Revert:
7907 2015-03-07 Pedro Alves <palves@redhat.com>
7908 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7909 or <winsock2.h> here. Instead include "gdb_socket.h".
7910 (remote_open): Use union gdb_sockaddr_u.
7911 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7912 or <winsock2.h> here. Instead include "gdb_socket.h".
7913 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7914 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7915 or <sys/un.h>.
7916 (init_named_socket, gdb_agent_helper_thread): Use union
7917 gdb_sockaddr_u.
7918
7919 2015-03-07 Pedro Alves <palves@redhat.com>
7920
7921 * configure.ac (build_warnings): Move
7922 -Wdeclaration-after-statement to the C-specific set.
7923 * configure: Regenerate.
7924
7925 2015-03-07 Pedro Alves <palves@redhat.com>
7926
7927 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7928 or <winsock2.h> here. Instead include "gdb_socket.h".
7929 (remote_open): Use union gdb_sockaddr_u.
7930 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7931 or <winsock2.h> here. Instead include "gdb_socket.h".
7932 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7933 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7934 or <sys/un.h>.
7935 (init_named_socket, gdb_agent_helper_thread): Use union
7936 gdb_sockaddr_u.
7937
7938 2015-03-07 Pedro Alves <palves@redhat.com>
7939
7940 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7941 instead.
7942
7943 2015-03-06 Yao Qi <yao.qi@linaro.org>
7944
7945 * linux-aarch64-low.c (aarch64_insert_point): Use
7946 show_debug_regs as a boolean.
7947 (aarch64_remove_point): Likewise.
7948
7949 2015-03-05 Pedro Alves <palves@redhat.com>
7950
7951 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7952 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7953 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7954 * nto-low.c (nto_target_ops): Likewise.
7955 * spu-low.c (spu_target_ops): Likewise.
7956 * win32-low.c (win32_target_ops): Likewise.
7957
7958 2015-03-04 Pedro Alves <palves@redhat.com>
7959
7960 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7961 Decide whether a breakpoint triggered based on the SIGTRAP's
7962 siginfo.si_code.
7963 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7964 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7965 (linux_low_filter_event): Check for breakpoints before checking
7966 watchpoints.
7967 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7968 siginfo.si_code.
7969 (linux_stopped_by_sw_breakpoint)
7970 (linux_supports_stopped_by_sw_breakpoint)
7971 (linux_stopped_by_hw_breakpoint)
7972 (linux_supports_stopped_by_hw_breakpoint): New functions.
7973 (linux_target_ops): Install new target methods.
7974
7975 2015-03-04 Pedro Alves <palves@redhat.com>
7976
7977 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7978 * server.c (swbreak_feature, hwbreak_feature): New globals.
7979 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7980 (captured_main): Clear swbreak_feature and hwbreak_feature.
7981 * server.h (swbreak_feature, hwbreak_feature): Declare.
7982 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7983 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7984 supports_stopped_by_hw_breakpoint>: New fields.
7985 (target_supports_stopped_by_sw_breakpoint)
7986 (target_stopped_by_sw_breakpoint)
7987 (target_supports_stopped_by_hw_breakpoint)
7988 (target_stopped_by_hw_breakpoint): Declare.
7989
7990 2015-03-04 Pedro Alves <palves@redhat.com>
7991
7992 enum lwp_stop_reason -> enum target_stop_reason
7993 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7994 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7995 (linux_wait_1, stuck_in_jump_pad_callback)
7996 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7997 (linux_stopped_by_watchpoint):
7998 * linux-low.h (enum lwp_stop_reason): Delete.
7999 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8000 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8001
8002 2015-03-04 Yao Qi <yao.qi@linaro.org>
8003
8004 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8005
8006 2015-03-03 Gary Benson <gbenson@redhat.com>
8007
8008 * hostio.c (handle_vFile): Fix prefix lengths.
8009
8010 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8011
8012 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8013 ptr_bits.
8014
8015 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8016
8017 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8018 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8019 (clean): Add "rm -f" for above C files.
8020 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8021 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8022 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8023 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8024 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8025 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8026 (init_registers_s390x_vx_linux64)
8027 (init_registers_s390x_tevx_linux64)
8028 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8029 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8030 declarations.
8031 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8032 (s390_store_vxrs_high): New functions.
8033 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8034 NT_S390_VXRS_HIGH.
8035 (s390_arch_setup): Add logic for selecting one of the new target
8036 descriptions. Activate the new vector regsets if applicable.
8037 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8038 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8039 and init_registers_s390x_tevx_linux64.
8040
8041 2015-03-01 Pedro Alves <palves@redhat.com>
8042
8043 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8044 parameter.
8045
8046 2015-02-27 Pedro Alves <palves@redhat.com>
8047
8048 * linux-x86-low.c (u_debugreg_offset): New function.
8049 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8050
8051 2015-02-27 Pedro Alves <palves@redhat.com>
8052
8053 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8054 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8055 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8056 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8057 (ps_lsetfpregs, ps_getpid)
8058 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8059 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8060 (ps_lsetxregs, ps_plog): Declare.
8061
8062 2015-02-27 Pedro Alves <palves@redhat.com>
8063
8064 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8065 IP_AGENT_EXPORT_FUNC.
8066 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8067 IP_AGENT_EXPORT_FUNC.
8068 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8069 (IP_AGENT_EXPORT): Delete.
8070 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8071 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8072 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8073 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8074 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8075 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8076 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8077 (traceframe_read_count, traceframe_write_count)
8078 (traceframes_created, trace_state_variables, get_raw_reg)
8079 (get_trace_state_variable_value, set_trace_state_variable_value)
8080 (ust_loaded, helper_thread_id, cmd_buf): Use
8081 IPA_SYM_EXPORTED_NAME.
8082 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8083 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8084 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8085 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8086 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8087 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8088 EXTERN_C_PUSH/EXTERN_C_POP.
8089 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8090 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8091 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8092 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8093 (traceframe_write_count, traceframe_read_count)
8094 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8095 (about_to_request_buffer_space, get_trace_state_variable_value)
8096 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8097 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8098 EXTERN_C_PUSH/EXTERN_C_POP.
8099 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8100 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8101 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8102 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8103 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8104 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8105 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8106 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8107 Define.
8108 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8109 (IP_AGENT_EXPORT_VAR_DECL): Define.
8110 (tracing): Declare.
8111 (gdb_agent_get_raw_reg): Declare.
8112
8113 2015-02-27 Tom Tromey <tromey@redhat.com>
8114 Pedro Alves <palves@redhat.com>
8115
8116 Rename symbols whose names are reserved C++ keywords throughout.
8117
8118 2015-02-27 Pedro Alves <palves@redhat.com>
8119
8120 * Makefile.in (COMPILER): New, get it from autoconf.
8121 (CXX): Get from autoconf instead.
8122 (COMPILE.pre): Use COMPILER.
8123 (CC-LD): Rename to ...
8124 (CC_LD): ... this. Use COMPILER.
8125 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8126 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8127 * acinclude.m4: Include build-with-cxx.m4.
8128 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8129 Disable -Werror by default if building in C++ mode.
8130 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8131 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8132 the C++ compiler. Save/restore CXXFLAGS too.
8133 * configure: Regenerate.
8134
8135 2015-02-27 Pedro Alves <palves@redhat.com>
8136
8137 * acinclude.m4: Include libiberty.m4.
8138 * configure.ac: Call libiberty_INIT.
8139 * config.in, configure: Regenerate.
8140
8141 2015-02-26 Pedro Alves <palves@redhat.com>
8142
8143 * linux-low.c (linux_wait_1): When incrementing the PC past a
8144 program breakpoint always use the_low_target.breakpoint_len as
8145 increment, rather than the maximum between that and
8146 the_low_target.decr_pc_after_break.
8147
8148 2015-02-23 Pedro Alves <palves@redhat.com>
8149
8150 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8151 thread was doing a step-over; always adjust the PC if
8152 we stepped over a permanent breakpoint.
8153 (linux_wait_1): If we stepped over breakpoint that was on top of a
8154 permanent breakpoint, manually advance the PC past it.
8155
8156 2015-02-23 Pedro Alves <palves@redhat.com>
8157
8158 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8159 modes.
8160 (x86_fill_gregset, x86_store_gregset): Use it when handling
8161 $orig_eax.
8162
8163 2015-02-20 Pedro Alves <palves@redhat.com>
8164
8165 * thread-db.c: Include "nat/linux-procfs.h".
8166 (thread_db_init): Skip listing new threads if the kernel supports
8167 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8168
8169 2015-02-20 Pedro Alves <palves@redhat.com>
8170
8171 * linux-low.c (status_pending_p_callback): Use ptid_match.
8172
8173 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8174
8175 PR breakpoints/16812
8176 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8177 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8178 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8179
8180 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8181
8182 PR breakpoints/15956
8183 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8184
8185 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8186
8187 * linux-low.c (linux_low_btrace_conf): Print size.
8188 * server.c (handle_btrace_conf_general_set): New.
8189 (hanle_general_set): Call handle_btrace_conf_general_set.
8190 (handle_query): Report Qbtrace-conf:bts:size as supported.
8191
8192 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8193
8194 * linux-low.c (linux_low_enable_btrace): Update parameters.
8195 (linux_low_btrace_conf): New.
8196 (linux_target_ops)<to_btrace_conf>: Initialize.
8197 * server.c (current_btrace_conf): New.
8198 (handle_btrace_enable): Rename to ...
8199 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8200 to target_enable_btrace. Update comment. Update users.
8201 (handle_qxfer_btrace_conf): New.
8202 (qxfer_packets): Add btrace-conf entry.
8203 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8204 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8205 (target_ops)<read_btrace_conf>: New.
8206 (target_enable_btrace): Update parameters.
8207 (target_read_btrace_conf): New.
8208
8209 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8210
8211 * server.c (handle_btrace_general_set): Remove call to
8212 target_supports_btrace.
8213 (supported_btrace_packets): New.
8214 (handle_query): Call supported_btrace_packets.
8215 * target.h: include btrace-common.h.
8216 (btrace_target_info): Removed.
8217 (supports_btrace, target_supports_btrace): Update parameters.
8218
8219 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8220
8221 * Makefile.in (SFILES): Add common/btrace-common.c.
8222 (OBS): Add common/btrace-common.o.
8223 (btrace-common.o): Add build rules.
8224 * linux-low: Include btrace-common.h.
8225 (linux_low_read_btrace): Use struct btrace_data. Call
8226 btrace_data_init and btrace_data_fini.
8227
8228 2015-02-06 Pedro Alves <palves@redhat.com>
8229
8230 * thread-db.c (find_new_threads_callback): Add debug output.
8231
8232 2015-02-04 Pedro Alves <palves@redhat.com>
8233
8234 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8235 (resume_stopped_resumed_lwps): New function.
8236 (linux_wait_for_event_filtered): Use it.
8237
8238 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8239
8240 * Makefile.in (SFILES): Add linux-personality.c.
8241 (linux-personality.o): New rule.
8242 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8243 list of objects to be built.
8244 * linux-low.c: Include nat/linux-personality.h.
8245 (linux_create_inferior): Remove code to disable address space
8246 randomization (moved to ../nat/linux-personality.c). Create
8247 cleanup to disable address space randomization.
8248
8249 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8250
8251 * Makefile.in (posix-strerror.o): New rule.
8252 (mingw-strerror.o): Likewise.
8253 * configure: Regenerated.
8254 * configure.ac: Source file ../common/common.host. Initialize new
8255 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8256
8257 2015-01-14 Yao Qi <yao@codesourcery.com>
8258
8259 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8260 (ppc-linux.o): New rule.
8261 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8262 * configure.ac: AC_CHECK_FUNCS(getauxval).
8263 * config.in: Re-generated.
8264 * configure: Re-generated.
8265 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8266 ppc64_64bit_inferior_p
8267
8268 2015-01-14 Yao Qi <yao@codesourcery.com>
8269
8270 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8271 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8272 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8273 (PT_ORIG_R3, PT_TRAP): Likewise.
8274 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8275 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8276 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8277
8278 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8279
8280 * i387-fp.c (i387_cache_to_xsave): In look over
8281 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8282 zmmh_low_space field by use of zmmh_high_space.
8283
8284 2015-01-09 Pedro Alves <palves@redhat.com>
8285
8286 * linux-low.c (step_over_bkpt): Move higher up in the file.
8287 (handle_extended_wait): Don't store the stop_pc here.
8288 (get_stop_pc): Adjust comments and rename to ...
8289 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8290 stopped for a software breakpoint or hardware breakpoint.
8291 (thread_still_has_status_pending_p): New function.
8292 (status_pending_p_callback): Use
8293 thread_still_has_status_pending_p. If the event is no longer
8294 interesting, resume the LWP.
8295 (handle_tracepoints): Add assert.
8296 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8297 (wstatus_maybe_breakpoint): New function.
8298 (cancel_breakpoint): Delete function.
8299 (check_stopped_by_watchpoint): New function, factored out from
8300 linux_low_filter_event.
8301 (lp_status_maybe_breakpoint): Delete function.
8302 (linux_low_filter_event): Remove filter_ptid argument.
8303 Leave thread group exits pending here. Store the LWP's stop PC.
8304 Always leave events pending.
8305 (linux_wait_for_event_filtered): Pull all events out of the
8306 kernel, and leave them all pending.
8307 (count_events_callback, select_event_lwp_callback): Consider all
8308 events.
8309 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8310 (select_event_lwp): Only give preference to the stepping LWP in
8311 all-stop mode. Adjust comments.
8312 (ignore_event): New function.
8313 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8314 references to cancel_breakpoints. Adjust to renames. Also give
8315 equal priority to all LWPs that have had events in non-stop mode.
8316 If reporting a software breakpoint event, unadjust the LWP's PC.
8317 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8318 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8319 Adjust.
8320 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8321 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8322 (linux_stopped_by_watchpoint): Adjust.
8323 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8324 * linux-low.h (enum lwp_stop_reason): New.
8325 (struct lwp_info) <stop_pc>: Adjust comment.
8326 <stopped_by_watchpoint>: Delete field.
8327 <stop_reason>: New field.
8328 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8329 * mem-break.c (software_breakpoint_inserted_here)
8330 (hardware_breakpoint_inserted_here): New function.
8331 * mem-break.h (software_breakpoint_inserted_here)
8332 (hardware_breakpoint_inserted_here): Declare.
8333 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8334 (cancel_breakpoints): Delete.
8335 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8336 (upload_fast_traceframes): Remove references to
8337 cancel_breakpoints.
8338
8339 2015-01-09 Pedro Alves <palves@redhat.com>
8340
8341 * thread-db.c (find_new_threads_callback): Ignore thread if the
8342 kernel thread ID is -1.
8343
8344 2015-01-09 Pedro Alves <palves@redhat.com>
8345
8346 * linux-low.c (linux_attach_fail_reason_string): Move to
8347 nat/linux-ptrace.c, and rename.
8348 (linux_attach_lwp): Update comment.
8349 (attach_proc_task_lwp_callback): New function.
8350 (linux_attach): Adjust to rename and use
8351 linux_proc_attach_tgid_threads.
8352 (linux_attach_fail_reason_string): Delete declaration.
8353
8354 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8355
8356 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8357 * server.c (gdbserver_version): Likewise.
8358
8359 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8360
8361 * remote-utils.c: Include ctype.h.
8362 (input_interrupt): Explicitly handle the case when the char
8363 received is the NUL byte. Improve the printing of non-ASCII
8364 characters.
8365
8366 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8367
8368 * linux-low.c (linux_low_filter_event): Update call to
8369 linux_enable_event_reporting following the addition of
8370 a new parameter to that function.
8371
8372 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8373
8374 PR server/17457
8375 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8376 (AARCH64_FPCR_REGNO): Likewise.
8377 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8378 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8379 (aarch64_store_fpregset): Likewise.
8380
8381 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8382
8383 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8384 Remove FIXME comment about assumption about N.
8385
8386 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8387
8388 * configure.ac: If large-file support is disabled in GDBserver,
8389 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8390 * configure: Regenerate.
8391
8392 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8393
8394 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8395 warning upon ENODATA from ptrace.
8396 * linux-s390-low.c (s390_store_tdb): New.
8397 (s390_regsets): Add regset for NT_S390_TDB.
8398
8399 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8400
8401 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8402 without a fill_function.
8403 * linux-s390-low.c (s390_fill_last_break): Remove.
8404 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8405 (s390_arch_setup): Use regset's size instead of fill_function for
8406 loop end condition.
8407
8408 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8409
8410 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8411 the regset's store function when ptrace returned an error.
8412 * regcache.c (get_thread_regcache): Invalidate register cache
8413 before fetching inferior's registers.
8414
8415 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8416
8417 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8418 while-loop as for-loop.
8419 (regsets_store_inferior_registers): Likewise.
8420
8421 2014-11-28 Yao Qi <yao@codesourcery.com>
8422
8423 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8424 * config.in, configure: Re-generate.
8425 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8426 is defined.
8427
8428 2014-11-21 Yao Qi <yao@codesourcery.com>
8429
8430 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8431 (AC_CHECK_HEADERS): Remove malloc.h.
8432 * configure: Re-generated.
8433 * config.in: Re-generated.
8434 * server.h: Don't include alloca.h and malloc.h.
8435 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8436 Don't include malloc.h.
8437
8438 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8439
8440 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8441 corresponding ERRNO check in same block.
8442
8443 2014-11-12 Pedro Alves <palves@redhat.com>
8444
8445 * server.c (cont_thread): Update comment.
8446 (start_inferior, attach_inferior): No longer clear cont_thread.
8447 (handle_v_cont): No longer set cont_thread.
8448 (captured_main): Clear cont_thread each time a GDB connects.
8449
8450 2014-11-12 Pedro Alves <palves@redhat.com>
8451
8452 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8453 thread, and don't resume all threads if the Hc thread has exited.
8454
8455 2014-11-12 Pedro Alves <palves@redhat.com>
8456
8457 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8458 the process group instead of to a specific LWP.
8459
8460 2014-10-15 Pedro Alves <palves@redhat.com>
8461
8462 PR server/17487
8463 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8464 parameter.
8465 (arm_set_thread_context): Delete.
8466 (the_low_target): Adjust.
8467 * win32-i386-low.c (debug_registers_changed)
8468 (debug_registers_used): Delete.
8469 (update_debug_registers_callback): New function.
8470 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8471 needing to update their debug registers.
8472 (win32_get_current_dr): New function.
8473 (x86_dr_low_get_addr, x86_dr_low_get_control)
8474 (x86_dr_low_get_status): Fetch the debug register from the thread
8475 record's context.
8476 (i386_initial_stuff): Adjust.
8477 (i386_get_thread_context): Remove current_event parameter. Don't
8478 clear debug_registers_changed nor copy DR values to
8479 debug_reg_state.
8480 (i386_set_thread_context): Delete.
8481 (i386_prepare_to_resume): New function.
8482 (i386_thread_added): Mark the thread as needing to update irs
8483 debug registers.
8484 (the_low_target): Remove i386_set_thread_context and install
8485 i386_prepare_to_resume.
8486 * win32-low.c (win32_get_thread_context): Adjust.
8487 (win32_set_thread_context): Use SetThreadContext
8488 directly.
8489 (win32_prepare_to_resume): New function.
8490 (win32_require_context): New function, factored out from ...
8491 (thread_rec): ... this.
8492 (continue_one_thread): Call win32_prepare_to_resume on each thread
8493 we're about to continue.
8494 (win32_resume): Call win32_prepare_to_resume on the event thread.
8495 * win32-low.h (struct win32_thread_info)
8496 <debug_registers_changed>: New field.
8497 (struct win32_target_ops): Change prototype of set_thread_context,
8498 delete set_thread_context and add prepare_to_resume.
8499 (win32_require_context): New declaration.
8500
8501 2014-10-08 Gary Benson <gbenson@redhat.com>
8502
8503 * server.h: Do not include common-exceptions.h.
8504
8505 2014-10-08 Gary Benson <gbenson@redhat.com>
8506
8507 * server.h: Do not include cleanups.h.
8508
8509 2014-09-30 James Hogan <james.hogan@imgtec.com>
8510
8511 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8512 mips64-dsp-linux.c.
8513
8514 2014-09-23 Yao Qi <yao@codesourcery.com>
8515
8516 * linux-low.c (lp_status_maybe_breakpoint): New function.
8517 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8518 (count_events_callback): Likewise.
8519 (select_event_lwp_callback): Likewise.
8520 (cancel_breakpoints_callback): Likewise.
8521
8522 2014-09-19 Don Breazeal <donb@codesourcery.com>
8523
8524 * linux-low.c (handle_extended_wait): Call
8525 linux_ptrace_get_extended_event.
8526 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8527 linux_is_extended_waitstatus.
8528
8529 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8530
8531 * Makefile.in (CPPFLAGS): Define.
8532 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8533 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8534
8535 2014-09-16 Gary Benson <gbenson@redhat.com>
8536
8537 * inferiors.h (current_inferior): Renamed as...
8538 (current_thread): New variable. All uses updated.
8539 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8540 (maybe_move_out_of_jump_pad): Likewise.
8541 (cancel_breakpoint): Likewise.
8542 (linux_low_filter_event): Likewise.
8543 (wait_for_sigstop): Likewise.
8544 (linux_resume_one_lwp): Likewise.
8545 (need_step_over_p): Likewise.
8546 (start_step_over): Likewise.
8547 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8548 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8549 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8550 and save_inferior as saved_thread.
8551 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8552 saved_thread.
8553 (regcache_invalidate_thread): Likewise.
8554 * remote-utils.c (prepare_resume_reply): Likewise.
8555 * thread-db.c (thread_db_get_tls_address): Likewise.
8556 (disable_thread_event_reporting): Likewise.
8557 (remove_thread_event_breakpoints): Likewise.
8558 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8559 as saved_thread.
8560 * target.h (set_desired_inferior): Renamed as...
8561 (set_desired_thread): New declaration. All uses updated.
8562 * server.c (myresume): Updated comment to reference thread instead
8563 of inferior.
8564 (handle_serial_event): Likewise.
8565 (handle_target_event): Likewise.
8566
8567 2014-09-12 Tom Tromey <tromey@redhat.com>
8568 Gary Benson <gbenson@redhat.com>
8569
8570 * regcache.h: Include common-regcache.h.
8571 (regcache_read_pc): Don't declare.
8572 * regcache.c (get_thread_regcache_for_ptid): New function.
8573
8574 2014-09-11 Tom Tromey <tromey@redhat.com>
8575 Gary Benson <gbenson@redhat.com>
8576
8577 * symbol.c: New file.
8578 * Makefile.in (SFILES): Add symbol.c.
8579 (OBS): Add symbol.o.
8580
8581 2014-09-11 Gary Benson <gbenson@redhat.com>
8582
8583 * target.c (target_stop_ptid, target_continue_ptid): New
8584 functions.
8585
8586 2014-09-11 Tom Tromey <tromey@redhat.com>
8587 Gary Benson <gbenson@redhat.com>
8588
8589 * target.h: Include target/target.h.
8590 * target.c (target_read_memory, target_read_uint32)
8591 (target_write_memory): New functions.
8592
8593 2014-09-11 Gary Benson <gbenson@redhat.com>
8594
8595 * server.h (debug_hw_points): Don't declare.
8596 * server.c (debug_hw_points): Don't define. Replace all uses
8597 with show_debug_regs.
8598 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8599 all uses with show_debug_regs.
8600
8601 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8602
8603 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8604 endianness into account.
8605 (ppc_supply_ptrace_register): Likewise.
8606
8607 2014-09-03 James Hogan <james.hogan@imgtec.com>
8608
8609 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8610 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8611
8612 2014-09-03 Gary Benson <gbenson@redhat.com>
8613
8614 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8615 ALL_DEBUG_ADDRESS_REGISTERS.
8616
8617 2014-09-02 Gary Benson <gbenson@redhat.com>
8618
8619 * i386-low.h: Renamed as...
8620 * x86-low.h: New file. All type, function and variable name
8621 prefixes changed from "i386_" to "x86_". All references updated.
8622 * i386-low.c: Renamed as...
8623 * x86-low.c: New file. All type, function and variable name
8624 prefixes changed from "i386_" to "x86_". All references updated.
8625
8626 2014-09-02 Gary Benson <gbenson@redhat.com>
8627
8628 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8629 (x86_linux_new_thread): Likewise.
8630
8631 2014-08-29 Gary Benson <gbenson@redhat.com>
8632
8633 * server.h (setjmp.h): Do not include.
8634 (toplevel): Do not declare.
8635 (common-exceptions.h): Include.
8636 (cleanups.h): Likewise.
8637 * server.c (toplevel): Do not define.
8638 (exit_code): New static global.
8639 (detach_or_kill_for_exit_cleanup): New function.
8640 (main): New function. Original main renamed to...
8641 (captured_main): New function.
8642 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8643
8644 2014-08-29 Gary Benson <gbenson@redhat.com>
8645
8646 * Makefile.in (SFILES): Add common/common-exceptions.c.
8647 (OBS): Add common-exceptions.o.
8648 (common-exceptions.o): New rule.
8649 * utils.c (prepare_to_throw_exception): New function.
8650
8651 2014-08-29 Gary Benson <gbenson@redhat.com>
8652
8653 * config.in: Regenerate.
8654 * configure: Likewise.
8655
8656 2014-08-29 Gary Benson <gbenson@redhat.com>
8657
8658 * Makefile.in (SFILES): Add common/cleanups.c.
8659 (OBS): cleanups.o.
8660 (cleanups.o): New rule.
8661
8662 2014-08-29 Gary Benson <gbenson@redhat.com>
8663
8664 * utils.c (internal_vwarning): New function.
8665
8666 2014-08-28 Gary Benson <gbenson@redhat.com>
8667
8668 * utils.h (fatal): Remove declaration.
8669 * utils.c (fatal): Remove function.
8670
8671 2014-08-28 Gary Benson <gbenson@redhat.com>
8672
8673 * tracepoint.c (gdb_agent_init): Replace fatal with
8674 perror_with_name.
8675 (initialize_tracepoint): Likewise.
8676
8677 2014-08-28 Gary Benson <gbenson@redhat.com>
8678
8679 * remote-utils.c (remote_prepare): Replace fatal with error.
8680
8681 2014-08-28 Gary Benson <gbenson@redhat.com>
8682
8683 * linux-low.c (linux_async): Replace fatal with warning.
8684 Tidy up and return.
8685 (linux_start_non_stop): Return -1 if linux_async failed.
8686
8687 2014-08-28 Gary Benson <gbenson@redhat.com>
8688
8689 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8690 gdb_assert.
8691 (i386_dr_low_get_addr): Remove vague comment.
8692 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8693 gdb_assert.
8694
8695 2014-08-28 Gary Benson <gbenson@redhat.com>
8696
8697 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8698 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8699 internal_error.
8700 (linux_resume_one_lwp): Likewise.
8701 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8702 gdb_assert.
8703 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8704 with internal_error.
8705 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8706 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8707 (find_register_by_name): Replace fatal with internal_error.
8708 (find_regno): Likewise.
8709 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8710 * thread-db.c (thread_db_create_event): Likewise.
8711 (thread_db_load_search): Likewise.
8712 (try_thread_db_load_1): Likewise.
8713 * tracepoint.c (get_jump_space_head): Replace fatal with
8714 internal_error.
8715 (claim_trampoline_space): Likewise.
8716 (have_fast_tracepoint_trampoline_buffer): Likewise.
8717 (cmd_qtstart): Likewise.
8718 (stop_tracing): Likewise.
8719 (fast_tracepoint_collecting): Likewise.
8720 (target_malloc): Likewise.
8721 (download_tracepoint): Likewise.
8722 (download_trace_state_variables): Replace check with gdb_assert.
8723 (upload_fast_traceframes): Replace fatal with internal_error.
8724
8725 2014-08-19 Tom Tromey <tromey@redhat.com>
8726 Gary Benson <gbenson@redhat.com>
8727
8728 * Makefile.in (SFILES): Add common/common-debug.c.
8729 (OBS): Add common-debug.o.
8730 (common-debug.o): New rule.
8731 * debug.h (debug_printf): Don't declare.
8732 * debug.c (debug_printf): Renamed and rewritten as...
8733 (debug_vprintf): New function.
8734
8735 2014-08-19 Gary Benson <gbenson@redhat.com>
8736
8737 * utils.h: Do not include print-utils.h.
8738
8739 2014-08-19 Tom Tromey <tromey@redhat.com>
8740 Gary Benson <gbenson@redhat.com>
8741
8742 * server.h: Add static assertion.
8743 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8744
8745 2014-08-19 Tom Tromey <tromey@redhat.com>
8746 Gary Benson <gbenson@redhat.com>
8747
8748 * Makefile.in (SFILES): Add common/errors.c.
8749 (OBS): Add errors.o.
8750 (IPA_OBS): Add errors-ipa.o.
8751 (errors.o): New rule.
8752 (errors-ipa.o): Likewise.
8753 * utils.h (perror_with_name, error, warning): Don't declare.
8754 * utils.c (warning): Renamed and rewritten as...
8755 (vwarning): New function.
8756 (error): Renamed and rewritten as...
8757 (verror): New function.
8758 (internal_error): Renamed and rewritten as...
8759 (internal_verror): New function.
8760
8761 2014-08-07 Gary Benson <gbenson@redhat.com>
8762
8763 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8764 * configure: Regenerate.
8765 * config.in: Likewise.
8766 * server.h: Do not include errno.h.
8767 * event-loop.c: Likewise.
8768 * hostio-errno.c: Likewise.
8769 * linux-low.c: Likewise.
8770 * remote-utils.c: Likewise.
8771 * spu-low.c: Likewise.
8772 * utils.c: Likewise.
8773 * gdbreplay.c: Unconditionally include errno.h.
8774
8775 2014-08-07 Gary Benson <gbenson@redhat.com>
8776
8777 * server.h: Do not include string.h.
8778 * event-loop.c: Likewise.
8779 * linux-low.c: Likewise.
8780 * regcache.c: Likewise.
8781 * remote-utils.c: Likewise.
8782 * spu-low.c: Likewise.
8783 * utils.c: Likewise.
8784
8785 2014-08-07 Gary Benson <gbenson@redhat.com>
8786
8787 * server.h: Do not include gdb_assert.h.
8788
8789 2014-08-07 Gary Benson <gbenson@redhat.com>
8790
8791 * server.h: Do not include common-utils.h.
8792
8793 2014-08-07 Gary Benson <gbenson@redhat.com>
8794
8795 * server.h: Do not include ptid.h.
8796 * notif.h: Likewise.
8797
8798 2014-08-07 Gary Benson <gbenson@redhat.com>
8799
8800 * server.h: Do not include gdb_locale.h.
8801
8802 2014-08-07 Gary Benson <gbenson@redhat.com>
8803
8804 * server.h: Do not include gdb/signals.h.
8805 * win32-low.c: Likewise.
8806
8807 2014-08-07 Gary Benson <gbenson@redhat.com>
8808
8809 * server.h: Do not include pathmax.h.
8810
8811 2014-08-07 Gary Benson <gbenson@redhat.com>
8812
8813 * server.h: Do not include libiberty.h.
8814 * linux-bfin-low.c: Likewise.
8815
8816 2014-08-07 Gary Benson <gbenson@redhat.com>
8817
8818 * server.h: Do not include ansidecl.h.
8819
8820 2014-08-07 Gary Benson <gbenson@redhat.com>
8821
8822 * linux-x86-low.c: Do not include stddef.h.
8823 * lynx-ppc-low.c: Likewise.
8824 * tracepoint.c: Likewise.
8825
8826 2014-08-07 Gary Benson <gbenson@redhat.com>
8827
8828 * server.h: Do not include stdarg.h.
8829 * nto-low.c: Likewise.
8830
8831 2014-08-07 Gary Benson <gbenson@redhat.com>
8832
8833 * server.h: Do not include stdlib.h.
8834 * inferiors.c: Likewise.
8835 * linux-low.c: Likewise.
8836 * regcache.c: Likewise.
8837 * spu-low.c: Likewise.
8838 * tracepoint.c: Likewise.
8839 * utils.c: Likewise.
8840
8841 2014-08-07 Gary Benson <gbenson@redhat.com>
8842
8843 * server.h: Do not include stdio.h.
8844 * linux-low.c: Likewise.
8845 * remote-utils.c: Likewise.
8846 * spu-low.c: Likewise.
8847 * utils.c: Likewise.
8848 * wincecompat.c: Likewise.
8849
8850 2014-08-06 Gary Benson <gbenson@redhat.com>
8851
8852 * regcache.c (init_register_cache): Move conditionals inside if.
8853
8854 2014-08-06 Gary Benson <gbenson@redhat.com>
8855
8856 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8857
8858 2014-07-31 Gary Benson <gbenson@redhat.com>
8859
8860 * ax.h: Do not include server.h.
8861 * gdbthread.h: Likewise.
8862 * lynx-low.h: Likewise.
8863 * notif.h: Likewise.
8864
8865 2014-07-30 Gary Benson <gbenson@redhat.com>
8866
8867 * server.h: Include common-defs.h.
8868 Do not include config.h or build-gnulib-gdbserver/config.h.
8869
8870 2014-07-30 Gary Benson <gbenson@redhat.com>
8871
8872 * hostio-errno.c: Move server.h to top of includes list.
8873 * inferiors.c: Likewise.
8874 * linux-x86-low.c: Likewise.
8875 * notif.c: Include server.h.
8876
8877 2014-07-24 Tom Tromey <tromey@redhat.com>
8878 Gary Benson <gbenson@redhat.com>
8879
8880 * server.h (CORE_ADDR): Now unsigned.
8881
8882 2014-07-16 Pedro Alves <palves@redhat.com>
8883
8884 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8885
8886 2014-07-15 Pedro Alves <palves@redhat.com>
8887
8888 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8889 copy.
8890
8891 2014-07-11 Pedro Alves <palves@redhat.com>
8892
8893 * linux-low.c (kill_wait_lwp): New function, based on
8894 kill_one_lwp_callback, but use my_waitpid directly.
8895 (kill_one_lwp_callback, linux_kill): Use it.
8896
8897 2014-06-23 Pedro Alves <palves@redhat.com>
8898
8899 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8900 before setting DR0..DR3.
8901
8902 2014-06-20 Gary Benson <gbenson@redhat.com>
8903
8904 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8905 * configure: Regenerated.
8906 * config.in: Likewise.
8907
8908 2014-06-20 Gary Benson <gbenson@redhat.com>
8909
8910 * Makefile.in (SFILES): Update locations for files moved
8911 from common to nat.
8912 (object file files): Reordered.
8913
8914 2014-06-20 Gary Benson <gbenson@redhat.com>
8915
8916 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8917 (i386_dr_low_set_addr): Likewise.
8918 (i386_dr_low_get_addr): Likewise.
8919 (i386_dr_low_can_set_control): Likewise.
8920 (i386_dr_low_set_control): Likewise.
8921 (i386_dr_low_get_control): Likewise.
8922 (i386_dr_low_get_status): Likewise.
8923 (i386_get_debug_register_length): Likewise.
8924 * linux-x86-low.c (i386_dr_low_set_addr):
8925 Changed signature. Made static.
8926 (i386_dr_low_get_addr): Likewise.
8927 (i386_dr_low_set_control): Likewise.
8928 (i386_dr_low_get_control): Likewise.
8929 (i386_dr_low_get_status): Likewise.
8930 (i386_dr_low): New global variable.
8931 * win32-i386-low.c (i386_dr_low_set_addr):
8932 Changed signature. Made static.
8933 (i386_dr_low_get_addr): Likewise.
8934 (i386_dr_low_set_control): Likewise.
8935 (i386_dr_low_get_control): Likewise.
8936 (i386_dr_low_get_status): Likewise.
8937 (i386_dr_low): New global variable.
8938
8939 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8940
8941 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8942 * Makefile.in (AR, AR_FLAGS): Define.
8943 * configure: Regenerate.
8944
8945 2014-06-19 Gary Benson <gbenson@redhat.com>
8946
8947 * Makefile.in (i386-dregs.o): New rule.
8948 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8949 * i386-low.c (target.h): Remove include.
8950 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8951 (DR_CONTROL_SHIFT): Likewise.
8952 (DR_CONTROL_SIZE): Likewise.
8953 (DR_RW_EXECUTE): Likewise.
8954 (DR_RW_WRITE): Likewise.
8955 (DR_RW_READ): Likewise.
8956 (DR_RW_IORW): Likewise.
8957 (DR_LEN_1): Likewise.
8958 (DR_LEN_2): Likewise.
8959 (DR_LEN_4): Likewise.
8960 (DR_LEN_8): Likewise.
8961 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8962 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8963 (DR_ENABLE_SIZE): Likewise.
8964 (DR_LOCAL_SLOWDOWN): Likewise.
8965 (DR_GLOBAL_SLOWDOWN): Likewise.
8966 (DR_CONTROL_RESERVED): Likewise.
8967 (I386_DR_CONTROL_MASK): Likewise.
8968 (I386_DR_VACANT): Likewise.
8969 (I386_DR_LOCAL_ENABLE): Likewise.
8970 (I386_DR_GLOBAL_ENABLE): Likewise.
8971 (I386_DR_DISABLE): Likewise.
8972 (I386_DR_SET_RW_LEN): Likewise.
8973 (I386_DR_GET_RW_LEN): Likewise.
8974 (I386_DR_WATCH_HIT): Likewise.
8975 (i386_wp_op_t): Likewise.
8976 (i386_show_dr): Likewise.
8977 (i386_length_and_rw_bits): Likewise.
8978 (i386_insert_aligned_watchpoint): Likewise.
8979 (i386_remove_aligned_watchpoint): Likewise.
8980 (i386_handle_nonaligned_watchpoint): Likewise.
8981 i386_update_inferior_debug_regs(): Likewise.
8982 (i386_dr_insert_watchpoint): Likewise.
8983 (i386_dr_remove_watchpoint): Likewise.
8984 (i386_dr_region_ok_for_watchpoint): Likewise.
8985 (i386_dr_stopped_data_address): Likewise.
8986 (i386_dr_stopped_by_watchpoint): Likewise.
8987
8988 2014-06-19 Gary Benson <gbenson@redhat.com>
8989
8990 * i386-low.c (i386_dr_show): Renamed to
8991 i386_show_dr and made static. All uses updated.
8992 (i386_dr_length_and_rw_bits): Renamed to
8993 i386_length_and_rw_bits and made static.
8994 All uses updated.
8995 (i386_dr_insert_aligned_watchpoint): Renamed to
8996 i386_insert_aligned_watchpoint and made static.
8997 All uses updated.
8998 (i386_dr_remove_aligned_watchpoint): Renamed to
8999 i386_remove_aligned_watchpoint and made static.
9000 All uses updated.
9001 (i386_dr_update_inferior_debug_regs): Renamed to
9002 i386_update_inferior_debug_regs and made static.
9003 All uses updated.
9004
9005 2014-06-18 Gary Benson <gbenson@redhat.com>
9006
9007 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9008 (i386_dr_low_can_set_control): Likewise.
9009 (i386_get_debug_register_length): Likewise.
9010 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9011 (i386_dr_low_can_set_control): Likewise.
9012 (i386_get_debug_register_length): Likewise.
9013
9014 2014-06-17 Gary Benson <gbenson@redhat.com>
9015
9016 * i386-low.h (i386-dregs.h): New include.
9017 (DR_FIRSTADDR): Now in i386-dregs.h.
9018 (DR_LASTADDR): Likewise.
9019 (DR_NADDR): Likewise.
9020 (DR_STATUS): Likewise.
9021 (DR_CONTROL): Likewise.
9022 (i386_debug_reg_state): Likewise.
9023 (i386_dr_insert_watchpoint): Likewise.
9024 (i386_dr_remove_watchpoint): Likewise.
9025 (i386_dr_region_ok_for_watchpoint): Likewise.
9026 (i386_dr_stopped_data_address): Likewise.
9027 (i386_dr_stopped_by_watchpoint): Likewise.
9028 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9029
9030 2014-06-18 Gary Benson <gbenson@redhat.com>
9031
9032 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9033 i386_dr_insert_watchpoint.
9034 (i386_low_remove_watchpoint): Renamed to
9035 i386_dr_remove_watchpoint.
9036 (i386_low_region_ok_for_watchpoint): Renamed to
9037 i386_dr_region_ok_for_watchpoint.
9038 (i386_low_stopped_data_address): Renamed to
9039 i386_dr_stopped_data_address.
9040 (i386_low_stopped_by_watchpoint): Renamed to
9041 i386_dr_stopped_by_watchpoint.
9042 * i386-low.c (i386_show_dr): Renamed to
9043 i386_dr_show and made nonstatic. All uses updated.
9044 (i386_length_and_rw_bits): Renamed to
9045 i386_dr_length_and_rw_bits and made nonstatic.
9046 All uses updated.
9047 (i386_insert_aligned_watchpoint): Renamed to
9048 i386_dr_insert_aligned_watchpoint and made nonstatic.
9049 All uses updated.
9050 (i386_remove_aligned_watchpoint): Renamed to
9051 i386_dr_remove_aligned_watchpoint and made nonstatic.
9052 All uses updated.
9053 (i386_update_inferior_debug_regs): Renamed to
9054 i386_dr_update_inferior_debug_regs and made nonstatic.
9055 All uses updated.
9056 (i386_low_insert_watchpoint): Renamed to
9057 i386_dr_insert_watchpoint. All uses updated.
9058 (i386_low_remove_watchpoint): Renamed to
9059 i386_dr_remove_watchpoint. All uses updated.
9060 (i386_low_region_ok_for_watchpoint): Renamed to
9061 i386_dr_region_ok_for_watchpoint. All uses updated.
9062 (i386_low_stopped_data_address): Renamed to
9063 i386_dr_stopped_data_address. All uses updated.
9064 (i386_low_stopped_by_watchpoint): Renamed to
9065 i386_dr_stopped_by_watchpoint. All uses updated.
9066
9067 2014-06-18 Gary Benson <gbenson@redhat.com>
9068
9069 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9070 (i386_dr_low_can_set_control): Likewise.
9071 (i386_insert_aligned_watchpoint): New check.
9072
9073 2014-06-18 Gary Benson <gbenson@redhat.com>
9074
9075 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9076 Renamed to state.
9077
9078 2014-06-18 Gary Benson <gbenson@redhat.com>
9079
9080 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9081 instead of fatal and error.
9082 (i386_handle_nonaligned_watchpoint): Likewise.
9083
9084 2014-06-18 Gary Benson <gbenson@redhat.com>
9085
9086 * i386-low.c (i386_get_debug_register_length): New macro.
9087 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9088 (i386_show_dr): Use debug_printf instead of fprintf. Use
9089 phex to format values.
9090
9091 2014-06-18 Gary Benson <gbenson@redhat.com>
9092
9093 * i386-low.h: Comment changes.
9094 * i386-low.c: Likewise.
9095
9096 2014-06-18 Gary Benson <gbenson@redhat.com>
9097
9098 * i386-low.c: Whitespace changes.
9099
9100 2014-06-12 Tom Tromey <tromey@redhat.com>
9101
9102 * utils.c (freeargv): Remove.
9103
9104 2014-06-12 Tom Tromey <tromey@redhat.com>
9105
9106 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9107 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9108 (parse_debug_format_options): Likewise.
9109 (gdbserver_usage): Likewise.
9110 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9111 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9112 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9113 against libiberty.
9114 ($(LIBGNU)): Depend on libiberty.
9115 (all-lib): Recurse into all subdirs.
9116 (install-only): Invoke "install" target in subdirs.
9117 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9118 targets.
9119 * configure: Rebuild.
9120 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9121 for vasprintf, vsnprintf, or gettimeofday.
9122 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9123 srv_tgtobj.
9124
9125 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9126
9127 * development.sh: Delete.
9128 * Makefile.in (config.status): Adjust dependency on development.sh.
9129 * configure.ac: Adjust development.sh source call.
9130 * configure: Regenerate.
9131
9132 2014-06-02 Pedro Alves <palves@redhat.com>
9133
9134 * ax.c (gdb_free_agent_expr): New function.
9135 * ax.h (gdb_free_agent_expr): New declaration.
9136 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9137 list.
9138 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9139 static.
9140 (clear_breakpoint_conditions_and_commands): New function.
9141 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9142 (clear_breakpoint_conditions_and_commands): New declaration.
9143
9144 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9145
9146 * linux-aarch64-low.c (asm/ptrace.h): Include.
9147
9148 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9149
9150 Fix TLS access for -static -pthread.
9151 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9152 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9153 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9154
9155 2014-05-20 Pedro Alves <palves@redhat.com>
9156
9157 * linux-aarch64-low.c (aarch64_insert_point)
9158 (aarch64_remove_point): No longer check whether the type is
9159 supported here. Adjust to new interface.
9160 (the_low_target): Install aarch64_supports_z_point_type as
9161 supports_z_point_type method.
9162 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9163 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9164 instead of a Z packet char. Adjust.
9165 (arm_supports_z_point_type): New function.
9166 (arm_insert_point, arm_remove_point): Adjust to new interface.
9167 (the_low_target): Install arm_supports_z_point_type.
9168 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9169 (cris_insert_point, cris_remove_point): Adjust to new interface.
9170 Don't check whether the type is supported here.
9171 (the_low_target): Install cris_supports_z_point_type.
9172 * linux-low.c (linux_supports_z_point_type): New function.
9173 (linux_insert_point, linux_remove_point): Adjust to new interface.
9174 * linux-low.h (struct linux_target_ops) <insert_point,
9175 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9176 raw_breakpoint pointer parameter.
9177 <supports_z_point_type>: New method.
9178 * linux-mips-low.c (mips_supports_z_point_type): New function.
9179 (mips_insert_point, mips_remove_point): Adjust to new interface.
9180 Use mips_supports_z_point_type.
9181 (the_low_target): Install mips_supports_z_point_type.
9182 * linux-ppc-low.c (the_low_target): Install NULL as
9183 supports_z_point_type method.
9184 * linux-s390-low.c (the_low_target): Install NULL as
9185 supports_z_point_type method.
9186 * linux-sparc-low.c (the_low_target): Install NULL as
9187 supports_z_point_type method.
9188 * linux-x86-low.c (x86_supports_z_point_type): New function.
9189 (x86_insert_point): Adjust to new insert_point interface. Use
9190 insert_memory_breakpoint. Adjust to new
9191 i386_low_insert_watchpoint interface.
9192 (x86_remove_point): Adjust to remove_point interface. Use
9193 remove_memory_breakpoint. Adjust to new
9194 i386_low_remove_watchpoint interface.
9195 (the_low_target): Install x86_supports_z_point_type.
9196 * lynx-low.c (lynx_target_ops): Install NULL as
9197 supports_z_point_type callback.
9198 * nto-low.c (nto_supports_z_point_type): New.
9199 (nto_insert_point, nto_remove_point): Adjust to new interface.
9200 (nto_target_ops): Install nto_supports_z_point_type.
9201 * mem-break.c: Adjust intro comment.
9202 (struct raw_breakpoint) <raw_type, size>: New fields.
9203 <inserted>: Update comment.
9204 <shlib_disabled>: Delete field.
9205 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9206 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9207 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9208 (raw_bkpt_type_to_target_hw_bp_type): New function.
9209 (find_enabled_raw_code_breakpoint_at): New function.
9210 (find_raw_breakpoint_at): New type and size parameters. Use them.
9211 (insert_memory_breakpoint): New function, based off
9212 set_raw_breakpoint_at.
9213 (remove_memory_breakpoint): New function.
9214 (set_raw_breakpoint_at): Reimplement.
9215 (set_breakpoint): New, based on set_breakpoint_at.
9216 (set_breakpoint_at): Reimplement.
9217 (delete_raw_breakpoint): Go through the_target->remove_point
9218 instead of assuming memory breakpoints.
9219 (find_gdb_breakpoint_at): Delete.
9220 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9221 (find_gdb_breakpoint): New function.
9222 (set_gdb_breakpoint_at): Delete.
9223 (z_type_supported): New function.
9224 (set_gdb_breakpoint_1): New function, loosely based off
9225 set_gdb_breakpoint_at.
9226 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9227 (delete_gdb_breakpoint_at): Delete.
9228 (delete_gdb_breakpoint_1): New function, loosely based off
9229 delete_gdb_breakpoint_at.
9230 (delete_gdb_breakpoint): New function.
9231 (clear_gdb_breakpoint_conditions): Rename to ...
9232 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9233 breakpoint.
9234 (add_condition_to_breakpoint): Make static.
9235 (add_breakpoint_condition): Take a struct breakpoint pointer
9236 instead of an address. Adjust.
9237 (gdb_condition_true_at_breakpoint): Rename to ...
9238 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9239 z_type parameter.
9240 (gdb_condition_true_at_breakpoint): Reimplement.
9241 (add_breakpoint_commands): Take a struct breakpoint pointer
9242 instead of an address. Adjust.
9243 (gdb_no_commands_at_breakpoint): Rename to ...
9244 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9245 parameter. Return true if no breakpoint was found. Change debug
9246 output.
9247 (gdb_no_commands_at_breakpoint): Reimplement.
9248 (run_breakpoint_commands): Rename to ...
9249 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9250 and change return type to boolean.
9251 (run_breakpoint_commands): New function.
9252 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9253 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9254 breakpoint. Go through the_target->remove_point instead of
9255 assuming memory breakpoint.
9256 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9257 software and hardware breakpoints.
9258 (reinsert_raw_breakpoint): Go through the_target->insert_point
9259 instead of assuming memory breakpoint.
9260 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9261 software and hardware breakpoints.
9262 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9263 Check both software and hardware breakpoints.
9264 (validate_inserted_breakpoint): Assert the breakpoint is a
9265 software breakpoint. Set the inserted flag to -1 instead of
9266 setting shlib_disabled.
9267 (delete_disabled_breakpoints): Adjust.
9268 (validate_breakpoints): Only validate software breakpoints.
9269 Adjust to inserted flag change.
9270 (check_mem_read, check_mem_write): Skip breakpoint types other
9271 than software breakpoints. Adjust to inserted flag change.
9272 * mem-break.h (enum raw_bkpt_type): New enum.
9273 (raw_breakpoint, struct process_info): Forward declare.
9274 (Z_packet_to_target_hw_bp_type): Delete declaration.
9275 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9276 (set_gdb_breakpoint, delete_gdb_breakpoint)
9277 (clear_breakpoint_conditions): New declarations.
9278 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9279 (breakpoint_inserted_here): Update comment.
9280 (add_breakpoint_condition, add_breakpoint_commands): Replace
9281 address parameter with a breakpoint pointer parameter.
9282 (gdb_breakpoint_here): Update comment.
9283 (delete_gdb_breakpoint_at): Delete.
9284 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9285 * server.c (process_point_options): Take a struct breakpoint
9286 pointer instead of an address. Adjust.
9287 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9288 delete_gdb_breakpoint.
9289 * spu-low.c (spu_target_ops): Install NULL as
9290 supports_z_point_type method.
9291 * target.h: Include mem-break.h.
9292 (struct target_ops) <prepare_to_access_memory>: Update comment.
9293 <supports_z_point_type>: New field.
9294 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9295 instead of a char. Also take a raw breakpoint pointer.
9296 * win32-arm-low.c (the_low_target): Install NULL as
9297 supports_z_point_type.
9298 * win32-i386-low.c (i386_supports_z_point_type): New function.
9299 (i386_insert_point, i386_remove_point): Adjust to new interface.
9300 (the_low_target): Install i386_supports_z_point_type.
9301 * win32-low.c (win32_supports_z_point_type): New function.
9302 (win32_insert_point, win32_remove_point): Adjust to new interface.
9303 (win32_target_ops): Install win32_supports_z_point_type.
9304 * win32-low.h (struct win32_target_ops):
9305 <supports_z_point_type>: New method.
9306 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9307 instead of a char. Also take a raw breakpoint pointer.
9308
9309 2014-05-20 Pedro Alves <palves@redhat.com>
9310
9311 * mem-break.h: Include break-common.h.
9312 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9313 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9314 (Z_packet_to_target_hw_bp_type): New declaration.
9315 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9316 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9317 (Z_PACKET_ACCESS_WP): Delete macros.
9318 (Z_packet_to_hw_type): Delete function.
9319 * i386-low.h: Don't include break-common.h here.
9320 (Z_packet_to_hw_type): Delete declaration.
9321 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9322 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9323 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9324 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9325 * linux-aarch64-low.c: Don't include break-common.h here.
9326 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9327 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9328 (Z_packet_to_target_hw_bp_type): Delete function.
9329 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9330 function.
9331 (mips_insert_point, mips_remove_point): Use
9332 Z_packet_to_target_hw_bp_type.
9333
9334 2014-05-20 Pedro Alves <palves@redhat.com>
9335
9336 * linux-aarch64-low.c: Include break-common.h.
9337 (enum target_point_type): Delete.
9338 (Z_packet_to_point_type): Rename to ...
9339 (Z_packet_to_target_hw_bp_type): ... this, and return a
9340 target_hw_bp_type instead.
9341 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9342 instead of an enum target_point_type.
9343 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9344 breakpoint type.
9345 (aarch64_dr_state_insert_one_point)
9346 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9347 (aarch64_handle_aligned_watchpoint)
9348 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9349 Take an enum target_hw_bp_type instead of an enum
9350 target_point_type.
9351 (aarch64_supports_z_point_type): New function.
9352 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9353 use Z_packet_to_target_hw_bp_type.
9354
9355 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9356
9357 * configure.ac: Only use -Werror by default when DEVELOPMENT
9358 is true.
9359 * configure: Regenerate.
9360
9361 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9362
9363 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9364 * linux-x86-low.c (X86_64_USER_REGS): New.
9365 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9366
9367 2014-04-28 Yao Qi <yao@codesourcery.com>
9368
9369 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9370 name.
9371
9372 2014-04-25 Pedro Alves <palves@redhat.com>
9373
9374 PR server/16255
9375 * linux-low.c (linux_attach_fail_reason_string): New function.
9376 (linux_attach_lwp): Delete.
9377 (linux_attach_lwp_1): Rename to ...
9378 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9379 argument. Remove "initial" parameter. Return int instead of
9380 void. Don't error or warn here.
9381 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9382 failure to attach to the tgid. Call warning when failing to
9383 attach to an lwp.
9384 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9385 argument. Remove "initial" parameter. Return int instead of
9386 void. Don't error or warn here.
9387 (linux_attach_fail_reason_string): New declaration.
9388 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9389 interface change. Use linux_attach_fail_reason_string.
9390
9391 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9392 Walfred Tedeschi <walfred.tedeschi@intel.com>
9393
9394 * Makefile.in: Added rules to handle new files
9395 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9396 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9397 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9398 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9399 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9400 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9401 x32-avx512-linux.o.
9402 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9403 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9404 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9405 i386/x32-avx512.xml.
9406 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9407 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9408 i386/x32-avx512-linux.xml.
9409 * i387-fp.c (num_avx512_k_registers): New constant for number
9410 of K registers.
9411 (num_avx512_zmmh_low_registers): New constant for number of
9412 lower ZMM registers (0-15).
9413 (num_avx512_zmmh_high_registers): New constant for number of
9414 higher ZMM registers (16-31).
9415 (num_avx512_ymmh_registers): New contant for number of higher
9416 YMM registers (ymm16-31 added by avx521 on x86_64).
9417 (num_avx512_xmm_registers): New constant for number of higher
9418 XMM registers (xmm16-31 added by AVX512 on x86_64).
9419 (struct i387_xsave): Add space for AVX512 registers.
9420 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9421 Add code to handle AVX512 registers.
9422 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9423 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9424 prototypei from generated file.
9425 (tdesc_amd64_avx512_linux): Likewise.
9426 (init_registers_x32_avx512_linux): Likewise.
9427 (tdesc_x32_avx512_linux): Likewise.
9428 (init_registers_i386_avx512_linux): Likewise.
9429 (tdesc_i386_avx512_linux): Likewise.
9430 (x86_64_regmap): Add AVX512 registers.
9431 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9432 mask.
9433 (initialize_low_arch): Add code to initialize AVX512 registers.
9434
9435 2014-04-23 Pedro Alves <palves@redhat.com>
9436
9437 * mem-break.c (find_gdb_breakpoint_at): Make static.
9438 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9439
9440 2014-04-23 Pedro Alves <palves@redhat.com>
9441
9442 * i386-low.c: Don't include break-common.h here.
9443 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9444 prototype to take target_hw_bp_type as argument instead of a Z
9445 packet char.
9446 * i386-low.h: Include break-common.h here.
9447 (Z_packet_to_hw_type): Declare.
9448 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9449 prototypes.
9450 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9451 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9452 (x86_remove_point): Convert the packet number to a
9453 target_hw_bp_type before calling i386_low_remove_watchpoint.
9454 * win32-i386-low.c (i386_insert_point): Convert the packet number
9455 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9456 (i386_remove_point): Convert the packet number to a
9457 target_hw_bp_type before calling i386_low_remove_watchpoint.
9458
9459 2014-04-23 Pedro Alves <palves@redhat.com>
9460
9461 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9462
9463 2014-04-10 Pedro Alves <palves@redhat.com>
9464
9465 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9466 Check if the condition or command is NULL before checking if the
9467 breakpoint is known. On success, return true.
9468 * mem-break.h (add_breakpoint_condition): Document return.
9469 (add_breakpoint_commands): Add describing comment.
9470 * server.c (skip_to_semicolon): New function.
9471 (process_point_options): Use it.
9472
9473 2014-04-09 Pedro Alves <palves@redhat.com>
9474
9475 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9476 to lwpid_of.
9477
9478 2014-02-27 Pedro Alves <palves@redhat.com>
9479
9480 PR 12702
9481 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9482 macros.
9483 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9484 output.
9485 (last_thread_of_process_p): Take a PID argument instead of a
9486 thread pointer.
9487 (linux_wait_for_lwp): Delete.
9488 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9489 functions.
9490 (linux_low_filter_event): New function, party factored out from
9491 linux_wait_for_event.
9492 (linux_wait_for_event): Rename to ...
9493 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9494 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9495 sigsuspend. Check for zombie leaders.
9496 (linux_wait_for_event): Reimplement as wrapper around
9497 linux_wait_for_event_filtered.
9498 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9499 a normal or signal exit is seen, it's the whole process exiting.
9500 (wait_for_sigstop): No longer a for_each_inferior callback.
9501 Rewrite on top of linux_wait_for_event_filtered.
9502 (stop_all_lwps): Call wait_for_sigstop directly.
9503 * server.c (resume, handle_target_event): Handle
9504 TARGET_WAITKIND_NO_RESUMED.
9505
9506 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9507
9508 * win32-low.c (psapi_get_dll_name,
9509 * win32_CreateToolhelp32Snapshot): Delete.
9510 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9511 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9512 Delete.
9513 (handle_load_dll): Add function description.
9514 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9515
9516 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9517
9518 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9519 Add comment.
9520 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9521 base address when calling win32_add_one_solib.
9522 (handle_load_dll): Delete local variable load_addr.
9523 Remove 0x1000 offset applied to DLL base address when calling
9524 win32_add_one_solib.
9525 (handle_unload_dll): Add comment.
9526
9527 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9528
9529 * win32-low.c (win32_add_all_dlls): Renames
9530 win32_ensure_ntdll_loaded. Rewrite function documentation.
9531 Adjust implementation to always load all DLLs.
9532 Add 0x1000 offset to DLL base address when calling
9533 win32_add_one_solib.
9534 (child_initialization_done): New static global.
9535 (do_initial_child_stuff): Set child_initialization_done to
9536 zero during child initialization, and 1 after. Replace call
9537 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9538 Add comment.
9539 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9540 (handle_unload_dll): Add function documentation.
9541 (get_child_debug_event): Ignore load and unload DLL events
9542 during child initialization.
9543
9544 2014-02-20 Doug Evans <dje@google.com>
9545
9546 Remove global all_lwps.
9547 * inferiors.h (ptid_of): Move here from linux-low.h.
9548 (pid_of, lwpid_of): Ditto.
9549 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9550 parameter is a struct thread_info * now.
9551 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9552 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9553 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9554 directly.
9555 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9556 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9557 * linux-arm-low.c (update_registers_callback): Update, "entry"
9558 parameter is a struct thread_info * now.
9559 Fetch lwpid from current_inferior directly.
9560 (arm_insert_point): Pass &all_threads to find_inferior instead of
9561 &all_lwps.
9562 (arm_remove_point): Ditto.
9563 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9564 (arm_prepare_to_resume): Fetch pid from thread.
9565 (arm_read_description): Fetch lwpid from current_inferior directly.
9566 * linux-low.c (all_lwps): Delete.
9567 (delete_lwp): Delete call to remove_inferior.
9568 (handle_extended_wait): Fetch lwpid from thread.
9569 (add_lwp): Don't set lwp->entry.id. Remove call to
9570 add_inferior_to_list.
9571 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9572 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9573 (kill_one_lwp_callback): Ditto.
9574 (linux_kill): Don't dereference NULL pointer.
9575 Fetch ptid,lwpid from thread.
9576 (get_detach_signal): Fetch ptid from thread.
9577 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9578 Simplify call to regcache_invalidate_thread.
9579 (delete_lwp_callback): Update, "entry" parameter is a
9580 struct thread_info * now. Fetch pid from thread.
9581 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9582 (status_pending_p_callback): Update, "entry" parameter is a
9583 struct thread_info * now. Fetch ptid from thread.
9584 (find_lwp_pid): Update, "entry" parameter is a
9585 struct thread_info * now.
9586 (linux_wait_for_lwp): Fetch pid from thread.
9587 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9588 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9589 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9590 (dequeue_one_deferred_signal): Ditto.
9591 (cancel_breakpoint): Fetch ptid from current_inferior.
9592 (linux_wait_for_event): Pass &all_threads to find_inferior,
9593 not &all_lwps. Fetch ptid, lwpid from thread.
9594 (count_events_callback): Update, "entry" parameter is a
9595 struct thread_info * now.
9596 (select_singlestep_lwp_callback): Ditto.
9597 (select_event_lwp_callback): Ditto.
9598 (cancel_breakpoints_callback): Ditto.
9599 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9600 not &all_lwps.
9601 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9602 (unsuspend_one_lwp): Update, "entry" parameter is a
9603 struct thread_info * now.
9604 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9605 not &all_lwps.
9606 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9607 Fetch lwpid from thread, not lwp.
9608 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9609 Pass &all_threads to find_inferior, not &all_lwps.
9610 (send_sigstop): Fetch lwpid from thread, not lwp.
9611 (send_sigstop_callback): Update, "entry" parameter is a
9612 struct thread_info * now.
9613 (suspend_and_send_sigstop_callback): Ditto.
9614 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9615 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9616 struct thread_info * now.
9617 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9618 from thread, lwp.
9619 (lwp_running): Update, "entry" parameter is a
9620 struct thread_info * now.
9621 (stop_all_lwps): Fetch ptid from thread.
9622 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9623 (linux_resume_one_lwp): Fetch lwpid from thread.
9624 (linux_set_resume_request): Update, "entry" parameter is a
9625 struct thread_info * now. Fetch pid, lwpid from thread.
9626 (resume_status_pending_p): Update, "entry" parameter is a
9627 struct thread_info * now.
9628 (need_step_over_p): Ditto. Fetch lwpid from thread.
9629 (start_step_over): Fetch lwpid from thread.
9630 (linux_resume_one_thread): Update, "entry" parameter is a
9631 struct thread_info * now. Fetch lwpid from thread.
9632 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9633 (proceed_one_lwp): Update, "entry" parameter is a
9634 struct thread_info * now. Fetch lwpid from thread.
9635 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9636 struct thread_info * now.
9637 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9638 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9639 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9640 directly.
9641 (regsets_store_inferior_registers): Ditto.
9642 (fetch_register, store_register): Ditto.
9643 (linux_read_memory, linux_write_memory): Ditto.
9644 (linux_request_interrupt): Ditto.
9645 (linux_read_auxv): Ditto.
9646 (linux_xfer_siginfo): Ditto.
9647 (linux_qxfer_spu): Ditto.
9648 (linux_qxfer_libraries_svr4): Ditto.
9649 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9650 moved to inferiors.h.
9651 (get_lwp): Delete.
9652 (get_thread_lwp): Update.
9653 (struct lwp_info): Delete member "entry". Simplify comment for
9654 member "thread".
9655 (all_lwps): Delete.
9656 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9657 current_inferior directly.
9658 (update_watch_registers_callback): Update, "entry" parameter is a
9659 struct thread_info * now. Fetch pid from thread.
9660 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9661 (mips_insert_point): Fetch lwpid from current_inferior.
9662 Pass &all_threads to find_inferior, not &all_lwps.
9663 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9664 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9665 directly.
9666 (mips_stopped_data_address): Ditto.
9667 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9668 directly.
9669 * linux-tile-low.c (tile_arch_setup): Ditto.
9670 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9671 (update_debug_registers_callback): Update, "entry" parameter is a
9672 struct thread_info * now. Fetch pid from thread.
9673 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9674 Pass &all_threads to find_inferior, not &all_lwps.
9675 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9676 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9677 Pass &all_threads to find_inferior, not &all_lwps.
9678 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9679 (i386_dr_low_get_status): Ditto.
9680 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9681 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9682 (x86_linux_read_description): Ditto.
9683 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9684
9685 2014-02-20 Doug Evans <dje@google.com>
9686
9687 * inferiors.c (get_first_inferior): Fix buglet.
9688
9689 2014-02-19 Doug Evans <dje@google.com>
9690
9691 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9692 * inferiors.c (add_thread): Change result type to struct thread_info *.
9693 All callers updated.
9694 (add_lwp): Call add_thread here instead of in callers.
9695 All callers updated.
9696 * linux-low.h (get_lwp_thread): Rewrite.
9697 (struct lwp_info): New member "thread".
9698
9699 2014-02-19 Doug Evans <dje@google.com>
9700
9701 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9702 All callers updated.
9703
9704 2014-02-19 Doug Evans <dje@google.com>
9705
9706 * inferiors.c (add_thread): Fix whitespace.
9707
9708 2014-02-19 Doug Evans <dje@google.com>
9709
9710 * dll.c (clear_dlls): Replace accessing list implemention details
9711 with API function.
9712 * gdbthread.h (get_first_thread): Declare.
9713 * inferiors.c (for_each_inferior_with_data): New function.
9714 (get_first_thread): New function.
9715 (find_thread_ptid): Simplify.
9716 (get_first_inferior): New function.
9717 (clear_list): Delete.
9718 (one_inferior_p): New function.
9719 (clear_inferior_list): New function.
9720 (clear_inferiors): Update.
9721 * inferiors.h (for_each_inferior_with_data): Declare.
9722 (clear_inferior_list): Declare.
9723 (one_inferior_p): Declare.
9724 (get_first_inferior): Declare.
9725 * linux-low.c (linux_wait_for_event): Replace accessing list
9726 implemention details with API function.
9727 * server.c (target_running): Ditto.
9728 (accumulate_file_name_length): New function.
9729 (emit_dll_description): New function.
9730 (handle_qxfer_libraries): Replace accessing list implemention
9731 details with API function.
9732 (handle_qxfer_threads_worker): New function.
9733 (handle_qxfer_threads_proper): Replace accessing list implemention
9734 details with API function.
9735 (handle_query): Ditto.
9736 (visit_actioned_threads_callback_ftype): New typedef.
9737 (visit_actioned_threads_data): New struct.
9738 (visit_actioned_threads): Rewrite to be find_inferior callback.
9739 (resume): Call find_inferior.
9740 (handle_status): Replace accessing list implemention
9741 details with API function.
9742 (process_serial_event): Replace accessing list implemention details
9743 with API function.
9744 * target.c (set_desired_inferior): Replace accessing list implemention
9745 details with API function.
9746 * tracepoint.c (same_process_p): New function.
9747 (gdb_agent_about_to_close): Replace accessing list implemention
9748 details with API function.
9749 * win32-low.c (child_delete_thread): Replace accessing list
9750 implemention details with API function.
9751 (match_dll_by_basename): New function.
9752 (dll_is_loaded_by_basename): New function.
9753 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9754 details call to dll_is_loaded_by_basename.
9755
9756 2014-02-19 Doug Evans <dje@google.com>
9757
9758 * dll.h (struct dll_info): Add comment.
9759 * gdbthread.h (struct thread_info): Add comment.
9760 (current_ptid): Simplify.
9761 * inferiors.c (add_process): Update.
9762 (remove_process): Update.
9763 * inferiors.h (struct process_info): Rename member "head" to "entry".
9764 * linux-low.c (delete_lwp): Update.
9765 (add_lwp): Update.
9766 (last_thread_of_process_p): Update.
9767 (kill_one_lwp_callback, linux_kill): Update.
9768 (status_pending_p_callback): Update.
9769 (wait_for_sigstop): Update. Simplify read of ptid.
9770 (start_step_over): Update.
9771 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9772 (get_lwp_thread): Update.
9773 (struct lwp_info): Rename member "head" to "entry".
9774 * regcache.h (inferior_list_entry): Delete.
9775 * server.c (kill_inferior_callback): Update.
9776 (detach_or_kill_inferior_callback): Update.
9777 (print_started_pid): Update.
9778 (print_attached_pid): Update.
9779 (process_serial_event): Simplify read of ptid.
9780 * thread-db.c (thread_db_create_event): Update.
9781 (thread_db_get_tls_address): Update.
9782 * win32-low.c (current_inferior_ptid): Simplify.
9783
9784 2014-02-19 Tom Tromey <tromey@redhat.com>
9785
9786 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9787 argument.
9788 (target_supports_btrace): Update.
9789
9790 2014-02-14 Yao Qi <yao@codesourcery.com>
9791
9792 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9793 (rsp-low-ipa.o): New target.
9794
9795 2014-02-12 Tom Tromey <tromey@redhat.com>
9796
9797 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9798 convert_ascii_to_int.
9799 * regcache.c (registers_to_string): Likewise.
9800 * remote-utils.c (decode_M_packet): Likewise.
9801 * server.c (process_serial_event): Likewise.
9802
9803 2014-02-12 Tom Tromey <tromey@redhat.com>
9804
9805 * server.c (handle_query, handle_v_run): Use hex2bin, not
9806 unhexify.
9807 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9808
9809 2014-02-12 Tom Tromey <tromey@redhat.com>
9810
9811 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9812 convert_int_to_ascii.
9813 * regcache.c (registers_to_string, collect_register_as_string):
9814 Likewise.
9815 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9816 Likewise.
9817 * server.c (process_serial_event): Likewise.
9818 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9819 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9820
9821 2014-02-12 Tom Tromey <tromey@redhat.com>
9822
9823 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9824 bin2hex, not hexify.
9825 * tracepoint.c (cmd_qtstatus): Likewise.
9826
9827 2014-02-12 Tom Tromey <tromey@redhat.com>
9828
9829 * remote-utils.c (monitor_output): Pass explicit length to
9830 hexify.
9831
9832 2014-02-12 Tom Tromey <tromey@redhat.com>
9833
9834 * tracepoint.c: Include rsp-low.h.
9835 * server.c: Include rsp-low.h.
9836 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9837 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9838 declare.
9839 * remote-utils.c: Include rsp-low.h.
9840 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9841 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9842 (convert_int_to_ascii, convert_ascii_to_int): Move to
9843 common/rsp-low.c.
9844 * regcache.c: Include rsp-low.h.
9845 * ax.c: Include rsp-low.h.
9846 * Makefile.in (SFILES): Add common/rsp-low.c.
9847 (OBS): Add rsp-low.o.
9848 (rsp-low.o): New target.
9849
9850 2014-02-12 Tom Tromey <tromey@redhat.com>
9851
9852 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9853 Include print-utils.h.
9854 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9855 (plongest, thirty_two, phex_nz): Remove.
9856 * Makefile.in (SFILES): Add common/print-utils.c.
9857 (OBS): Add print-utils.o.
9858 (print-utils-ipa.o): New target.
9859 (print-utils.o): New target.
9860 (IPA_OBJS): Add print-utils-ipa.o.
9861
9862 2014-02-06 Tom Tromey <tromey@redhat.com>
9863
9864 * Makefile.in (SFILES): Fix indentation.
9865
9866 2014-02-05 Doug Evans <dje@google.com>
9867
9868 * linux-low.c (linux_wait_for_event): Improve comment.
9869 (linux_wait_1): Keep current_inferior in sync with event_child.
9870
9871 2014-01-22 Doug Evans <dje@google.com>
9872
9873 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9874
9875 2014-01-22 Doug Evans <dje@google.com>
9876
9877 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9878 * configure: Regenerate.
9879 * config.in: Regenerate.
9880 * Makefile.in (SFILES): Add debug.c.
9881 (OBS): Add debug.o.
9882 * debug.c: New file.
9883 * debug.h: New file.
9884 * linux-aarch64-low.c (*): Update all debugging printfs to use
9885 debug_printf instead of fprintf.
9886 * linux-arm-low.c (*): Ditto.
9887 * linux-cris-low.c (*): Ditto.
9888 * linux-crisv32-low.c (*): Ditto.
9889 * linux-m32r-low.c (*): Ditto.
9890 * linux-sparc-low.c (*): Ditto.
9891 * linux-x86.c (*): Ditto.
9892 * linux-low.c (*): Ditto.
9893 (linux_wait_1): Add calls to debug_enter, debug_exit.
9894 (linux_wait): Remove redundant debugging printf.
9895 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9896 (linux_resume, unstop_all_lwps): Ditto.
9897 * mem-break.c (*): Update all debugging printfs to use
9898 debug_printf instead of fprintf.
9899 * remote-utils.c (*): Ditto.
9900 * thread-db.c (*): Ditto.
9901 * server.c #include <ctype.h>, "gdb_vecs.h".
9902 (debug_threads): Moved to debug.c.
9903 (*): Update all debugging printfs to use debug_printf instead of
9904 fprintf.
9905 (start_inferior): Replace call to fflush with call to debug_flush.
9906 (monitor_show_help): Mention set debug-format.
9907 (parse_debug_format_options): New function.
9908 (handle_monitor_command): Handle "monitor set debug-format".
9909 (gdbserver_usage): Mention --debug-format.
9910 (main): Parse --debug-format.
9911 * server.h (debug_threads): Declaration moved to debug.h.
9912 #include "debug.h".
9913 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9914 trace_debug_1 that uses debug_printf.
9915 (tracepoint_look_up_symbols): Update all debugging printfs to use
9916 debug_printf instead of fprintf.
9917
9918 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9919
9920 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9921 sys/ptrace.h.
9922
9923 2014-01-17 Pedro Alves <palves@redhat.com>
9924
9925 PR build/16445
9926 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9927 defined after including gdb_proc_service.h.
9928
9929 2014-01-16 Doug Evans <dje@google.com>
9930
9931 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9932 (match_dll): Use it.
9933
9934 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9935
9936 * target.h (target_ops) <read_btrace>: Change parameters and
9937 return type to allow error reporting.
9938 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9939 trace reading errors on.
9940 * linux-low.c (linux_low_read_btrace): Pass trace reading
9941 errors on.
9942 (linux_low_disable_btrace): New.
9943
9944 2014-01-15 Doug Evans <dje@google.com>
9945
9946 * inferiors.c (thread_id_to_gdb_id): Delete.
9947 * inferiors.h (thread_id_to_gdb_id): Delete.
9948
9949 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9950
9951 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9952 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9953 versions.
9954
9955 2014-01-08 Pedro Alves <palves@redhat.com>
9956
9957 * server.c (handle_status): Don't discard previous queued stop
9958 replies or thread's pending status here.
9959 (main) <disconnection>: Do it here instead.
9960
9961 2014-01-08 Pedro Alves <palves@redhat.com>
9962
9963 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9964 * server.c (visit_actioned_threads, handle_pending_status): New
9965 function.
9966 (handle_v_cont): Factor out parts to ...
9967 (resume): ... this new function. If in all-stop, and a thread
9968 being resumed has a pending status, report it without actually
9969 resuming.
9970 (myresume): Adjust to use the new 'resume' function.
9971 (clear_pending_status_callback, set_pending_status_callback)
9972 (find_status_pending_thread_callback): New functions.
9973 (handle_status): Handle the case of multiple threads having
9974 interesting statuses to report. Report threads' real last signal
9975 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9976 with an interesting thread to report the status for, instead of
9977 always reporting the status of the first thread.
9978
9979 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9980
9981 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9982 * gdbreplay.c (gdbreplay_version): Likewise.
9983
9984 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9985
9986 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9987 iov.iov_len with the real length in use.
9988
9989 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9990
9991 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9992 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9993 for all targets that use win32-low.c.
9994 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9995 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9996
9997 2013-12-13 Pedro Alves <palves@redhat.com>
9998
9999 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10000 if equal to TARGET_WAITKIND_LOADED.
10001 * win32-low.c (cached_status): New static global.
10002 (win32_wait): Add declaration.
10003 (do_initial_child_stuff): Flush all initial pending debug events
10004 up to the initial breakpoint.
10005 (win32_wait): If CACHED_STATUS was set, return that instead
10006 of doing a real wait. Remove the code resuming the execution
10007 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10008 during the initial phase. Also remove the code changing
10009 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10010 TARGET_WAITKIND_STOPPED.
10011
10012 2013-12-11 Yao Qi <yao@codesourcery.com>
10013
10014 * notif.c (handle_notif_ack): Return 0 if no notification
10015 matches.
10016
10017 2013-11-20 Doug Evans <dje@google.com>
10018
10019 * linux-low.c (linux_set_resume_request): Fix comment.
10020
10021 2013-11-20 Doug Evans <dje@google.com>
10022
10023 * linux-low.c (resume_status_pending_p): Tweak comment.
10024
10025 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10026
10027 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10028 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10029 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10030 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10031 (srv_amd64_regobj): Add amd64-mpx.o.
10032 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10033 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10034 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10035 * i387-fp.c (num_pl_bnd_register) Added constant.
10036 (num_pl_bnd_cfg_registers) Added constant.
10037 (struct i387_xsave) Added reserved area and MPX fields.
10038 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10039 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10040 function.
10041 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10042 (init_registers_amd64_mpx_linux): Declare new function.
10043 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10044 (x86_64_regmap): Add MPX registers.
10045 (x86_linux_read_description): Add MPX case.
10046 (initialize_low_arch): Initialize MPX targets.
10047
10048 2013-11-18 Tom Tromey <tromey@redhat.com>
10049
10050 * configure: Rebuild.
10051 * configure.ac: Don't check for stdlib.h.
10052 * gdbreplay.c: Unconditionally include stdlib.h.
10053
10054 2013-11-18 Tom Tromey <tromey@redhat.com>
10055
10056 * config.in: Rebuild.
10057 * configure: Rebuild.
10058 * configure.ac: Don't use AC_HEADER_DIRENT.
10059
10060 2013-11-18 Tom Tromey <tromey@redhat.com>
10061
10062 * server.h: Don't check HAVE_STRING_H.
10063 * gdbreplay.c: Don't check HAVE_STRING_H.
10064 * configure: Rebuild.
10065
10066 2013-11-18 Tom Tromey <tromey@redhat.com>
10067
10068 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10069 LIBGNU.
10070
10071 2013-11-08 Tom Tromey <tromey@redhat.com>
10072
10073 * configure, config.in: Rebuild.
10074 * configure.ac: Remove unused configury.
10075
10076 2013-11-08 Tom Tromey <tromey@redhat.com>
10077
10078 * acinclude.m4: Include common.m4, codeset.m4.
10079 * configure, config.in: Rebuild.
10080 * configure.ac: Use GDB_AC_COMMON.
10081
10082 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10083
10084 * linux-s390-low.c (HWCAP_S390_TE): New define.
10085 (s390_arch_setup): Consider the TE field in the HWCAP for
10086 determining 'have_regset_tdb'.
10087
10088 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10089
10090 PR gdb/16014
10091 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10092 call to sizeof.
10093
10094 2013-10-02 Pedro Alves <palves@redhat.com>
10095
10096 * server.c (process_serial_event): Don't output "GDBserver
10097 exiting" if GDB is connected through stdio.
10098 * target.c (mywait): Likewise, be silent if GDB is connected
10099 through stdio.
10100
10101 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10102
10103 * lynx-low.c (lynx_add_threads_after_attach): New function.
10104 (lynx_attach): Remove call to add_thread. Add call to
10105 lynx_add_threads_after_attach instead.
10106
10107 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10108
10109 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10110 * config.in, configure: Regenerated.
10111
10112 2013-09-18 Yao Qi <yao@codesourcery.com>
10113
10114 PR server/15959
10115 * server.c (start_inferior): Clear 'resume_info'.
10116
10117 2013-09-16 Jiong Wang <jiwang@tilera.com>
10118
10119 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10120 for each register.
10121
10122 2013-09-16 Jiong Wang <jiwang@tilera.com>
10123
10124 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10125 linux-tile-low.o to srv_tgtobj.
10126
10127 2013-09-16 Will Newton <will.newton@linaro.org>
10128
10129 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10130 out regs.
10131
10132 2013-09-06 Pedro Alves <palves@redhat.com>
10133
10134 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10135 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10136 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10137 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10138 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10139 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10140
10141 2013-09-06 Pedro Alves <palves@redhat.com>
10142
10143 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10144 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10145
10146 2013-09-06 Pedro Alves <palves@redhat.com>
10147
10148 * linux-amd64-ipa.c: Include tracepoint.h.
10149 * linux-i386-ipa.c: Include tracepoint.h.
10150
10151 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10152
10153 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10154 (ps_get_thread_area): New function.
10155
10156 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10157
10158 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10159 (initialize_low_arch): Call init_registers_crisv32 rather than
10160 init_register_crisv32.
10161
10162 2013-09-05 Pedro Alves <palves@redhat.com>
10163
10164 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10165 to ...
10166 * hostio.h: ... this new file.
10167 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10168 win32-low.c: Include hostio.h.
10169
10170 2013-09-05 Pedro Alves <palves@redhat.com>
10171
10172 * server.h (gdb_client_data, handler_func, callback_handler_func)
10173 (delete_file_handler, add_file_handler, append_callback_event)
10174 (delete_callback_event, start_event_loop, initialize_event_loop):
10175 Move to event-loop.h and include it.
10176 * event-loop.h: New file.
10177
10178 2013-09-05 Pedro Alves <palves@redhat.com>
10179
10180 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10181 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10182 (loaded_dll, unloaded_dll): Move to ...
10183 * dll.h: ... this new file.
10184 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10185
10186 2013-09-05 Pedro Alves <palves@redhat.com>
10187
10188 * server.h (current_process, get_thread_process, all_processes)
10189 (add_inferior_to_list, for_each_inferior, current_inferior)
10190 (remove_inferior, add_process, remove_process, find_process_pid)
10191 (have_started_inferiors_p, have_attached_inferiors_p)
10192 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10193 (clear_inferiors, find_inferior, find_inferior_id)
10194 (inferior_target_data, set_inferior_target_data)
10195 (inferior_regcache_data, set_inferior_regcache_data): Move to
10196 inferiors.h, and include it.
10197 * inferiors.h: New file.
10198
10199 2013-09-05 Pedro Alves <palves@redhat.com>
10200
10201 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10202 Move ...
10203 * ax.h: ... here.
10204
10205 2013-09-05 Pedro Alves <palves@redhat.com>
10206
10207 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10208 tracepoint.h.
10209 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10210 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10211 (handle_tracepoint_general_set, handle_tracepoint_query)
10212 (tracepoint_finished_step, tracepoint_was_hit)
10213 (release_while_stepping_state_list, current_traceframe)
10214 (in_readonly_region, traceframe_read_mem)
10215 (fetch_traceframe_registers, traceframe_read_sdata)
10216 (traceframe_read_info, struct fast_tpoint_collect_status)
10217 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10218 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10219 (supply_fast_tracepoint_registers)
10220 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10221 (ipa_tdesc, claim_trampoline_space)
10222 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10223 (agent_mem_read, agent_get_trace_state_variable_value)
10224 (agent_set_trace_state_variable_value, agent_tsv_read)
10225 (agent_mem_read_string, get_raw_reg_func_addr)
10226 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10227 * tracepoint.h: ... this new file.
10228
10229 2013-09-05 Pedro Alves <palves@redhat.com>
10230
10231 * server.h (perror_with_name, error, fatal, warning, paddress)
10232 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10233 include it.
10234 * utils.h: New file.
10235
10236 2013-09-05 Pedro Alves <palves@redhat.com>
10237
10238 * server.h (remote_debug, noack_mode, transport_is_reliable)
10239 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10240 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10241 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10242 (write_enn, initialize_async_io, enable_async_io)
10243 (disable_async_io, check_remote_input_interrupt_request)
10244 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10245 (dead_thread_notify, prepare_resume_reply)
10246 (decode_address_to_semicolon, decode_address, decode_m_packet)
10247 (decode_M_packet, decode_X_packet, decode_xfer_write)
10248 (decode_search_memory_packet, unhexify, hexify)
10249 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10250 (look_up_one_symbol, relocate_instruction)
10251 (monitor_output): Move to remote-utils.h, and include it.
10252 * remote-utils.h: New file.
10253
10254 2013-09-05 Pedro Alves <palves@redhat.com>
10255
10256 * server.h (_): Delete.
10257
10258 2013-09-02 Pedro Alves <palves@redhat.com>
10259
10260 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10261 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10262 allocated.
10263 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10264
10265 2013-09-02 Pierre Muller <muller@sourceware.org>
10266
10267 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10268 or WriteProcessMemory complete successfully and handle
10269 ERROR_PARTIAL_COPY error.
10270
10271 2013-09-02 Pedro Alves <palves@redhat.com>
10272
10273 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10274 error instead of EIO.
10275
10276 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10277
10278 PR server/15604
10279 * linux-low.c: Include filestuff.h.
10280 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10281 * lynx-low.c: Include filestuff.h.
10282 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10283 * server.c: Include filestuff.h.
10284 (main): Call notice_open_fds.
10285 * spu-low.c: Include filestuff.h.
10286 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10287
10288 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10289
10290 * Makefile.in: Explain why ../target and ../nat are not
10291 listed as include file search paths.
10292 (linux-waitpid.o): New object file rule.
10293 * configure.srv (srv_native_linux_obj): New variable.
10294 Replace all occurrences of linux native object files with
10295 $srv_native_linux_obj.
10296 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10297 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10298 (linux_enable_event_reporting): Remove declaration.
10299 (my_waitpid): Moved to common/linux-waitpid.c.
10300 (linux_wait_for_event): Pass ptid when calling
10301 linux_enable_event_reporting.
10302 (linux_supports_tracefork_flag): Remove.
10303 (linux_enable_event_reporting): Likewise.
10304 (linux_tracefork_grandchild): Remove.
10305 (STACK_SIZE): Moved to common/linux-ptrace.c.
10306 (linux_tracefork_child): Remove.
10307 (linux_test_for_tracefork): Remove.
10308 (linux_look_up_symbols): Call linux_supports_traceclone.
10309 (initialize_low): Remove call to linux_test_for_tracefork.
10310 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10311 common/linux-ptrace.h.
10312 (PTRACE_TYPE_ARG4): Likewise.
10313 Include linux-ptrace.h.
10314
10315 2013-08-21 Pedro Alves <palves@redhat.com>
10316
10317 * config.in: Renegerate.
10318
10319 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10320
10321 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10322 (SFILES): Remove $(srcdir)/common/target-common.c and
10323 add $(srcdir)/target/waitstatus.c.
10324 (OBS): Remove target-common.o and add waitstatus.o.
10325 (server_h): Remove $(srcdir)/../common/target-common.h and
10326 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10327 and $(srcdir)/../target/waitstatus.h.
10328 (target-common.o): Remove.
10329 (waitstatus.o): New target object file.
10330 * target.h: Do not include target-common.h and
10331 include target/resume.h, target/wait.h and
10332 target/waitstatus.h.
10333
10334 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10335
10336 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10337 to PTRACE_TYPE_ARG3.
10338 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10339 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10340 PTRACE_TYPE_ARG4.
10341 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10342 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10343
10344 2013-07-27 Jie Zhang <jie@codesourcery.com>
10345 Daniel Jacobowitz <dan@codesourcery.com>
10346 Yao Qi <yao@codesourcery.com>
10347
10348 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10349 (mips-linux-watch.o): New rule.
10350 (mips_linux_watch_h): New variable.
10351 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10352 srv_tgtobj.
10353 * linux-mips-low.c: Include mips-linux-watch.h.
10354 (struct arch_process_info, struct arch_lwp_info): New.
10355 (update_watch_registers_callback): New function.
10356 (mips_linux_new_process, mips_linux_new_thread) New functions.
10357 (mips_linux_prepare_to_resume, mips_insert_point): New
10358 functions.
10359 (mips_remove_point, mips_stopped_by_watchpoint): New
10360 functions.
10361 (rsp_bp_type_to_target_hw_bp_type): New function.
10362 (mips_stopped_data_address): New function.
10363 (the_low_target): Add watchpoint support functions.
10364
10365 2013-07-27 Yao Qi <yao@codesourcery.com>
10366
10367 * i386-low.c: Include break-common.h.
10368 (enum target_hw_bp_type): Remove.
10369
10370 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10371
10372 * Makefile.in (SFILES): /common/target-common.c.
10373 (OBS): Add target-common.o.
10374 (server_h): Add $(srcdir)/../common/target-common.h.
10375 (target-common.o): New target.
10376 * server.c (queue_stop_reply_callback): Free
10377 status string after use.
10378 * target.c (target_waitstatus_to_string): Remove.
10379 * target.h: Include target-common.h.
10380 (resume_kind): Likewise.
10381 (target_waitkind): Likewise.
10382 (target_waitstatus): Likewise.
10383 (TARGET_WNOHANG): Likewise.
10384
10385 2013-07-04 Yao Qi <yao@codesourcery.com>
10386
10387 * Makefile.in (host_alias): Use @host_noncanonical@.
10388 (target_alias): Use @target_noncanonical@.
10389 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10390 ACX_NONCANONICAL_HOST.
10391 * configure: Regenerated.
10392
10393 Revert:
10394 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10395
10396 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10397 * configure: Rebuild.
10398 * Makefile.in (version_host, version_target): Get from configure.
10399 (version.c): Use $(version_host) and $(version_target).
10400
10401 2013-07-03 Pedro Alves <palves@redhat.com>
10402
10403 * Makefile.in (config.status): Depend on development.sh.
10404 * acinclude.m4: Include libmcheck.m4.
10405 * configure: Regenerate.
10406
10407 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10408
10409 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10410 attribute inside the parentheses.
10411 (winapi_DebugSetProcessKillOnExit): Ditto.
10412 (winapi_DebugBreakProcess): Ditto.
10413 (winapi_GenerateConsoleCtrlEvent): Ditto.
10414
10415 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10416
10417 * notif.h (notif_event): Add a dummy member to avoid compiler
10418 errors.
10419
10420 2013-07-01 Pedro Alves <palves@redhat.com>
10421
10422 * hostio.c (HOSTIO_PATH_MAX): Define.
10423 (require_filename, handle_open, handle_unlink, handle_readlink):
10424 Use it.
10425
10426 2013-07-01 Pedro Alves <palves@redhat.com>
10427
10428 * server.h: Include "pathmax.h".
10429 * linux-low.c: Don't include sys/param.h.
10430 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10431 MAXPATHLEN.
10432 * win32-low.c: Don't include sys/param.h.
10433 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10434
10435 2013-07-01 Pedro Alves <palves@redhat.com>
10436
10437 * event-loop.c: Don't check HAVE_UNISTD_H before including
10438 <unistd.h>.
10439 * gdbreplay.c: Likewise.
10440 * remote-utils.c: Likewise.
10441 * server.c: Likewise.
10442 * configure.ac: Don't check for unistd.h.
10443 * configure: Regenerate.
10444
10445 2013-06-28 Tom Tromey <tromey@redhat.com>
10446
10447 * Makefile.in (version.c): Use version.in, not
10448 common/version.in.
10449
10450 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10451
10452 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10453 * configure: Rebuild.
10454 * Makefile.in (version_host, version_target): Get from configure.
10455 (version.c): Use $(version_host) and $(version_target).
10456
10457 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10458
10459 Fix trace-status to output user name without trailing colon.
10460 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10461
10462 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10463
10464 Fix trace-status to output proper start-time and stop-time.
10465 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10466 output start time and stop time in hex as gdb expects.
10467
10468 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10469
10470 * tracepoint.c (build_traceframe_info_xml): Output trace state
10471 variables present in the trace buffer.
10472
10473 2013-06-24 Tom Tromey <tromey@redhat.com>
10474
10475 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10476 create-version.sh.
10477 (version.o): Remove.
10478 * gdbreplay.c: Include version.h.
10479 (version, host_name): Don't declare.
10480 * server.h: Include version.h.
10481 (version, host_name): Don't declare.
10482
10483 2013-06-12 Pedro Alves <palves@redhat.com>
10484
10485 * linux-x86-low.c (linux_is_elf64): Delete global.
10486 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10487 with local linux_pid_exe_is_elf_64_file use.
10488
10489 2013-06-11 Pedro Alves <palves@redhat.com>
10490
10491 * linux-low.c (regset_disabled, disable_regset): New functions.
10492 (regsets_fetch_inferior_registers)
10493 (regsets_store_inferior_registers): Use them.
10494 (initialize_regsets_info); Don't allocate the disabled_regsets
10495 array here.
10496 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10497 comment.
10498
10499 2013-06-11 Pedro Alves <palves@redhat.com>
10500
10501 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10502 xmalloc.
10503
10504 2013-06-11 Pedro Alves <palves@redhat.com>
10505
10506 * linux-x86-low.c (initialize_low_arch): Call
10507 init_registers_x32_avx_linux.
10508
10509 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10510
10511 Fix compatibility with Android Bionic.
10512 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10513 it is not empty.
10514
10515 2013-06-07 Pedro Alves <palves@redhat.com>
10516
10517 PR server/14823
10518 * Makefile.in (OBS): Add tdesc.o.
10519 (IPA_OBJS): Add tdesc-ipa.o.
10520 (tdesc-ipa.o): New rule.
10521 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10522 interface.
10523 * linux-low.c (new_inferior): Delete.
10524 (disabled_regsets, num_regsets): Delete.
10525 (linux_add_process): Adjust to set the new per-process
10526 new_inferior flag.
10527 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10528 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10529 was a stop. When calling arch_setup, switch the current inferior
10530 to the thread that got an event.
10531 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10532 (regsets_fetch_inferior_registers)
10533 (regsets_store_inferior_registers): New regsets_info parameter.
10534 Adjust to use it.
10535 (linux_register_in_regsets): New regs_info parameter. Adjust to
10536 use it.
10537 (register_addr, fetch_register, store_register): New usrregs_info
10538 parameter. Adjust to use it.
10539 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10540 parameter regs_info. Adjust to use it.
10541 (linux_fetch_registers): Get the current inferior's regs_info, and
10542 adjust to use it.
10543 (linux_store_registers): Ditto.
10544 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10545 (initialize_low): Don't initialize the target_regsets here. Call
10546 initialize_low_arch.
10547 * linux-low.h (target_regsets): Delete declaration.
10548 (struct regsets_info): New.
10549 (struct usrregs_info): New.
10550 (struct regs_info): New.
10551 (struct process_info_private) <new_inferior>: New field.
10552 (struct linux_target_ops): Delete the num_regs, regmap, and
10553 regset_bitmap fields. New field regs_info.
10554 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10555 * i387-fp.c (num_xmm_registers): Delete.
10556 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10557 calls to new interface.
10558 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10559 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10560 Infer the number of xmm registers from the regcache's target
10561 description.
10562 * i387-fp.h (num_xmm_registers): Delete.
10563 * inferiors.c (add_thread): Don't install the thread's regcache
10564 here.
10565 * proc-service.c (gregset_info): Fetch the current inferior's
10566 regs_info. Adjust to use it.
10567 * regcache.c: Include tdesc.h.
10568 (register_bytes, reg_defs, num_registers)
10569 (gdbserver_expedite_regs): Delete.
10570 (get_thread_regcache): If the thread doesn't have a regcache yet,
10571 create one, instead of aborting gdbserver.
10572 (regcache_invalidate_one): Rename to ...
10573 (regcache_invalidate_thread): ... this.
10574 (regcache_invalidate_one): New.
10575 (regcache_invalidate): Only invalidate registers of the current
10576 process.
10577 (init_register_cache): Add target_desc parameter, and use it.
10578 (new_register_cache): Ditto. Assert the target description has a
10579 non zero registers_size.
10580 (regcache_cpy): Add assertions. Adjust.
10581 (realloc_register_cache, set_register_cache): Delete.
10582 (registers_to_string, registers_from_string): Adjust.
10583 (find_register_by_name, find_regno, find_register_by_number)
10584 (register_cache_size): Add target_desc parameter, and use it.
10585 (free_register_cache_thread, free_register_cache_thread_one)
10586 (regcache_release, register_cache_size): New.
10587 (register_size): Add target_desc parameter, and use it.
10588 (register_data, supply_register, supply_register_zeroed)
10589 (supply_regblock, supply_register_by_name, collect_register)
10590 (collect_register_as_string, collect_register_by_name): Adjust.
10591 * regcache.h (struct target_desc): Forward declare.
10592 (struct regcache) <tdesc>: New field.
10593 (init_register_cache, new_register_cache): Add target_desc
10594 parameter.
10595 (regcache_invalidate_thread): Declare.
10596 (regcache_invalidate_one): Delete declaration.
10597 (regcache_release): Declare.
10598 (find_register_by_number, register_cache_size, register_size)
10599 (find_regno): Add target_desc parameter.
10600 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10601 declarations.
10602 * remote-utils.c: Include tdesc.h.
10603 (outreg, prepare_resume_reply): Adjust.
10604 * server.c: Include tdesc.h.
10605 (gdbserver_xmltarget): Delete declaration.
10606 (get_features_xml, process_serial_event): Adjust.
10607 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10608 declare.
10609 (struct process_info) <tdesc>: New field.
10610 (ipa_tdesc): Declare.
10611 * tdesc.c: New file.
10612 * tdesc.h: New file.
10613 * tracepoint.c: Include tdesc.h.
10614 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10615 (get_context_regcache): Adjust to pass ipa_tdesc down.
10616 (do_action_at_tracepoint): Adjust to get the register cache size
10617 from the context regcache's description.
10618 (traceframe_walk_blocks): Adjust to get the register cache size
10619 from the current trace frame's description.
10620 (traceframe_get_pc): Adjust to get current trace frame's
10621 description and pass it down.
10622 (gdb_collect): Adjust to get the register cache size from the
10623 IPA's description.
10624 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10625 (gdbserver_xmltarget): Delete.
10626 (initialize_low_tracepoint): Set the ipa's target description.
10627 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10628 (initialize_low_tracepoint): Set the ipa's target description.
10629 * linux-x86-low.c: Include tdesc.h.
10630 [__x86_64__] (is_64bit_tdesc): New.
10631 (ps_get_thread_area, x86_get_thread_area): Use it.
10632 (i386_cannot_store_register): Rename to ...
10633 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10634 (i386_cannot_fetch_register): Rename to ...
10635 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10636 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10637 to new interface.
10638 (target_regsets): Rename to ...
10639 (x86_regsets): ... this.
10640 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10641 interface.
10642 (x86_siginfo_fixup): Use is_64bit_tdesc.
10643 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10644 (tdesc_x32_avx_linux, tdesc_x32_linux)
10645 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10646 Declare.
10647 (x86_linux_update_xmltarget): Delete.
10648 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10649 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10650 (AMD64_LINUX_USER64_CS): New.
10651 (x86_linux_read_description): New, based on
10652 x86_linux_update_xmltarget.
10653 (same_process_callback): New.
10654 (x86_arch_setup_process_callback): New.
10655 (x86_linux_update_xmltarget): New.
10656 (x86_regsets_info): New.
10657 (amd64_linux_regs_info): New.
10658 (i386_linux_usrregs_info): New.
10659 (i386_linux_regs_info): New.
10660 (x86_linux_regs_info): New.
10661 (x86_arch_setup): Reimplement.
10662 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10663 (x86_emit_ops): Ditto.
10664 (the_low_target): Adjust. Install x86_linux_regs_info,
10665 x86_cannot_fetch_register, and x86_cannot_store_register.
10666 (initialize_low_arch): New.
10667 * linux-ia64-low.c (tdesc_ia64): Declare.
10668 (ia64_fetch_register): Adjust.
10669 (ia64_usrregs_info, regs_info): New globals.
10670 (ia64_regs_info): New function.
10671 (the_low_target): Adjust.
10672 (initialize_low_arch): New function.
10673 * linux-sparc-low.c (tdesc_sparc64): Declare.
10674 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10675 Adjust.
10676 (sparc_arch_setup): New function.
10677 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10678 (the_low_target): Adjust.
10679 (initialize_low_arch): New function.
10680 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10681 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10682 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10683 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10684 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10685 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10686 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10687 (tdesc_powerpc_isa205_vsx64l): Declare.
10688 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10689 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10690 (ppc_set_pc, ppc_get_hwcap): Adjust.
10691 (ppc_usrregs_info): Forward declare.
10692 (!__powerpc64__) ppc_regmap_adjusted: New global.
10693 (ppc_arch_setup): Adjust to the current process'es target
10694 description.
10695 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10696 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10697 (ppc_store_evrregset): Adjust.
10698 (target_regsets): Rename to ...
10699 (ppc_regsets): ... this, and make static.
10700 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10701 (ppc_regs_info): New function.
10702 (the_low_target): Adjust.
10703 (initialize_low_arch): New function.
10704 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10705 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10706 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10707 (tdesc_s390x_linux64v2): Declare.
10708 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10709 (s390_fill_gregset, s390_store_last_break): Adjust.
10710 (target_regsets): Rename to ...
10711 (s390_regsets): ... this, and make static.
10712 (s390_get_pc, s390_set_pc): Adjust.
10713 (s390_get_hwcap): New target_desc parameter, and use it.
10714 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10715 (s390_arch_setup): Adjust to set the current process'es target
10716 description. Don't adjust the regmap.
10717 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10718 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10719 (regs_info_3264): New globals.
10720 (s390_regs_info): New function.
10721 (the_low_target): Adjust.
10722 (initialize_low_arch): New function.
10723 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10724 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10725 [__mips64] (init_registers_mips_linux)
10726 (init_registers_mips_dsp_linux): Delete defines.
10727 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10728 (have_dsp): New global.
10729 (mips_read_description): New, based on mips_arch_setup.
10730 (mips_arch_setup): Reimplement.
10731 (get_usrregs_info): New function.
10732 (mips_cannot_fetch_register, mips_cannot_store_register)
10733 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10734 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10735 (target_regsets): Rename to ...
10736 (mips_regsets): ... this, and make static.
10737 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10738 (dsp_regs_info, regs_info): New globals.
10739 (mips_regs_info): New function.
10740 (the_low_target): Adjust.
10741 (initialize_low_arch): New function.
10742 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10743 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10744 Declare.
10745 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10746 (arm_read_description): New, with bits factored from
10747 arm_arch_setup.
10748 (arm_arch_setup): Reimplement.
10749 (target_regsets): Rename to ...
10750 (arm_regsets): ... this, and make static.
10751 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10752 (arm_regs_info): New function.
10753 (the_low_target): Adjust.
10754 (initialize_low_arch): New function.
10755 * linux-m68k-low.c (tdesc_m68k): Declare.
10756 (target_regsets): Rename to ...
10757 (m68k_regsets): ... this, and make static.
10758 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10759 (m68k_regs_info): New function.
10760 (m68k_arch_setup): New function.
10761 (the_low_target): Adjust.
10762 (initialize_low_arch): New function.
10763 * linux-sh-low.c (tdesc_sharch): Declare.
10764 (target_regsets): Rename to ...
10765 (sh_regsets): ... this, and make static.
10766 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10767 (sh_regs_info, sh_arch_setup): New functions.
10768 (the_low_target): Adjust.
10769 (initialize_low_arch): New function.
10770 * linux-bfin-low.c (tdesc_bfin): Declare.
10771 (bfin_arch_setup): New function.
10772 (bfin_usrregs_info, regs_info): New globals.
10773 (bfin_regs_info): New function.
10774 (the_low_target): Adjust.
10775 (initialize_low_arch): New function.
10776 * linux-cris-low.c (tdesc_cris): Declare.
10777 (cris_arch_setup): New function.
10778 (cris_usrregs_info, regs_info): New globals.
10779 (cris_regs_info): New function.
10780 (the_low_target): Adjust.
10781 (initialize_low_arch): New function.
10782 * linux-cris-low.c (tdesc_crisv32): Declare.
10783 (cris_arch_setup): New function.
10784 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10785 (cris_regs_info): New function.
10786 (the_low_target): Adjust.
10787 (initialize_low_arch): New function.
10788 * linux-m32r-low.c (tdesc_m32r): Declare.
10789 (m32r_arch_setup): New function.
10790 (m32r_usrregs_info, regs_info): New globals.
10791 (m32r_regs_info): Adjust.
10792 (initialize_low_arch): New function.
10793 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10794 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10795 (tic6x_usrregs_info): Forward declare.
10796 (tic6x_read_description): New function, based on ...
10797 (tic6x_arch_setup): ... this. Reimplement.
10798 (target_regsets): Rename to ...
10799 (tic6x_regsets): ... this, and make static.
10800 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10801 (tic6x_regs_info): New function.
10802 (the_low_target): Adjust.
10803 (initialize_low_arch): New function.
10804 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10805 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10806 (target_regsets): Rename to ...
10807 (xtensa_regsets): ... this, and make static.
10808 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10809 globals.
10810 (xtensa_arch_setup, xtensa_regs_info): New functions.
10811 (the_low_target): Adjust.
10812 (initialize_low_arch): New function.
10813 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10814 (nios2_arch_setup): Set the current process'es tdesc.
10815 (target_regsets): Rename to ...
10816 (nios2_regsets): ... this.
10817 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10818 (nios2_regs_info): New function.
10819 (the_low_target): Adjust.
10820 (initialize_low_arch): New function.
10821 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10822 (aarch64_arch_setup): Set the current process'es tdesc.
10823 (target_regsets): Rename to ...
10824 (aarch64_regsets): ... this.
10825 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10826 (aarch64_regs_info): New function.
10827 (the_low_target): Adjust.
10828 (initialize_low_arch): New function.
10829 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10830 globals.
10831 (target_regsets): Rename to ...
10832 (tile_regsets): ... this.
10833 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10834 (tile_regs_info): New function.
10835 (tile_arch_setup): Set the current process'es tdesc.
10836 (the_low_target): Adjust.
10837 (initialize_low_arch): New function.
10838 * spu-low.c (tdesc_spu): Declare.
10839 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10840 * win32-arm-low.c (tdesc_arm): Declare.
10841 (arm_arch_setup): New function.
10842 (the_low_target): Install arm_arch_setup instead of
10843 init_registers_arm.
10844 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10845 (init_windows_x86): Rename to ...
10846 (i386_arch_setup): ... this. Set `win32_tdesc'.
10847 (the_low_target): Adjust.
10848 * win32-low.c (win32_tdesc): New global.
10849 (child_add_thread): Don't create the thread cache here.
10850 (do_initial_child_stuff): Set the new process'es tdesc.
10851 * win32-low.h (struct target_desc): Forward declare.
10852 (win32_tdesc): Declare.
10853 * lynx-i386-low.c (tdesc_i386): Declare global.
10854 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10855 * lynx-low.c (lynx_tdesc): New global.
10856 (lynx_add_process): Set the new process'es tdesc.
10857 * lynx-low.h (struct target_desc): Forward declare.
10858 (lynx_tdesc): Declare global.
10859 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10860 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10861 * nto-low.c (nto_tdesc): New global.
10862 (do_attach): Set the new process'es tdesc.
10863 * nto-low.h (struct target_desc): Forward declare.
10864 (nto_tdesc): Declare.
10865 * nto-x86-low.c (tdesc_i386): Declare.
10866 (nto_x86_arch_setup): Set `nto_tdesc'.
10867
10868 2013-06-04 Gary Benson <gbenson@redhat.com>
10869
10870 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10871 to qSupported response when appropriate.
10872 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10873 with nonzero-length annex.
10874 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10875 arguments supplied in annex.
10876
10877 2013-05-31 Doug Evans <dje@google.com>
10878
10879 PR server/15594
10880 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10881 64 bits in 64-cross-32 environment.
10882
10883 2013-05-28 Pedro Alves <palves@redhat.com>
10884
10885 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10886 (aarch64-without-fpu.c): Delete rule.
10887 * configure.srv (aarch64*-*-linux*): Remove references to
10888 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10889 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10890 declaration.
10891
10892 2013-05-24 Pedro Alves <palves@redhat.com>
10893
10894 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10895 instead of strchr/decode_address. Error if the range isn't split
10896 with a ','. Don't assume there's be a ':' in the action.
10897
10898 2013-05-23 Yao Qi <yao@codesourcery.com>
10899 Pedro Alves <palves@redhat.com>
10900
10901 * linux-low.c (lwp_in_step_range): New function.
10902 (linux_wait_1): If the thread was range stepping and stopped
10903 outside the stepping range, report the stop to GDB. Otherwise,
10904 continue stepping. Add range stepping debug output.
10905 (linux_set_resume_request): Copy the step range from the resume
10906 request to the lwp.
10907 (linux_supports_range_stepping): New.
10908 (linux_target_ops) <supports_range_stepping>: Set to
10909 linux_supports_range_stepping.
10910 * linux-low.h (struct linux_target_ops)
10911 <supports_range_stepping>: New field.
10912 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10913 * linux-x86-low.c (x86_supports_range_stepping): New.
10914 (the_low_target) <supports_range_stepping>: Set to
10915 x86_supports_range_stepping.
10916 * server.c (handle_v_cont): Handle 'r' action.
10917 (handle_v_requests): Append ";r" if the target supports range
10918 stepping.
10919 * target.h (struct thread_resume) <step_range_start,
10920 step_range_end>: New fields.
10921 (struct target_ops) <supports_range_stepping>:
10922 New field.
10923 (target_supports_range_stepping): New macro.
10924
10925 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10926
10927 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10928 confusion in comment.
10929
10930 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10931
10932 * lynx-low.c (struct process_info_private): New type.
10933 (lynx_add_process): New function.
10934 (lynx_create_inferior, lynx_attach): Replace calls to
10935 add_process by calls to lynx_add_process.
10936 (lynx_resume): If PTID is null, then try using
10937 current_process()->private->last_wait_event_ptid.
10938 Add comments.
10939 (lynx_clear_inferiors): Delete. The contents of that function
10940 has been inlined in lynx_mourn;
10941 (lynx_wait_1): Save the ptid in the process's private data.
10942 (lynx_mourn): Free the process' private data. Replace call
10943 to lynx_clear_inferiors by call to clear_inferiors.
10944
10945 2013-05-17 Yao Qi <yao@codesourcery.com>
10946
10947 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10948 the right place.
10949
10950 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10951
10952 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10953 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10954 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10955 PT_TEXT_END_ADDR guards. Update comments.
10956 (linux_target_op) <read_offsets>: Conditionally define to
10957 linux_read_offsets if the target is UCLIBC and if it defines
10958 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10959
10960 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10961 Andrew Jenner <andrew@codesourcery.com>
10962
10963 * Makefile.in (SFILES): Add linux-nios2-low.c.
10964 (clean): Add action to delete nios2-linux.c.
10965 (nios2-linux.c): New rule.
10966 * configure.srv: Add nios2*-*-linux*.
10967 * linux-nios2-low.c: New.
10968
10969 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10970
10971 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10972
10973 2013-04-25 Hui Zhu <hui@codesourcery.com>
10974
10975 PR gdb/15186
10976 * ax.c (ax_printf): Add fflush.
10977
10978 2013-04-22 Tom Tromey <tromey@redhat.com>
10979
10980 * Makefile.in (SFILES): Add filestuff.c.
10981 (OBS): Add filestuff.o.
10982 (filestuff.o): New target.
10983 * config.in, configure: Rebuild.
10984 * configure.ac: Check for fdwalk, pipe2.
10985
10986 2013-04-17 Pedro Alves <palves@redhat.com>
10987
10988 * configure.ac (USE_THREAD_DB): Delete variable.
10989 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10990 Don't AC_SUBST USE_THREAD_DB.
10991 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10992 * config.in, configure: Regenerate.
10993
10994 2013-04-16 Pedro Alves <palves@redhat.com>
10995
10996 * linux-low.h (struct lwp_info) <thread_known>: Move under
10997 the USE_THREAD_DB #ifdef.
10998
10999 2013-04-16 Pedro Alves <palves@redhat.com>
11000
11001 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11002 (linux-low.o): Delete rule.
11003 * linux-low.h: Always include "gdb_thread_db.h" instead of
11004 conditionally including thread_db.h.
11005 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11006 HAVE_THREAD_DB_H.
11007
11008 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11009
11010 * Makefile.in (install-only): Fix make install regression.
11011
11012 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11013
11014 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11015 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11016 installation.
11017 * gdbserver.1: Remove.
11018
11019 2013-03-22 Pedro Alves <palves@redhat.com>
11020
11021 * linux-low.c (handle_extended_wait): Don't call
11022 linux_enable_event_reporting.
11023
11024 2013-03-15 Tony Theodore <tonyt@logyst.com>
11025
11026 PR build/9098:
11027 * Makefile.in (SHELL): Use @SHELL@.
11028
11029 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11030
11031 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11032 compiler warning.
11033
11034 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11035
11036 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11037 Remove extraneous NULL element.
11038
11039 2013-03-13 Yao Qi <yao@codesourcery.com>
11040
11041 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11042 'V' block in trace frame.
11043
11044 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11045
11046 * target.h (struct target_ops): Add btrace ops.
11047 (target_supports_btrace): New macro.
11048 (target_enable_btrace): New macro.
11049 (target_disable_btrace): New macro.
11050 (target_read_btrace): New macro.
11051 * gdbthread.h (struct thread_info): Add btrace field.
11052 * server.c: Include btrace-common.h.
11053 (handle_btrace_general_set): New function.
11054 (handle_btrace_enable): New function.
11055 (handle_btrace_disable): New function.
11056 (handle_general_set): Call handle_btrace_general_set.
11057 (handle_qxfer_btrace): New function.
11058 (struct qxfer qxfer_packets[]): Add btrace entry.
11059 * inferiors.c (remove_thread): Disable btrace.
11060 * linux-low: Include linux-btrace.h.
11061 (linux_low_enable_btrace): New function.
11062 (linux_low_read_btrace): New function.
11063 (linux_target_ops): Add btrace ops.
11064 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11065 Add srv_linux_btrace=yes.
11066 (x86_64-*-linux*): Add linux-btrace.o.
11067 Add srv_linux_btrace=yes.
11068 * configure.ac: Define HAVE_LINUX_BTRACE.
11069 * config.in: Regenerated.
11070 * configure: Regenerated.
11071
11072 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11073
11074 * server.c (handle_qxfer): Preserve error message if -3 is
11075 returned.
11076 (qxfer): Document the -3 return value.
11077
11078 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11079
11080 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11081 (linux_btrace_h): New variable.
11082 (linux-btrace.o): New rule.
11083
11084 2013-03-08 Stan Shebs <stan@codesourcery.com>
11085 Hafiz Abid Qadeer <abidh@codesourcery.com>
11086
11087 * tracepoint.c (trace_buffer_size): New global.
11088 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11089 (init_trace_buffer): Change to one-argument function. Allocate
11090 trace buffer memory.
11091 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11092 handle QTBuffer:size packet.
11093 (cmd_bigqtbuffer_size): New function.
11094 (initialize_tracepoint): Call init_trace_buffer with
11095 DEFAULT_TRACE_BUFFER_SIZE.
11096 * server.c (handle_query): Add QTBuffer:size in the
11097 supported packets.
11098
11099 2013-03-07 Yao Qi <yao@codesourcery.com>
11100
11101 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11102 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11103 of -1.
11104 (cmd_qtsp): Adjust condition. Do post increment.
11105 Set cur_action and cur_step_action back to 0.
11106
11107 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11108
11109 PR server/15236
11110 * linux-low.c (linux_write_memory): Return early success if LEN is
11111 zero.
11112
11113 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11114
11115 * configure.srv: Add x86_64-*-cygwin* as target.
11116
11117 2013-02-28 Tom Tromey <tromey@redhat.com>
11118
11119 * configure.ac: Invoke AC_SYS_LARGEFILE.
11120 * configure, config.in: Rebuild.
11121
11122 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11123
11124 * win32-low.c: Throughout, fix format strings and casts of
11125 printf-like functions to avoid type related warnings on all
11126 platforms.
11127 (get_child_debug_event): Print dwDebugEventCode as hex since
11128 that's how it's usually documented.
11129
11130 2013-02-28 Yao Qi <yao@codesourcery.com>
11131
11132 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11133 pulongest.
11134
11135 2013-02-27 Jiong Wang <jiwang@tilera.com>
11136
11137 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11138 (reg-tilegx32.c): New rule.
11139 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11140 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11141 different register info initializer according to elf class.
11142 (init_registers_tilgx32): New function. The tilegx32 register info
11143 initializer.
11144 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11145 (tile_store_gregset): Likewise.
11146
11147 2013-02-27 Yao Qi <yao@codesourcery.com>
11148
11149 * server.c (process_point_options): Print debug message when
11150 debug_threads is true.
11151
11152 2013-02-26 Yao Qi <yao@codesourcery.com>
11153
11154 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11155
11156 2013-02-19 Pedro Alves <palves@redhat.com>
11157 Kai Tietz <ktietz@redhat.com>
11158
11159 PR gdb/15161
11160
11161 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11162 instead of strtoul to extract address from packet.
11163 (process_serial_event) <'z'>: Likewise.
11164
11165 2013-02-18 Yao Qi <yao@codesourcery.com>
11166
11167 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11168
11169 2013-02-14 Pedro Alves <palves@redhat.com>
11170
11171 Plug memory leak.
11172
11173 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11174 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11175
11176 2013-02-14 Pedro Alves <palves@redhat.com>
11177
11178 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11179
11180 2013-02-14 Pedro Alves <palves@redhat.com>
11181
11182 * tracepoint.c (save_string): Delete.
11183 (add_tracepoint_action): Use savestring instead of save_string.
11184
11185 2013-02-12 Pedro Alves <palves@redhat.com>
11186
11187 * linux-xtensa-low.c: Ditto.
11188 * xtensa-xtregs.c: Ditto.
11189
11190 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11191
11192 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11193 thread_db.
11194
11195 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11196
11197 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11198 aarch64_num_wp_regs and aarch64_num_bp_regs to
11199 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11200
11201 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11202
11203 * linux-aarch64-low.c (ps_get_thread_area): Replace
11204 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11205
11206 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11207 Marcus Shawcroft <marcus.shawcroft@arm.com>
11208 Nigel Stephens <nigel.stephens@arm.com>
11209 Yufeng Zhang <yufeng.zhang@arm.com>
11210
11211 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11212 (aarch64.c, aarch64-without-fpu.c): New targets.
11213 * configure.srv (aarch64*-*-linux*): New.
11214 * linux-aarch64-low.c: New file.
11215
11216 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11217
11218 * linux-low.c (handle_extended_wait, linux_create_inferior)
11219 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11220 (dequeue_one_deferred_signal, linux_resume_one_thread)
11221 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11222 (linux_tracefork_grandchild, linux_test_for_tracefork)
11223 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11224 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11225 where the argument is 0.
11226
11227 2013-01-25 Yao Qi <yao@codesourcery.com>
11228
11229 * event-loop.c: Include "queue.h".
11230 (gdb_event_p): New typedef.
11231 (struct gdb_event) <next_event>: Remove.
11232 (event_queue): Change to QUEUE(gdb_event_p).
11233 (async_queue_event): Remove.
11234 (gdb_event_xfree): New.
11235 (initialize_event_loop): New.
11236 (process_event): Use API from QUEUE.
11237 (wait_for_event): Likewise.
11238 * server.c (main): Call initialize_event_loop.
11239 * server.h (initialize_event_loop): Declare.
11240
11241 2013-01-18 Yao Qi <yao@codesourcery.com>
11242
11243 * ax.h (struct eval_agent_expr_context): New.
11244 (gdb_eval_agent_expr): Update declaration.
11245 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11246 TFRAME. Add new argument CTX.
11247 * server.h (struct eval_agent_expr_context): Declare.
11248 (agent_mem_read, agent_tsv_read): Update declaration.
11249 (agent_mem_read_string): Likewise.
11250 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11251 (add_traceframe_block): Add new argument TPOINT.
11252 Increase TPOINT->traceframe_usage.
11253 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11254 eval_tracepoint_agent_expr.
11255 (condition_true_at_tracepoint): Likewise.
11256 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11257 (agent_mem_read_string, agent_tsv_read): Likewise.
11258
11259 2013-01-16 Yao Qi <yao@codesourcery.com>
11260
11261 * linux-low.c (linux_resume_one_lwp): Don't check
11262 'lwp->bp_reinsert != 0'.
11263
11264 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11265 Pedro Alves <palves@redhat.com>
11266
11267 * lynx-low.c (ptrace_request_to_str): Define a temporary
11268 macro and use it to simplify this function's implementation.
11269
11270 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11271
11272 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11273 sets errno.
11274
11275 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11276
11277 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11278
11279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11280
11281 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11282
11283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11284
11285 * lynx-low.c (lynx_resume): Use the resume_info parameter
11286 to determine the ptid for the lynx_ptrace call, unless
11287 it is equal to minus_one_ptid, in which case we use the
11288 ptid of the current_inferior.
11289 (lynx_wait_1): After having received a thread create/exit
11290 event, resume the inferior's execution using the signaling
11291 thread's ptid, rather than the old ptid.
11292
11293 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11294
11295 * lynx-low.c (lynx_resume): Delete variable ret.
11296
11297 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11298
11299 * gdbreplay.c (gdbreplay_version): Update copyright year.
11300 * server.c (gdbserver_version): Likewise.
11301
11302 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11303
11304 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11305 new thread.
11306
11307 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11308
11309 * lynx-low.c (ptrace_request_to_str): Add handling for
11310 PTRACE_GETTRACESIG.
11311
11312 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11313
11314 * lynx-low.c (lynx_attach): Delete variable new_process.
11315
11316 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11317
11318 * lynx-low.c (lynx_create_inferior): Delete variable
11319 new_process.
11320
11321 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11322
11323 * lynx-low.c (ptrace_request_to_str): Do not handle
11324 PTRACE_GETTHREADLIST if this macro does not exist.
11325
11326 2012-12-15 Yao Qi <yao@codesourcery.com>
11327
11328 * Makefile.in (OBS): Add notif.o.
11329 * notif.c, notif.h: New.
11330 * server.c: Include "notif.h".
11331 (struct vstop_notif) <next>: Remove.
11332 <base>: New field.
11333 (queue_stop_reply): Update.
11334 (push_event, send_next_stop_reply): Remove.
11335 (discard_queued_stop_replies): Update.
11336 (notif_stop): New variable.
11337 (handle_v_stopped): Remove.
11338 (handle_v_requests): Don't call handle_v_stopped. Call
11339 handle_ack_notif instead.
11340 (queue_stop_reply_callback): Call notif_event_enque instead
11341 of queue_stop_reply.
11342 (handle_status): Don't call send_next_stop_reply, call
11343 notif_write_event instead.
11344 (kill_inferior_callback): Likewise.
11345 (detach_or_kill_inferior_callback): Likewise.
11346 (main): Call initialize_notif.
11347 (process_serial_event): Call QUEUE_is_empty.
11348 (handle_target_event): Call notif_push instead of push event.
11349 * server.h (push_event): Remove declaration.
11350
11351 2012-12-10 Tom Tromey <tromey@redhat.com>
11352
11353 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11354 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11355 macros.
11356 (.c.o): Rewrite.
11357 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11358 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11359 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11360 (amd64-linux-ipa.o, ax.o): Rewrite.
11361 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11362 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11363 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11364 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11365 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11366 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11367 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11368 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11369 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11370 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11371 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11372 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11373 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11374 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11375 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11376 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11377 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11378 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11379 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11380 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11381 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11382 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11383 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11384 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11385 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11386 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11387 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11388 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11389 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11390 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11391 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11392 (reg-tilegx.o): Remove.
11393 (all_object_files): New macro.
11394 Include .deps files.
11395 * aclocal.m4, configure: Rebuild.
11396 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11397 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11398 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11399
11400 2012-12-05 Tom Tromey <tromey@redhat.com>
11401
11402 PR gdb/14917:
11403 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11404
11405 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11406
11407 * configure.ac: Check for linux/perf_event.h.
11408 * config.in: Regenerated.
11409 * configure: Regenerated.
11410
11411 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11412
11413 * hostio.c (handle_readlink): Decrease buffer size
11414 parameter passed to readlink by one byte.
11415
11416 2012-11-26 Yao Qi <yao@codesourcery.com>
11417
11418 * configure.ac (build_warnings): Append '-Wempty-body'.
11419 * configure: Regenerated.
11420 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11421 body.
11422
11423 2012-11-15 Pierre Muller <muller@sourceware.org>
11424
11425 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11426 * config.in: Regenerate.
11427 * configure: Regenerate.
11428 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11429 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11430 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11431 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11432 header.
11433 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11434 instead of <sys/wait.h> header.
11435 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11436
11437 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11438
11439 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11440 (various make rules): Remove -DGDBSERVER
11441
11442 2012-11-09 Yao Qi <yao@codesourcery.com>
11443
11444 * spu-low.c (current_ptid): Move it to ..
11445 * gdbthread.h: ... here. New.
11446 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11447 * server.c (myresume, process_serial_event): Likewise.
11448 * thread-db.c (thread_db_find_new_threads): Likewise.
11449 * tracepoint.c (run_inferior_command): Likewise.
11450
11451 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11452
11453 * server.c (handle_search_memory_1): Include access length in
11454 warning message.
11455
11456 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11457
11458 * linux-crisv32-low.c: Fix compile errors.
11459
11460 2012-09-04 Yao Qi <yao@codesourcery.com>
11461
11462 * tracepoint.c (cmd_qtsv): Adjust debug message.
11463 Don't check CUR_TPOINT.
11464
11465 2012-08-28 Yao Qi <yao@codesourcery.com>
11466
11467 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11468 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11469 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11470 Remove declarations of xmalloc, xreallloc, xstrdup and
11471 freeargv.
11472 * Makefile.in (libiberty_h): New.
11473 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11474 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11475
11476 2012-08-23 Yao Qi <yao@codesourcery.com>
11477
11478 * server.h: Remove declaration of 'xsnprintf'.
11479
11480 2012-08-22 Keith Seitz <keiths@redhat.com>
11481
11482 * server.h: Include build-gnulib-gbserver/config.h.
11483 * gdbreplay.c: Likewise.
11484
11485 2012-08-08 Doug Evans <dje@google.com>
11486
11487 * Makefile.in (SFILES): Add gdb_vecs.c.
11488 (OBS): Add gdb_vecs.o.
11489 (gdb_vecs_h, host_defs_h): New variables.
11490 (thread-db.o): Add $(gdb_vecs_h) dependency.
11491 (gdb_vecs.o): New rule.
11492 * thread-db.c: #include "gdb_vecs.h".
11493 (thread_db_load_search): Use a vector to iterate over path elements.
11494 Handle text appearing after "$pdir".
11495
11496 * configure.ac: Add check for strstr.
11497 * config.in: Regenerate.
11498 * configure: Regenerate.
11499
11500 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11501
11502 * hostio.c (handle_pread): If pread fails, fall back to attempting
11503 lseek/read.
11504 (handle_pwrite): Likewise for pwrite.
11505
11506 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11507
11508 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11509 between unsupported TYPE and unimplementable ADDR/LEN combination.
11510 (arm_insert_point): Act on new return value.
11511
11512 2012-07-31 Pedro Alves <palves@redhat.com>
11513
11514 * server.c (process_point_options): Only skip tokens if we find
11515 one that is unrecognized. Don't treat 'X' specially while
11516 skipping unrecognized tokens.
11517
11518 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11519
11520 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11521 to 4-byte-align HW breakpoint addresses for Thumb.
11522
11523 2012-07-27 Yao Qi <yao@codesourcery.com>
11524
11525 PR remote/14161.
11526
11527 * server.h: Declare gdb_agent_about_to_close.
11528 * target.c (kill_inferior): Include "agent.h".
11529 New. Send command 'kill'.
11530 * target.h (kill_inferior): Removed macro.
11531 * tracepoint.c (gdb_agent_about_to_close): New.
11532 (gdb_agent_helper_thread): Handle command 'close'.
11533 Wait endlessly until the inferior stops.
11534 Install gdb_agent_remove_socket to atexit hook.
11535 (agent_socket_name): New static variable.
11536 (gdb_agent_socket_init): Replace local variable 'name' with
11537 'agent_socket_name'.
11538 (gdb_agent_remove_socket): New.
11539
11540 2012-07-27 Yao Qi <yao@codesourcery.com>
11541
11542 * server.c (process_point_options): Stop at 'X' when parsing.
11543
11544 2012-07-19 Michael Eager <eager@eagercon.com>
11545
11546 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11547 to hw_execute.
11548 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11549 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11550 hardware breakpoint.
11551
11552 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11553
11554 * gdbserver/linux-low.c (initialize_low): Call
11555 linux_ptrace_init_warnings.
11556
11557 2012-07-02 Doug Evans <dje@google.com>
11558
11559 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11560 pointer to int.
11561
11562 2012-07-02 Stan Shebs <stan@codesourcery.com>
11563
11564 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11565 (ax.o): Add it to build rule.
11566 (ax-ipa.o): Ditto.
11567 (OBS): Add format.o.
11568 (IPA_OBS): Add format.o.
11569 * server.c (handle_query): Claim support for breakpoint commands.
11570 (process_point_options): Add command case.
11571 (process_serial_event): Leave running if there are printfs in
11572 effect.
11573 * mem-break.h (any_persistent_commands): Declare.
11574 (add_breakpoint_commands): Declare.
11575 (gdb_no_commands_at_breakpoint): Declare.
11576 (run_breakpoint_commands): Declare.
11577 * mem-break.c (struct point_command_list): New struct.
11578 (struct breakpoint): New field command_list.
11579 (any_persistent_commands): New function.
11580 (add_commands_to_breakpoint): New function.
11581 (add_breakpoint_commands): New function.
11582 (gdb_no_commands_at_breakpoint): New function.
11583 (run_breakpoint_commands): New function.
11584 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11585 locally.
11586 * ax.c: Include format.h.
11587 (ax_printf): New function.
11588 (gdb_eval_agent_expr): Add printf opcode.
11589
11590 2012-06-13 Yao Qi <yao@codesourcery.com>
11591
11592 * server.c (start_inferior): Remove duplicated writes to fields
11593 'last_resume_kind' and 'last_status' of 'current_inferior'.
11594
11595 2012-06-12 Yao Qi <yao@codesourcery.com>
11596 Pedro Alves <palves@redhat.com>
11597
11598 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11599 comment.
11600 * server.c (handle_v_cont): Extend comment.
11601
11602 2012-06-11 Yao Qi <yao@codesourcery.com>
11603
11604 * linux-low.c (linux_attach): Add 'static'.
11605
11606 2012-06-06 Yao Qi <yao@codesourcery.com>
11607
11608 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11609
11610 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11611
11612 Fix gcc -flto compilation warning.
11613 * server.c (main): Make variable multi_mode and attach volatile.
11614
11615 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11616
11617 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11618 if the platform doesn't know about it.
11619
11620 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11621
11622 * Makefile.in (SFILES): Add linux-tile-low.c.
11623 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11624 * configure.srv: Handle tilegx-*-linux*.
11625 * linux-tile-low.c: New file.
11626
11627 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11628
11629 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11630
11631 2012-05-24 Pedro Alves <palves@redhat.com>
11632
11633 PR gdb/7205
11634
11635 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11636
11637 2012-05-24 Pedro Alves <palves@redhat.com>
11638
11639 PR gdb/7205
11640
11641 Replace target_signal with gdb_signal throughout.
11642
11643 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11644
11645 * linux-low.c (linux_store_registers): Avoid the copying sequence
11646 when no data has been retrieved by ptrace.
11647
11648 2012-05-22 Will Deacon <will.deacon@arm.com>
11649
11650 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11651 Include asm/ptrace.h.
11652 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11653 already defined.
11654
11655 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11656
11657 * linux-low.c (linux_store_registers): Don't re-retrieve data
11658 with ptrace that has already been obtained from /proc. Always
11659 copy any data retrieved with ptrace to the buffer supplied.
11660
11661 2012-05-11 Yao Qi <yao@codesourcery.com>
11662 Pedro Alves <palves@redhat.com>
11663
11664 * linux-low.c (enum stopping_threads_kind): New.
11665 (stopping_threads): Change type to `enum stopping_threads_kind'.
11666 (handle_extended_wait): If stopping and suspending threads, leave
11667 the new_lwp suspended too.
11668 (linux_wait_for_event): Adjust.
11669 (stop_all_lwps): Set `stopping_threads' to
11670 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11671 whether we're suspending threads or just stopping them. Assert no
11672 recursion happens.
11673
11674 2012-04-29 Yao Qi <yao@codesourcery.com>
11675
11676 * server.h: Move some code to ...
11677 * gdbthread.h: ... here. New.
11678 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11679 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11680 (nto-low.o, win32-low.o): Likewise.
11681 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11682 * regcache.c, remote-utils.c, server.c: Likewise.
11683 * target.c, tracepoint.c, win32-low.c: Likewise.
11684
11685 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11686
11687 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11688 (PTRACE_ARG4_TYPE): Likewise.
11689 (PTRACE_XFER_TYPE): Likewise.
11690 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11691 ptrace to PTRACE_ARG3_TYPE.
11692 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11693 (PTRACE_ARG4_TYPE): Likewise.
11694 (PTRACE_XFER_TYPE): Likewise.
11695 (linux_detach_one_lwp): Cast fourth argument of
11696 ptrace to long then PTRACE_ARG4_TYPE.
11697 (regsets_fetch_inferior_registers): Cast third argument of
11698 ptrace to long then PTRACE_ARG3_TYPE.
11699 (regsets_store_inferior_registers): Likewise.
11700
11701 2012-04-20 Pedro Alves <palves@redhat.com>
11702
11703 * configure: Regenerate.
11704
11705 2012-04-19 Pedro Alves <palves@redhat.com>
11706
11707 * Makefile.in (GNULIB_BUILDDIR): New.
11708 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11709 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11710 (all, install-only, uninstall, clean-info, all-lib, clean): No
11711 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11712 (maintainer-clean realclean distclean): Use subdir_do.
11713 (subdir_do): New.
11714 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11715 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11716 * acinclude.m4: Include acx_configure_dir.m4.
11717 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11718 calls. Call AC_PROG_RANLIB. Configure gnulib using
11719 ACX_CONFIGURE_DIR.
11720 (GNULIB): New.
11721 (GNULIB_STDINT_H): Adjust.
11722 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11723 * gdbreplay.c: Include build-gnulib/config.h.
11724 * server.h: Likewise.
11725 * aclocal.m4: Regenerate.
11726 * config.in: Regenerate.
11727 * configure: Regenerate.
11728
11729 2012-04-19 Pedro Alves <palves@redhat.com>
11730
11731 * Makefile.in (LIBGNU, INCGNU): Adjust.
11732 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11733 (all, install-only, uninstall, clean-info, all-lib, clean)
11734 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11735 * configure.ac: Adjust AC_OUTPUT output.
11736 * aclocal.m4: Regenerate.
11737 * configure: Regenerate.
11738
11739 2012-04-19 Pedro Alves <palves@redhat.com>
11740
11741 * Makefile.in (generated_files): New.
11742 (server_h): Remove the explicit dependency on config.h, and depend
11743 on $generated_files.
11744
11745 2012-04-19 Pedro Alves <palves@redhat.com>
11746
11747 * Makefile.in (INCGNU): Add -Ignulib.
11748
11749 2012-04-19 Pedro Alves <palves@redhat.com>
11750
11751 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11752 (INCGNU): ... this, and spell out -I here.
11753 (GNULIB_LIB): Rename to ...
11754 (LIBGNU): ... this.
11755 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11756
11757 2012-04-19 Pedro Alves <palves@redhat.com>
11758
11759 * config.in: Regenerate.
11760
11761 2012-04-19 Pedro Alves <palves@redhat.com>
11762
11763 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11764 * server.h (memmem): Remove declaration.
11765 * config.in: Regenerate.
11766 * configure: Regenerate.
11767
11768 2012-04-19 Yao Qi <yao@codesourcery.com>
11769
11770 * Makefile.in (SFILES): Add common/vec.c.
11771 (OBS): Add vec.o.
11772 (vec.o): New rule.
11773
11774 2012-04-19 Yao Qi <yao@codesourcery.com>
11775
11776 * remote-utils.c (prepare_resume_reply): Replace with macro
11777 target_core_of_thread.
11778 * server.c (handle_qxfer_threads_proper): Likewise.
11779 * target.h (traget_core_of_thread): New macro.
11780
11781 2012-04-18 Pedro Alves <palves@redhat.com>
11782
11783 * aclocal.m4: Regenerate.
11784 * configure: Regenerate.
11785
11786 2012-04-16 Yao Qi <yao@codesourcery.com>
11787
11788 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11789 duplicated on address.
11790
11791 2012-04-16 Yao Qi <yao@codesourcery.com>
11792
11793 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11794 (struct tracepoint_action_ops) <send>: New field.
11795 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11796 (agent_expr_send, x_tracepoint_action_send): New.
11797 (l_tracepoint_action_send): New.
11798 (cmd_qtdp): Download and install tracepoint
11799 according to `use_agent'.
11800 (run_inferior_command): Add one more parameter `len'.
11801 Update callers.
11802 (tracepoint_send_agent): New.
11803 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11804
11805 2012-04-16 Yao Qi <yao@codesourcery.com>
11806
11807 * tracepoint.c (download_tracepoints): Moved to ...
11808 (cmd_qtstart): ... here.
11809
11810 2012-04-14 Yao Qi <yao@codesourcery.com>
11811
11812 * tracepoint.c: Include inttypes.h.
11813 (struct collect_memory_action): Use sized types.
11814 (struct tracepoint): Likewise.
11815 (cmd_qtdp, stop_tracing): Update print specifiers.
11816 (cmd_qtp, response_tracepoint): Likewise.
11817 (collect_data_at_tracepoint): Likewise.
11818 (collect_data_at_step): Likewise.
11819
11820 2012-04-14 Yao Qi <yao@codesourcery.com>
11821
11822 Import gnulib module inttypes.
11823 * aclocal.m4, config.in, configure: Regenerated.
11824
11825 2012-04-14 Yao Qi <yao@codesourcery.com>
11826
11827 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11828 Makefile and config.status at last.
11829
11830 2012-04-13 Yao Qi <yao@codesourcery.com>
11831
11832 * tracepoint.c: Include stdint.h unconditionally.
11833
11834 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11835
11836 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11837 on BFD_HAVE_SYS_PROCFS_TYPE.
11838 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11839 * configure: Regenerate.
11840 * config.in: Likewise.
11841
11842 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11843
11844 * Makefile.in (clean): Also remove x32.c x32-linux.c
11845 x32-avx.c x32-avx-linux.c.
11846 (x32.o): New target.
11847 (x32.c): Likewise.
11848 (x32-linux.o): Likewise.
11849 (x32-linux.c): Likewise.
11850 (x32-avx.o): Likewise.
11851 (x32-avx.c): Likewise.
11852 (x32-avx-linux.o): Likewise.
11853 (x32-avx-linux.c): Likewise.
11854
11855 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11856 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11857 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11858 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11859 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11860 i386/x32-avx-linux.xml.
11861
11862 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11863 (init_registers_x32_avx_linux): Likwise.
11864 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11865 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11866
11867 2012-04-13 Pedro Alves <palves@redhat.com>
11868
11869 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11870 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11871 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11872 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11873 the sub-make.
11874
11875 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11876
11877 * linux-x86-low.c (compat_x32_clock_t): New.
11878 (compat_x32_siginfo_t): Likewise.
11879 (compat_x32_siginfo_from_siginfo): Likewise.
11880 (siginfo_from_compat_x32_siginfo): Likewise.
11881 (linux_is_elf64): Likewise.
11882 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11883 and siginfo_from_compat_x32_siginfo for x32.
11884 (x86_arch_setup): Set linux_is_elf64.
11885
11886 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11887
11888 PR gdb/13969
11889 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11890 e_machine field.
11891 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11892 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11893 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11894 compatible with process.
11895
11896 2012-04-12 Yao Qi <yao@codesourcery.com>
11897
11898 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11899 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11900 (install-only, install-info, clean): Handle sub dir gnulib.
11901 (all-lib, am--refresh): New targets.
11902 (memmem.o): Remove target.
11903 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11904 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11905 (AC_REPLACE_FUNCS): Remove memmem.
11906 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11907 (AC_OUTPUT): Generate Makefile in gnulib/.
11908 * aclocal.m4, config.in, configure: Regenerated.
11909
11910 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11911
11912 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11913
11914 2012-04-05 Pedro Alves <palves@redhat.com>
11915
11916 -Werror=strict-aliasing
11917
11918 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11919 pointer.
11920
11921 2012-04-04 Pedro Alves <palves@redhat.com>
11922
11923 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11924 (sparc_store_gregset_from_stack, sparc_store_gregset)
11925 (sparc_breakpoint_at): Fix formatting.
11926
11927 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11928
11929 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11930 are available.
11931 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11932 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11933 * config.in: Regenerate.
11934 * configure: Likewise.
11935
11936 2012-03-29 Pedro Alves <palves@redhat.com>
11937
11938 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11939 Correct ptrace arguments.
11940
11941 2012-03-28 Pedro Alves <palves@redhat.com>
11942
11943 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11944 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11945 (IA64_FR1_REGNUM): New defines.
11946 (ia64_fetch_register): New.
11947 (the_low_target): Install it.
11948 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11949 field.
11950 * linux-low.c (linux_fetch_registers): Try the
11951 the_low_target.fetch_register hook first.
11952
11953 * linux-arm-low.c (the_low_target): Adjust.
11954 * linux-bfin-low.c (the_low_target): Adjust.
11955 * linux-cris-low.c (the_low_target): Adjust.
11956 * linux-crisv32-low.c (the_low_target): Adjust.
11957 * linux-m32r-low.c (the_low_target): Adjust.
11958 * linux-m68k-low.c (the_low_target): Adjust.
11959 * linux-mips-low.c (the_low_target): Adjust.
11960 * linux-ppc-low.c (the_low_target): Adjust.
11961 * linux-s390-low.c (the_low_target): Adjust.
11962 * linux-sh-low.c (the_low_target): Adjust.
11963 * linux-sparc-low.c (the_low_target): Adjust.
11964 * linux-tic6x-low.c (the_low_target): Adjust.
11965 * linux-x86-low.c (the_low_target): Adjust.
11966 * linux-xtensa-low.c (the_low_target): Adjust.
11967
11968 2012-03-26 Pedro Alves <palves@redhat.com>
11969
11970 * server.c (handle_qxfer_libraries): Don't bail early if
11971 the_target->qxfer_libraries_svr4 is not NULL.
11972
11973 2012-03-26 Pedro Alves <palves@redhat.com>
11974
11975 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11976
11977 2012-03-23 Pedro Alves <palves@redhat.com>
11978
11979 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11980 "library-list-svr4" element's start tag when the the DSO list is
11981 empty.
11982
11983 2012-03-23 Pedro Alves <palves@redhat.com>
11984
11985 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11986 a variable whose type size is the same as the inferior's pointer
11987 size.
11988
11989 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11990
11991 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11992 struct siginfo.
11993 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11994 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11995 * linux-low.h: Include <signal.h>.
11996 (struct siginfo): Remove forward declaration.
11997 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11998 struct siginfo.
11999
12000 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12001
12002 * .gitignore: Ignore more files.
12003
12004 2012-03-19 Pedro Alves <palves@redhat.com>
12005 Jan Kratochvil <jan.kratochvil@redhat.com>
12006
12007 * server.c (cont_thread, general_thread): Add describing comments.
12008 (start_inferior): Clear `cont_thread'.
12009 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12010 of a process.
12011
12012 2012-03-15 Yao Qi <yao@codesourcery.com>
12013
12014 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12015 handling to ...
12016 (cmd_qtdp): ... here.
12017
12018 2012-03-15 Yao Qi <yao@codesourcery.com>
12019
12020 * tracepoint.c (struct tracepoint_action_ops): New.
12021 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12022 (m_tracepoint_action_download): New.
12023 (r_tracepoint_action_download): New.
12024 (x_tracepoint_action_download): New.
12025 (l_tracepoint_action_download): New.
12026 (add_tracepoint_action): Install `action->ops' according type.
12027 (download_tracepoint_1): Move code `download' function pointer
12028 of various tracepoint_action_ops.
12029
12030 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12031
12032 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12033 linux_ptrace_attach_warnings.
12034
12035 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12036
12037 * Makefile.in (linux-ptrace.o): New.
12038 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12039 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12040 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12041 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12042 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12043 of these targets.
12044 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12045
12046 2012-03-08 Yao Qi <yao@codesourcery.com>
12047 Pedro Alves <palves@redhat.com>
12048
12049 Fix PR server/13392.
12050 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12051 offset of JMP insn.
12052 * tracepoint.c (remove_tracepoint): New.
12053 (cmd_qtdp): Call remove_tracepoint when failed to install.
12054
12055 2012-03-07 Pedro Alves <palves@redhat.com>
12056
12057 * linux-low.c (get_detach_signal): New.
12058 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12059 Pass on pending signals to PTRACE_DETACH. Check the result of the
12060 ptrace call.
12061 * server.c (program_signals, program_signals_p): New.
12062 (handle_general_set): Handle QProgramSignals.
12063 * server.h (program_signals, program_signals_p): Declare.
12064
12065 2012-03-05 Pedro Alves <palves@redhat.com>
12066 Jan Kratochvil <jan.kratochvil@redhat.com>
12067
12068 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12069 New comment why.
12070
12071 2012-03-03 Yao Qi <yao@codesourcery.com>
12072
12073 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12074 agent_look_up_symbols.
12075
12076 2012-03-03 Yao Qi <yao@codesourcery.com>
12077
12078 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12079 (linux-x86-low.o): Likewise.
12080 * server.h: Remove in_process_agent_loaded.
12081 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12082 common/agent.c.
12083 Update callers.
12084
12085 2012-03-03 Yao Qi <yao@codesourcery.com>
12086
12087 * tracepoint.c (gdb_agent_capability): New global.
12088 (in_process_agent_loaded_ust): Renamed to
12089 `in_process_agent_supports_ust'.
12090 Update callers.
12091 (in_process_agent_supports_ust): Call agent_capability_check.
12092 (clear_installed_tracepoints): Assert that agent supports
12093 agent.
12094
12095 2012-03-03 Yao Qi <yao@codesourcery.com>
12096
12097 * linux-low.c (linux_supports_agent): New.
12098 (linux_target_ops): Initialize field `supports_agent' with
12099 linux_supports_agent.
12100 * target.h (struct target_ops) <supports_agent>: New.
12101 (target_supports_agent): New macro.
12102 * server.c (handle_general_set): Handle packet 'QAgent'.
12103 (handle_query): Send `QAgent+'.
12104 * Makefile.in (server.o): Depends on agent.h.
12105
12106 2012-03-03 Yao Qi <yao@codesourcery.com>
12107
12108 * Makefile.in (OBS): Add agent.o.
12109 Add new rule for agent.o.
12110 Track dependence of tracepoint.c on agent.h.
12111 * tracepoint.c (run_inferior_command_1):
12112 (run_inferior_command): Call agent_run_command.
12113 (gdb_ust_connect_sync_socket): Deleted. Move it to
12114 common/agent.c.
12115 (resume_thread, stop_thread): Likewise.
12116 (gdb_ust_socket_init): Renamed to ...
12117 (gdb_agent_socket_init): ... New.
12118 (gdb_ust_thread): Renamed to ...
12119 (gdb_agent_helper_thread): ... New.
12120 (gdb_ust_init): Move some code to ...
12121 (gdb_agent_init): ... here. New.
12122 [HAVE_UST]: Call gdb_ust_init.
12123 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12124 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12125 * config.in, configure: Regenerated.
12126
12127 2012-03-02 Pedro Alves <palves@redhat.com>
12128
12129 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12130 * linux-low.c (struct simple_pid_list): New.
12131 (stopped_pids): New a struct simple_pid_list pointer.
12132 (add_to_pid_list, pull_pid_from_list): New.
12133 (handle_extended_wait): Don't assume the first signal new children
12134 report is SIGSTOP. Adjust call to pull_pid_from_list.
12135 (linux_wait_for_lwp): Adjust.
12136
12137 2012-03-02 Yao Qi <yao@codesourcery.com>
12138
12139 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12140 debug log.
12141
12142 2012-03-02 Yao Qi <yao@codesourcery.com>
12143
12144 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12145 `stop_pc' and `tpoint'. Update caller.
12146
12147 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12148
12149 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12150 * linux-low.c (use_linux_regsets): New macro.
12151 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12152 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12153 (linux_register_in_regsets): New function.
12154 (usr_fetch_inferior_registers): Skip registers covered by
12155 regsets.
12156 (usr_store_inferior_registers): Likewise.
12157 (usr_fetch_inferior_registers): New macro.
12158 (usr_store_inferior_registers): Likewise.
12159 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12160 (linux_store_registers): Likewise.
12161 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12162 prototype.
12163 (init_registers_mips64_dsp_linux): Likewise.
12164 (init_registers_mips_linux): New macro.
12165 (init_registers_mips_dsp_linux): Likewise.
12166 (mips_dsp_num_regs): Likewise.
12167 (DSP_BASE, DSP_CONTROL): New fallback macros.
12168 (mips_base_regs): New macro.
12169 (mips_regmap): Use it. Fix the size.
12170 (mips_dsp_regmap): New variable.
12171 (mips_dsp_regset_bitmap): Likewise.
12172 (mips_arch_setup): New function.
12173 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12174 than mips_regmap.
12175 (mips_cannot_store_register): Likewise.
12176 (the_low_target): Update .arch_setup, .num_regs and .regmap
12177 initializers. Add .regset_bitmap initializer.
12178 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12179 initializer.
12180 * linux-bfin-low.c (the_low_target): Likewise.
12181 * linux-cris-low.c (the_low_target): Likewise.
12182 * linux-crisv32-low.c (the_low_target): Likewise.
12183 * linux-ia64-low.c (the_low_target): Likewise.
12184 * linux-m32r-low.c (the_low_target): Likewise.
12185 * linux-m68k-low.c (the_low_target): Likewise.
12186 * linux-ppc-low.c (the_low_target): Likewise.
12187 * linux-s390-low.c (the_low_target): Likewise.
12188 * linux-sh-low.c (the_low_target): Likewise.
12189 * linux-sparc-low.c (the_low_target): Likewise.
12190 * linux-tic6x-low.c (the_low_target): Likewise.
12191 * linux-x86-low.c (the_low_target): Likewise.
12192 * linux-xtensa-low.c (the_low_target): Likewise.
12193 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12194 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12195 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12196 srv_xmlfiles.
12197 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12198 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12199
12200 2012-02-29 Yao Qi <yao@codesourcery.com>
12201 Pedro Alves <palves@redhat.com>
12202
12203 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12204 `step_over_finished' is true.
12205
12206 2012-02-27 Pedro Alves <palves@redhat.com>
12207
12208 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12209 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12210
12211 2012-02-27 Pedro Alves <palves@redhat.com>
12212
12213 PR server/9684
12214 * linux-low.c (pid_is_stopped): New.
12215 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12216
12217 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12218
12219 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12220 of conditions.
12221
12222 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12223
12224 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12225
12226 2012-02-24 Luis Machado <lgustavo@codesourcery>
12227
12228 * server.c (handle_query): Advertise support for target-side
12229 breakpoint condition evaluation.
12230 (process_point_options): New function.
12231 (process_serial_event): When inserting a breakpoint, check for
12232 a target-side condition that should be evaluated.
12233
12234 * mem-break.c: Include regcache.h and ax.h.
12235 (point_cond_list_t): New data structure.
12236 (breakpoint) <cond_list>: New field.
12237 (find_gdb_breakpoint_at): Make non-static.
12238 (delete_gdb_breakpoint_at): Clear any target-side
12239 conditions.
12240 (clear_gdb_breakpoint_conditions): New function.
12241 (add_condition_to_breakpoint): Likewise.
12242 (add_breakpoint_condition): Likewise.
12243 (gdb_condition_true_at_breakpoint): Likewise.
12244 (gdb_breakpoint_here): Return result directly instead
12245 of going through a local variable.
12246
12247 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12248 (clear_gdb_breakpoint_conditions): Likewise.
12249 (add_breakpoint_condition): Likewise.
12250 (gdb_condition_true_at_breakpoint): Likewise.
12251
12252 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12253 (need_step_over_p): Take target-side breakpoint condition into
12254 consideration.
12255
12256 2012-02-24 Luis Machado <lgustavo@codesourcery>
12257
12258 * server.h: Include tracepoint.h.
12259 (agent_mem_read, agent_get_trace_state_variable_value,
12260 agent_set_trace_state_variable_value,
12261 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12262 get_set_tsv_func_addr): New prototypes.
12263
12264 * ax.h: New include file.
12265 * ax.c: New source file.
12266
12267 * tracepoint.c: Include ax.h.
12268 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12269 agent_expr, eval_result_type): Move to ax.h.
12270 (parse_agent_expr): Rename to ...
12271 (gdb_parse_agent_expr): ... this, make it non-static and move
12272 to ax.h.
12273 (unparse_agent_expr) Rename to ...
12274 (gdb_unparse_agent_expr): ... this, make it non-static and move
12275 to ax.h.
12276 (eval_agent_expr): Rename to ...
12277 (eval_tracepoint_agent_expr): ... this.
12278 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12279 forward declarations.
12280 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12281 (agent_get_trace_state_variable_value): New function.
12282 (agent_set_trace_state_variable_value): New function.
12283 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12284 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12285 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12286 (condition_true_at_tracepoint): Likewise.
12287 (parse_agent_expr): Rename to ...
12288 (gdb_parse_agent_expr): ... this and move to ax.c.
12289 (unparse_agent_expr): Rename to ...
12290 (gdb_unparse_agent_expr): ... this and move to ax.c.
12291 (gdb_agent_op_name): Move to ax.c.
12292 (eval_agent_expr): Rename to ...
12293 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12294 and move to ax.c.
12295 (eval_tracepoint_agent_expr): New function.
12296 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12297 non-static.
12298 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12299 ax.c.
12300 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12301 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12302 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12303 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12304 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12305 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12306 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12307 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12308 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12309 (compile_bytecodes): Remove forward declaration.
12310 (is_goto_target): Move to ax.c.
12311 (compile_bytecodes): Move to ax.c and call
12312 agent_get_trace_state_variable_value (...) and
12313 agent_set_trace_state_variable_value (...).
12314
12315 * Makefile.in: Update ax.c and IPA dependencies.
12316
12317 2012-02-24 Pedro Alves <palves@redhat.com>
12318
12319 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12320 (cmd_bigqtbuffer_circular): ... this. Only handle
12321 'QTBuffer:circular:'.
12322 (handle_tracepoint_general_set): Adjust.
12323
12324 2012-02-16 Yao Qi <yao@codesourcery.com>
12325
12326 * inferiors.c: Move code to ...
12327 * dll.c: .... here. New.
12328 * server.h: Declare clear_dlls.
12329 * Makefile.in (SFILES): Add dll.c.
12330 (OBS): Add dll.o
12331 (dll.o): New rule.
12332
12333 2012-02-11 Yao Qi <yao@codesourcery.com>
12334
12335 * server.c: (handle_monitor_command): Add a new parameter
12336 `own_buf'.
12337 (handle_query): Update caller.
12338
12339 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12340
12341 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12342 * configure, config.in: Regenerate.
12343 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12344 is not defined.
12345
12346 2012-02-02 Pedro Alves <palves@redhat.com>
12347
12348 Try SIGKILL first, then PTRACE_KILL.
12349 * linux-low.c (linux_kill_one_lwp): New.
12350 (linux_kill_one_lwp): Rename to ...
12351 (kill_one_lwp_callback): ... this. Use the new
12352 linux_kill_one_lwp.
12353
12354 2012-02-02 Pedro Alves <palves@redhat.com>
12355
12356 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12357 inferior.
12358
12359 2012-01-27 Pedro Alves <palves@redhat.com>
12360
12361 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12362 (elf_64_file_p): Make static.
12363 (linux_pid_exe_is_elf_64_file): New.
12364 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12365 Delete declarations.
12366 (linux_pid_exe_is_elf_64_file): Declare.
12367 * linux-x86-low.c (x86_arch_setup): Use
12368 linux_pid_exe_is_elf_64_file.
12369
12370 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12371
12372 * linux-low.c (linux_wait_for_event_1): Rename to ...
12373 (linux_wait_for_event): ... here and merge it with former
12374 linux_wait_for_event - new variable wait_ptid, use it.
12375 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12376
12377 2012-01-23 Pedro Alves <palves@redhat.com>
12378
12379 * server.c (main): Avoid yet another case of infinite loop while
12380 detaching/killing after a longjmp.
12381
12382 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12383
12384 Code cleanup.
12385 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12386
12387 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12388
12389 * hostio.c (handle_readlink): New function.
12390 (handle_vFile): Call it to handle "vFile:readlink" packets.
12391
12392 2012-01-20 Pedro Alves <palves@redhat.com>
12393 Ulrich Weigand <ulrich.weigand@linaro.org>
12394
12395 * server.c (handle_v_requests): Only support vAttach and vRun to
12396 start multiple processes when in extended protocol mode.
12397
12398 2012-01-17 Pedro Alves <palves@redhat.com>
12399
12400 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12401 memalign plus mprotect to allocate the scratch buffer.
12402
12403 2012-01-13 Pedro Alves <palves@redhat.com>
12404
12405 * server.c (attach_inferior): Clear `cont_thread'.
12406
12407 2012-01-13 Pedro Alves <palves@redhat.com>
12408
12409 * server.c (main): Avoid infinite loop while detaching/killing
12410 after a longjmp.
12411
12412 2012-01-09 Doug Evans <dje@google.com>
12413
12414 * server.c (start_inferior): Set last_ptid in --wrapper case.
12415
12416 2012-01-06 Yao Qi <yao@codesourcery.com>
12417
12418 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12419 defined.
12420 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12421
12422 2012-01-04 Yao Qi <yao@codesourcery.com>
12423
12424 * tracepoint.c (cmd_qtdp): Print debug message
12425 for static tracepoint.
12426
12427 2012-01-04 Yao Qi <yao@codesourcery.com>
12428
12429 * tracepoint.c (trace_vdebug): Differentiate debug message
12430 between gdbserver and IPA.
12431
12432 2012-01-03 Yao Qi <yao@codesourcery.com>
12433
12434 * tracepoint.c (tracepoint_was_hit): Don't collect for
12435 static tracepoint.
12436
12437 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12438
12439 * terminal.h: Reformat copyright header.
12440
12441 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12442
12443 * server.c (gdbserver_version): Update copyright year.
12444 * gdbreplay.c (gdbreplay_version): Likewise.
12445
12446 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12447
12448 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12449
12450 Revert:
12451 2011-12-18 Hui Zhu <teawater@gmail.com>
12452 * linux-low.c (linux_create_inferior): Save return value to ret.
12453
12454 2011-12-18 Hui Zhu <teawater@gmail.com>
12455
12456 * linux-low.c (linux_create_inferior): Save return value to ret.
12457
12458 2011-12-16 Doug Evans <dje@google.com>
12459
12460 * linux-low.c (linux_create_inferior): If stdio connection,
12461 redirect stdin from /dev/null, stdout to stderr.
12462 * remote-utils.c (remote_is_stdio): New static global.
12463 (remote_connection_is_stdio): New function.
12464 (remote_prepare): Handle stdio connection.
12465 (remote_open): Ditto.
12466 (remote_close): Don't close stdin for stdio connections.
12467 (read_prim,write_prim): New functions. Replace all calls to
12468 read/write to these.
12469 * server.c (main): Watch for "-" argument. Move call to
12470 remote_prepare before start_inferior.
12471 * server.h (STDIO_CONNECTION_NAME): New macro.
12472 (remote_connection_is_stdio): Declare.
12473
12474 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12475 in debugging output.
12476
12477 2011-12-15 Yao Qi <yao@codesourcery.com>
12478
12479 * tracepoint.c: Include sys/syscall.h.
12480 (gdb_ust_thread): Remove preprocessor conditional.
12481
12482 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12483
12484 * linux-low.c (linux_detach_one_lwp): Call
12485 the_low_target.prepare_to_resume before detaching.
12486
12487 2011-12-14 Yao Qi <yao@codesourcery.com>
12488
12489 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12490 of write.
12491
12492 2011-12-14 Yao Qi <yao@codesourcery.com>
12493
12494 * i386-low.c (i386_low_stopped_data_address): Initialize local
12495 variable `control'.
12496
12497 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12498
12499 PR remote/13492
12500
12501 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12502 DR_CONTROL unless necessary. Extend comments.
12503 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12504 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12505
12506 2011-12-13 Yao Qi <yao@codesourcery.com>
12507
12508 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12509 macros.
12510 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12511
12512 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12513
12514 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12515 Print new debug message for such case.
12516
12517 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12518
12519 Fix overlapping memcpy.
12520 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12521 the read_inferior_memory transfer.
12522 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12523 write_inferior_memory transfer.
12524 (set_fast_tracepoint_jump): New variable buf. Use it for the
12525 read_inferior_memory and write_inferior_memory transfers.
12526 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12527 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12528 Use it for the write_inferior_memory transfer.
12529 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12530 buffers.
12531
12532 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12533
12534 * linux-low.c (fetch_register, store_register): Make code
12535 consistent, fix formatting.
12536
12537 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12538
12539 * linux-low.c (usr_store_inferior_registers): Factor out code
12540 to handle individual registers into...
12541 (store_register): ... this new function.
12542
12543 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12544
12545 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12546 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12547 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12548 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12549 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12550 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12551 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12552 (srv_xmlfiles): Add new XML files.
12553
12554 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12555 and <sys/uio.h>.
12556 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12557 (init_registers_s390_linux32v1): Add prototype.
12558 (init_registers_s390_linux32v2): Likewise.
12559 (init_registers_s390_linux64v1): Likewise.
12560 (init_registers_s390_linux64v2): Likewise.
12561 (init_registers_s390x_linux64v1): Likewise.
12562 (init_registers_s390x_linux64v2): Likewise.
12563 (s390_num_regs): Increment to 52.
12564 (s390_regmap): Add orig_r2 register.
12565 (s390_num_regs_3264): Increment to 68.
12566 (s390_regmap_3264): Add orig_r2 register.
12567 (s390_collect_ptrace_register): Handle orig_r2 register.
12568 (s390_supply_ptrace_register): Likewise.
12569 (s390_fill_last_break): New function.
12570 (s390_store_last_break): Likewise.
12571 (s390_fill_system_call): New function.
12572 (s390_store_system_call): Likewise.
12573 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12574 register sets.
12575 (s390_check_regset): New function.
12576 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12577 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12578 Update target_regsets for available register sets.
12579
12580 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12581 Jan Kratochvil <jan.kratochvil@redhat.com>
12582
12583 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12584 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12585 New.
12586 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12587 * linux-low.h (struct process_info_private): New member r_debug.
12588 * server.c (handle_qxfer_libraries): Call
12589 the_target->qxfer_libraries_svr4.
12590 (handle_qxfer_libraries_svr4): New function.
12591 (qxfer_packets): New entry "libraries-svr4".
12592 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12593 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12594 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12595 PACKET_qXfer_libraries_svr4.
12596
12597 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12598
12599 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12600 PSW address/mask between 8-byte and 16-byte formats.
12601 (s390_supply_ptrace_register): Likewise.
12602 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12603 basic addressing mode bit.
12604
12605 2011-11-24 Stan Shebs <stan@codesourcery.com>
12606
12607 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12608
12609 2011-11-17 Stan Shebs <stan@codesourcery.com>
12610
12611 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12612 (tracing_start_time): New global.
12613 (tracing_stop_time): New global.
12614 (tracing_user_name): New global.
12615 (tracing_notes): New global.
12616 (tracing_stop_note): New global.
12617 (cmd_qtstart): Set traceframe_usage, start_time.
12618 (stop_tracing): Set stop_time.
12619 (cmd_qtstatus): Report additional status.
12620 (cmd_qtp): New function.
12621 (handle_tracepoint_query): Call it.
12622 (cmd_qtnotes): New function.
12623 (handle_tracepoint_general_set): Call it.
12624 (get_timestamp): Rename from tsv_get_timestamp.
12625
12626 2011-11-14 Stan Shebs <stan@codesourcery.com>
12627 Kwok Cheung Yeung <kcy@codesourcery.com>
12628
12629 * linux-x86-low.c (small_jump_insn): New.
12630 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12631 trampoline and error message, build a trampoline and issue a small
12632 jump instruction to it.
12633 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12634 trampoline and error message.
12635 (x86_get_min_fast_tracepoint_insn_len): New.
12636 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12637 * linux-low.h (struct linux_target_ops): Add arguments to
12638 install_fast_tracepoint_jump_pad operation, add new operation.
12639 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12640 arguments.
12641 (linux_get_min_fast_tracepoint_insn_len): New function.
12642 (linux_target_op): Add new operation.
12643 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12644 (gdb_trampoline_buffer_end): Ditto.
12645 (gdb_trampoline_buffer_error): Ditto.
12646 (struct ipa_sym_addresses): Add fields for new IPA variables.
12647 (symbol_list): Add entries for new IPA variables.
12648 (struct tracepoint): Add fields to hold the address range of the
12649 trampoline used by the tracepoint.
12650 (trampoline_buffer_head): New static variable.
12651 (trampoline_buffer_tail): Ditto.
12652 (claim_trampoline_space): New function.
12653 (have_fast_tracepoint_trampoline_buffer): New function.
12654 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12655 structure.
12656 (install_fast_tracepoint): Ditto, also add error buffer argument.
12657 (cmd_qtminftpilen): New function.
12658 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12659 (fast_tracepoint_from_trampoline_address): New function.
12660 (fast_tracepoint_collecting): Handle trampoline as part of jump
12661 pad space.
12662 (set_trampoline_buffer_space): New function.
12663 (initialize_tracepoint): Initialize new IPA variables.
12664 * target.h (struct target_ops): Add arguments to
12665 install_fast_tracepoint_jump_pad operation, add new
12666 get_min_fast_tracepoint_insn_len operation.
12667 (target_get_min_fast_tracepoint_insn_len): New.
12668 (install_fast_tracepoint_jump_pad): Add arguments.
12669 * server.h (IPA_BUFSIZ): Define.
12670 * linux-i386-ipa.c: Include extra header files.
12671 (initialize_fast_tracepoint_trampoline_buffer): New function.
12672 (initialize_low_tracepoint): Call it.
12673 * server.h (set_trampoline_buffer_space): Declare.
12674 (claim_trampoline_space): Ditto.
12675 (have_fast_tracepoint_trampoline_buffer): Ditto.
12676
12677 2011-11-14 Yao Qi <yao@codesourcery.com>
12678
12679 * server.c (handle_query): Handle InstallInTrace for qSupported.
12680 * tracepoint.c (add_tracepoint): Sort list.
12681 (install_tracepoint, download_tracepoint): New.
12682 (cmd_qtdp): Call them to install and download tracepoints.
12683 (sort_tracepoints): Removed.
12684 (cmd_qtstart): Update.
12685
12686 2011-11-14 Yao Qi <yao@codesourcery.com>
12687
12688 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12689 * mem-break.h: Declare.
12690 * tracepoint.c (cmd_qtstart): Move some code to ...
12691 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12692 New.
12693 (download_tracepoints): Move some code to ...
12694 (download_tracepoint_1): ... here. New.
12695
12696 2011-11-08 Yao Qi <yao@codesourcery.com>
12697
12698 * remote-utils.c (relocate_instruction): A comment fix.
12699
12700 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12701
12702 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12703 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12704 dr_status_mirror and dr_control_mirror from debug_reg_state.
12705 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12706 (i386_initial_stuff): Remove use of deleted globals.
12707 (i386_get_thread_context, i386_set_thread_context,
12708 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12709 from debug_reg_state.
12710
12711 2011-11-05 Yao Qi <yao@codesourcery.com>
12712
12713 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12714 address as TPOINT's.
12715
12716 2011-11-02 Stan Shebs <stan@codesourcery.com>
12717
12718 * tracepoint.c (agent_mem_read_string): New function.
12719 (eval_agent_expr): Call it for tracenz.
12720 * server.c (handle_query): Report support for tracenz.
12721
12722 2011-11-02 Yao Qi <yao@codesourcery.com>
12723
12724 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12725
12726 2011-11-02 Yao Qi <yao@codesourcery.com>
12727
12728 * target.h: Fix a typo in comment.
12729
12730 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12731
12732 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12733 clobber the breakpoints' shadows with fast tracepoint jumps.
12734 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12735 * target.c (write_inferior_memory): Also pass MYADDR down to
12736 check_mem_write.
12737
12738 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12739
12740 * configure.ac: Check support for personality routine.
12741 * configure: Regenerate.
12742 * config.in: Likewise.
12743 * linux-low.c: Include <sys/personality.h>.
12744 Define ADDR_NO_RANDOMIZE if necessary.
12745 (linux_create_inferior): Disable address space randomization when
12746 forking inferior, if requested.
12747 (linux_supports_disable_randomization): New function.
12748 (linux_target_ops): Install it.
12749 * server.h (disable_randomization): Declare.
12750 * server.c (disable_randomization): New global variable.
12751 (handle_general_set): Handle QDisableRandomization.
12752 (handle_query): Likewise for qSupported.
12753 (main): Support --disable-randomization and --no-disable-randomization
12754 command line arguments.
12755 * target.h (struct target_ops): Add supports_disable_randomization.
12756 (target_supports_disable_randomization): New macro.
12757
12758 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12759
12760 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12761 ifdef check.
12762 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12763 [!PT_GETDSBT] (target_loadmap): New definition.
12764 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12765 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12766 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12767 and PT_GETDSBT to LINUX_LOADMAP.
12768 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12769 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12770
12771 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12772
12773 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12774 (arm_linux_hwbp_cap): New static variable.
12775 (arm_linux_get_hwbp_cap): Replace by ...
12776 (arm_linux_init_hwbp_cap): ... this new function.
12777 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12778 (arm_linux_get_hw_watchpoint_count): Likewise.
12779 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12780 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12781 (arm_prepare_to_resume): Use perror_with_name instead of error.
12782
12783 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12784
12785 * linux-arm-low.c: Include <signal.h>.
12786 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12787 (struct arm_linux_hwbp_cap): New data type.
12788 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12789 (struct arm_linux_hw_breakpoint): New data type.
12790 (MAX_BPTS, MAX_WPTS): Define.
12791 (struct arch_process_info, struct arch_lwp_info): New data types.
12792 (arm_linux_get_hwbp_cap): New function.
12793 (arm_linux_get_hw_breakpoint_count): Likewise.
12794 (arm_linux_get_hw_watchpoint_count): Likewise.
12795 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12796 (arm_hwbp_control_initialize): Likewise.
12797 (arm_hwbp_control_is_enabled): Likewise.
12798 (arm_hwbp_control_is_initialized): Likewise.
12799 (arm_hwbp_control_disable): Likewise.
12800 (arm_linux_hw_breakpoint_equal): Likewise.
12801 (arm_linux_hw_point_initialize): Likewise.
12802 (struct update_registers_data): New data structure.
12803 (update_registers_callback: New function.
12804 (arm_insert_point): Likewise.
12805 (arm_remove_point): Likewise.
12806 (arm_stopped_by_watchpoint): Likewise.
12807 (arm_stopped_data_address): Likewise.
12808 (arm_new_process): Likewise.
12809 (arm_new_thread): Likewise.
12810 (arm_prepare_to_resume): Likewise.
12811 (the_low_target): Register arm_insert_point, arm_remove_point,
12812 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12813 arm_new_thread, and arm_prepare_to_resume.
12814
12815 2011-09-15 Stan Shebs <stan@codesourcery.com>
12816
12817 * server.h (struct emit_ops): Add compare-goto fields.
12818 * tracepoint.c (gdb_agent_op_sizes): New table.
12819 (emit_eq_goto): New function.
12820 (emit_ne_goto): New function.
12821 (emit_lt_goto): New function.
12822 (emit_le_goto): New function.
12823 (emit_gt_goto): New function.
12824 (emit_ge_goto): New function.
12825 (is_goto_target): New function.
12826 (compile_bytecodes): Recognize special cases of compare-goto
12827 combinations and call specialized emitters for them.
12828 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12829 (amd64_emit_ne_goto): New function.
12830 (amd64_emit_lt_goto): New function.
12831 (amd64_emit_le_goto): New function.
12832 (amd64_emit_gt_goto): New function.
12833 (amd64_emit_ge_goto): New function.
12834 (amd64_emit_ops): Add the new functions.
12835 (i386_emit_eq_goto): New function.
12836 (i386_emit_ne_goto): New function.
12837 (i386_emit_lt_goto): New function.
12838 (i386_emit_le_goto): New function.
12839 (i386_emit_gt_goto): New function.
12840 (i386_emit_ge_goto): New function.
12841 (i386_emit_ops): Add the new functions.
12842
12843 2011-09-08 Stan Shebs <stan@codesourcery.com>
12844
12845 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12846 (i386_emit_epilogue): Restore %ebx.
12847
12848 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12849
12850 * server.c (step_thread): Remove definition.
12851 (process_serial_event): Don't handle Hs.
12852 * server.h (step_thread): Remove declaration.
12853 * target.c (set_desired_inferior): Remove use of step_thread.
12854
12855 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12856
12857 * linux-low.c: Include linux-procfs.h.
12858 (linux_attach_lwp_1): Update comments.
12859 (linux_attach): Scan for existing threads when attaching to a
12860 process that is the tgid.
12861 * Makefile.in: Update dependencies.
12862
12863 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12864
12865 * configure.srv: Add linux-procfs.o dependencies.
12866
12867 2011-08-14 Yao Qi <yao@codesourcery.com>
12868
12869 * target.h (struct target_ops): Fix indent.
12870 * win32-low.c (win32_target_ops): Fix comment.
12871
12872 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12873 Yao Qi <yao@codesourcery.com>
12874
12875 * Makefile.in (clean): Remove tic6x-*.c files.
12876 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12877 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12878 (tic6x-c64xp-linux.c): Likewise.
12879 * configure.srv: Add support for tic6x-*-uclinux.
12880 * linux-tic6x-low.c: New.
12881 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12882
12883 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12884 Yao Qi <yao@codesourcery.com>
12885
12886 * target.h (struct target_ops): Add read_loadmap.
12887 * linux-low.c (struct target_loadseg): New type.
12888 (struct target_loadmap): New type.
12889 (linux_read_loadmap): New function.
12890 (linux_target_ops): Add linux_read_loadmap.
12891 * server.c (handle_query): Support qXfer:fdpic:read packet.
12892 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12893 to NULL.
12894
12895 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12896
12897 * win32-low.c: Include <stdint.h>.
12898
12899 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12900
12901 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12902 to the inferior here.
12903 (i386_remove_aligned_watchpoint): Ditto.
12904 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12905 fit part of the watchpoint in the debug registers.
12906 (i386_update_inferior_debug_regs): New.
12907 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12908 registers, and only update the inferior on success.
12909 (i386_low_remove_watchpoint): Ditto.
12910
12911 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12912
12913 * linux-low.c (compare_ints, unique, list_threads, show_process,
12914 linux_core_of_thread): Delete.
12915 (linux_target_ops): Change linux_core_of_thread to
12916 linux_common_core_of_thread.
12917 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12918 * utils.c (malloc_failure): Change type of argument.
12919 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12920 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12921 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12922 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12923 (IPA_OBJS): Add common-utils-ipa.o.
12924 (ptid_h, linux_osdata_h): New macros.
12925 (server_h): Add common/common-utils.h, common/xml-utils.h,
12926 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12927 common/ptid.h.
12928 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12929 ptid.o, buffer.o): New rules.
12930 (linux-low.o): Add common/linux-osdata.h as a dependency.
12931 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12932 * configure.ac: Add AC_HEADER_DIRENT check.
12933 * config.in: Regenerate.
12934 * configure: Regenerate.
12935 * remote-utils.c (xml_escape_text): Delete.
12936 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12937 buffer_xml_printf): Move to common/buffer.c.
12938 * server.c (main): Remove call to initialize_inferiors.
12939 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12940 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12941 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12942 internal_error, gdb_assert, gdb_assert_fail): Delete.
12943 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12944 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12945 common/buffer.h.
12946 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12947 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12948 initialize_inferiors): Delete.
12949
12950 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12951
12952 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12953 symbol error.
12954
12955 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12956
12957 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12958 assertion.
12959 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12960
12961 2011-05-26 Yao Qi <yao@codesourcery.com>
12962
12963 * Makefile.in (thread-db.o): Track dependence to
12964 common/gdb_thread_db.h.
12965 * thread-db.c: include gdb_thread_db.h from right place.
12966
12967 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12968
12969 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12970 __FILE__ and __LINE__ to internal_error.
12971
12972 2011-05-13 Doug Evans <dje@google.com>
12973
12974 * thread-db.c (try_thread_db_load_from_sdir): New function.
12975 (try_thread_db_load_from_dir): New function.
12976 (thread_db_load_search): Handle $sdir, ignore $pdir.
12977 Remove trying of system directories if search of
12978 libthread-db-search-path fails, that is now done via $sdir.
12979
12980 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12981
12982 * server.c (handle_query): Add EnableDisableTracepoints to the list
12983 of supported features.
12984 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12985 tracepoints.
12986 (cmd_qtenable_disable): New.
12987 (cmd_qtstart): Install tracepoints even if disabled.
12988 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12989 receiving a QTEnable or QTDisable packet.
12990 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12991 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12992 tracepoints.
12993 (gdb_probe): Skip data collection if static tracepoint is disabled.
12994
12995 2011-05-10 Doug Evans <dje@google.com>
12996
12997 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12998
12999 2011-05-04 Doug Evans <dje@google.com>
13000
13001 * linux-low.c (linux_join): Skip process lookup.
13002 * spu-low.c (spu_join): Ditto.
13003 * server.c (join_inferiors_callback): Delete.
13004 (process_serial_event): For 'D' packet (detach) call join_inferior
13005 directly.
13006
13007 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13008
13009 * README: Don't mention xscale*-*-linux*.
13010 * configure.srv (xscale*-*-linux*): Don't handle target.
13011
13012 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13013
13014 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13015 casting pointers.
13016 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13017 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13018 (i386_emit_void_call_2): Likewise.
13019
13020 2011-04-26 Yao Qi <yao@codesourcery.com>
13021
13022 * linux-low.c: Move common macros to linux-ptrace.h.
13023 Include linux-ptrace.h.
13024 * Makefile.in (linux_ptrace_h): New.
13025 (linux-low.o): Depends on linux-ptrace.h.
13026
13027 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13028
13029 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13030 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13031 (remote_prepare): New function with most of the TCP code from ...
13032 (remote_open): ... here. Detect PORT here unconditionally. Move also
13033 setting transport_is_reliable.
13034 * server.c (run_once): New variable.
13035 (gdbserver_usage): Document it.
13036 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13037 the first run if RUN_ONCE.
13038 * server.h (run_once, remote_prepare): New declarations.
13039
13040 2011-04-19 Tom Tromey <tromey@redhat.com>
13041
13042 * win32-low.c (handle_load_dll): Remove duplicate "the".
13043
13044 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13045
13046 Remove support for old Cygwin 1.5 versions.
13047 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13048 function to avoid warning.
13049 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13050 warning.
13051
13052 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13053
13054 * gdbserver/server.h (Macro _): Define it if not available.
13055
13056 2011-03-14 Michael Snyder <msnyder@vmware.com>
13057
13058 * hostio.c (handle_close): Remove unnecessary null test.
13059
13060 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13061
13062 * Makefile.in (maintainer-clean realclean distclean): Remove
13063 "make ... subdir_do" command.
13064
13065 2011-03-10 Michael Snyder <msnyder@vmware.com>
13066
13067 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13068
13069 * server.c (handle_v_run): Free alloced buffer on early return.
13070
13071 2011-03-09 Yao Qi <yao@codesourcery.com>
13072
13073 Revert:
13074 2011-03-04 Yao Qi <yao@codesourcery.com>
13075
13076 * Makefile.in: Remove GNU make feature --directory.
13077
13078 2011-03-05 Yao Qi <yao@codesourcery.com>
13079
13080 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13081 (subdir_do): New make target. Copied from gdb/Makefile.
13082 (maintainer-clean, realclean, distclean, clean): Call corresponding
13083 make targets in common/Makefile.
13084
13085 2011-02-11 Yao Qi <yao@codesourcery.com>
13086
13087 * configure.ac: Call AC_PROG_RANLIB.
13088 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13089 * configure: Regenerate.
13090
13091 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13092
13093 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13094
13095 2011-03-06 Yao Qi <yao@codesourcery.com>
13096
13097 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13098
13099 2011-03-05 Yao Qi <yao@codesourcery.com>
13100
13101 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13102 (subdir_do): New make target. Copied from gdb/Makefile.
13103 (maintainer-clean, realclean, distclean, clean): Call corresponding
13104 make targets in common/Makefile.
13105
13106 2011-03-04 Yao Qi <yao@codesourcery.com>
13107
13108 * Makefile.in: Remove GNU make feature --directory.
13109
13110 2011-03-04 Michael Snyder <msnyder@vmware.com>
13111
13112 * server.c (queue_stop_reply): Call xmalloc not malloc.
13113
13114 2011-03-02 Michael Snyder <msnyder@vmware.com>
13115
13116 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13117
13118 2011-02-28 Michael Snyder <msnyder@vmware.com>
13119
13120 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13121 (cmd_qtframe): Ditto.
13122 (cmd_qtbuffer): Ditto.
13123 (cmd_bigqtbuffer): Ditto.
13124
13125 * utils.c (decimal2str): Initialize 'width' to nine, then
13126 don't mess with it.
13127
13128 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13129
13130 * hostio.c (require_data): Free *data, not data.
13131
13132 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13133
13134 * hostio.c (require_data): Use free, not xfree.
13135
13136 2011-02-27 Michael Snyder <msnyder@vmware.com>
13137
13138 * server.c (handle_query): Discard unused value.
13139
13140 * hostio.c (require_data): Free malloc memory before returning
13141 error.
13142
13143 2011-02-26 Michael Snyder <msnyder@vmware.com>
13144
13145 * linux-low.c (list_threads): Call closedir for dirent.
13146
13147 2011-02-27 Michael Snyder <msnyder@vmware.com>
13148
13149 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13150 a case statement falls through.
13151
13152 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13153
13154 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13155 in comparison.
13156
13157 2011-02-26 Michael Snyder <msnyder@vmware.com>
13158
13159 * utils.c (decimal2str): Eliminate dead code and dead param.
13160 (pulongest): Drop dead param from call to decimal2str.
13161 (plongest): Ditto.
13162
13163 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13164
13165 Revert the following patch (not approved yet):
13166 2011-02-21 Hui Zhu <teawater@gmail.com>
13167 * tracepoint.c (tp_printf): New function.
13168 (eval_agent_expr): Handle gdb_agent_op_printf.
13169
13170 2011-02-21 Hui Zhu <teawater@gmail.com>
13171
13172 * tracepoint.c (tp_printf): New function.
13173 (eval_agent_expr): Handle gdb_agent_op_printf.
13174
13175 2011-02-18 Tom Tromey <tromey@redhat.com>
13176
13177 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13178 (tracepoint.o): Likewise.
13179 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13180 (gdb_agent_op_names): Likewise.
13181
13182 2011-02-18 Tom Tromey <tromey@redhat.com>
13183
13184 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13185 gdb_agent_op_rot>: New constants.
13186 (gdb_agent_op_names): Add pick and roll.
13187 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13188 cases.
13189
13190 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13191
13192 * aclocal.m4: Regenerated with aclocal-1.11.1.
13193
13194 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13195
13196 * server.c (handle_qxfer_traceframe_info): New.
13197 (qxfer_packets): Register "traceframe-info".
13198 (handle_query): Report support for qXfer:traceframe-info:read+.
13199 * tracepoint.c (match_blocktype): New.
13200 (traceframe_find_block_type): Rename to ...
13201 (traceframe_walk_blocks): ... this. Add callback filter argument,
13202 and use it.
13203 (traceframe_find_block_type): New, reimplemented on top of
13204 traceframe_walk_blocks.
13205 (build_traceframe_info_xml): New.
13206 (traceframe_read_info): New.
13207 * server.h (traceframe_read_info): Declare.
13208
13209 2011-02-11 Yao Qi <yao@codesourcery.com>
13210
13211 * configure.ac: Call AC_PROG_RANLIB.
13212 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13213 * configure: Regenerate.
13214
13215 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13216
13217 * server.c (gdb_read_memory): Change return semantics to allow
13218 partial transfers.
13219 (handle_search_memory_1): Adjust.
13220 (process_serial_event) <'m' packet>: Handle partial transfers.
13221 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13222
13223 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13224
13225 * regcache.c (init_register_cache): Initialize
13226 regcache->register_status.
13227 (free_register_cache): Release regcache->register_status.
13228 (regcache_cpy): Copy register_status.
13229 (registers_to_string): Print 'x's for unavailable registers.
13230 (supply_register): Mark the register's status valid or
13231 unavailable, depending on whether a buffer was passed in or not.
13232 (supply_register_zeroed): New.
13233 (supply_regblock): Mark the registers' status valid or
13234 unavailable, depending on whether a buffer was passed in or not.
13235 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13236 (struct regcache): New `register_status' field.
13237 (supply_register_zeroed): Declare.
13238 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13239 supply_register_zeroed, rather than passing a NULL buffer to
13240 supply_register.
13241 * tracepoint.c (fetch_traceframe_registers): Update comment.
13242
13243 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13244
13245 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13246 buffer explicit.
13247
13248 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13249
13250 * server.h (decode_xfer_write): Change prototype.
13251 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13252 and don't extract the annex here.
13253 * server.c (decode_xfer_read): Remove `annex' parameter,
13254 and don't extract the annex here.
13255 (decode_xfer): New.
13256 (struct qxfer): New.
13257 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13258 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13259 (handle_qxfer_statictrace): New functions, abstracted out from
13260 handle_query, and made to use the struct qxfer interface.
13261 (handle_threads_qxfer_proper): Rename to ...
13262 (handle_qxfer_threads_proper): ... this.
13263 (handle_threads_qxfer): Rename to ...
13264 (handle_qxfer_threads): ... this. Adjust.
13265 (qxfer_packets): New array.
13266 (handle_qxfer): New function.
13267 (handle_query): Use handle_qxfer.
13268
13269 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13270
13271 * gdbreplay.c: Shorten lines of >= 80 columns.
13272 * linux-low.c: Ditto.
13273 * linux-ppc-low.c: Ditto.
13274 * linux-s390-low.c: Ditto.
13275 * linux-sparc-low.c: Ditto.
13276 * linux-x86-low.c: Ditto.
13277 * linux-xtensa-low.c: Ditto.
13278 * mem-break.c: Ditto.
13279 * nto-low.c: Ditto.
13280 * regcache.h: Ditto.
13281 * remote-utils.c: Ditto.
13282 * server.c: Ditto.
13283 * server.h: Ditto.
13284 * thread-db.c: Ditto.
13285 * tracepoint.c: Ditto.
13286 * utils.c: Ditto.
13287 * win32-low.h: Ditto.
13288
13289 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13290
13291 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13292 update.
13293
13294 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13295
13296 * server.c (gdbserver_version): Update copyright year in version
13297 output.
13298 * gdbreplay.c (gdbreplay_version): Ditto.
13299
13300 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13301
13302 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13303 * linux-bfin-low.c: New file.
13304 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13305 PT_DATA_ADDR for BFIN targets.
13306 * Makefile.in (SFILES): Add linux-bfin-low.c.
13307 (clean): Remove reg-bfin.c.
13308 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13309 * README: Mention supported Blackfin targets.
13310
13311 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13312
13313 * .gitignore: New file.
13314
13315 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13316
13317 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13318
13319 2010-10-22 Jie Zhang <jie@codesourcery.com>
13320
13321 * Makefile.in: Add FLAGS_TO_PASS variable.
13322 (install): Remove dependency of install-only and recursively
13323 invoke make for install-only.
13324
13325 2010-10-04 Doug Evans <dje@google.com>
13326
13327 * Makefile.in (uninstall): Use $(DESTDIR).
13328
13329 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13330
13331 PR gdb/11842
13332
13333 * linux-x86-low.c (compat_siginfo_from_siginfo)
13334 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13335 si_code is < 0. Check for si_code == SI_TIMER before checking for
13336 si_code < 0.
13337
13338 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13339
13340 * lynx-i386-low.c: New file.
13341 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13342
13343 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13344
13345 * lynx-low.c (ptrace_request_to_str): Remove handling for
13346 request values that have been removed in LynxOS 5.x.
13347
13348 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13349
13350 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13351 <ptrace.h>
13352
13353 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13354
13355 * configure.ac: Add --enable-inprocess-agent option.
13356 * configure: Rebuilt.
13357
13358 2010-09-06 Yao Qi <yao@codesourcery.com>
13359
13360 * linux-low.c (linux_kill): Remove unused variable.
13361 (linux_stabilize_threads): Likewise.
13362 * server.c (start_inferior): Likewise.
13363 (queue_stop_reply_callback): Likewise.
13364 * tracepoint.c (do_action_at_tracepoint): Likewise.
13365
13366 2010-09-06 Yao Qi <yao@codesourcery.com>
13367
13368 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13369 on return.
13370
13371 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13372
13373 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13374
13375 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13376
13377 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13378 "$(IPA_DEPFILES)".
13379
13380 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13381
13382 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13383 gdbserver/lynx-ppc-low.c: New files.
13384 * Makefile.in (lynx_low_h): New variable.
13385 (lynx-low.o, lynx-ppc-low.o): New rules.
13386 * configure.ac: On LynxOS, link with -lnetinet.
13387 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13388 * configure: regenerate.
13389
13390 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13391
13392 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13393 * configure.ac: Add check for vasprintf and vsnprintf.
13394 * configure, config.in: Regenerate.
13395 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13396
13397 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13398
13399 * gdbreplay.c: Move include of alloca.h up, next to include of
13400 malloc.h.
13401 * server.h: Add include of malloc.h.
13402 * mem-break.c: Remove include of malloc.h.
13403 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13404
13405 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13406
13407 * Makefile.in (memmem.o): Build with -Wno-error.
13408
13409 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13410
13411 * utils.c (xsnprintf): Make non-static.
13412 * server.h: Add xsnprintf declaration.
13413 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13414 replace calls to snprintf by calls to xsnprintf throughout.
13415
13416 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13417
13418 * configure.ac: Add configure check for alloca.
13419 * configure, config.in: Regenerate.
13420 * server.h: Include alloca.h if it exists.
13421 * gdbreplay.c: Include alloca.h if it exists.
13422
13423 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13424
13425 * linux-low.c (__SIGRTMIN): Define if not already defined.
13426 (linux_create_inferior): Check for __ANDROID__ rather than
13427 __SIGRTMIN.
13428 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13429 are already deferred.
13430 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13431 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13432 stopped and already has a pending signal to report.
13433 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13434 a pending signal to report or is moving out of a jump pad.
13435 (linux_init_signals): Check for __ANDROID__ rather than
13436 __SIGRTMIN.
13437
13438 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13439
13440 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13441 debug_threads check. Avoid a linear search when not doing debug
13442 output.
13443
13444 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13445
13446 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13447 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13448 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13449 (process_event): Change local fd's type to gdb_fildes_t.
13450 (create_file_handler): Adjust prototype.
13451 (delete_file_handler): Adjust prototype.
13452 (handle_file_event): Adjust prototype. Use pfildes.
13453 (create_file_event): Adjsut prototype.
13454 * remote-utils.c (remote_desc, listen_desc): Change type to
13455 gdb_fildes_t.
13456 * server.h: New gdb_fildes_t typedef.
13457 [USE_WIN32API]: Include winsock2.h.
13458 (delete_file_handler, add_file_handler): Adjust prototypes.
13459 (pfildes): Declare.
13460 * utils.c (pfildes): New.
13461
13462 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13463
13464 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13465 * configure: Regenerate.
13466
13467 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13468
13469 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13470 (linux_done_accessing_memory): ... this.
13471 (linux_target_ops): Adjust.
13472 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13473 * nto-low.c (nto_target_ops): Adjust comment.
13474 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13475 * spu-low.c (spu_target_ops): Adjust comment.
13476 * target.h (target_ops): Rename unprepare_to_access_memory field
13477 to done_accessing_memory.
13478 (unprepare_to_access_memory): Rename to ...
13479 (done_accessing_memory): ... this.
13480
13481 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13482
13483 * linux-low.c (linux_prepare_to_access_memory): New.
13484 (linux_unprepare_to_access_memory): New.
13485 (linux_target_ops): Install them.
13486 * server.c (read_memory): Rename to ...
13487 (gdb_read_memory): ... this. Use
13488 prepare_to_access_memory/prepare_to_access_memory.
13489 (write_memory): Rename to ...
13490 (gdb_write_memory): ... this. Use
13491 prepare_to_access_memory/prepare_to_access_memory.
13492 (handle_search_memory_1): Adjust.
13493 (process_serial_event): Adjust.
13494 * target.h (struct target_ops): New fields
13495 prepare_to_access_memory and unprepare_to_access_memory.
13496 (prepare_to_access_memory, unprepare_to_access_memory): New.
13497 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13498 prepare_to_access_memory/prepare_to_access_memory.
13499 * nto-low.c (nto_target_ops): Adjust.
13500 * spu-low.c (spu_target_ops): Adjust.
13501 * win32-low.c (win32_target_ops): Adjust.
13502
13503 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13504
13505 * Makefile.in (WARN_CFLAGS): Get it from configure.
13506 (WERROR_CFLAGS): New.
13507 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13508 * configure.ac: Introduce --enable-werror, which adds -Werror to
13509 the compiler command line. Enabled by default. Disable with
13510 --disable-werror. Add -Wdeclaration-after-statement
13511 Wpointer-arith and -Wformat-nonliteral to warning flags.
13512 * configure: Regenerate.
13513
13514 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13515
13516 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13517
13518 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13519
13520 * gdbreplay.c (remote_error): New.
13521 (gdbchar): New.
13522 (expect): Use gdbchar. Check for error reading from GDB.
13523 Clarify sync error output.
13524 (play): Check for errors writing to GDB.
13525 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13526 * remote-utils.c (getpkt): Check for errors writing to the remote
13527 descriptor.
13528
13529 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13530
13531 * linux-low.c (linux_wait_1): Move non-debugging code out of
13532 `debug_threads' control.
13533
13534 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13535
13536 * linux-low.c (linux_wait_1): Don't set last_status here.
13537 * server.c (push_event, queue_stop_reply_callback): Assert we're
13538 not pushing a TARGET_WAITKIND_IGNORE event.
13539 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13540 (myresume, handle_target_event): Set the thread's last_resume_kind
13541 and last_status from the target returned status.
13542
13543 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13544
13545 PR threads/10729
13546
13547 * linux-x86-low.c (update_debug_registers_callback): New.
13548 (i386_dr_low_set_addr): Use it.
13549 (i386_dr_low_get_addr): New.
13550 (i386_dr_low_set_control): Use update_debug_registers_callback.
13551 (i386_dr_low_get_control): New.
13552 (i386_dr_low_get_status): Adjust.
13553 * linux-low.c (linux_stop_lwp): New.
13554 * linux-low.h (linux_stop_lwp): Declare.
13555
13556 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13557 argument instead of a i386_debug_reg_state.
13558 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13559 a i386_debug_reg_state.
13560 (i386_insert_aligned_watchpoint): Adjust.
13561 (i386_remove_aligned_watchpoint): Adjust.
13562 (i386_low_stopped_data_address): Read the debug registers from the
13563 inferior instead of from the mirrors.
13564 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13565 (i386_dr_low_get_addr): Declare.
13566 (i386_dr_low_get_control): Declare.
13567 (i386_dr_low_get_status): Change prototype.
13568
13569 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13570 (i386_dr_low_get_addr): New.
13571 (i386_dr_low_get_control): New.
13572 (i386_dr_low_get_status): Adjust prototype. Return
13573 dr_status_mirror.
13574 (i386_initial_stuff): Clear dr_status_mirror and
13575 dr_control_mirror.
13576 (i386_get_thread_context): Adjust.
13577 (i386_set_thread_context): Adjust.
13578 (i386_thread_added): Adjust.
13579
13580 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13581
13582 * linux-low.h (linux_thread_area): Delete declaration.
13583
13584 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13585
13586 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13587 after its termination.
13588
13589 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13590
13591 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13592 (gdb_wants_all_stopped): Delete.
13593 (linux_wait_1): Don't call them.
13594 * server.c (handle_v_cont): Tag all threads as want-stopped.
13595 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13596 stopped as "client-wants-stopped".
13597
13598 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13599
13600 * Makefile.in (signals_h): New.
13601 (server_h): Depend on it.
13602 (server.o): Don't depend on $(signals_def).
13603 (signals.o): Depend on $(signals_def).
13604
13605 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13606
13607 * Makefile.in (signals_def): New.
13608 (server_h): Append include/gdb/signals.h and signals_def.
13609 (server.o): Append signals_def.
13610
13611 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13612
13613 * server.c (handle_target_event): Use target_signal_to_host for
13614 resume_info.sig initialization.
13615 * target.h (struct thread_resume) <sig>: New comment.
13616
13617 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13618
13619 * server.c (handle_query): strcpy() the returned string from paddress()
13620 instead of sprintf().
13621 * utils.c (paddress): Return phex_nz().
13622
13623 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13624
13625 * server.c (handle_v_cont): Call mourn_inferior if process
13626 just exited.
13627 (myresume): Likewise.
13628
13629 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13630
13631 Static tracepoints, and integration with UST.
13632
13633 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13634 * mem-break.c (uninsert_all_breakpoints)
13635 (reinsert_all_breakpoints): New.
13636 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13637 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13638 (gdb_agent_ust_loaded, helper_thread_id)
13639 (gdb_agent_helper_thread_id): New macros.
13640 (struct ipa_sym_addresses): Add addr_ust_loaded,
13641 addr_helper_thread_id, addr_cmd_buf.
13642 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13643 (in_process_agent_loaded_ust): New.
13644 (write_e_ust_not_loaded): New.
13645 (maybe_write_ipa_ust_not_loaded): New.
13646 (struct collect_static_trace_data_action): New.
13647 (enum tracepoint_type) <static_tracepoint>: New.
13648 (struct tracepoint) <handle>: Mention static tracepoints.
13649 (struct static_tracepoint_ctx): New.
13650 (CMD_BUF_SIZE): New.
13651 (add_tracepoint_action): Handle static tracepoint actions.
13652 (unprobe_marker_at): New.
13653 (clear_installed_tracepoints): Handle static tracepoints.
13654 (cmd_qtdp): Handle static tracepoints.
13655 (probe_marker_at): New.
13656 (cmd_qtstart): Handle static tracepoints.
13657 (response_tracepoint): Handle static tracepoints.
13658 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13659 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13660 (get_context_regcache): Handle static tracepoints.
13661 (do_action_at_tracepoint): Handle static tracepoint actions.
13662 (traceframe_find_block_type): Handle static trace data blocks.
13663 (traceframe_read_sdata): New.
13664 (download_tracepoints): Download static tracepoint actions.
13665 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13666 (GDB_PROBE_NAME): New.
13667 (ust_ops): New.
13668 (GET_UST_SYM): New.
13669 (USTF): New.
13670 (dlsym_ust): New.
13671 (ust_marker_to_static_tracepoint): New.
13672 (gdb_probe): New.
13673 (collect_ust_data_at_tracepoint): New.
13674 (gdb_ust_probe): New.
13675 (UNIX_PATH_MAX, SOCK_DIR): New.
13676 (gdb_ust_connect_sync_socket): New.
13677 (resume_thread, stop_thread): New.
13678 (run_inferior_command): New.
13679 (init_named_socket): New.
13680 (gdb_ust_socket_init): New.
13681 (cstr_to_hexstr): New.
13682 (next_st): New.
13683 (first_marker, next_marker): New.
13684 (response_ust_marker): New.
13685 (cmd_qtfstm, cmd_qtsstm): New.
13686 (unprobe_marker_at, probe_marker_at): New.
13687 (cmd_qtstmat, gdb_ust_thread): New.
13688 (gdb_ust_init): New.
13689 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13690 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13691 (ST_REGENTRY): New.
13692 (x86_64_st_collect_regmap): New.
13693 (X86_64_NUM_ST_COLLECT_GREGS): New.
13694 (AMD64_RIP_REGNUM): New.
13695 (supply_static_tracepoint_registers): New.
13696 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13697 (ST_REGENTRY): New.
13698 (i386_st_collect_regmap): New.
13699 (i386_NUM_ST_COLLECT_GREGS): New.
13700 (supply_static_tracepoint_registers): New.
13701 * server.c (handle_query): Handle qXfer:statictrace:read.
13702 <qSupported>: Report support for StaticTracepoints, and
13703 qXfer:statictrace:read features.
13704 * server.h (traceframe_read_sdata)
13705 (supply_static_tracepoint_registers): Declare.
13706 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13707 (unpack_varlen_hex): Include in IPA build.
13708 * Makefile.in (ustlibs, ustinc): New.
13709 (IPA_OBJS): Add remote-utils-ipa.o.
13710 ($(IPA_LIB)): Link -ldl and -lpthread.
13711 (UST_CFLAGS): New.
13712 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13713 * config.in, configure: Regenerate.
13714
13715 2010-06-20 Ian Lance Taylor <iant@google.com>
13716 Pedro Alves <pedro@codesourcery.com>
13717
13718 * linux-x86-low.c (always_true): Delete.
13719 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13720 trying to fool the compiler with always_true.
13721
13722 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13723
13724 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13725 conditions in gdbserver.
13726
13727 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13728
13729 * spu-low.c (spu_read_memory): Wrap around local store limit.
13730 (spu_write_memory): Likewise.
13731
13732 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13733
13734 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13735 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13736 LONGEST uses.
13737 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13738 uses.
13739 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13740 uses with LONGEST uses.
13741
13742 2010-06-14 Stan Shebs <stan@codesourcery.com>
13743 Pedro Alves <pedro@codesourcery.com>
13744
13745 Bytecode compiler.
13746
13747 * linux-x86-low.c: Include limits.h.
13748 (add_insns): New.
13749 (always_true): New.
13750 (EMIT_ASM): New.
13751 (EMIT_ASM32): New.
13752 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13753 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13754 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13755 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13756 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13757 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13758 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13759 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13760 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13761 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13762 (amd64_emit_void_call_2): New.
13763 (amd64_emit_ops): New.
13764 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13765 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13766 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13767 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13768 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13769 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13770 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13771 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13772 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13773 (i386_emit_stack_adjust, i386_emit_int_call_1)
13774 (i386_emit_void_call_2): New.
13775 (i386_emit_ops): New.
13776 (x86_emit_ops): New.
13777 (the_low_target): Install x86_emit_ops.
13778 * server.h (struct emit_ops): New.
13779 (get_raw_reg_func_addr): Declare.
13780 (current_insn_ptr, emit_error): Declare.
13781 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13782 (set_trace_state_variable_value): New defines.
13783 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13784 addr_get_trace_state_variable_value and
13785 addr_set_trace_state_variable_value.
13786 (symbol_list): New fields for get_raw_reg,
13787 get_trace_state_variable_value and set_trace_state_variable_value.
13788 (condfn): New typedef.
13789 (struct tracepoint): New field `compiled_cond'.
13790 (do_action_at_tracepoint): Clear compiled_cond.
13791 (get_trace_state_variable_value, set_trace_state_variable_value):
13792 Export in the IPA.
13793 (condition_true_at_tracepoint): If there's a compiled condition,
13794 run that.
13795 (current_insn_ptr, emit_error): New globals.
13796 (struct bytecode_address): New.
13797 (get_raw_reg_func_addr): New.
13798 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13799 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13800 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13801 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13802 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13803 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13804 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13805 (compile_tracepoint_condition, compile_bytecodes): New.
13806 * target.h (emit_ops): Forward declare.
13807 (struct target_ops): New field emit_ops.
13808 (target_emit_ops): New.
13809 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13810 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13811 * linux-low.c (linux_emit_ops): New.
13812 (linux_target_ops): Install it.
13813 * linux-low.h (struct linux_target_ops): New field emit_ops.
13814
13815 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13816
13817 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13818 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13819
13820 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13821 Stan Shebs <stan@codesourcery.com>
13822
13823 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13824 (all): Depend on $(extra_libraries).
13825 (install-only): Install the IPA.
13826 (IPA_OBJS, IPA_LIB): New.
13827 (clean): Remove the IPA lib.
13828 (IPAGENT_CFLAGS): New.
13829 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13830 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13831 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13832 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13833 * configure.ac: Check for atomic builtins support in the compiler.
13834 (IPA_DEPFILES, extra_libraries): Define.
13835 * configure.srv (ipa_obj): Add description.
13836 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13837 (i[34567]86-*-linux*): Set ipa_obj.
13838 (x86_64-*-linux*): Set ipa_obj.
13839 * linux-low.c (stabilizing_threads): New.
13840 (supports_fast_tracepoints): New.
13841 (linux_detach): Stabilize threads before detaching.
13842 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13843 the lwp is either not stabilizing, or is moving out of a jump pad.
13844 (linux_fast_tracepoint_collecting): New.
13845 (maybe_move_out_of_jump_pad): New.
13846 (enqueue_one_deferred_signal): New.
13847 (dequeue_one_deferred_signal): New.
13848 (linux_wait_for_event_1): If moving out of a jump pad, defer
13849 pending signals to later.
13850 (linux_stabilize_threads): New.
13851 (linux_wait_1): Check if threads need moving out of jump pads, and
13852 do it if so.
13853 (stuck_in_jump_pad_callback): New.
13854 (move_out_of_jump_pad_callback): New.
13855 (lwp_running): New.
13856 (linux_resume_one_lwp): Handle moving out of jump pads.
13857 (linux_set_resume_request): Dequeue deferred signals.
13858 (need_step_over_p): Also step over fast tracepoint jumps.
13859 (start_step_over): Also uninsert fast tracepoint jumps.
13860 (finish_step_over): Also reinsert fast tracepoint jumps.
13861 (linux_install_fast_tracepoint_jump): New.
13862 (linux_target_ops): Install linux_stabilize_threads and
13863 linux_install_fast_tracepoint_jump_pad.
13864 * linux-low.h (linux_target_ops) <get_thread_area,
13865 install_fast_tracepoint_jump_pad>: New fields.
13866 (struct lwp_info) <collecting_fast_tracepoint,
13867 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13868 (linux_get_thread_area): Declare.
13869 * linux-x86-low.c (jump_insn): New.
13870 (x86_get_thread_area): New.
13871 (append_insns): New.
13872 (push_opcode): New.
13873 (amd64_install_fast_tracepoint_jump_pad): New.
13874 (i386_install_fast_tracepoint_jump_pad): New.
13875 (x86_install_fast_tracepoint_jump_pad): New.
13876 (the_low_target): Install x86_get_thread_area and
13877 x86_install_fast_tracepoint_jump_pad.
13878 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13879 (struct fast_tracepoint_jump): New.
13880 (fast_tracepoint_jump_insn): New.
13881 (fast_tracepoint_jump_shadow): New.
13882 (find_fast_tracepoint_jump_at): New.
13883 (fast_tracepoint_jump_here): New.
13884 (delete_fast_tracepoint_jump): New.
13885 (set_fast_tracepoint_jump): New.
13886 (uninsert_fast_tracepoint_jumps_at): New.
13887 (reinsert_fast_tracepoint_jumps_at): New.
13888 (set_breakpoint_at): Use write_inferior_memory.
13889 (uninsert_raw_breakpoint): Use write_inferior_memory.
13890 (check_mem_read): Mask out fast tracepoint jumps.
13891 (check_mem_write): Mask out fast tracepoint jumps.
13892 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13893 (set_fast_tracepoint_jump): Declare.
13894 (delete_fast_tracepoint_jump)
13895 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13896 (reinsert_fast_tracepoint_jumps_at): Declare.
13897 * regcache.c: Don't compile many functions when building the
13898 in-process agent library.
13899 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13900 the register buffer in the heap.
13901 (free_register_cache): If the register buffer isn't owned by the
13902 regcache, don't free it.
13903 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13904 pre-existing register caches.
13905 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13906 type.
13907 (convert_ascii_to_int): : Constify `from' parameter type.
13908 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13909 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13910 the needed buffer in-place.
13911 (relocate_instruction): New.
13912 * server.c (handle_query) <qSymbols>: If the target supports
13913 tracepoints, give it a chance of looking up symbols. Report
13914 support for fast tracepoints.
13915 (handle_status): Stabilize threads.
13916 (process_serial_event): Adjust.
13917 * server.h (struct fast_tracepoint_jump): Forward declare.
13918 (struct process_info) <fast_tracepoint_jumps>: New field.
13919 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13920 (decode_X_packet, decode_M_packet): Adjust.
13921 (relocate_instruction): Declare.
13922 (in_process_agent_loaded): Declare.
13923 (tracepoint_look_up_symbols): Declare.
13924 (struct fast_tpoint_collect_status): Declare.
13925 (fast_tracepoint_collecting): Declare.
13926 (force_unlock_trace_buffer): Declare.
13927 (handle_tracepoint_bkpts): Declare.
13928 (initialize_low_tracepoint)
13929 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13930 * target.h (struct target_ops) <stabilize_threads,
13931 install_fast_tracepoint_jump_pad>: New fields.
13932 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13933 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13934 [HAVE_STDINT_H]: Include stdint.h.
13935 (trace_debug_1): Rename to ...
13936 (trace_vdebug): ... this.
13937 (trace_debug): Rename to ...
13938 (trace_debug_1): ... this. Add `level' parameter.
13939 (trace_debug): New.
13940 (ATTR_USED, ATTR_NOINLINE): New.
13941 (IP_AGENT_EXPORT): New.
13942 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13943 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13944 (about_to_request_buffer_space, trace_buffer_is_full)
13945 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13946 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13947 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13948 (traceframe_write_count, traceframes_created)
13949 (trace_state_variables)
13950 New renaming defines.
13951 (struct ipa_sym_addresses): New.
13952 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13953 (symbol_list): New.
13954 (ipa_sym_addrs): New.
13955 (all_tracepoint_symbols_looked_up): New.
13956 (in_process_agent_loaded): New.
13957 (write_e_ipa_not_loaded): New.
13958 (maybe_write_ipa_not_loaded): New.
13959 (tracepoint_look_up_symbols): New.
13960 (debug_threads) [IN_PROCESS_AGENT]: New.
13961 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13962 (UNKNOWN_SIDE_EFFECTS): New.
13963 (stop_tracing): New.
13964 (flush_trace_buffer): New.
13965 (stop_tracing_bkpt): New.
13966 (flush_trace_buffer_bkpt): New.
13967 (read_inferior_integer): New.
13968 (read_inferior_uinteger): New.
13969 (read_inferior_data_pointer): New.
13970 (write_inferior_data_pointer): New.
13971 (write_inferior_integer): New.
13972 (write_inferior_uinteger): New.
13973 (struct collect_static_trace_data_action): Delete.
13974 (enum tracepoint_type): New.
13975 (struct tracepoint) <type>: New field `type'.
13976 <actions_str, step_actions, step_actions_str>: Only include in
13977 GDBserver.
13978 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13979 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13980 (tracepoints): Use IP_AGENT_EXPORT.
13981 (last_tracepoint): Don't include in the IPA.
13982 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13983 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13984 (alloced_trace_state_variables): New.
13985 (trace_state_variables): Use IP_AGENT_EXPORT.
13986 (traceframe_t): Delete unused variable.
13987 (circular_trace_buffer): Don't include in the IPA.
13988 (trace_buffer_start): Delete.
13989 (struct trace_buffer_control): New.
13990 (trace_buffer_free): Delete.
13991 (struct ipa_trace_buffer_control): New.
13992 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13993 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13994 New.
13995 (trace_buffer_ctrl): New.
13996 (TRACE_BUFFER_CTRL_CURR): New.
13997 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13998 Reimplement as macros.
13999 (trace_buffer_wrap): Delete.
14000 (traceframe_write_count, traceframe_read_count)
14001 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14002 (struct tracepoint_hit_ctx) <type>: New field.
14003 (struct fast_tracepoint_ctx): New.
14004 (memory_barrier): New.
14005 (cmpxchg): New.
14006 (record_tracepoint_error): Update atomically in the IPA.
14007 (clear_inferior_trace_buffer): New.
14008 (about_to_request_buffer_space): New.
14009 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14010 updating the same buffer.
14011 (add_tracepoint): Default the tracepoint's type to trap
14012 tracepoint, and orig_size to -1.
14013 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14014 internal variables.
14015 (create_trace_state_variable): New parameter `gdb'. Handle it.
14016 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14017 (cmd_qtdp): Handle fast tracepoints.
14018 (cmd_qtdv): Adjust.
14019 (max_jump_pad_size): New.
14020 (gdb_jump_pad_head): New.
14021 (get_jump_space_head): New.
14022 (claim_jump_space): New.
14023 (sort_tracepoints): New.
14024 (MAX_JUMP_SIZE): New.
14025 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14026 IPA.
14027 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14028 support. Upload fast traceframes, and delete internal IPA
14029 breakpoints.
14030 (stop_tracing_handler): New.
14031 (flush_trace_buffer_handler): New.
14032 (cmd_qtstop): Upload fast tracepoints.
14033 (response_tracepoint): Handle fast tracepoints.
14034 (tracepoint_finished_step): Upload fast traceframes. Set the
14035 tracepoint hit context's tracepoint type.
14036 (handle_tracepoint_bkpts): New.
14037 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14038 type. Add comment about fast tracepoints.
14039 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14040 non-existing action_str field.
14041 (get_context_regcache): Handle fast tracepoints.
14042 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14043 to the regcache.
14044 (fast_tracepoint_from_jump_pad_address): New.
14045 (fast_tracepoint_from_ipa_tpoint_address): New.
14046 (collecting_t): New.
14047 (force_unlock_trace_buffer): New.
14048 (fast_tracepoint_collecting): New.
14049 (collecting): New.
14050 (gdb_collect): New.
14051 (write_inferior_data_ptr): New.
14052 (target_tp_heap): New.
14053 (target_malloc): New.
14054 (download_agent_expr): New.
14055 (UALIGN): New.
14056 (download_tracepoints): New.
14057 (download_trace_state_variables): New.
14058 (upload_fast_traceframes): New.
14059 (IPA_FIRST_TRACEFRAME): New.
14060 (IPA_NEXT_TRACEFRAME_1): New.
14061 (IPA_NEXT_TRACEFRAME): New.
14062 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14063 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14064 (gdb_jump_pad_buffer_end): New.
14065 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14066 (initialize_tracepoint): Adjust.
14067 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14068 buffer. Initialize the low module.
14069 * utils.c (PREFIX, TOOLNAME): New.
14070 (malloc_failure): Use PREFIX.
14071 (error): In the IPA, an error causes an exit.
14072 (fatal, warning): Use PREFIX.
14073 (internal_error): Use TOOLNAME.
14074 (NUMCELLS): Increase to 10.
14075 * configure, config.in: Regenerate.
14076
14077 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14078
14079 * server.c (handle_query) <qSupported>: Do two passes over the
14080 qSupported string to avoid nesting strtok.
14081
14082 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14083
14084 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14085 (CDEPS): New.
14086 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14087 -Wl,--dynamic-list.
14088 * configure: Regenerate.
14089 * proc-service.list: New.
14090
14091 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14092
14093 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14094 New comment.
14095
14096 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14097
14098 * gdbreplay.c (remote_open): Check error return from socket() call by
14099 its equality to -1 not by it being negative.
14100 * remote-utils.c (remote_open): Likewise.
14101
14102 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14103
14104 * config.h: Regenerate.
14105
14106 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14107
14108 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14109 doesn't provide PTRACE_GET_THREAD_AREA.
14110
14111 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14112
14113 * linux-m68k-low.c: Include <asm/ptrace.h>
14114 (ps_get_thread_area): Implement.
14115
14116 2010-05-03 Doug Evans <dje@google.com>
14117
14118 * event-loop.c (struct callback_event): New struct.
14119 (callback_list): New global.
14120 (append_callback_event, delete_callback_event): New functions.
14121 (process_callback): New function.
14122 (start_event_loop): Call it.
14123 * remote-utils.c (NOT_SCHEDULED): Define.
14124 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14125 moved out of readchar.
14126 (readchar): Rewrite. Call reschedule before returning.
14127 (reset_readchar): New function.
14128 (remote_close): Call it.
14129 (process_remaining, reschedule): New functions.
14130 * server.h (callback_handler_func): New typedef.
14131 (append_callback_event, delete_callback_event): Declare.
14132
14133 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14134
14135 * proc-service.c (ps_pglobal_lookup): Use
14136 thread_db_look_up_one_symbol.
14137 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14138 parameter. Use it instead of all_symbols_looked_up.
14139 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14140 field.
14141 (all_symbols_looked_up): Don't declare.
14142 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14143 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14144 field.
14145 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14146 Set all_symbols_looked_up here.
14147 (thread_db_look_up_one_symbol): New.
14148 (thread_db_get_tls_address): Adjust.
14149 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14150 thread_db object on the heap, and tentatively set it in the
14151 process structure.
14152 (thread_db_init): Don't set all_symbols_looked_up here.
14153 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14154
14155 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14156
14157 * linux-low.c (linux_kill, linux_detach): Adjust.
14158 (status_pending_p_callback): Remove redundant statement. Check
14159 for !TARGET_WAITIKIND_IGNORE, instead of
14160 TARGET_WAITKIND_STOPPED.
14161 (handle_tracepoints): Make sure LWP is locked. Adjust.
14162 (linux_wait_for_event_1): Adjust.
14163 (linux_cancel_breakpoints): New.
14164 (unsuspend_one_lwp): New.
14165 (unsuspend_all_lwps): New.
14166 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14167 (send_sigstop_callback): Change return type to int, add new
14168 `except' parameter and handle it.
14169 (suspend_and_send_sigstop_callback): New.
14170 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14171 pass them down. If SUSPEND, also increment the lwp's suspend
14172 count.
14173 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14174 (need_step_over_p): Don't consider suspended LWPs.
14175 (start_step_over): Adjust.
14176 (proceed_one_lwp): Change return type to int, add new `except'
14177 parameter and handle it.
14178 (unsuspend_and_proceed_one_lwp): New.
14179 (proceed_all_lwps): Use find_inferior instead of
14180 for_each_inferior.
14181 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14182 also decrement the suspend count of LWPs. Pass `except' down,
14183 instead of hacking its suspend count.
14184 (linux_pause_all): Add `freeze' parameter. Adjust.
14185 (linux_unpause_all): New.
14186 (linux_target_ops): Install linux_unpause_all.
14187 * server.c (handle_status): Adjust.
14188 * target.h (struct target_ops): New fields `unpause_all' and
14189 `cancel_breakpoints'. Add new parameter to `pause_all'.
14190 (pause_all): Add new `freeze' parameter.
14191 (unpause_all): New.
14192 (cancel_breakpoints): New.
14193 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14194 cancel breakpoints.
14195 (cmd_qtstart): Pause threads.
14196 (stop_tracing): Pause threads, and cancel breakpoints.
14197 * win32-low.c (win32_target_ops): Adjust.
14198
14199 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14200
14201 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14202 the inferior right away from here...
14203 (linux_wait_1): ... to here, and adjust to check the thread's
14204 last_resume_kind instead of the lwp's step or stop_expected flags.
14205
14206 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14207
14208 * README: Use consistent `GDB' and `GDBserver' spellings.
14209
14210 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14211
14212 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14213 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14214 (linux_detach_one_lwp): Assume the lwp is stopped.
14215 (any_thread_of): Delete.
14216 (linux_detach): Stop all lwps here. Don't blindly delete all
14217 breakpoints.
14218 (delete_lwp_callback): New.
14219 (linux_mourn): Delete all lwps of the process that is gone.
14220 (linux_wait_1): Don't delete the last lwp of the process here.
14221 * mem-break.h (mark_breakpoints_out): Declare.
14222 * mem-break.c (mark_breakpoints_out): New.
14223 (free_all_breakpoints): Use it.
14224 * server.c (handle_target_event): If the process is gone, mark
14225 breakpoints out.
14226 * thread-db.c (struct thread_db) <create_bp>: New field.
14227 (thread_db_enable_reporting): Fix prototype. Store a thread event
14228 breakpoint reference in the thread_db struct.
14229 (thread_db_load_search): Clear the thread_db object.
14230 (try_thread_db_load_1): Ditto.
14231 (switch_to_process): New.
14232 (disable_thread_event_reporting): Use it.
14233 (remove_thread_event_breakpoints): New.
14234 (thread_db_detach, thread_db_mourn): Use it.
14235
14236 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14237
14238 * linux-low.c (linux_enable_event_reporting): New.
14239 (linux_wait_for_event_1, handle_extended_wait): Use it.
14240
14241 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14242
14243 * linux-low.c (linux_kill_one_lwp, linux_kill)
14244 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14245 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14246 SIGSTOP even if the LWP is stopped.
14247 (send_sigstop_callback): New.
14248 (stop_all_lwps): Use send_sigstop_callback instead.
14249 (linux_resume_one_thread): Adjust.
14250 (proceed_one_lwp): Still proceed an LWP that the client has
14251 requested to stop, if we haven't reported it as stopped yet. Make
14252 sure that LWPs the client want stopped, have a pending SIGSTOP.
14253
14254 2010-04-26 Doug Evans <dje@google.com>
14255
14256 * server.c (handle_general_set): Make static.
14257
14258 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14259 Print received char after testing for error/eof instead of before.
14260 (input_interrupt): Tweak comment.
14261
14262 2010-04-23 Doug Evans <dje@google.com>
14263
14264 * server.c (start_inferior): Print inferior argv if --debug.
14265
14266 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14267
14268 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14269 * nto-x86-low.c: Include server.h
14270
14271 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14272
14273 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14274 be consistent with other sources of this directory.
14275 (init_registers_amd64): Correct name of source file of this function
14276 in the comment.
14277
14278 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14279
14280 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14281 64-bit executables.
14282
14283 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14284
14285 * win32-i386-low.c: Add 64-bit support.
14286 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14287 (init_registers_amd64): Declare.
14288 (mappings): Add 64-bit version of array.
14289 (init_windows_x86): New function.
14290 (the_low_target): Change init_arch field to init_windows_x86.
14291
14292 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14293
14294 * win32-low.c: Adapt to support also 64-bit architecture.
14295 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14296 (get_image_name): Use SIZE_T type for local variable `done'.
14297 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14298 (toolhelp_get_dll_name): Idem.
14299 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14300 Use uintptr_t typecast to avoid warning.
14301 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14302 (handle_exception): Use phex_nz to avoid warning.
14303 (win32_wait): Remove unused local variable `process'.
14304
14305 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14306
14307 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14308 `amd64-avx.o'.
14309
14310 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14311
14312 * configure.ac: Use `ws2_32' library for srv_mingw.
14313 * configure: Regenerate.
14314 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14315 * remote-utils.c: Likewise.
14316
14317 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14318
14319 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14320 if __x86_64__ is defined.
14321
14322 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14323
14324 * configure: Regenerate.
14325
14326 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14327
14328 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14329 * target.h (target_ops): New get_tib_address field.
14330 * win32-low.h (win32_thread_info): Add thread_local_base field.
14331 * win32-low.c (child_add_thread): Add tlb argument.
14332 Set thread_local_base field to TLB.
14333 (get_child_debug_event): Adapt to child_add_thread change.
14334 (win32_get_tib_address): New function.
14335 (win32_target_ops): Set get_tib_address field to
14336 win32_get_tib_address.
14337 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14338
14339 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14340
14341 * linux-low.c (linux_mourn): Also remove the process.
14342 * server.c (handle_target_event): Don't remove the process here.
14343 * nto-low.c (nto_mourn): New.
14344 (nto_target_ops): Install it.
14345 * spu-low.c (spu_mourn): New.
14346 (spu_target_ops): Install it.
14347 * win32-low.c (win32_mourn): New.
14348 (win32_target_ops): Install it.
14349
14350 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14351
14352 * server.h (buffer_xml_printf): Remove redundant `;'.
14353
14354 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14355
14356 * regcache.c (set_register_cache): Invalidate regcaches before
14357 changing the register cache layout.
14358 (regcache_invalidate_one): Allow a NULL regcache.
14359 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14360 regcaches before changing the register cache layout or the target
14361 regsets.
14362
14363 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14364
14365 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14366 variable warning on Linux/x86-64.
14367
14368 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14369
14370 GDBserver disconnected tracing support.
14371
14372 * linux-low.c (linux_remove_process): Delete.
14373 (add_lwp): Don't set last_resume_kind here.
14374 (linux_kill): Use `mourn'.
14375 (linux_detach): Use `thread_db_detach', and `mourn'.
14376 (linux_mourn): New.
14377 (linux_attach_lwp_1): Adjust comment.
14378 (linux_attach): last_resume_kind moved the thread_info; adjust.
14379 (status_pending_p_callback): Adjust.
14380 (linux_wait_for_event_1): Adjust.
14381 (count_events_callback, select_singlestep_lwp_callback)
14382 (select_event_lwp_callback, cancel_breakpoints_callback)
14383 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14384 (proceed_one_lwp): Adjust.
14385 (linux_async): Add debug output.
14386 (linux_thread_stopped): New.
14387 (linux_pause_all): New.
14388 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14389 linux_pause_all.
14390 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14391 (thread_db_free): Delete declaration.
14392 (thread_db_detach, thread_db_mourn): Declare.
14393 * thread-db.c (thread_db_init): Use thread_db_mourn.
14394 (thread_db_free): Delete, split in two.
14395 (disable_thread_event_reporting): New.
14396 (thread_db_detach): New.
14397 (thread_db_mourn): New.
14398
14399 * server.h (struct thread_info) <last_resume_kind>: New field.
14400 <attached>: Add comment.
14401 <gdb_detached>: New field.
14402 (handler_func): Change return type to int.
14403 (handle_serial_event, handle_target_event): Ditto.
14404 (gdb_connected): Declare.
14405 (tracing): Delete.
14406 (disconnected_tracing): Declare.
14407 (stop_tracing): Declare.
14408
14409 * server.c (handle_query) <qSupported>: Report support for
14410 disconnected tracing.
14411 (queue_stop_reply_callback): Account for running threads.
14412 (gdb_wants_thread_stopped): New.
14413 (gdb_wants_all_threads_stopped): New.
14414 (gdb_reattached_process): New.
14415 (handle_status): Clear the `gdb_detached' flag of all processes.
14416 In all-stop, stop all threads.
14417 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14418 (process_serial_event): If the remote connection breaks, or if an
14419 exit was forced with "monitor exit", force an event loop exit.
14420 Handle disconnected tracing on detach.
14421 (handle_serial_event): Adjust.
14422 (handle_target_event): If GDB isn't connected, forward events back
14423 to the inferior, unless the last process exited, in which case,
14424 exit gdbserver. Adjust interface.
14425
14426 * remote-utils.c (remote_open): Don't block in accept. Instead
14427 register an event loop source on the listen socket file
14428 descriptor. Refactor bits into ...
14429 (listen_desc): ... this new global.
14430 (gdb_connected): ... this new function.
14431 (enable_async_notification): ... this new function.
14432 (handle_accept_event): ... this new function.
14433 (remote_close): Clear remote_desc.
14434
14435 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14436
14437 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14438 New fields.
14439 (mourn_inferior): Define.
14440 (target_process_qsupported): Avoid the dangling else problem.
14441 (thread_stopped): Define.
14442 (pause_all): Define.
14443 (target_waitstatus_to_string): Declare.
14444 * target.c (target_waitstatus_to_string): New.
14445
14446 * tracepoint.c (tracing): Make extern.
14447 (disconnected_tracing): New.
14448 (stop_tracing): Make extern. Handle tracing stops due to GDB
14449 disconnecting.
14450 (cmd_qtdisconnected): New.
14451 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14452 (handle_tracepoint_general_set): Handle QTDisconnected.
14453
14454 * event-loop.c (event_handler_func): Change return type to int.
14455 (process_event): Bail out if the event handler wants the event
14456 loop to stop.
14457 (handle_file_event): Ditto.
14458 (start_event_loop): Bail out if the event handler wants the event
14459 loop to stop.
14460
14461 * nto-low.c (nto_target_ops): Adjust.
14462 * spu-low.c (spu_wait): Don't remove the process here.
14463 (spu_target_ops): Adjust.
14464 * win32-low.c (win32_wait): Don't remove the process here.
14465 (win32_target_ops): Adjust.
14466
14467 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14468
14469 * regcache.c (realloc_register_cache): Invalidate inferior's
14470 regcache before recreating it.
14471
14472 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14473
14474 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14475
14476 2010-04-09 Stan Shebs <stan@codesourcery.com>
14477 Pedro Alves <pedro@codesourcery.com>
14478
14479 * server.h (LONGEST): New.
14480 (struct thread_info) <while_stepping>: New field.
14481 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14482 Declare.
14483 (initialize_tracepoint, handle_tracepoint_general_set)
14484 (handle_tracepoint_query, tracepoint_finished_step)
14485 (tracepoint_was_hit, release_while_stepping_state_list):
14486 (current_traceframe): Declare.
14487 * server.c (handle_general_set): Handle tracepoint packets.
14488 (read_memory): New.
14489 (write_memory): New.
14490 (handle_search_memory_1): Use read_memory.
14491 (handle_query): Report support for conditional tracepoints, trace
14492 state variables, and tracepoint sources. Handle tracepoint
14493 queries.
14494 (main): Initialize the tracepoints module.
14495 (process_serial_event): Handle traceframe reads/writes.
14496
14497 * linux-low.c (handle_tracepoints): New.
14498 (linux_wait_1): Call it.
14499 (linux_resume_one_lwp): Handle while-stepping.
14500 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14501 (linux_target_ops): Install them.
14502 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14503 New field.
14504 * linux-x86-low.c (x86_supports_tracepoints): New.
14505 (the_low_target). Install it.
14506
14507 * mem-break.h (delete_breakpoint): Declare.
14508 * mem-break.c (delete_breakpoint): Make external.
14509
14510 * target.h (struct target_ops): Add `supports_tracepoints',
14511 `read_pc', and `write_pc' fields.
14512 (target_supports_tracepoints): Define.
14513 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14514 (phex_nz): New.
14515
14516 * regcache.h (struct regcache) <registers_owned>: New field.
14517 (init_register_cache, regcache_cpy): Declare.
14518 (regcache_read_pc, regcache_write_pc): Declare.
14519 (register_cache_size): Declare.
14520 (supply_regblock): Declare.
14521 * regcache.c (init_register_cache): New.
14522 (new_register_cache): Use it.
14523 (regcache_cpy): New.
14524 (register_cache_size): New.
14525 (supply_regblock): New.
14526 (regcache_read_pc, regcache_write_pc): New.
14527
14528 * tracepoint.c: New.
14529
14530 * Makefile.in (OBS): Add tracepoint.o.
14531 (tracepoint.o): New rule.
14532
14533 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14534
14535 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14536 (i386-mmx.o): New.
14537 (i386-mmx.c): Likewise.
14538 (i386-mmx-linux.o): Likewise.
14539 (i386-mmx-linux.c): Likewise.
14540
14541 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14542 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14543 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14544 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14545
14546 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14547 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14548 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14549
14550 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14551
14552 * Makefile.in (clean): Updated.
14553 (i386-avx.o): New.
14554 (i386-avx.c): Likewise.
14555 (i386-avx-linux.o): Likewise.
14556 (i386-avx-linux.c): Likewise.
14557 (amd64-avx.o): Likewise.
14558 (amd64-avx.c): Likewise.
14559 (amd64-avx-linux.o): Likewise.
14560 (amd64-avx-linux.c): Likewise.
14561
14562 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14563 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14564 (srv_amd64_regobj): Add amd64-avx.o.
14565 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14566 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14567 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14568 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14569 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14570 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14571 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14572
14573 * i387-fp.c: Include "i386-xstate.h".
14574 (i387_xsave): New.
14575 (i387_cache_to_xsave): Likewise.
14576 (i387_xsave_to_cache): Likewise.
14577 (x86_xcr0): Likewise.
14578
14579 * i387-fp.h (i387_cache_to_xsave): Likewise.
14580 (i387_xsave_to_cache): Likewise.
14581 (x86_xcr0): Likewise.
14582
14583 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14584 * linux-crisv32-low.c (target_regsets): Likewise.
14585 * linux-m68k-low.c (target_regsets): Likewise.
14586 * linux-mips-low.c (target_regsets): Likewise.
14587 * linux-ppc-low.c (target_regsets): Likewise.
14588 * linux-s390-low.c (target_regsets): Likewise.
14589 * linux-sh-low.c (target_regsets): Likewise.
14590 * linux-sparc-low.c (target_regsets): Likewise.
14591 * linux-xtensa-low.c (target_regsets): Likewise.
14592
14593 * linux-low.c: Include <sys/uio.h>.
14594 (regsets_fetch_inferior_registers): Support nt_type.
14595 (regsets_store_inferior_registers): Likewise.
14596 (linux_process_qsupported): New.
14597 (linux_target_ops): Add linux_process_qsupported.
14598
14599 * linux-low.h (regset_info): Add nt_type.
14600 (linux_target_ops): Add process_qsupported.
14601
14602 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14603 and <sys/uio.h>.
14604 (init_registers_i386_avx_linux): New.
14605 (init_registers_amd64_avx_linux): Likewise.
14606 (xmltarget_i386_linux_no_xml): Likewise.
14607 (xmltarget_amd64_linux_no_xml): Likewise.
14608 (PTRACE_GETREGSET): Likewise.
14609 (PTRACE_SETREGSET): Likewise.
14610 (x86_fill_xstateregset): Likewise.
14611 (x86_store_xstateregset): Likewise.
14612 (use_xml): Likewise.
14613 (x86_linux_update_xmltarget): Likewise.
14614 (x86_linux_process_qsupported): Likewise.
14615 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14616 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14617 init_registers_i386_linux here. Call
14618 x86_linux_update_xmltarget.
14619 (the_low_target): Add x86_linux_process_qsupported.
14620
14621 * server.c (handle_query): Call target_process_qsupported.
14622
14623 * target.h (target_ops): Add process_qsupported.
14624 (target_process_qsupported): New.
14625
14626 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14627
14628 * inferiors.c (add_thread): Set last_status kind to
14629 TARGET_WAITKIND_IGNORE.
14630 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14631 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14632 (linux_wait_1): Move `thread' local definition to block that uses
14633 it. Don't NULL initialize `event_child'.
14634 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14635 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14636 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14637
14638 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14639
14640 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14641 an extended waitstatus, or by a watchpoint.
14642 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14643 thread was stepping or has been stopped by a watchpoint.
14644
14645 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14646
14647 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14648 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14649 of another, then delete the previous, and validate all
14650 breakpoints.
14651 (validate_inserted_breakpoint): New.
14652 (delete_disabled_breakpoints): New.
14653 (validate_breakpoints): New.
14654 (check_mem_read): Validate breakpoints before trusting their
14655 shadow. Delete disabled breakpoints.
14656 (check_mem_write): Validate breakpoints before trusting they
14657 should be inserted. Delete disabled breakpoints.
14658 * mem-break.h (validate_breakpoints):
14659 * server.c (handle_query): Validate breakpoints when we see a
14660 qSymbol query.
14661
14662 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14663
14664 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14665 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14666 if we could tell there's a GDB breakpoint at stop_pc.
14667 (need_step_over_p): Don't do a step over if we find a GDB
14668 breakpoint at the resume PC.
14669
14670 * mem-break.c (struct raw_breakpoint): New.
14671 (enum bkpt_type): New type `gdb_breakpoint'.
14672 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14673 fields. New field `raw'.
14674 (find_raw_breakpoint_at): New.
14675 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14676 breakpoint instead.
14677 (set_breakpoint_at): Adjust.
14678 (delete_raw_breakpoint): New.
14679 (release_breakpoint): New.
14680 (delete_breakpoint): Rename to...
14681 (delete_breakpoint_1): ... this. Add proc parameter. Use
14682 release_breakpoint. Return ENOENT.
14683 (delete_breakpoint): Reimplement.
14684 (find_breakpoint_at): Delete.
14685 (find_gdb_breakpoint_at): New.
14686 (delete_breakpoint_at): Delete.
14687 (set_gdb_breakpoint_at): New.
14688 (delete_gdb_breakpoint_at): New.
14689 (gdb_breakpoint_here): New.
14690 (set_reinsert_breakpoint): Use release_breakpoint.
14691 (uninsert_breakpoint): Rename to ...
14692 (uninsert_raw_breakpoint): ... this.
14693 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14694 (reinsert_raw_breakpoint): Change parameter type to
14695 raw_breakpoint.
14696 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14697 instead.
14698 (check_breakpoints): Adjust. Use release_breakpoint.
14699 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14700 (breakpoint_inserted_here): Ditto.
14701 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14702 Don't trust the breakpoint's shadow if it is not inserted.
14703 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14704 (delete_all_breakpoints): Adjust.
14705 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14706 use delete_breakpoint_1.
14707
14708 * mem-break.h (breakpoints_supported): Delete declaration.
14709 (set_gdb_breakpoint_at): Declare.
14710 (gdb_breakpoint_here): Declare.
14711 (delete_breakpoint_at): Delete.
14712 (delete_gdb_breakpoint_at): Declare.
14713
14714 * server.h (struct raw_breakpoint): Forward declare.
14715 (struct process_info): New field `raw_breakpoints'.
14716
14717 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14718 breakpoints.
14719
14720 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14721
14722 * linux-low.c (status_pending_p_callback): Fix comment.
14723 (linux_wait_for_event_1): Move most of the internal breakpoint
14724 handling from here...
14725 (linux_wait_1): ... to here.
14726 (count_events_callback): New.
14727 (select_singlestep_lwp_callback): New.
14728 (select_event_lwp_callback): New.
14729 (cancel_breakpoints_callback): New.
14730 (select_event_lwp): New.
14731 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14732 priority to all LWPs that have had events that should be reported
14733 to the client. Cancel breakpoints when about to reporting the
14734 event to the client, not while stopping lwps. No longer cancel
14735 finished single-steps here.
14736 (cancel_finished_single_step): Delete.
14737 (cancel_finished_single_steps): Delete.
14738
14739 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14740
14741 * mem-break.c (enum bkpt_type): New.
14742 (struct breakpoint): New field `type'.
14743 (set_breakpoint_at): Change return type to struct breakpoint
14744 pointer. Set type to `other_breakpoint' by default.
14745 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14746 in the breakpoint list.
14747 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14748 (reinsert_breakpoint): Rename to ...
14749 (reinsert_raw_breakpoint): ... this.
14750 (reinsert_breakpoints_at): Adjust.
14751 * mem-break.h (struct breakpoint): Declare.
14752 (set_breakpoint_at): Change return type to struct breakpoint
14753 pointer.
14754
14755 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14756
14757 * server.c (handle_query): Assign, not compare.
14758
14759 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14760
14761 Teach linux gdbserver to step-over-breakpoints.
14762
14763 * linux-low.c (can_hardware_single_step): New.
14764 (supports_breakpoints): New.
14765 (handle_extended_wait): If stopping threads, read the stop pc of
14766 the new cloned LWP.
14767 (get_pc): New.
14768 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14769 low target doesn't support retrieving the PC.
14770 (add_lwp): Set last_resume_kind to resume_continue.
14771 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14772 (linux_attach): Don't clear stop_expected. Set the lwp's
14773 last_resume_kind to resume_stop.
14774 (linux_detach_one_lwp): Don't check for removed breakpoints.
14775 (check_removed_breakpoint): Delete.
14776 (status_pending_p): Rename to ...
14777 (status_pending_p_callback): ... this. Don't check for removed
14778 breakpoints. Don't consider threads that are stopped from GDB's
14779 perspective.
14780 (linux_wait_for_lwp): Always read the stop_pc here.
14781 (cancel_breakpoint): New.
14782 (step_over_bkpt): New global.
14783 (linux_wait_for_event_1): Implement stepping over breakpoints.
14784 (gdb_wants_lwp_stopped): New.
14785 (gdb_wants_all_stopped): New.
14786 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14787 single-step traps here. Store the thread's last reported target
14788 wait status.
14789 (send_sigstop): Don't clear stop_expected. Always set it,
14790 instead.
14791 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14792 (cancel_finished_single_step): New.
14793 (cancel_finished_single_steps): New.
14794 (wait_for_sigstop): Don't cancel finished single-step traps here.
14795 (linux_resume_one_lwp): Don't check for removed breakpoints.
14796 Don't set `step' on non-hardware step archs.
14797 (linux_set_resume_request): Ignore resume_stop requests if already
14798 stopping or stopped. Set the lwp's last_resume_kind.
14799 (resume_status_pending_p): Don't check for removed breakpoints.
14800 (need_step_over_p): New.
14801 (start_step_over): New.
14802 (finish_step_over): New.
14803 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14804 requests. Clear the thread's last reported target waitstatus.
14805 Don't use the `suspended' flag. Don't consider pending breakpoints.
14806 (linux_resume): Start a step-over if necessary.
14807 (proceed_one_lwp): New.
14808 (proceed_all_lwps): New.
14809 (unstop_all_lwps): New.
14810 * linux-low.h (struct lwp_info): Rewrite comment for the
14811 `suspended' flag. Add the `stop_pc' field. Delete the
14812 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14813 Add `'last_resume_kind' and `need_step_over' fields.
14814 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14815 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14816 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14817 (set_raw_breakpoint_at): New.
14818 (set_breakpoint_at): Rewrite to use it.
14819 (reinsert_breakpoint_handler): Delete.
14820 (set_reinsert_breakpoint): New.
14821 (reinsert_breakpoint_by_bp): Delete.
14822 (delete_reinsert_breakpoints): New.
14823 (uninsert_breakpoint): Rewrite.
14824 (uninsert_breakpoints_at): New.
14825 (reinsert_breakpoint): Rewrite.
14826 (reinsert_breakpoints_at): New.
14827 (check_breakpoints): Rewrite.
14828 (breakpoint_here): New.
14829 (breakpoint_inserted_here): New.
14830 (check_mem_read): Adjust.
14831 * mem-break.h (breakpoints_supported, breakpoint_here)
14832 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14833 (reinsert_breakpoint_by_bp): Delete declaration.
14834 (delete_reinsert_breakpoints): Declare.
14835 (reinsert_breakpoint): Delete declaration.
14836 (reinsert_breakpoints_at): Declare.
14837 (uninsert_breakpoint): Delete declaration.
14838 (uninsert_breakpoints_at): Declare.
14839 (check_breakpoints): Adjust prototype.
14840 * server.h: Adjust include order.
14841 (struct thread_info): Declare here. Add a `last_status' field.
14842
14843 2010-03-23 Michael Snyder <msnyder@vmware.com>
14844
14845 * server.c (crc32): New function.
14846 (handle_query): Add handling for 'qCRC:' request.
14847
14848 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14849
14850 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14851 lwp had been stopped by a watchpoint.
14852
14853 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14854
14855 * server.h (internal_error): Declare.
14856 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14857 * utils.c (internal_error): New function.
14858
14859 2010-03-15 Andreas Schwab <schwab@redhat.com>
14860
14861 * configure.srv: Fix typo setting srv_regobj.
14862
14863 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14864
14865 * linux-low.c (fetch_register): Avoid passing a non string literal
14866 format to `error'.
14867 (usr_store_inferior_registers): Ditto.
14868
14869 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14870
14871 * linux-low.c (linux_write_memory): Bail out early if peeking
14872 memory failed.
14873
14874 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14875
14876 * linux-low.h (struct lwp_info): New fields
14877 `stopped_by_watchpoint' and `stopped_data_address'.
14878 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14879 here, and cache them in the lwp object.
14880 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14881 directly.
14882 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14883 field.
14884 (linux_stopped_by_watchpoint): Rewrite.
14885 (linux_stopped_data_address): Rewrite.
14886
14887 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14888
14889 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14890 switching the current inferior, not before.
14891
14892 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14893
14894 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14895 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14896 i386-linux.c and amd64-linux.c.
14897 (reg-i386.o): Removed.
14898 (reg-i386.c): Likewise.
14899 (reg-i386-linux.o): Likewise.
14900 (reg-i386-linux.c): Likewise.
14901 (reg-x86-64.o): Likewise.
14902 (reg-x86-64.c): Likewise.
14903 (reg-x86-64-linux.o): Likewise.
14904 (reg-x86-64-linux.c): Likewise.
14905 (i386.o): New.
14906 (i386.c): Likewise.
14907 (i386-linux.o): Likewise.
14908 (i386-linux.c): Likewise.
14909 (amd64.o): Likewise.
14910 (amd64.c): Likewise.
14911 (amd64-linux.o): Likewise.
14912 (amd64-linux.c): Likewise.
14913
14914 * configure.srv (srv_i386_regobj): New.
14915 (srv_i386_linux_regobj): Likewise.
14916 (srv_amd64_regobj): Likewise.
14917 (srv_amd64_linux_regobj): Likewise.
14918 (srv_i386_32bit_xmlfiles): Likewise.
14919 (srv_i386_64bit_xmlfiles): Likewise.
14920 (srv_i386_xmlfiles): Likewise.
14921 (srv_amd64_xmlfiles): Likewise.
14922 (srv_i386_linux_xmlfiles): Likewise.
14923 (srv_amd64_linux_xmlfiles): Likewise.
14924 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14925 srv_xmlfiles to $srv_i386_xmlfiles.
14926 (i[34567]86-*-mingw32ce*): Likewise.
14927 (i[34567]86-*-mingw*): Likewise.
14928 (i[34567]86-*-nto*): Likewise.
14929 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14930 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14931 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14932 (x86_64-*-linux*): Likewise.
14933
14934 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14935 (init_registers_amd64_linux): New.
14936 (x86_arch_setup): Replace init_registers_x86_64_linux with
14937 init_registers_amd64_linux.
14938
14939 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14940
14941 * configure.ac: Check for libdl. If it is not available link against
14942 static libthread_db.
14943 * configure: Regenerate.
14944
14945 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14946
14947 PR9605
14948
14949 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14950 handing a read watchpoint.
14951 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14952
14953 2010-02-12 Doug Evans <dje@google.com>
14954
14955 * linux-low.c (linux_supports_tracefork_flag): Document.
14956 (linux_look_up_symbols): Add comment.
14957
14958 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14959
14960 * regcache.c (supply_register): Clear regcache if buf is NULL.
14961
14962 2010-02-02 Nicolas Roche <roche@sourceware.org>
14963 Joel Brobecker <brobecker@adacore.com>
14964
14965 * inferiors.c (find_inferior): Add function documentation.
14966 (unloaded_dll): Handle the case where the unloaded dll has not
14967 been previously registered in the dll list.
14968
14969 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14970
14971 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14972 (thumb2_breakpoint): New.
14973 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14974
14975 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14976
14977 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14978 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14979 breakpoints.
14980
14981 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14982
14983 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14984
14985 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14986
14987 * linux-s390-low.c (s390_collect_ptrace_register)
14988 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14989
14990 2010-01-21 Doug Evans <dje@google.com>
14991
14992 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14993 (PTRACE_ARG4_TYPE): New macro.
14994 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14995 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14996 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14997 (usr_store_inferior_registers): Ditto.
14998 (linux_read_memory, linux_write_memory): Ditto.
14999 (linux_test_for_tracefork): Ditto.
15000
15001 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15002 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15003
15004 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15005
15006 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15007 target.
15008
15009 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15010
15011 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15012 prototype to take a regcache. Adjust.
15013
15014 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15015
15016 * regcache.h (struct thread_info): Forward declare.
15017 (struct regcache): New.
15018 (new_register_cache): Adjust prototype.
15019 (get_thread_regcache): Declare.
15020 (free_register_cache): Adjust prototype.
15021 (registers_to_string, registers_from_string): Ditto.
15022 (supply_register, supply_register_by_name, collect_register)
15023 (collect_register_as_string, collect_register_by_name): Ditto.
15024 * regcache.c (struct inferior_regcache_data): Delete.
15025 (get_regcache): Rename to ...
15026 (get_thread_regcache): ... this. Adjust. Switch inferior before
15027 fetching registers.
15028 (regcache_invalidate_one): Adjust.
15029 (regcache_invalidate): Fix prototype.
15030 (new_register_cache): Return the new register cache.
15031 (free_register_cache): Change prototype.
15032 (realloc_register_cache): Adjust.
15033 (registers_to_string): Change prototype to take a regcache. Adjust.
15034 (registers_from_string): Ditto.
15035 (register_data): Ditto.
15036 (supply_register): Ditto.
15037 (supply_register_by_name): Ditto.
15038 (collect_register): Ditto.
15039 (collect_register_as_string): Ditto.
15040 (collect_register_by_name): Ditto.
15041 * server.c (process_serial_event): Adjust.
15042 * linux-low.h (regset_fill_func, regset_store_func): Change
15043 prototype.
15044 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15045 Change prototype.
15046 * linux-low.c (get_stop_pc): Adjust.
15047 (check_removed_breakpoint): Adjust.
15048 (linux_wait_for_event): Adjust.
15049 (linux_resume_one_lwp): Adjust.
15050 (fetch_register): Add regcache parameter. Adjust.
15051 (usr_store_inferior_registers): Ditto.
15052 (regsets_fetch_inferior_registers): Ditto.
15053 (regsets_store_inferior_registers): Ditto.
15054 (linux_fetch_registers, linux_store_registers): Ditto.
15055 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15056 regcache. Adjust.
15057 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15058 Ditto.
15059 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15060 prototype to take a regcache.
15061 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15062 * remote-utils.c (convert_ascii_to_int, outreg)
15063 (prepare_resume_reply): Change prototype to take a regcache.
15064 Adjust.
15065 * target.h (struct target_ops) <fetch_registers, store_registers>:
15066 Change prototype to take a regcache.
15067 (fetch_inferior_registers, store_inferior_registers): Change
15068 prototype to take a regcache. Adjust.
15069 * proc-service.c (ps_lgetregs): Adjust.
15070 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15071 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15072 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15073 take a regcache. Adjust.
15074 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15075 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15076 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15077 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15078 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15079 (cris_cannot_fetch_register):
15080 (cris_breakpoint_at): Change prototype to take a regcache.
15081 Adjust.
15082 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15083 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15084 to take a regcache. Adjust.
15085 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15086 Adjust.
15087 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15088 take a regcache. Adjust.
15089 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15090 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15091 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15092 * linux-mips-low.c (mips_get_pc):
15093 (mips_set_pc): Change prototype to take a regcache. Adjust.
15094 (mips_reinsert_addr): Adjust.
15095 (mips_collect_register): Change prototype to take a regcache.
15096 Adjust.
15097 (mips_supply_register):
15098 (mips_collect_register_32bit, mips_supply_register_32bit)
15099 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15100 (mips_store_fpregset): Ditto.
15101 * linux-ppc-low.c (ppc_supply_ptrace_register)
15102 (ppc_supply_ptrace_register): Ditto.
15103 (parse_spufs_run): Adjust.
15104 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15105 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15106 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15107 take a regcache. Adjust.
15108 * linux-s390-low.c (s390_collect_ptrace_register)
15109 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15110 (s390_set_pc): Change prototype to take a regcache. Adjust.
15111 (s390_arch_setup): Adjust.
15112 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15113 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15114 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15115 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15116 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15117 regcache. Adjust.
15118 (sparc_breakpoint_at): Adjust.
15119 * linux-xtensa-low.c (xtensa_fill_gregset):
15120 (xtensa_store_gregset):
15121 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15122 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15123 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15124 prototype to take a regcache. Adjust.
15125 * win32-arm-low.c (arm_fetch_inferior_register)
15126 (arm_store_inferior_register): Change prototype to take a
15127 regcache. Adjust.
15128 * win32-i386-low.c (i386_fetch_inferior_register)
15129 (i386_store_inferior_register): Change prototype to take a
15130 regcache. Adjust.
15131 * win32-low.c (child_fetch_inferior_registers)
15132 (child_store_inferior_registers): Change prototype to take a
15133 regcache. Adjust.
15134 (win32_wait): Adjust.
15135 (win32_fetch_inferior_registers): Change prototype to take a
15136 regcache. Adjust.
15137 (win32_store_inferior_registers): Adjust.
15138 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15139 store_inferior_register>: Change prototype to take a regcache.
15140
15141 2010-01-20 Doug Evans <dje@google.com>
15142
15143 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15144 #ifdef.
15145 (linux_wait_for_event1, linux_init_signals): Ditto.
15146 (W_STOPCODE): Provide definition if missing.
15147
15148 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15149
15150 * linux-low.c (linux_core_of_thread): New.
15151 (compare_ints, show_process, list_threads): New.
15152 (linux_qxfer_osdata): Report threads and cores.
15153 (linux_target_op): Register linux_core_of_thread.
15154 * remote-utils.c (prepare_resume_reply): Report the core.
15155 (buffer_xml_printf): Support %d specifier.
15156 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15157 New.
15158 (handle_query): Handle qXfer:threads. Announce availability
15159 thereof.
15160 * target.h (struct target_ops): New field core_of_thread.
15161
15162 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15163
15164 * Makefile.in (clean): Remove new generated files.
15165 (reg-s390.o, reg-s390.c): Remove rules.
15166 (reg-s390x.o, reg-s390x.c): Likewise.
15167 (s390-linux32.o, s390-linux32.c): Add rules.
15168 (s390-linux64.o, s390-linux64.c): Likewise.
15169 (s390x-linux64.o, s390x-linux64.c): Likewise.
15170 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15171 * linux-s390-low.c: Include <elf.h>.
15172 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15173 (init_registers_s390): Remove prototype.
15174 (init_registers_s390x): Likewise.
15175 (init_registers_s390_linux32): Add prototype.
15176 (init_registers_s390_linux64): Likewise.
15177 (init_registers_s390x_linux64): Likewise.
15178 (s390_num_regs_3264): New define.
15179 (s390_regmap_3264): New global variable.
15180 (s390_cannot_fetch_register): Remove obsolete check.
15181 (s390_cannot_store_register): Likewise.
15182 (s390_collect_ptrace_register): Handle upper/lower register halves.
15183 (s390_supply_ptrace_register): Likewise.
15184 (s390_fill_gregset): Update to register number changes.
15185 (s390_get_hwcap): New routine.
15186 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15187 Install appropriate regmap and register set.
15188
15189 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15190
15191 * server.c (gdbserver_version): Update copyright year to 2010.
15192 * gdbreplay.c (gdbreplay_version): Likewise.
15193
15194 2009-12-28 Doug Evans <dje@google.com>
15195
15196 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15197 elf/external.h. Include <elf.h> instead but only if necessary.
15198
15199 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15200
15201 * linux-low.c (linux_remove_process): Remove `detaching'
15202 parameter. Don't release/detach from thread_db here.
15203 (linux_kill): Release/detach from thread_db here, ...
15204 (linux_detach): ... and here, before actually detaching.
15205 (linux_wait_1): ... and here, when a process exits.
15206 * thread-db.c (any_thread_of): New.
15207 (thread_db_free): Switch the current inferior to a thread of the
15208 passed in process.
15209
15210 2009-12-21 Doug Evans <dje@google.com>
15211
15212 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15213
15214 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15215 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15216 warning ifndef __NR_tkill. Move setting of errno there too.
15217 Delete unnecessary resetting of errno after syscall.
15218 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15219
15220 * configure.ac: Check for dladdr.
15221 * config.in: Regenerate.
15222 * configure: Regenerate.
15223 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15224 (try_thread_db_load): Update.
15225
15226 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15227
15228 2009-12-18 Doug Evans <dje@google.com>
15229
15230 * event-loop.c: Include unistd.h if it exists.
15231
15232 * linux-low.c (my_waitpid): Move definition away from being in
15233 between linux_tracefork_child/linux_test_for_tracefork.
15234
15235 * gdb_proc_service.h (psaddr_t): Fix type.
15236 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15237 signature to match glibc.
15238
15239 2009-12-16 Doug Evans <dje@google.com>
15240
15241 * linux-low.c (linux_read_memory): Fix argument to read.
15242
15243 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15244
15245 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15246 events, don't leave current_inferior pointing at null.
15247
15248 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15249
15250 * win32-low.c (LOG): Delete.
15251 (OUTMSG): Output to stderr.
15252 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15253 on compile time LOG macro.
15254 (win32_wait): Fix debug output.
15255
15256 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15257
15258 * win32-low.c (win32_add_one_solib): If the dll name is
15259 "ntdll.dll", prepend the system directory to the dll path.
15260
15261 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15262
15263 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15264
15265 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15266 Vladimir Prus <vladimir@codesourcery.com>
15267
15268 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15269 * configure.ac: Check for __mcoldfire__ and set
15270 gdb_cv_m68k_is_coldfire.
15271 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15272 reg-cf.o and reg-m68k.o.
15273 * configure: Regenerated.
15274
15275 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15276
15277 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15278 Pass it to thread_db_free.
15279 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15280 proper `detaching' argument to linux_remove_process.
15281 * linux-low.h (thread_db_free): Add `detaching' parameter.
15282 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15283 to thread_db_free.
15284 (thread_db_free): Add `detaching' parameter. Only
15285 call td_ta_clear_event if detaching from process.
15286
15287 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15288
15289 * thread-db.c (thread_db_free): Fix typo.
15290
15291 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15292
15293 PR gdb/10838
15294 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15295
15296 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15297
15298 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15299 with an i686 compiler.
15300 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15301 needed.
15302 * configure: Rebuilt.
15303
15304 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15305
15306 PR gdb/10783
15307
15308 * server.c (handle_search_memory_1): Correct read_addr initialization
15309 in loop for searching subsequent chunks.
15310
15311 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15312
15313 * configure.ac: New --with-libthread-db option.
15314 * thread-db.c: Allow direct dependence on libthread_db.
15315 (thread_db_free): Adjust.
15316 * config.in: Regenerate.
15317 * configure: Likewise.
15318
15319 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15320
15321 PR gdb/10757
15322 * thread-db.c (attach_thread): New function.
15323 (maybe_attach_thread): Return success/failure.
15324 (find_new_threads_callback): Adjust.
15325 (thread_db_find_new_threads): Loop until no new threads.
15326
15327 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15328
15329 * proc-service.c (ps_lgetregs): Formatting.
15330
15331 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15332
15333 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15334 * configure.ac: Adjust.
15335 * linux-low.h (struct process_info_private): Move members to struct
15336 thread_db.
15337 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15338 * linux-low.c (linux_remove_process): Adjust.
15339 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15340 * server.c (handle_query): Move code ...
15341 (handle_monitor_command): ... here. New function.
15342 * target.h (struct target_ops): New member.
15343 * thread-db.c (struct thread_db): New.
15344 (libthread_db_search_path): New variable.
15345 (thread_db_create_event, thread_db_enable_reporting)
15346 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15347 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15348 (try_thread_db_load_1, dladdr_to_soname): New functions.
15349 (try_thread_db_load, thread_db_load_search): New functions.
15350 (thread_db_init): Search for libthread_db.
15351 (thread_db_free): New function.
15352 (thread_db_handle_monitor_command): Likewise.
15353 * config.in: Regenerate.
15354 * configure: Regenerate.
15355
15356 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15357
15358 * spu-low.c (spu_kill): Wait for inferior to terminate.
15359 Call clear_inferiors.
15360 (spu_detach): Call clear_inferiors.
15361
15362 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15363
15364 * aclocal.m4: Regenerate.
15365 * config.in: Likewise.
15366 * configure: Likewise.
15367
15368 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15369
15370 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15371 (parse_spufs_run): New function.
15372 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15373 (ppc_breakpoint_at): Handle SPU breakpoints.
15374
15375 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15376
15377 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15378 (SPUFS_MAGIC): Define.
15379 (spu_enumerate_spu_ids): New function.
15380 (linux_qxfer_spu): New function.
15381 (linux_target_ops): Install linux_qxfer_spu.
15382
15383 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15384
15385 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15386 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15387 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15388 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15389 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15390 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15391 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15392 (init_registers_powerpc_cell32l): Add prototype.
15393 (init_registers_powerpc_cell64l): Likewise.
15394 (ppc_arch_setup): Detect Cell/B.E. architecture.
15395
15396 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15397
15398 * Makefile.in (datarootdir): New variable.
15399
15400 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * linux-low.c (linux_write_memory): Update debugging output.
15403 * Makefile.in (clean): Add new descriptions.
15404 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15405 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15406 * configure.srv: Add new files for arm*-*-linux*.
15407 * linux-arm-low.c: Add new declarations.
15408 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15409 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15410 (HWCAP_VFPv3D16): New.
15411 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15412 instead of __IWMMXT__.
15413 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15414 (arm_arch_setup): New.
15415 (target_regsets): Remove #ifdef. Add VFP regset.
15416 (the_low_target): Use arm_arch_setup.
15417
15418 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15419
15420 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15421 the main thread again.
15422
15423 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15424
15425 Adding Neutrino gdbserver.
15426 * configure: Regenerated.
15427 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15428 * configure.srv (i[34567]86-*-nto*): New target.
15429 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15430 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15431 (nto_comctrl) [__QNX__]: New function.
15432 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15433
15434 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15435
15436 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15437 srv_tgtobj.
15438
15439 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15440 Pedro Alves <pedro@codesourcery.com>
15441
15442 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15443 don't support CONTEXT_EXTENDED_REGISTERS.
15444 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15445 (the_low_target): Install them.
15446 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15447 failing with ERROR_PIPE_NOT_CONNECTED.
15448
15449 2009-06-30 Doug Evans <dje@google.com>
15450 Pierre Muller <muller@ics.u-strasbg.fr>
15451
15452 Add h/w watchpoint support to x86-linux, win32-i386.
15453 * Makefile.in (SFILES): Add i386-low.c
15454 (i386_low_h): Define.
15455 (i386-low.o): Add dependencies.
15456 (linux-x86-low.o): Add i386-low.h dependency.
15457 (win32-i386-low.o): Ditto.
15458 * i386-low.c: New file.
15459 * i386-low.h: New file.
15460 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15461 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15462 * linux-low.c (linux_add_process): Initialize arch_private.
15463 (linux_remove_process): Free arch_private.
15464 (add_lwp): Initialize arch_private.
15465 (delete_lwp): Free arch_private.
15466 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15467 provided.
15468 * linux-low.h (process_info_private): New member arch_private.
15469 (lwp_info): New member arch_private.
15470 (linux_target_ops): New members new_process, new_thread,
15471 prepare_to_resume.
15472 (ptid_of): New macro.
15473 * linux-x86-low.c: Include stddef.h, i386-low.h.
15474 (arch_process_info): New struct.
15475 (arch_lwp_info): New struct.
15476 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15477 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15478 (i386_dr_low_get_status): New function.
15479 (x86_insert_point, x86_remove_point): New functions.
15480 (x86_stopped_by_watchpoint): New function.
15481 (x86_stopped_data_address): New function.
15482 (x86_linux_new_process, x86_linux_new_thread): New functions.
15483 (x86_linux_prepare_to_resume): New function.
15484 (the_low_target): Add entries for insert_point, remove_point,
15485 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15486 prepare_to_resume.
15487 * server.c (debug_hw_points): New global.
15488 (monitor_show_help): Document set debug-hw-points.
15489 (handle_query): Process "set debug-hw-points".
15490 * server.h (debug_hw_points): Declare.
15491 (paddress): Declare.
15492 * utils.c (NUMCELLS, CELLSIZE): New macros.
15493 (get_sell, xsnprintf, paddress): New functions.
15494 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15495 remove_point, stopped_by_watchpoint, stopped_data_address.
15496 * win32-i386-low.c: Include i386-low.h.
15497 (debug_reg_state): Replaces dr.
15498 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15499 (i386_dr_low_get_status): New function.
15500 (i386_insert_point, i386_remove_point): New functions.
15501 (i386_stopped_by_watchpoint): New function.
15502 (i386_stopped_data_address): New function.
15503 (i386_initial_stuff): Update.
15504 (get_thread_context,set_thread_context,i386_thread_added): Update.
15505 (the_low_target): Add entries for insert_point,
15506 remove_point, stopped_by_watchpoint, stopped_data_address.
15507 * win32-low.c (win32_insert_watchpoint): New function.
15508 (win32_remove_watchpoint): New function.
15509 (win32_stopped_by_watchpoint): New function.
15510 (win32_stopped_data_address): New function.
15511 (win32_target_ops): Add entries for insert_watchpoint,
15512 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15513 * win32-low.h (win32_target_ops): New members insert_point,
15514 remove_point, stopped_by_watchpoint, stopped_data_address.
15515
15516 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15517
15518 * server.c (process_serial_event): Re-return unsupported, not
15519 error, if the type isn't recognized. Re-allow supporting only
15520 insert or remove packets. Also call require_running for
15521 breakpoints. Add missing break statement to default case. Tidy.
15522 * target.h (struct target_ops): Rename insert_watchpoint to
15523 insert_point, and remove_watchpoint to remove_point.
15524
15525 * linux-low.h (struct linux_target_ops): Likewise.
15526 * linux-low.c (linux_insert_watchpoint): Rename to ...
15527 (linux_insert_point): ... this. Adjust.
15528 (linux_remove_watchpoint): Rename to ...
15529 (linux_remove_point): ... this. Adjust.
15530 (linux_target_ops): Adjust.
15531 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15532 (cris_insert_point): ... this.
15533 (cris_remove_watchpoint): Rename to ...
15534 (cris_remove_point): ... this.
15535 (the_low_target): Adjust.
15536
15537 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15538
15539 * server.c (handle_v_kill): Pass signal_pid to
15540 kill_inferior if multi_process is zero.
15541
15542 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15543
15544 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15545 * target.h (target_ops): Comment for *_watchpoint to make it clear
15546 the functions can get types '0' and '1'.
15547
15548 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15549
15550 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15551 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15552 * regcache.c (get_regcache): Likewise.
15553 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15554 * win32-low.c (child_fetch_inferior_registers): Remove check for
15555 regno 0.
15556
15557 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15558 Pedro Alves <pedro@codesourcery.com>
15559
15560 * target.h (struct target_ops) <supports_multi_process>: New
15561 callback.
15562 (target_supports_multi_process): New.
15563 * server.c (handle_query): Even if GDB reports support, only
15564 enable multi-process if the target also supports it. Report
15565 multi-process support only if the target backend supports it.
15566 * linux-low.c (linux_supports_multi_process): New function.
15567 (linux_target_ops): Install it as target_supports_multi_process
15568 callback.
15569
15570 2009-05-24 Doug Evans <dje@google.com>
15571
15572 Global renaming of find_thread_pid to find_thread_ptid.
15573 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15574 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15575 All callers updated.
15576
15577 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15578 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15579 directly.
15580
15581 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15582 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15583 (linux_resume_one_lwp): Ditto.
15584
15585 2009-05-23 Doug Evans <dje@google.com>
15586
15587 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15588 from struct inferior_list_entry * to struct lwp_info *.
15589 All callers updated.
15590
15591 2009-05-13 Doug Evans <dje@google.com>
15592
15593 * linux-x86-low.c: Don't include assert.h.
15594 (x86_siginfo_fixup): Use fatal, not assert.
15595 (x86_arch_setup): Fix comment.
15596
15597 2009-05-12 Doug Evans <dje@google.com>
15598
15599 Biarch support for i386/amd64 gdbserver.
15600 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15601 Add linux-x86-low.c.
15602 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15603 (linux-x86-low.o): Add.
15604 * linux-x86-64-low.c: Delete.
15605 * linux-i386-low.c: Delete.
15606 * linux-x86-low.c: New file.
15607 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15608 linux-x86-low.o.
15609 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15610 linux-x86-low.o.
15611 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15612 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15613 (linux_child_pid_to_exec_file): New function.
15614 (elf_64_header_p, elf_64_file_p): New functions.
15615 (siginfo_fixup): New function.
15616 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15617 give target a chance to convert layout.
15618 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15619 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15620
15621 2009-05-07 Doug Evans <dje@google.com>
15622
15623 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15624 (regsets_store_inferior_registers): Ditto.
15625
15626 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15627
15628 PR server/10048
15629
15630 * linux-low.c (must_set_ptrace_flags): Delete.
15631 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15632 of the global.
15633 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15634 `lwp->must_set_ptrace_flags' instead.
15635 (linux_wait_for_event_1): Set ptrace options here.
15636 (linux_wait_1): ... not here.
15637
15638 2009-04-30 Doug Evans <dje@google.com>
15639
15640 * inferiors.c (started_inferior_callback): New function.
15641 (attached_inferior_callback): New function.
15642 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15643 * server.c (print_started_pid, print_attached_pid): New functions.
15644 (detach_or_kill_for_exit): New function.
15645 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15646 * server.h (have_started_inferiors_p): Declare.
15647 (have_attached_inferiors_p): Declare.
15648
15649 * inferiors.c (remove_process): Fix memory leak, free process.
15650 * linux-low.c (linux_remove_process): New function.
15651 (linux_kill): Call it instead of remove_process.
15652 (linux_detach, linux_wait_1): Ditto.
15653
15654 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15655
15656 * configure.srv: Add x86 Windows CE target.
15657
15658 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15659
15660 * inferiors.c (get_thread_process): Make global.
15661 * server.h (get_thread_process): Add prototype.
15662 * thread-db.c (find_one_thread): Use get_thread_process
15663 instead of current_process.
15664 (thread_db_get_tls_address): Do not crash if called when
15665 thread layer is not yet initialized.
15666
15667 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15668
15669 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15670 * spu-low.c (current_tid): Rename to ...
15671 (current_ptid): ... this.
15672 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15673 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15674 ptid_get_lwp (current_ptid) instead of current_tid.
15675 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15676 instead of current_tid. Use find_process_pid to verify pid
15677 argument is valid. Pass proper argument to remove_process.
15678 (spu_thread_alive): Compare current_ptid instead of current_tid.
15679 (spu_resume): Likewise.
15680
15681 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15682
15683 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15684 variable.
15685
15686 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15687
15688 Implement the multiprocess extensions, and add linux multiprocess
15689 support.
15690
15691 * server.h (ULONGEST): Declare.
15692 (struct ptid, ptid_t): New.
15693 (minus_one_ptid, null_ptid): Declare.
15694 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15695 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15696 (struct inferior_list_entry): Change `id' type from unsigned from
15697 to ptid_t.
15698 (struct sym_cache, struct breakpoint, struct
15699 process_info_private): Forward declare.
15700 (struct process_info): Declare.
15701 (current_process): Declare.
15702 (all_processes): Declare.
15703 (initialize_inferiors): Declare.
15704 (add_thread): Adjust to use ptid_t.
15705 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15706 (add_process, remove_process, find_thread_pid): Declare.
15707 (find_inferior_id): Adjust to use ptid_t.
15708 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15709 (multi_process): Declare.
15710 (push_event): Adjust to use ptid_t.
15711 (read_ptid, write_ptid): Declare.
15712 (prepare_resume_reply): Adjust to use ptid_t.
15713 (clear_symbol_cache): Declare.
15714 * inferiors.c (all_processes): New.
15715 (null_ptid, minus_one_ptid): New.
15716 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15717 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15718 (add_thread): Change unsigned long to ptid. Remove gdb_id
15719 parameter. Adjust.
15720 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15721 (gdb_id_to_thread): Rename to ...
15722 (find_thread_pid): ... this. Change unsigned long to ptid.
15723 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15724 (loaded_dll, pull_pid_from_list): Adjust.
15725 (add_process, remove_process, find_process_pid)
15726 (get_thread_process, current_process, initialize_inferiors): New.
15727 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15728 (struct target_waitstatus) <related_pid>: Ditto.
15729 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15730 return type to int.
15731 (struct target_ops) <join>: Add `pid' argument.
15732 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15733 (struct target_ops) <wait>: Add `ptid' field. Change return type
15734 to ptid.
15735 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15736 (mywait): Add `ptid' argument. Change return type to ptid_t.
15737 (target_pid_to_str): Declare.
15738 * target.c (set_desired_inferior): Adjust to use ptids.
15739 (mywait): Add new `ptid' argument. Adjust.
15740 (target_pid_to_str): New.
15741 * mem-break.h (free_all_breakpoints): Declare.
15742 * mem-break.c (breakpoints): Delelete.
15743 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15744 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15745 to use per-process breakpoint list.
15746 (free_all_breakpoints): New.
15747 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15748 (symbol_cache, all_symbols_looked_up): Delete.
15749 (hexchars): New.
15750 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15751 read_ptid): New.
15752 (prepare_resume_reply): Change ptid argument's type from unsigned
15753 long to ptid_t. Adjust. Implement W;process and X;process.
15754 (free_sym_cache, clear_symbol_cache): New.
15755 (look_up_one_symbol): Adjust to per-process symbol cache. *
15756 * server.c (cont_thread, general_thread, step_thread): Change type
15757 to ptid_t.
15758 (attached): Delete.
15759 (multi_process): New.
15760 (last_ptid): Change type to ptid_t.
15761 (struct vstop_notif) <ptid>: Change type to ptid_t.
15762 (queue_stop_reply, push_event): Change `ptid' argument's type to
15763 ptid_t.
15764 (discard_queued_stop_replies): Add `pid' argument.
15765 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15766 changes. Don't reference the `attached' global.
15767 (attach_inferior): Adjust to mywait interface changes.
15768 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15769 features. Handle and report "multiprocess+". Handle
15770 "qAttached:PID".
15771 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15772 changes.
15773 (handle_v_kill): New.
15774 (handle_v_stopped): Adjust to use target_pid_to_str.
15775 (handle_v_requests): Allow multiple attaches and runs when
15776 multiprocess extensions are in effect. Handle "vKill".
15777 (myresume): Adjust to use ptids.
15778 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15779 (handle_status): Adjust to discard_queued_stop_replies interface
15780 change.
15781 (first_thread_of, kill_inferior_callback)
15782 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15783 (main): Call initialize_inferiors. Adjust to use ptids, killing
15784 and detaching from all inferiors. Handle multiprocess packet
15785 variants.
15786 * linux-low.h: Include gdb_proc_service.h.
15787 (struct process_info_private): New.
15788 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15789 <lwpid_of>: Use ptid_get_lwp.
15790 (get_lwp_thread): Adjust.
15791 (struct lwp_info): Add `dead' member.
15792 (find_lwp_pid): Declare.
15793 * linux-low.c (thread_db_active): Delete.
15794 (new_inferior): Adjust comment.
15795 (inferior_pid): Delete.
15796 (linux_add_process): New.
15797 (handle_extended_wait): Adjust.
15798 (add_lwp): Change unsigned long to ptid.
15799 (linux_create_inferior): Add process to processes table. Adjust
15800 to use ptids. Don't set new_inferior here.
15801 (linux_attach_lwp): Rename to ...
15802 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15803 it. Adjust to use ptids.
15804 (linux_attach_lwp): New.
15805 (linux_attach): Add process to processes table. Don't set
15806 new_inferior here.
15807 (struct counter): New.
15808 (second_thread_of_pid_p, last_thread_of_process_p): New.
15809 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15810 multiple processes.
15811 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15812 processes. Remove process from process table.
15813 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15814 to multiple processes.
15815 (any_thread_of): New.
15816 (linux_detach): Add `pid' argument, and handle it. Remove process
15817 from processes table.
15818 (linux_join): Add `pid' argument. Handle it.
15819 (linux_thread_alive): Change unsighed long argument to ptid_t.
15820 Consider dead lwps as not being alive.
15821 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15822 threads we're not interested in.
15823 (same_lwp, find_lwp_pid): New.
15824 (linux_wait_for_lwp): Change `pid' argument's type from int to
15825 ptid_t. Adjust.
15826 (linux_wait_for_event): Rename to ...
15827 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15828 from int to ptid_t. Adjust.
15829 (linux_wait_for_event): New.
15830 (linux_wait_1): Add `ptid' argument. Change return type to
15831 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15832 that exit from the process table.
15833 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15834 Adjust.
15835 (mark_lwp_dead): New.
15836 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15837 stopping all threads, mark its main lwp as dead.
15838 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15839 ptids.
15840 (fetch_register, usr_store_inferior_registers)
15841 (regsets_fetch_inferior_registers)
15842 (regsets_store_inferior_registers, linux_read_memory)
15843 (linux_write_memory): Inline `inferior_pid'.
15844 (linux_look_up_symbols): Adjust to use per-process
15845 `thread_db_active'.
15846 (linux_request_interrupt): Adjust to use ptids.
15847 (linux_read_auxv): Inline `inferior_pid'.
15848 (initialize_low): Don't reference thread_db_active.
15849 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15850 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15851 (ps_getpid): Return the pid of the current inferior.
15852 * thread-db.c (proc_handle, thread_agent): Delete.
15853 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15854 per-process data.
15855 (find_one_thread): Change argument type to ptid_t. Adjust to
15856 per-process data.
15857 (maybe_attach_thread): Adjust to per-process data and ptids.
15858 (thread_db_find_new_threads): Ditto.
15859 (thread_db_init): Ditto.
15860 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15861 processes table. Adjust to use ptids.
15862 (spu_kill, spu_detach): Adjust interface. Remove process from
15863 processes table.
15864 (spu_join, spu_thread_alive): Adjust interface.
15865 (spu_wait): Adjust interface. Remove process from processes
15866 table. Adjust to use ptids.
15867 * win32-low.c (current_inferior_tid): Delete.
15868 (current_inferior_ptid): New.
15869 (debug_event_ptid): New.
15870 (thread_rec): Take a ptid. Adjust.
15871 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15872 (child_delete_thread): Ditto.
15873 (do_initial_child_stuff): Add `attached' argument. Add process to
15874 processes table.
15875 (child_fetch_inferior_registers, child_store_inferior_registers):
15876 Adjust.
15877 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15878 (win32_attach): Pass 1 to do_initial_child_stuff.
15879 (win32_kill): Adjust interface. Remove process from processes
15880 table.
15881 (win32_detach): Ditto.
15882 (win32_join): Adjust interface.
15883 (win32_thread_alive): Take a ptid.
15884 (win32_resume): Adjust to use ptids.
15885 (get_child_debug_event): Ditto.
15886 (win32_wait): Adjust interface. Remove exiting process from
15887 processes table.
15888
15889 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15890
15891 Non-stop mode support.
15892
15893 * server.h (non_stop): Declare.
15894 (gdb_client_data, handler_func): Declare.
15895 (delete_file_handler, add_file_handler, start_event_loop):
15896 Declare.
15897 (handle_serial_event, handle_target_event, push_event)
15898 (putpkt_notif): Declare.
15899 * target.h (enum resume_kind): New.
15900 (struct thread_resume): Replace `step' field by `kind' field.
15901 (TARGET_WNOHANG): Define.
15902 (struct target_ops) <wait>: Add `options' argument.
15903 <supports_non_stop, async, start_non_stop>: New fields.
15904 (target_supports_non_stop, target_async): New.
15905 (start_non_stop): Declare.
15906 (mywait): Add `options' argument.
15907 * target.c (mywait): Add `options' argument. Print child exit
15908 notifications here.
15909 (start_non_stop): New.
15910 * server.c (non_stop, own_buf, mem_buf): New globals.
15911 (struct vstop_notif): New.
15912 (notif_queue): New global.
15913 (queue_stop_reply, push_event, discard_queued_stop_replies)
15914 (send_next_stop_reply): New.
15915 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15916 interface changes.
15917 (attach_inferior): In non-stop mode, don't wait for the target
15918 here.
15919 (handle_general_set): Handle QNonStop.
15920 (handle_query): When handling qC, return the current general
15921 thread, instead of the first thread of the list.
15922 (handle_query): If the backend supports non-stop mode, include
15923 QNonStop+ in the qSupported query response.
15924 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15925 and non-stop mode.
15926 (handle_v_attach, handle_v_run): Handle non-stop mode.
15927 (handle_v_stopped): New.
15928 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15929 (myresume): Adjust to use resume_kind. Handle non-stop.
15930 (queue_stop_reply_callback): New.
15931 (handle_status): Handle non-stop mode.
15932 (main): Clear non_stop flag on reconnection. Use the event-loop.
15933 Refactor serial protocol handling from here ...
15934 (process_serial_event): ... to this new function. When GDB
15935 selects any thread, select one here. In non-stop mode, wait until
15936 GDB acks all pending events before exiting.
15937 (handle_serial_event, handle_target_event): New.
15938 * remote-utils.c (remote_open): Install remote_desc in the event
15939 loop.
15940 (remote_close): Remove remote_desc from the event loop.
15941 (putpkt_binary): Rename to...
15942 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15943 (putpkt_binary): New as wrapper around putpkt_binary_1.
15944 (putpkt_notif): New.
15945 (prepare_resume_reply): In non-stop mode, don't change the
15946 general_thread.
15947 * event-loop.c: New.
15948 * Makefile.in (OBJ): Add event-loop.o.
15949 (event-loop.o): New rule.
15950
15951 * linux-low.h (pid_of): Moved here.
15952 (lwpid_of): New.
15953 (get_lwp_thread): Use lwpid_of.
15954 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15955 * linux-low.c (pid_of): Delete.
15956 (inferior_pid): Use lwpid_of.
15957 (linux_event_pipe): New.
15958 (target_is_async_p): New.
15959 (delete_lwp): New.
15960 (handle_extended_wait): Use lwpid_of.
15961 (add_lwp): Don't set lwpid field.
15962 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15963 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15964 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15965 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15966 first. Adjust to linux_wait_for_event interface changes. Use
15967 lwpid_of.
15968 (linux_detach): Don't delete the main lwp here.
15969 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15970 (status_pending_p): Don't consider explicitly suspended lwps.
15971 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15972 pointer. Add OPTIONS argument. Change return type to int. Use
15973 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15974 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15975 pointer. Add status pointer argument. Return a pid instead of a
15976 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15977 changes. In non-stop mode, don't switch to a random thread.
15978 (linux_wait): Rename to...
15979 (linux_wait_1): ... this. Add target_options argument, and handle
15980 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15981 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15982 clean exit and signal exit code. Don't stop all threads in
15983 non-stop mode. In all-stop mode, only stop all threads when
15984 reporting a stop to GDB. Handle explicit thread stop requests.
15985 (async_file_flush, async_file_mark): New.
15986 (linux_wait): New.
15987 (send_sigstop): Use lwpid_of.
15988 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15989 interface changes. In non-stop mode, don't switch to a random
15990 thread.
15991 (linux_resume_one_lwp): Use lwpid_of.
15992 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15993 (linux_resume_one_thread): ... this. Handle resume_stop. In
15994 non-stop mode, don't look for pending flag in all threads.
15995 (resume_status_pending_p): Don't consider explicitly suspended
15996 threads.
15997 (my_waitpid): Reimplement. Emulate __WALL.
15998 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15999 Use lwpid_of.
16000 (sigchld_handler, linux_supports_non_stop, linux_async)
16001 (linux_start_non_stop): New.
16002 (linux_target_ops): Register linux_supports_non_stop, linux_async
16003 and linux_start_non_stop.
16004 (initialize_low): Install SIGCHLD handler.
16005 * thread-db.c (thread_db_create_event, find_one_thread)
16006 (thread_db_get_tls_address): Use lwpid_of.
16007 * win32-low.c (win32_detach): Adjust to use resume_kind.
16008 (win32_wait): Add `options' argument.
16009 * spu-low.c (spu_resume): Adjust to use resume_kind.
16010 (spu_wait): Add `options' argument.
16011
16012 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16013
16014 Decouple target code from remote protocol.
16015
16016 * target.h (enum target_waitkind): New.
16017 (struct target_waitstatus): New.
16018 (struct target_ops) <wait>: Return an unsigned long. Take a
16019 target_waitstatus pointer instead of a char pointer.
16020 (mywait): Likewise.
16021 * target.c (mywait): Change prototype to return an unsigned long.
16022 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16023 * server.h (thread_from_wait, old_thread_from_wait): Delete
16024 declarations.
16025 (prepare_resume_reply): Change prototype to take a
16026 target_waitstatus.
16027 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16028 (last_status, last_ptid): New.
16029 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16030 pid instead of a signal.
16031 (attach_inferior): Remove "status" and "signal" parameters.
16032 Adjust.
16033 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16034 not as an address.
16035 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16036 (handle_v_requests, myresume): Remove "status" and "signal"
16037 parameters. Adjust.
16038 (handle_status): New.
16039 (main): Delete local `status'. Adjust.
16040 * remote-utils.c: Include target.h.
16041 (prepare_resume_reply): Change prototype to take a
16042 target_waitstatus. Adjust.
16043
16044 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16045 interface.
16046 * spu-low.c (spu_wait): Adjust.
16047 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16048 Delete.
16049 (win32_wait): Adjust.
16050
16051 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16052
16053 * target.h (struct thread_resume): Delete leave_stopped member.
16054 (struct target_ops): Add a `n' argument to the `resume' callback.
16055 * server.c (start_inferior): Adjust.
16056 (handle_v_cont, myresume): Adjust.
16057 * linux-low.c (check_removed_breakpoint): Adjust to resume
16058 interface change, and to removed leave_stopped field.
16059 (resume_ptr): Delete.
16060 (struct thread_resume_array): New.
16061 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16062 resume interface change.
16063 (linux_continue_one_thread, linux_queue_one_thread)
16064 (resume_status_pending_p): Check if the resume field is NULL
16065 instead of checking the leave_stopped member.
16066 (linux_resume): Adjust to the target resume interface change.
16067 * spu-low.c (spu_resume): Adjust to the target resume interface
16068 change.
16069 * win32-low.c (win32_detach, win32_resume): Ditto.
16070
16071 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16072
16073 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16074 flag.
16075 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16076 pending.
16077 (linux_continue_one_thread): Only preserve the stepping flag if
16078 there's a pending breakpoint.
16079
16080 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16081
16082 * server.c (main): After the inferior having exited, call
16083 remote_close before exiting gdbserver.
16084
16085 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16086
16087 Fix size of FPSCR in Power 7 processors.
16088 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16089 (PPC_FEATURE_HAS_DFP): New #define.
16090 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16091 size of the FPSCR.
16092
16093 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16094
16095 * server.c (handle_query) Whitespace and formatting.
16096
16097 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16098
16099 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16100 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16101 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16102 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16103 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16104 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16105 Makefile.in, configure.ac: Fix whitespace throughout.
16106 * configure: Regenerate.
16107
16108 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16109
16110 * inferiors.c (find_inferior): Make it safe for the callback
16111 function to delete the currently iterated inferior.
16112
16113 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16114
16115 * Makefile.in (linuw_low_h): Move higher.
16116 (thread-db.o): Depend on $(linux_low_h).
16117
16118 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16119
16120 Rename "process" to "lwp" throughout.
16121
16122 * linux-low.c (all_processes): Rename to...
16123 (all_lwps): ... this.
16124 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16125 (add_process): Rename to ...
16126 (add_lwp): ... this. Adjust.
16127 (linux_create_inferior): Adjust.
16128 (linux_attach_lwp): Adjust.
16129 (linux_attach): Adjust.
16130 (linux_kill_one_process): Rename to ...
16131 (linux_kill_one_lwp): ... this. Adjust.
16132 (linux_kill): Adjust.
16133 (linux_detach_one_process): Rename to ...
16134 (linux_detach_one_lwp): ... this. Adjust.
16135 (linux_detach): Adjust.
16136 (check_removed_breakpoint): Adjust.
16137 (status_pending_p): Adjust.
16138 (linux_wait_for_process): Rename to ...
16139 (linux_wait_for_lwp): ... this. Adjust.
16140 (linux_wait_for_event): Adjust.
16141 (send_sigstop): Adjust.
16142 (wait_for_sigstop): Adjust.
16143 (stop_all_processes): Rename to ...
16144 (stop_all_lwps): ... this.
16145 (linux_resume_one_process): Rename to ...
16146 (linux_resume_one_lwp): ... this. Adjust.
16147 (linux_set_resume_request, linux_continue_one_thread)
16148 (linux_queue_one_thread, resume_status_pending_p)
16149 (usr_store_inferior_registers, regsets_store_inferior_registers)
16150 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16151 Adjust.
16152 * linux-low.h (get_process): Rename to ...
16153 (get_lwp): ... this. Adjust.
16154 (get_thread_process): Rename to ...
16155 (get_thread_lwp): ... this. Adjust.
16156 (get_process_thread): Rename to ...
16157 (get_lwp_thread): ... this. Adjust.
16158 (struct process_info): Rename to ...
16159 (struct lwp_info): ... this.
16160 (all_processes): Rename to ...
16161 (all_lwps): ... this.
16162 * proc-service.c (ps_lgetregs): Adjust.
16163 * thread-db.c (thread_db_create_event, find_one_thread)
16164 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16165
16166 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16167
16168 * server.c (handle_query): Handle "qAttached".
16169
16170 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16171
16172 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16173 GPLv3, update license URL.
16174
16175 2009-03-01 Doug Evans <dje@google.com>
16176
16177 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16178 (server_h): Add gdb_signals.h.
16179 (signals.o): Update.
16180 * server.h (target_signal_from_host,target_signal_to_host_p)
16181 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16182
16183 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16184
16185 * remote-utils.c (getpkt): Also generate remote-debug
16186 information if noack_mode is set.
16187
16188 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16189
16190 * server.c (handle_query): Report qXfer:siginfo:read and
16191 qXfer:siginfo:write as supported and handle them.
16192 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16193 * linux-low.c (linux_xfer_siginfo): New.
16194 (linux_target_ops): Set it.
16195
16196 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16197
16198 * server.c (gdbserver_usage): Mention --remote-debug.
16199 (main): Accept '--remote-debug' switch.
16200
16201 2009-01-18 Doug Evans <dje@google.com>
16202
16203 * regcache.c (new_register_cache): No need to check result of xcalloc.
16204 * server.c (handle_search_memory): Back out calls to xmalloc,
16205 result is checked and error is returned to user upon failure.
16206 (handle_query): Ditto. Add more checks for result of malloc.
16207 (handle_v_cont): Check result of malloc, report error back to
16208 user upon failure.
16209 (handle_v_run): Ditto. Call freeargv.
16210 * server.h (freeargv): Declare.
16211 * utils.c (freeargv): New fn.
16212
16213 2009-01-15 Doug Evans <dje@google.com>
16214
16215 * gdbreplay.c (perror_with_name): Make arg const char *.
16216 * server.h (target_signal_to_name): Make return type const char *.
16217 * thread-db.c (thread_db_err_str): Make return type const char *.
16218 * utils.c (perror_with_name): Make arg const char *.
16219
16220 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16221
16222 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16223 when handling a EXIT_PROCESS_DEBUG_EVENT.
16224
16225 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16226
16227 * gdbreplay.c (gdbreplay_version): Update copyright year.
16228 * server.c (gdbserver_version): Likewise.
16229
16230 2009-01-05 Doug Evans <dje@google.com>
16231
16232 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16233 (handle_extended_wait): Improve comment.
16234
16235 2008-12-13 Doug Evans <dje@google.com>
16236
16237 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16238 * server.h (ATTR_MALLOC): New macro.
16239 (xmalloc,xcalloc,xstrdup): Declare.
16240 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16241 * inferiors.c: Ditto.
16242 * linux-low.c: Ditto.
16243 * mem-break.c: Ditto.
16244 * regcache.c: Ditto.
16245 * remote-utils.c: Ditto.
16246 * server.c: Ditto.
16247 * target.c: Ditto.
16248 * win32-low.c: Ditto.
16249
16250 2008-12-12 Doug Evans <dje@google.com>
16251
16252 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16253 in debugging printf.
16254
16255 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16256
16257 2008-12-09 Doug Evans <dje@google.com>
16258
16259 * linux-low.h (struct process_info): Delete member tid, unused.
16260 * thread-db.c (find_one_thread): Update.
16261 (maybe_attach_thread): Update.
16262
16263 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16264
16265 * target.h (struct target_ops): Add qxfer_osdata member.
16266 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16267 and dirent.h.
16268 (linux_qxfer_osdata): New functions.
16269 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16270 callback.
16271 * server.c (handle_query): Handle "qXfer:osdata:read:".
16272 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16273 (buffer_xml_printf): New functions.
16274 * server.h (struct buffer): New.
16275 (buffer_grow_str, buffer_grow_str0): New macros.
16276 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16277 (buffer_xml_printf): Declare.
16278
16279 2008-11-24 Doug Evans <dje@google.com>
16280
16281 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16282
16283 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16284
16285 * server.c (handle_v_run): Always use the supplied argument list.
16286
16287 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16288
16289 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16290 (xtensa_regmap_table): Add entry for scompare1.
16291
16292 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16293
16294 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16295 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16296 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16297 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16298 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16299 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16300 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16301 XML target descriptions.
16302 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16303 when inferior is running on an ISA 2.05 or later processor. Add
16304 special case to return offset for full 64-bit slot of FPSCR when
16305 in 32-bits.
16306
16307 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16308
16309 * Makefile.in (SFILES, clean): Added sparc64 files.
16310 (reg-sparc64.o, reg-sparc64.c): New.
16311 * configure.srv (sparc*-*-linux*): New configuration.
16312 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16313 syscall arguments for SPARC.
16314 (regsets_store_inferior_registers): Likewise.
16315 * linux-sparc-low.c: New file.
16316
16317 2008-10-21 Doug Evans <dje@google.com>
16318
16319 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16320 (READLINE_DIR,READLINE_DEP): Delete.
16321 (INTERNAL_CFLAGS): Update.
16322 (LINTFLAGS): Update.
16323
16324 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16325
16326 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16327 whole argv from the last run, not just argv[0].
16328
16329 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16330
16331 * regcache.c (new_register_cache): Return NULL if the register
16332 cache size isn't known yet.
16333 (free_register_cache): Avoid dereferencing a NULL regcache.
16334
16335 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16336
16337 * configure.srv: Merge MIPS and MIPS64.
16338
16339 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16340
16341 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16342
16343 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16344
16345 * Makefile.in: Add required vsx dependencies.
16346
16347 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16348 Declare init_registers_powerpc_vsx32l.
16349 Declare init_registers_powerpc_vsx64l.
16350 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16351 (ppc_arch_setup): Check for VSX in hwcap.
16352 (ppc_fill_vsxregset): New function.
16353 (ppc_store_vsxregset): New function.
16354 Add new VSX entry in regset_info target_regsets.
16355
16356 * configure.srv: Add new VSX dependencies.
16357
16358 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16359
16360 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16361 (remote_open): Set or clear transport_is_reliable.
16362 (putpkt_binary): Don't expect acks in noack mode.
16363 (getpkt): Don't send ack/nac in noack mode.
16364 * server.c (handle_general_set): Handle QStartNoAckMode.
16365 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16366 qSupported.
16367 (main): Reset noack_mode on every connection.
16368 * server.h (noack_mode): Declare.
16369
16370 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16371
16372 * Makefile.in (GDBREPLAY_OBS): New variable.
16373 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16374
16375 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16376 Daniel Jacobowitz <dan@codesourcery.com>
16377
16378 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16379 (usr_store_inferior_registers): Likewise.
16380 (regsets_store_inferior_registers): Likewise.
16381
16382 2008-07-31 Rolf Jansen <rj@surtec.com>
16383 Pedro Alves <pedro@codesourcery.com>
16384
16385 * configure.ac: Check for memmem declaration.
16386 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16387 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16388 (disable_packet_qfThreadInfo): Unconditionally compile.
16389 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16390 * configure, config.in: Regenerate.
16391
16392 2008-07-28 Doug Kwan <dougkwan@google.com>
16393
16394 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16395 (linux_write_memory): Remove declaration of errno.
16396
16397 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16398
16399 * linux-low.c (handle_extended_wait): Do not use "status"
16400 variable uninitialized.
16401
16402 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16403
16404 * server.c (handle_v_attach): Inhibit reporting dll changes.
16405
16406 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16407
16408 * remote-utils.c (prepare_resume_reply): If requested, don't
16409 output "thread:TID" in the T stop reply.
16410
16411 * server.c (disable_packet_vCont, disable_packet_Tthread)
16412 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16413 (handle_query): If requested, disable support for qC, qfThreadInfo
16414 and qsThreadInfo.
16415 (handle_v_requests): If requested, disable support for vCont.
16416 (gdbserver_show_disableable): New.
16417 (main): Handle --disable-packet and --disable-packet=LIST.
16418
16419 * server.h (disable_packet_vCont, disable_packet_Tthread)
16420 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16421
16422 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16423
16424 * server.c (gdbserver_usage): Mention --version.
16425
16426 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16427
16428 * Makefile.in (gdbreplay.o): New rule.
16429
16430 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16431
16432 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16433 message, not gdbserver.
16434
16435 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16436 Nathan Sidwell <nathan@codesourcery.com>
16437 Joseph Myers <joseph@codesourcery.com>
16438
16439 * acinclude.m4: Include ../../config/acx.m4.
16440 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16441 * configure, config.in: Regenerate.
16442 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16443 * server.c (gdbserver_version): Print PKGVERSION.
16444 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16445 (main): Adjust gdbserver_usage calls.
16446 * gdbreplay.c (version, host_name): Add declarations.
16447 (gdbreplay_version, gdbreplay_usage): New.
16448 (main): Accept --version and --help options.
16449
16450 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16453 (arm_breakpoint_at): Handle Thumb.
16454 (the_low_target): Add comment.
16455
16456 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16457
16458 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16459
16460 2008-05-09 Doug Evans <dje@google.com>
16461
16462 * server.h (decode_search_memory_packet): Declare.
16463 * remote-utils.c (decode_search_memory_packet): New fn.
16464 * server.c (handle_search_memory_1): New fn.
16465 (handle_search_memory): New fn.
16466 (handle_query): Process qSearch:memory packets.
16467
16468 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16469
16470 * regcache.c (registers_length): Remove.
16471 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16472 full register packet.
16473 * regcache.h (registers_length): Remove prototype.
16474 * server.h (PBUFSIZ): Define to 16384.
16475
16476 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16477
16478 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16479 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16480 powerpc-64l.o, and powerpc-altivec64l.o.
16481 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16482 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16483 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16484 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16485 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16486 to srv_xmlfiles.
16487
16488 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16489 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16490 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16491 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16492 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16493 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16494 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16495 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16496 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16497 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16498 (clean): Update.
16499
16500 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16501 (init_registers_powerpc_32l): ... this new prototype.
16502 (init_registers_powerpc_32): Remove, replace by ...
16503 (init_registers_powerpc_altivec32l): ... this new prototype.
16504 (init_registers_powerpc_e500): Remove, replace by ...
16505 (init_registers_powerpc_e500l): ... this new prototype.
16506 (init_registers_ppc64): Remove, replace by ...
16507 (init_registers_powerpc_64l): ... this new prototype.
16508 (init_registers_powerpc_64): Remove, replace by ...
16509 (init_registers_powerpc_altivec64l): ... this new prototype.
16510 (ppc_num_regs): Set to 73.
16511 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16512 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16513 (ppc_cannot_store_register): Handle orig_r3 and trap.
16514 (ppc_arch_setup): Update init_registers_... calls.
16515 (ppc_fill_gregset): Handle orig_r3 and trap.
16516
16517 * inferiors.c (clear_inferiors): Reset current_inferior.
16518
16519 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16520
16521 * acinclude.m4: Add override.m4.
16522 * configure: Regenerate.
16523
16524 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16525
16526 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16527 initial call to init_register_ppc64.
16528
16529 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16530
16531 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16532 single powerpc*-*-linux* case.
16533 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16534
16535 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16536
16537 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16538 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16539 from reg_xmlfiles.
16540 * linux-ppc-low.c: Include <elf.h>.
16541 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16542 (ppc_hwcap): New global variable.
16543 (ppc_regmap): Remove __SPE__ #ifdef sections.
16544 (ppc_regmap_e500): New global variable.
16545 (ppc_cannot_store_register): Update __SPE__ special case.
16546 (ppc_get_hwcap): New function.
16547 (ppc_arch_setup): Use it to determine whether inferior supports
16548 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16549 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16550 Do not access registers if target does not support AltiVec.
16551 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16552 Do not access registers if target does not support SPE.
16553 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16554
16555 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16556
16557 * linux-low.c (disabled_regsets, num_regsets): New.
16558 (use_regsets_p): Delete.
16559 (linux_wait_for_process): Clear disabled_regsets.
16560 (regsets_fetch_inferior_registers): Check and set it.
16561 (regsets_store_inferior_registers): Likewise.
16562 (linux_fetch_registers, linux_store_registers): Do not use
16563 use_regsets_p.
16564 (initialize_low): Allocate disabled_regsets.
16565
16566 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16567
16568 * Makefile.in (LIBOBJS): New.
16569 (OBS): Use LIBOBJS.
16570 (memmem.o): New rule.
16571 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16572 * configure: Regenerated.
16573
16574 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16575
16576 * server.c (handle_query): Never return "unsupported" for
16577 qXfer:features:read queries.
16578
16579 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16580
16581 * server.c (get_features_xml): Fix inverted condition.
16582 (handle_query): Always support qXfer:feature:read.
16583
16584 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16585
16586 * server.c (wrapper_argv): New.
16587 (start_inferior): Handle wrapper_argv. If set, expect an extra
16588 trap.
16589 (gdbserver_usage): Document --wrapper.
16590 (main): Parse --wrapper.
16591
16592 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16593
16594 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16595 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16596 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16597 (ppc_set_pc): Likewise.
16598 (ppc_arch_setup): New function.
16599 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16600 of collect_register.
16601 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16602
16603 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16604
16605 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16606 instead of linux-ppc64-low.o.
16607 * linux-ppc64-low.c: Remove file.
16608 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16609 (linux-ppc64-low.o): Remove rule.
16610
16611 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16612 (init_registers_powerpc_64): Likewise.
16613 (ppc_regmap): Conditionally define depending on __powerpc64__.
16614 (ppc_cannot_store_register): Do not special-case "fpscr" when
16615 compiled on __powerpc64__.
16616 (ppc_collect_ptrace_register): New function.
16617 (ppc_supply_ptrace_register): New function.
16618 (ppc_breakpoint): Change type to "unsigned int".
16619 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16620 (the_low_target): Conditionally provide initializers for the
16621 arch_setup member depending on __powerpc64__. Install
16622 collect_ptrace_register and supply_ptrace_register members.
16623
16624 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16625
16626 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16627 * server.c (gdbserver_xmltarget): Define.
16628 (get_features_xml): Use it to replace "target.xml" and arch_string.
16629
16630 * configure.srv: Remove srv_xmltarget. Add XML files that were
16631 mentioned there to srv_xmlfiles instead. Remove conditional tests
16632 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16633 srv_xmlfiles and srv_regobj to include all possible choices.
16634 * configure.ac (srv_xmltarget): Remove.
16635 (srv_xmlfiles): Do not add "target.xml".
16636 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16637 checks for supplementary target information.
16638 * configure: Regenerate.
16639 * Makefile.in (XML_TARGET): Remove.
16640 (target.xml): Remove rule.
16641 (clean): Do not clean up target.xml.
16642 (.PRECIOUS): Do not mention target.xml.
16643
16644 * target.h (struct target_ops): Remove arch_string member.
16645 * linux-low.c (linux_arch_string): Remove.
16646 (linux_target_ops): Remove arch_string initializer.
16647 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16648 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16649 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16650 * spu-low.c (spu_arch_string): Remove.
16651 (spu_target_ops): Remove arch_string initializer.
16652 * win32-low.c (win32_arch_string): Remove.
16653 (win32_target_ops): Remove arch_string initializer.
16654 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16655 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16656 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16657
16658 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16659
16660 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16661 by collect_ptrace_register and supply_ptrace_register hooks.
16662 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16663 instead of checking for the_low_target.left_pad_xfer.
16664 (usr_store_inferior_registers): Use collect_ptrace_register callback
16665 instead of checking for the_low_target.left_pad_xfer.
16666
16667 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16668 (s390_supply_ptrace_register): Likewise.
16669 (s390_fill_gregset): Call s390_collect_ptrace_register.
16670 (the_low_target): Update.
16671
16672 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16673 (ppc_supply_ptrace_register): Likewise.
16674 (the_low_target): Update.
16675
16676 * linux-i386-low.c (the_low_target): Update.
16677 * linux-x86-64-low.c (the_low_target): Update.
16678
16679 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16680
16681 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16682 reg-s390.o and reg-s390x.o.
16683
16684 * linux-low.c (new_inferior): New global variable.
16685 (linux_create_inferior, linux_attach): Set it.
16686 (linux_wait_for_process): Call the_low_target.arch_setup after the
16687 target has stopped for the first time.
16688 (initialize_low): Do not call the_low_target.arch_setup.
16689
16690 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16691 (s390_set_pc): Likewise.
16692 (s390_arch_setup): New function.
16693 (the_low_target): Use s390_arch_setup as arch_setup routine.
16694
16695 * regcache.c (realloc_register_cache): New function.
16696 (set_register_cache): Call it for each existing regcache.
16697
16698 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16699
16700 * server.h (init_registers): Remove prototype.
16701
16702 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16703 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16704 instead of init_registers ().
16705 * linux-arm-low.c (init_registers_arm): Add prototype.
16706 (init_registers_arm_with_iwmmxt): Likewise.
16707 (the_low_target): Add initializer for arch_setup field.
16708 * linux-cris-low.c (init_registers_cris): Add prototype.
16709 (the_low_target): Add initializer for arch_setup field.
16710 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16711 (the_low_target): Add initializer for arch_setup field.
16712 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16713 (the_low_target): Add initializer for arch_setup field.
16714 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16715 (the_low_target): Add initializer for arch_setup field.
16716 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16717 (the_low_target): Add initializer for arch_setup field.
16718 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16719 (the_low_target): Add initializer for arch_setup field.
16720 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16721 (init_registers_mips64_linux): Likewise.
16722 (the_low_target): Add initializer for arch_setup field.
16723 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16724 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16725 (the_low_target): Add initializer for arch_setup field.
16726 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16727 (init_registers_powerpc_64): Likewise.
16728 (the_low_target): Add initializer for arch_setup field.
16729 * linux-s390-low.c (init_registers_s390): Add prototype.
16730 (init_registers_s390x): Likewise.
16731 (the_low_target): Add initializer for arch_setup field.
16732 * linux-sh-low.c (init_registers_sh): Add prototype.
16733 (the_low_target): Add initializer for arch_setup field.
16734 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16735 (the_low_target): Add initializer for arch_setup field.
16736 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16737 (the_low_target): Add initializer for arch_setup field.
16738
16739 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16740 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16741 instead of init_registers ().
16742 * win32-arm-low.c (init_registers_arm): Add prototype.
16743 (the_low_target): Add initializer for arch_setup field.
16744 * win32-i386-low.c (init_registers_i386): Add prototype.
16745 (the_low_target): Add initializer for arch_setup field.
16746
16747 * spu-low.c (init_registers_spu): Add prototype.
16748 (initialize_low): Call initialie_registers_spu () instead of
16749 initialize_registers ().
16750
16751 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16752
16753 * server.c (handle_v_requests): When handling the vRun and vAttach
16754 packets, if already debugging a process, don't kill it. Return an
16755 error instead.
16756
16757 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16758
16759 * server.c (handle_query): Correct length check.
16760
16761 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16762
16763 * win32-low.c (do_initial_child_stuff): Add process handle
16764 parameter. Set current_process_handle and current_process_id from the
16765 parameters. Clear globals.
16766 (win32_create_inferior): Don't set current_process_handle and
16767 current_process_id here. Instead pass them on the call to
16768 do_initial_child_stuff.
16769 (win32_attach): Likewise.
16770 (win32_clear_inferiors): New.
16771 (win32_kill): Don't close the current process handle or the
16772 current thread handle here. Instead call win32_clear_inferiors.
16773 (win32_detach): Don't open a new handle to the process. Call
16774 win32_clear_inferiors.
16775 (win32_join): Don't rely on current_process_handle; open a new
16776 handle using the process id.
16777 (win32_wait): Call win32_clear_inferiors when the inferior process
16778 has exited.
16779
16780 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16781
16782 * server.c (monitor_show_help): Add "exit".
16783
16784 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16785
16786 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16787 (clean): Add reg-xtensa.c.
16788 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16789 * configure.srv (xtensa*-*-linux*) New target.
16790 * linux-xtensa-low.c: New.
16791 * xtensa-xtregs.c: New.
16792
16793 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16794
16795 * hostio.c: Don't include errno.h.
16796 (errno_to_fileio_errno): Move to hostio-errno.
16797 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16798 error number outputting to the target->hostio_last_error callback.
16799 (hostio_packet_error): Use FILEIO_EINVAL directly.
16800 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16801 calls to hostio_error.
16802 * hostio-errno.c: New.
16803 * server.h (hostio_last_error_from_errno): Declare.
16804 * target.h (target_ops): Add hostio_last_error member.
16805 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16806 as hostio_last_error handler.
16807 * spu-low.c (spu_target_ops): Likewise.
16808 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16809 (wince_hostio_last_error): New functions.
16810 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16811 as hostio_last_error handler.
16812 (win32_target_ops) [!_WIN32_WCE]: Register
16813 hostio_last_error_from_errno as hostio_last_error handler.
16814 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16815 (hostio-errno.o): New rule.
16816 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16817 * configure.srv (srv_hostio_err_objs): New variable. Default to
16818 hostio-errno.o.
16819 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16820 * configure: Regenerate.
16821
16822 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16823
16824 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16825 (linux_kill, linux_detach): Clean up the process list.
16826 * remote-utils.c (remote_open): Improve port number parsing.
16827 (putpkt_binary, input_interrupt): Only send interrupts if the target
16828 is running.
16829 * server.c (extended_protocol): Make static.
16830 (attached): Define earlier.
16831 (exit_requested, response_needed, program_argv): New variables.
16832 (target_running): New.
16833 (start_inferior): Clear attached here.
16834 (attach_inferior): Set attached here.
16835 (require_running): Define.
16836 (handle_query): Use require_running and target_running. Implement
16837 "monitor exit".
16838 (handle_v_attach, handle_v_run): New.
16839 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16840 (gdbserver_usage): Update.
16841 (main): Redo argument parsing. Handle --debug and --multi. Handle
16842 --attach along with other options or after the port. Save
16843 program_argv. Support no initial program. Resynchronize
16844 communication with GDB after an error. Handle "monitor exit".
16845 Use require_running and target_running. Always allow the extended
16846 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16847 restart in extended mode.
16848 * README: Refer to the GDB manual. Update --attach usage.
16849
16850 2007-12-20 Andreas Schwab <schwab@suse.de>
16851
16852 * linux-low.c (STACK_SIZE): Define.
16853 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16854 (linux_test_for_tracefork): Likewise.
16855
16856 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16857
16858 * linux-low.c (linux_wait_for_event): Update messages. Do not
16859 reinsert auto-delete breakpoints.
16860 * mem-break.c (struct breakpoint): Change return type of handler to
16861 int.
16862 (set_breakpoint_at): Update handler type.
16863 (reinsert_breakpoint_handler): Return 1 instead of calling
16864 delete_breakpoint.
16865 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16866 setting a new one.
16867 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16868 * mem-break.h (set_breakpoint_at): Update handler type.
16869 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16870 * win32-low.c (auto_delete_breakpoint): New.
16871 (get_child_debug_event): Use it.
16872
16873 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16874
16875 * configure.ac: Check for pread and pwrite.
16876 * hostio.c (handle_pread): Fall back to lseek and read.
16877 (handle_pwrite): Fall back to lseek and write.
16878 * config.in, configure: Regenerated.
16879
16880 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16881
16882 * server.c (myresume): Add own_buf argument.
16883 (main): Update calls.
16884
16885 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16886
16887 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16888 * remote-utils.c (remote_open): Do not call disable_async_io.
16889 (block_async_io): Delete.
16890 (unblock_async_io): Make static.
16891 (initialize_async_io): New.
16892 * server.c (handle_v_cont): Handle async I/O here.
16893 (myresume): Likewise. Move other common resume tasks here...
16894 (main): ... from here. Call initialize_async_io. Disable async
16895 I/O before the main loop.
16896 * server.h (initialize_async_io): Declare.
16897 (block_async_io, unblock_async_io): Delete prototypes.
16898 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16899
16900 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16901
16902 * remote-utils.c (readchar): Allow binary data in received messages.
16903
16904 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16905
16906 * win32-low.c (attaching): New global.
16907 (win32_create_inferior): Clear the `attaching' global.
16908 (win32_attach): Set the `attaching' global.
16909 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16910 attaching. Only set a breakpoint at the entry point if not
16911 attaching.
16912
16913 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16914
16915 * server.c (main): Don't report dll events on the initial
16916 connection on attaches.
16917
16918 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16919
16920 * server.c (main): Relax numerical bases supported for the pid of
16921 the --attach command line argument.
16922
16923 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16924
16925 * win32-low.c (win32_attach): Call OpenProcess before
16926 DebugActiveProcess, not after. Add last error output to error
16927 call.
16928
16929 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16930
16931 * win32-low.c (win32_get_thread_context)
16932 (win32_set_thread_context): New functions.
16933 (thread_rec): Use win32_get_thread_context.
16934 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16935 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16936 field.
16937
16938 2007-12-03 Leo Zayas
16939 Pedro Alves <pedro_alves@portugalmail.pt>
16940
16941 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16942 global variables.
16943 (child_add_thread): Minor cleanup.
16944 (child_continue): Resume artificially suspended threads before
16945 calling ContinueDebugEvent.
16946 (suspend_one_thread): New.
16947 (fake_breakpoint_event): New.
16948 (get_child_debug_event): Change return type to int. Check here if
16949 gdb sent an interrupt request. If a soft interrupt was requested,
16950 fake a breakpoint event. Return 0 if there is no event to handle,
16951 and 1 otherwise.
16952 (win32_wait): Don't check here if gdb sent an interrupt request.
16953 Ensure there is a valid event to handle.
16954 (win32_request_interrupt): Add soft interruption method as last
16955 resort.
16956
16957 2007-12-03 Leo Zayas
16958 Pedro Alves <pedro_alves@portugalmail.pt>
16959
16960 * win32-low.h (win32_thread_info): Add descriptions to the
16961 structure members. Replace `suspend_count' counter by a
16962 `suspended' flag.
16963 * win32-low.c (thread_rec): Update condition of when to get the
16964 context from the inferior. Rely on ContextFlags being set if it
16965 has already been retrieved. Only suspend the inferior thread if
16966 we haven't already. Warn if that fails.
16967 (continue_one_thread): s/suspend_count/suspended/. Only call
16968 ResumeThread once. Warn if that fails.
16969
16970 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16971
16972 * win32-low.c (win32_wait): Don't read from the inferior when it
16973 has already exited.
16974
16975 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16976
16977 * Makefile.in (win32_low_h): New variable.
16978 (win32-low.o): Add dependency on $(win32_low_h).
16979 (win32-arm-low.o, win32-i386-low.o): New rules.
16980
16981 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16982
16983 * hostio.c: Correct copyright year.
16984
16985 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16986
16987 * Makefile.in (OBS): Add hostio.o.
16988 (hostio.o): New rule.
16989 * server.h (handle_vFile): Declare.
16990 * hostio.c: New file.
16991 * server.c (handle_v_requests): Take packet_len and new_packet_len
16992 for binary packets. Call handle_vFile.
16993 (main): Update call to handle_v_requests.
16994
16995 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16996
16997 * linux-low.c: Include <sched.h>.
16998
16999 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17000
17001 * linux-low.c (linux_tracefork_grandchild): New.
17002 (linux_tracefork_child): Use clone.
17003 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17004
17005 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17006
17007 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17008
17009 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17010
17011 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17012
17013 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17014
17015 * inferiors.c (change_inferior_id): Delete.
17016 (add_pid_to_list, pull_pid_from_list): New.
17017 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17018 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17019 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17020 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17021 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17022 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17023 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17024 (using_threads): Always set to 1.
17025 (handle_extended_wait): New.
17026 (add_process): Do not set TID.
17027 (linux_create_inferior): Set must_set_ptrace_flags.
17028 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17029 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17030 (linux_thread_alive): Rename TID argument to LWPID.
17031 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17032 (linux_wait_for_event): Do not use TID or check using_threads. Update
17033 call to dead_thread_notify. Call handle_extended_wait.
17034 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17035 (send_sigstop): Delete sigstop_sent.
17036 (wait_for_sigstop): Avoid TID.
17037 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17038 (linux_test_for_tracefork): New.
17039 (linux_lookup_signals): Use thread_db_active and
17040 linux_supports_tracefork_flag.
17041 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17042 * linux-low.h (get_process_thread): Avoid TID.
17043 (struct process_ifo): Move thread_known and tid to the end. Remove
17044 sigstop_sent.
17045 (linux_attach_lwp, thread_db_init): Update prototypes.
17046 * server.h (change_inferior_id): Delete prototype.
17047 (add_pid_to_list, pull_pid_from_list): New prototypes.
17048 * thread-db.c (thread_db_use_events): New.
17049 (find_first_thread): Rename to...
17050 (find_one_thread): ...this. Update callers and messages. Do not
17051 call fatal. Check thread_db_use_events. Do not call
17052 change_inferior_id or new_thread_notify.
17053 (maybe_attach_thread): Update. Do not call new_thread_notify.
17054 (thread_db_init): Set thread_db_use_events. Check use_events.
17055 * utils.c (fatal, warning): Correct message prefix.
17056
17057 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17058
17059 * Makefile.in (clean): Remove new files.
17060 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17061 (powerpc-64.o, powerpc-64.c): New rules.
17062 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17063 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17064 with SPE.
17065 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17066 SPE targets.
17067 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17068 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17069 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17070 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17071 (target_regsets): Add AltiVec and SPE register sets.
17072 * configure.ac: Check for AltiVec and SPE.
17073 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17074 (ppc_fill_vrregset, ppc_store_vrregset): New.
17075 (target_regsets): Add AltiVec register set.
17076 * configure: Regenerated.
17077
17078 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17079
17080 * linux-low.c (O_LARGEFILE): Define.
17081 (linux_read_memory): Use /proc/PID/mem.
17082 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17083 * configure, config.in: Regenerated.
17084
17085 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17086
17087 * linux-low.c (linux_wait_for_event): Do not pass signals while
17088 single-stepping.
17089
17090 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17091
17092 * win32-low.c (create_process): New.
17093 (win32_create_inferior): Use create_process instead of
17094 CreateProcess. If create_process failed retry appending an ".exe"
17095 suffix. Store the GetLastError result immediatelly after
17096 create_process calls and use it on the call to error.
17097
17098 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17099
17100 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17101
17102 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17103
17104 * configure.ac: Switch license to GPLv3.
17105
17106 2007-08-01 Michael Snyder <msnyder@access-company.com>
17107
17108 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17109
17110 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17111
17112 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17113 typedef.
17114 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17115 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17116 CloseToolhelp32Snapshot.
17117 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17118 CloseToolhelp32Snapshot.
17119
17120 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17121
17122 * server.c (main): Check for inferior exit before main loop.
17123
17124 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17125
17126 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17127 instead of on tmp_desc.
17128
17129 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17130 Daniel Jacobowitz <dan@codesourcery.com>
17131
17132 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17133 (add_thread): Minor cleanups.
17134 (clear_inferiors): Move lower in the file. Clear the DLL
17135 list.
17136 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17137 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17138 (xml_escape_text): New.
17139 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17140 for qSupported.
17141 (handle_v_cont): Report errors.
17142 (gdbserver_version): Update.
17143 (main): Correct size of own_buf. Do not report initial DLL events.
17144 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17145 (unloaded_dll, xml_escape_text): New.
17146 * win32-low.c (enum target_waitkind): Update comments.
17147 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17148 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17149 (win32_EnumProcessModules, win32_GetModuleInformation)
17150 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17151 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17152 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17153 (win32_Module32First, win32_Module32Next, load_toolhelp)
17154 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17155 (get_child_debug_event): Handle DLL events.
17156 (win32_wait): Likewise.
17157
17158 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17159
17160 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17161 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17162
17163 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17164
17165 * win32-low.c (handle_output_debug_string): Ignore event if not
17166 waiting.
17167
17168 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17169
17170 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17171
17172 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17173
17174 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17175
17176 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17177
17178 * inferiors.c (change_inferior_id): Add comment.
17179 * linux-low.c (check_removed_breakpoint): Add an early
17180 prototype. Improve debug output.
17181 (linux_attach): Doc update.
17182 (linux_detach_one_process, linux_detach): Clean up before releasing
17183 each process.
17184 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17185 * linux-low.h (struct process_info): Doc improvement.
17186 * mem-break.c (delete_all_breakpoints): New.
17187 * mem-break.h (delete_all_breakpoints): New prototype.
17188 * thread-db.c (find_first_thread): New.
17189 (thread_db_create_event): Call it instead of
17190 thread_db_find_new_threads. Clean up unused variables.
17191 (maybe_attach_thread): Remove first thread handling.
17192 (thread_db_find_new_threads): Use find_first_thread.
17193 (thread_db_get_tls_address): Likewise.
17194
17195 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17196
17197 * thread-db.c (thread_db_find_new_threads): Add prototype.
17198 (thread_db_create_event): Check for the main thread before adding
17199 a new thread.
17200 (maybe_attach_thread): Only enable event reporting if TID == 0.
17201 (thread_db_get_tls_address): Check for new threads.
17202
17203 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17204
17205 * linux-low.c (linux_create_inferior): Try execv before execvp.
17206 * spu-low.c (spu_create_inferior): Likewise.
17207
17208 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17209
17210 * linux-low.c (linux_create_inferior): Change execv to execvp.
17211 * spu-low.c (spu_create_inferior): Likewies.
17212
17213 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17214
17215 * Makefile.in (clean): Clean new files instead of deleted ones.
17216 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17217 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17218 rules.
17219 * configure.srv: Specify XML files and new regformats for MIPS and
17220 MIPS64 GNU/Linux.
17221 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17222 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17223 an entry for the restart register.
17224 (mips_cannot_fetch_register, mips_cannot_store_register)
17225 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17226 register names to match the XML descriptions.
17227 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17228 restart register instead of $0.
17229
17230 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17231 Markus Deuling <deuling@de.ibm.com>
17232
17233 * remote-utils.c (decode_xfer_write): New function.
17234 * server.h (decode_xfer_write): Add prototype.
17235 * server.c (handle_query): Add PACKET_LEN argument. Support
17236 qXfer:spu:read and qXfer:spu:write packets.
17237 (main): Pass packet_len to handle_query.
17238 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17239 * target.h (target_ops): Add qxfer_spu.
17240
17241 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17242
17243 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17244 accessing non-seekable spufs files.
17245
17246 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17247
17248 * server.c (handle_query): Add reply for qC packet.
17249
17250 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17251 Leo Zayas <lerele@champenstudios@com>
17252
17253 * server.h (check_remote_input_interrupt_request): New function.
17254 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17255 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17256 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17257 (check_remote_input_interrupt_request): New function.
17258 * server.h (check_remote_input_interrupt_request): Declare.
17259 * win32-low.c (winapi_DebugBreakProcess,
17260 winapi_GenerateConsoleCtrlEvent): New typedefs.
17261 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17262 to 250 ms.
17263 (win32_wait): Check for remote interrupt request
17264 with check_remote_input_interrupt_request.
17265 (win32_request_interrupt): New function.
17266 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17267
17268 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17269
17270 * win32-low.c (debug_registers_changed,
17271 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17272 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17273 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17274 (thread_rec): Get context using the low target.
17275 (child_add_thread): Call thread_added on the low target,
17276 which does the same thing.
17277 (regptr): Delete.
17278 (do_initial_child_stuff): Remove debug registers references.
17279 Set context using the low target. Resume threads after
17280 setting the contexts.
17281 (child_continue): Remove dead variable. Remove debug
17282 registers references.
17283 (child_fetch_inferior_registers): Go through the low target.
17284 (do_child_store_inferior_registers): Remove.
17285 (child_store_inferior_registers): Go through the low target.
17286 (win32_resume): Remove debug registers references.
17287 Set context using the low target.
17288 (handle_exception): Change return type to void. Don't record
17289 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17290 first chance exception.
17291 (get_child_debug_event): Change return type to void. Remove
17292 goto loop. Always return after waiting for debug event.
17293 (win32_wait): Convert to switch statement. Handle spurious
17294 events.
17295
17296 * win32-i386-low.c (debug_registers_changed,
17297 debug_registers_used): New.
17298 (initial_stuff): Rename to ...
17299 (i386_initial_stuff): ... this. Clear debug registers
17300 state variables.
17301 (store_debug_registers): Delete.
17302 (i386_get_thread_context): New.
17303 (load_debug_registers): Delete.
17304 (i386_set_thread_context): New.
17305 (i386_thread_added): New.
17306 (single_step): Rename to ...
17307 (i386_single_step): ... this.
17308 (do_fetch_inferior_registers): Rename to ...
17309 (i386_fetch_inferior_register): ... this.
17310 (i386_store_inferior_register): New.
17311 (the_low_target): Adapt to new interface.
17312
17313 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17314 (arm_get_thread_context): New.
17315 (arm_set_thread_context): New.
17316 (regptr): New.
17317 (do_fetch_inferior_registers): Rename to ...
17318 (arm_fetch_inferior_register): ... this.
17319 (arm_store_inferior_register): New.
17320 (arm_wince_breakpoint): Reimplement as unsigned long.
17321 (arm_wince_breakpoint_len): Define.
17322 (the_low_target): Adapt to new interface.
17323
17324 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17325 load_debug_registers. Add get_thread_context, set_thread_context,
17326 thread_added and store_inferior_register. Rename
17327 fetch_inferior_registers to fetch_inferior_register.
17328 (regptr): Remove declaration.
17329
17330 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17331
17332 * linux-low.c (linux_detach): Change return type to int. Return 0.
17333 * spu-low.c (spu_detach): Likewise.
17334
17335 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17336
17337 * target.h (target_ops): Change return type of detach to int.
17338 Add join.
17339 (join_inferior): New.
17340 * server.c (main): Don't skip detach support on mingw32.
17341 If the inferior doesn't support detaching return error.
17342 Call join_inferior instead of using waitpid.
17343 * linux-low.c (linux_join): New.
17344 (linux_target_op): Add linux_join.
17345 * spu-low.c (spu_join): New.
17346 (spu_target_ops): Add spu_join.
17347 * win32-low.c (win32_detach): Adapt to new interface.
17348 Reopen current_process_handle before detaching. Issue a child
17349 resume before detaching.
17350 (win32_join): New.
17351 (win32_target_op): Add win32_join.
17352
17353 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17354
17355 * win32-low.c (win32-attach): Fix return value.
17356 * target.h (target_ops): Describe ATTACH return values.
17357
17358 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17359
17360 * win32-low.c (GETPROCADDRESS): Define.
17361 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17362 (winapi_DebugSetProcessKillOnExit): Likewise.
17363 (win32_create_inferior): Force usage of ansi CreateProcessA.
17364 (win32_attach): Use GETPROCADDRESS.
17365 (win32_detach): Likewise.
17366
17367 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17368
17369 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17370
17371 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17372
17373 * win32-low.c: Commit leftover changes from 2007-03-29.
17374
17375 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17376
17377 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17378 fields short instead of int. Add explicit padding.
17379 (i387_cache_to_fsave): Remove unnecessary casts.
17380 (i387_fsave_to_cache): Doc fix.
17381 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17382
17383 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17384
17385 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17386 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17387
17388 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17389
17390 * configure.srv (arm*-*-mingw32ce*): Move near the other
17391 arm targets.
17392
17393 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17394
17395 * configure.ac: Add errno checking.
17396 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17397 sys/file.h and malloc.h.
17398 (AC_CHECK_DECLS): Add perror.
17399 (srv_mingwce): Handle.
17400 * configure.srv (i[34567]86-*-cygwin*): Add
17401 win32-i386-low.o to srv_tgtobj.
17402 (i[34567]86-*-mingw*): Likewise.
17403 (arm*-*-mingw32ce*): Add case.
17404 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17405 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17406 [__MINGW32CE__] (strerror): New function.
17407 [__MINGW32CE__] (errno): Define to GetLastError.
17408 [__MINGW32CE__] (COUNTOF): New macro.
17409 (remote_open): Remove extra close call.
17410 * mem-break.c (delete_breakpoint_at): New function.
17411 * mem-break.h (delete_breakpoint_at): Declare.
17412 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17413 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17414 [USE_WIN32API] (read, write): Add char* casts.
17415 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17416 * server.h: Include wincecompat.h on Windows CE.
17417 [HAVE_ERRNO_H]: Check.
17418 (perror): Declare if not declared.
17419 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17420 (perror_with_name): Remove errno declaration.
17421 * wincecompat.h: New.
17422 * wincecompat.c: New.
17423 * win32-low.h: New.
17424 * win32-arm-low.c: New.
17425 * win32-i386-low.c: New.
17426 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17427 (OUTMSG2): Make it safe.
17428 (_T): New macro.
17429 (COUNTOF): New macro.
17430 (NUM_REGS): Get it from the low target.
17431 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17432 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17433 (thread_rec): Let low target handle debug registers.
17434 (child_add_thread): Likewise.
17435 (child_init_thread_list): Likewise.
17436 (continue_one_thread): Likewise.
17437 (regptr): New.
17438 (do_child_fetch_inferior_registers): Move to ...
17439 * win32-i386-low.c: ... here, and rename to ...
17440 (do_fetch_inferior_registers): ... this.
17441 * win32-low.c (child_fetch_inferior_registers):
17442 Go through the low target.
17443 (do_child_store_inferior_registers): Use regptr.
17444 (strwinerror): New function.
17445 (win32_create_inferior): Handle Windows CE.
17446 Use strwinerror instead of strerror on Windows error
17447 codes. Add program to the error output.
17448 Don't close the main thread handle on Windows CE.
17449 (win32_attach): Use coredll.dll on Windows CE.
17450 (win32_kill): Close current process and current
17451 thread handles.
17452 (win32_detach): Use coredll.dll on Windows CE.
17453 (win32_resume): Let low target handle debug registers, and
17454 step request.
17455 (handle_exception): Add/Remove initial breakpoint. Avoid
17456 non-existant WSTOPSIG on Windows CE.
17457 (win32_read_inferior_memory): Cast to remove warning.
17458 (win32_arch_string): Go through the low target.
17459 (initialize_low): Call set_breakpoint_data with the low
17460 target's breakpoint.
17461 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17462 FOP_REGNUM, mappings): Move to ...
17463 * win32-i386-low.c: ... here.
17464 * win32-low.c (win32_thread_info): Move to ...
17465 * win32-low.h: ... here.
17466 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17467 win32-arm-low.c and wincecompat.c.
17468 (all:): Add $EXEEXT.
17469 (install-only:): Likewise.
17470 (gdbserver:): Likewise.
17471 (gdbreplay:): Likewise.
17472 * config.in: Regenerate.
17473 * configure: Regenerate.
17474
17475 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17476
17477 * win32-low.c: Rename typedef thread_info to
17478 win32_thread_info throughout.
17479
17480 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17481
17482 * win32-i386-low.c: Rename to ...
17483 * win32-low.c: ... this.
17484 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17485 * Makefile.in: Likewise.
17486
17487 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17488
17489 * remote-utils.c (monitor_output): Constify msg parameter.
17490 * server.h (monitor_output): Likewise.
17491 * win32-i386-low.c (handle_output_debug_string): New.
17492 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17493 handle_output_debug_string.
17494 (get_child_debug_event): Likewise.
17495
17496 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17497
17498 * server.c (main): Correct strtoul check.
17499
17500 2007-03-27 Jon Ringle <jon@ringle.org>
17501
17502 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17503
17504 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17505
17506 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17507
17508 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17509
17510 * terminal.h: Check HAVE_SGTTY_H.
17511
17512 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17513
17514 * remote-utils.c (remote_open): Print out the assigned port number.
17515
17516 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17517
17518 * remote-utils.c (monitor_output): New function.
17519 * server.c (debug_threads): Define here.
17520 (monitor_show_help): New function.
17521 (handle_query): Handle qRcmd.
17522 (main): Do not handle 'd' packet.
17523 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17524 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17525 of debug_threads.
17526
17527 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17528
17529 * Makefile.in (EXEEXT): New.
17530 (clean): Use $(EXEEXT).
17531
17532 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17533
17534 * target.h (target_ops): Rename send_signal to request_interrupt,
17535 and remove enum target_signal parameter.
17536 * linux-low.c (linux_request_interrupt): Rename from
17537 linux_send_signal, and always send SIGINT.
17538 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17539 and always send SIGINT.
17540 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17541 of send_signal.
17542 (input_interrupt): Likewise.
17543
17544 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17545
17546 * server.c (get_features_xml): Check if target implemented
17547 arch_string.
17548 * win32-i386-low.c (win32_arch_string): New.
17549 (win32_target_ops): Add win32_arch_string as arch_string member.
17550
17551 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17552
17553 * spu-low.c (spu_arch_string): New.
17554 (spu_target_ops): Add spu_arch_string.
17555
17556 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17557
17558 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17559 * configure.ac: Do not check for terminal.h.
17560 * configure, config.in: Regenerated.
17561
17562 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17563
17564 * Makefile.in (OBS): Add $(XML_BUILTIN).
17565 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17566 (clean): Update.
17567 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17568 (arm-with-iwmmxt.c): New.
17569 * config.in, configure: Regenerate.
17570 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17571 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17572 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17573 (arm*-*-linux*): Add iWMMXt and regset support.
17574 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17575 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17576 (arm_store_wmmxregset, target_regsets): New.
17577 * server.c (get_features_xml): Take annex argument. Check builtin
17578 XML documents.
17579 (handle_query): Handle multiple annexes.
17580
17581 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17582
17583 * remote-utils.c [USE_WIN32API] (read, write): Define.
17584 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17585 write.
17586
17587 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17588
17589 * linux-i386-low.c (the_low_target): Set arch_string.
17590 * linux-x86-64-low.c (the_low_target): Likewise.
17591 * linux-low.c (linux_arch_string): New.
17592 (linux_target_ops): Add it.
17593 * linux-low.h (struct linux_target_ops): Add arch_string.
17594 * server.c (write_qxfer_response): Use const void * for DATA.
17595 (get_features_xml): New.
17596 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17597 * target.h (struct target_ops): Add arch_string method.
17598
17599 2007-01-03 Denis Pilat <denis.pilat@st.com>
17600 Daniel Jacobowitz <dan@codesourcery.com>
17601
17602 * linux-low.c (linux_kill): Handle being called with no threads.
17603 * win32-i386-low.c (win32_kill): Likewise.
17604 (get_child_debug_event): Clear current_process_handle.
17605
17606 2006-12-30 Denis PILAT <denis.pilat@st.com>
17607 Daniel Jacobowitz <dan@codesourcery.com>
17608
17609 * remote-utils.c (remote_open): Check the type of specified
17610 serial port devices before opening them.
17611 * server.c (main): Kill the inferior if an error occurs during
17612 the first remote_open.
17613
17614 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17615
17616 * README: Update supported targets.
17617
17618 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17619
17620 * Makefile.in (clean): Remove reg-mips64.c.
17621 (reg-mips64.c, reg-mips64.o): New rules.
17622 * configure.srv: Handle mips64. Include regset support for mips.
17623 * linux-mips-low.c (union mips_register): New.
17624 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17625 (mips_breakpoint, mips_breakpoint_at): Use int.
17626 (mips_collect_register, mips_supply_register)
17627 (mips_collect_register_32bit, mips_supply_register_32bit)
17628 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17629 (mips_store_fpregset, target_regsets): New.
17630 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17631
17632 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17633
17634 * configure.srv: Add target "spu*-*-*".
17635 * Makefile.in (clean): Remove reg-spu.c.
17636 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17637 * spu-low.c: New file.
17638
17639 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17640
17641 * configure.ac: Correct td_thr_tls_get_addr test.
17642 * configure: Regenerated.
17643
17644 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17645
17646 * linux-low.c (linux_wait_for_event): Reformat. Use the
17647 pass_signals array.
17648 * remote-utils.c (decode_address_to_semicolon): New.
17649 * server.c (pass_signals, handle_general_set): New.
17650 (handle_query): Mention QPassSignals for qSupported.
17651 (main): Call handle_general_set.
17652 * server.h (pass_signals, decode_address_to_semicolon): New.
17653
17654 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17655
17656 * server.c (handle_query): Correct error handling for read_auxv.
17657
17658 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17659
17660 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17661 and srv_linux_thread_db to yes.
17662 * linux-s390-low.c (s390_fill_gregset): New function.
17663 (target_regsets): Define data structure.
17664
17665 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17666
17667 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17668 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17669 * config.in, configure: Regenerated.
17670 * inferiors.c (gdb_id_to_thread): New function.
17671 (gdb_id_to_thread_id): Use it.
17672 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17673 * linux-low.h (struct process_info): Add th member.
17674 (thread_db_get_tls_address): New prototype.
17675 * remote-utils.c (decode_address): Make non-static.
17676 * server.c (handle_query): Handle qGetTLSAddr.
17677 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17678 * target.h (struct target_ops): Add get_tls_address.
17679 * thread-db.c (maybe_attach_thread): Save the thread handle.
17680 (thread_db_get_tls_address): New.
17681
17682 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17683
17684 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17685 (linux_resume_one_process): Take a siginfo_t *. Update all
17686 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17687 (struct pending_signals): Add a siginfo_t.
17688 (linux_wait_for_process): Always set last_status.
17689 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17690 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17691 * linux-low.h (struct process_info): Add last_status.
17692
17693 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17694
17695 * remote-utils.c (try_rle): New function.
17696 (putpkt_binary): Use it.
17697
17698 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17699
17700 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17701 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17702 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17703 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17704 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17705 point registers.
17706
17707 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17708
17709 * server.c (terminal_fd): New variable.
17710 (old_foreground_pgrp): Likewise.
17711 (restore_old_foreground_pgrp): New function.
17712 (start_inferior): Record the terminal file descriptor in terminal_fd
17713 and its original foreground group in old_foreground_pgrp. Register
17714 restore_old_foreground_pgrp with atexit().
17715
17716 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17717
17718 * server.c (handle_query): Correct qPart to qXfer.
17719
17720 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17721
17722 * configure.ac: Check for more headers which are missing on
17723 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17724 * configure.srv: Add Cygwin and mingw32.
17725 * remote-utils.c: Don't include headers unconditionally which
17726 are missing on mingw32. Include <winsock.h> for mingw32.
17727 (remote_open): Adjust for mingw32 support. Flush
17728 standard error after writing to it.
17729 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17730 (unblock_async_io, enable_async_io, disable_async_io)
17731 (readchar, getpkt): Update for Winsock support.
17732 (prepare_resume_reply): Expect a protocol signal number.
17733 * server.c: Disable <sys/wait.h> on mingw32.
17734 (start_inferior): Adjust for mingw32 support. Flush
17735 standard error after writing to it.
17736 (attach_inferior): Likewise. Use protocol signal
17737 numbers.
17738 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17739 and names.
17740 * win32-i386-low.c: New file.
17741 * Makefile.in (XM_CLIBS): Set.
17742 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17743 (win32-i386-low.o): New dependency rule.
17744 * linux-low.c (linux_wait): Use target signal numbers.
17745 * target.h (struct target_ops): Doc fix.
17746 * server.h (target_signal_to_name): New prototype.
17747 * gdbreplay.c: Don't include headers unconditionally which
17748 are missing on mingw32. Include <winsock.h> for mingw32.
17749 (remote_close, remote_open): Adjust for Winsock support.
17750 * configure, config.in: Regenerated.
17751
17752 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17753
17754 * server.c (decode_xfer_read, write_qxfer_response): New.
17755 (handle_query): Take a packet length argument. Handle
17756 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17757 the qSupported response.
17758 (main): Update call to handle_query.
17759
17760 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17761
17762 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17763 (putpkt_binary): Renamed from putpkt and adjusted for binary
17764 data.
17765 (putpkt): New wrapper for putpkt_binary.
17766 (readchar): Don't mask off the high bit.
17767 (decode_X_packet): New function.
17768 * server.c (main): Call putpkt_binary if a handler sets the packet
17769 length. Save the length of the incoming packet. Handle 'X'.
17770 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17771
17772 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17773
17774 * server.c (handle_query): Handle qSupported.
17775
17776 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17777
17778 * remote-utils.c (all_symbols_looked_up): New variable.
17779 (look_up_one_symbol): Check it.
17780 * server.h (look_up_one_symbol): New declaration.
17781 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17782
17783 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17784
17785 * Makefile.in (linux-arm-low.o): Update dependencies.
17786 * linux-arm-low.c: Include "gdb_proc_service.h".
17787 (PTRACE_GET_THREAD_AREA): Define.
17788 (ps_get_thread_area): New function.
17789
17790 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17791
17792 * configure.srv (m68k*-*-uclinux*): New target.
17793 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17794 (linux_resume_one_process): Remove extraneous cast.
17795 (linux_read_offsets): New.
17796 (linux_target_op): Add linux_read_offsets on mmuless systems.
17797 * server.c (handle_query): Add qOffsets logic.
17798 * target.h (struct target_ops): Add read_offsets.
17799
17800 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17801
17802 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17803 (PTRACE_GET_THREAD_AREA): Define.
17804 (ps_get_thread_area): New function.
17805 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17806 (linux-x86-64-low.o): Update.
17807
17808 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17809
17810 * configure.ac: Remove checks for prfpregset_t.
17811 * gdb_proc_service.h: New file.
17812 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17813 new "gdb_proc_service.h".
17814 * proc-service.c: Likewise.
17815 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17816 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17817 * Makefile.in (gdb_proc_service_h): Updated.
17818 * configure, config.in: Regenerated.
17819
17820 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * remote-utils.c (prepare_resume_reply): Move declaration
17823 of gdb_id_from_wait to the top of the block.
17824
17825 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17826
17827 * linux-low.c (regsets_store_inferior_registers): Read the regset
17828 from the target before filling it.
17829
17830 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17831
17832 * server.c (attach_inferior): Return SIGTRAP for a successful
17833 attach.
17834
17835 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17836
17837 * Makefile.in (OBS): Add version.o.
17838 (STAGESTUFF): Delete.
17839 (version.o): Add dependencies.
17840 (version.c): Replace rule.
17841 (clean): Remove version.c.
17842 * server.c (gdbserver_version): New.
17843 (gdbserver_usage): Use printf.
17844 (main): Handle --version and --help.
17845 * server.h (version, host_name): Add declarations.
17846
17847 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17848
17849 * linux-arm-low.c:
17850 * linux-arm-low.c:
17851 * inferiors.c:
17852 * i387-fp.h:
17853 * i387-fp.c:
17854 * gdbreplay.c:
17855 * regcache.c:
17856 * proc-service.c:
17857 * mem-break.h:
17858 * mem-break.c:
17859 * linux-x86-64-low.c:
17860 * linux-sh-low.c:
17861 * linux-s390-low.c:
17862 * linux-ppc64-low.c:
17863 * linux-ppc-low.c:
17864 * linux-mips-low.c:
17865 * linux-m68k-low.c:
17866 * linux-m32r-low.c:
17867 * linux-low.h:
17868 * linux-low.c:
17869 * linux-ia64-low.c:
17870 * linux-i386-low.c:
17871 * linux-crisv32-low.c:
17872 * thread-db.c:
17873 * terminal.h:
17874 * target.h:
17875 * target.c:
17876 * server.h:
17877 * server.c:
17878 * remote-utils.c:
17879 * regcache.h:
17880 * utils.c:
17881 * Makefile.in:
17882 * configure.ac:
17883 * gdbserver.1: Add (C) after Copyright. Update the FSF
17884 address.
17885
17886 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17887
17888 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17889 (arm_breakpoint_at): Recognize both breakpoints.
17890 (the_low_target): Use the correct breakpoint instruction.
17891
17892 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17893
17894 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17895 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17896 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17897 (the_low_target): Update.
17898
17899 2005-10-25 Andreas Schwab <schwab@suse.de>
17900
17901 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17902
17903 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17904 (ia64_num_regs): Reduce to 462.
17905
17906 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17907
17908 * acinclude.m4: Correct quoting.
17909 * aclocal.m4: Regenerated.
17910
17911 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17912 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17913 (thread_db_init): Call thread_db_err_str.
17914 * configure.ac: Check for TD_VERSION.
17915 * config.in, configure: Regenerated.
17916
17917 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17918
17919 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17920
17921 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17922
17923 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17924 is not available. Define HAVE_PTRACE_GETREGS if it is.
17925 * config.in, configure: Regenerated.
17926 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17927 * linux-i386-low.c, linux-m68k-low.c: Update to use
17928 HAVE_PTRACE_GETREGS.
17929 * linux-low.c (regsets_fetch_inferior_registers)
17930 (regsets_store_inferior_registers): Only return 0 if we processed
17931 GENERAL_REGS.
17932 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17933 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17934
17935 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17936
17937 * inferiors.c (struct thread_info): Add gdb_id.
17938 (add_thread): Add gdb_id argument.
17939 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17940 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17941 calls to add_thread.
17942 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17943 * server.c (handle_query): Use thread_to_gdb_id.
17944 (handle_v_cont, main): Use gdb_id_to_thread_id.
17945 * server.h (add_thread): Update prototype.
17946 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17947 prototypes.
17948
17949 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17950
17951 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17952 left-padded registers.
17953 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17954 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17955
17956 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17957
17958 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17959 * configure: Regenerate.
17960 * config.in: Regenerate.
17961 * server.h (NEED_DECLARATION_STRERROR):
17962 Replace with !HAVE_DECL_STRERROR.
17963
17964 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17965
17966 * linux-low.c (linux_wait, linux_send_signal): Don't test
17967 an unsigned long variable for > 0 if it could be MAX_ULONG.
17968 * server.c (myresume): Likewise.
17969 * target.c (set_desired_inferior): Likewise.
17970
17971 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17972
17973 * configure.ac: Simplify and improve check for socklen_t.
17974 * configure, config.in: Regenerate.
17975
17976 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17977
17978 * acconfig.h: Remove.
17979 * configure.ac: Add a test for socklen_t. Use three-argument
17980 AC_DEFINE throughout.
17981 * config.in: Regenerated using autoheader 2.59.
17982 * configure: Regenerated.
17983
17984 * gdbreplay.c (socklen_t): Provide a default.
17985 (remote_open): Use socklen_t.
17986 * remote-utils.c (socklen_t): Provide a default.
17987 (remote_open): Use socklen_t.
17988 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17989 unsigned char.
17990
17991 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17992 char for buffers.
17993 * linux-low.c (linux_read_memory, linux_write_memory)
17994 (linux_read_auxv): Likewise.
17995 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17996 (check_mem_write): Likewise.
17997 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17998 Likewise.
17999 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18000 (registers_from_string, register_data): Likewise.
18001 * server.c (handle_query, main): Likewise.
18002 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18003 (decode_M_packet): Likewise.
18004 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18005 * target.h (struct target_ops): Update read_memory, write_memory,
18006 and read_auxv.
18007 (read_inferior_memory, write_inferior_memory): Update.
18008 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18009 to unsigned char *.
18010 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18011 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18012 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18013 linux-s390-low.c, linux-sh-low.c: Update for changes in
18014 read_inferior_memory and the_low_target->breakpoint.
18015
18016 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18017
18018 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18019 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18020 * configure.srv: Add powerpc64-*-linux*.
18021 * linux-ppc64-low.c: New file.
18022
18023 2005-05-23 Orjan Friberg <orjanf@axis.com>
18024
18025 * linux-cris-low.c: New file with support for CRIS.
18026 * linux-crisv32-low.c: Ditto for CRISv32.
18027 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18028 (clean): Add reg-cris.c and reg-crisv32.c.
18029 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18030 reg-crisv32.o, and reg-crisv32.c to make rules.
18031 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18032 recognized targets.
18033
18034 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18035
18036 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18037 of sizeof (PTRACE_XFER_TYPE).
18038 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18039
18040 2005-05-12 Orjan Friberg <orjanf@axis.com>
18041
18042 * target.h (struct target_ops): Add insert_watchpoint,
18043 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18044 pointers for hardware watchpoint support.
18045 * linux-low.h (struct linux_target_ops): Ditto.
18046 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18047 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18048 to linux_target_ops.
18049 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18050 reply packet.
18051 * server.c (main): Recognize 'Z' and 'z' packets.
18052
18053 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18054
18055 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18056 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18057 (the_low_target): Add new members.
18058
18059 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18060
18061 * proc-service.c (ps_lgetregs): Search all_processes instead of
18062 all_threads.
18063
18064 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18065
18066 * server.c (start_inferior): Change return type to int.
18067 (attach_inferior): Change sigptr to int *.
18068 (handle_v_cont, handle_v_requests): Change signal to int *.
18069 (main): Change signal to int.
18070
18071 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18072
18073 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18074 * configure.srv: Add m32r*-*-linux*.
18075 * linux-m32r-low.c: New file.
18076
18077 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18078
18079 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18080
18081 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18082
18083 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18084 Take unsigned long arguments for PIDs.
18085 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18086 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18087 (wait_for_sigstop, linux_resume_one_process)
18088 (regsets_fetch_inferior_registers, linux_send_signal)
18089 (linux_read_auxv): Likewise. Update the types of variables holding
18090 PIDs. Update format string specifiers.
18091 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18092 * remote-utils.c (prepare_resume_reply): Likewise.
18093 * server.c (cont_thread, general_thread, step_thread)
18094 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18095 unsigned long.
18096 (handle_query): Update format specifiers.
18097 (handle_v_cont, main): Use strtoul for thread IDs.
18098 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18099 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18100 (general_thread, step_thread, thread_from_wait)
18101 (old_thread_from_wait): Update.
18102 * target.h (struct thread_resume): Use unsigned long for THREAD.
18103 (struct target_ops): Use unsigned long for arguments to attach and
18104 thread_alive.
18105
18106 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18107
18108 * acinclude.m4: Include bfd/bfd.m4 directly.
18109 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18110 <agriffis@toolchain.org>.
18111 * aclocal.m4, configure: Regenerated.
18112
18113 2005-01-07 Andrew Cagney <cagney@gnu.org>
18114
18115 * configure.ac: Rename configure.in, require autoconf 2.59.
18116 * configure: Re-generate.
18117
18118 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18119
18120 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18121 LIBS when finished.
18122 * aclocal.m4: Regenerated.
18123 * configure: Regenerated.
18124
18125 2004-11-21 Andreas Schwab <schwab@suse.de>
18126
18127 * linux-m68k-low.c (m68k_num_gregs): Define.
18128 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18129 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18130 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18131 (m68k_breakpoint_at): New. Add to the_low_target.
18132
18133 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18134 srv_linux_thread_db to yes.
18135
18136 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18137
18138 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18139 (ARCH_SET_FS): Likewise.
18140 (ARCH_GET_FS): Likewise.
18141 (ARCH_GET_GS): Likewise.
18142
18143 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18144
18145 * linux-i386-low.c (ps_get_thread_area): New.
18146 * linux-x86-64-low.c (ps_get_thread_area): New.
18147 * linux-low.c: Include <sys/syscall.h>.
18148 (linux_kill_one_process): Don't kill the first thread here.
18149 (linux_kill): Kill the first thread here.
18150 (kill_lwp): New function.
18151 (send_sigstop, linux_send_signal): Use it.
18152 * proc-service.c: Clean up #ifdefs.
18153 (fpregset_info): Delete.
18154 (ps_lgetregs): Update and enable implementation.
18155 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18156 implementations.
18157 * remote-utils.c (struct sym_cache, symbol_cache): New.
18158 (input_interrupt): Print a clearer message.
18159 (async_io_enabled): New variable.
18160 (enable_async_io, disable_async_io): Use it. Update comments.
18161 (look_up_one_symbol): Use the symbol cache.
18162 * thread-db.c (thread_db_look_up_symbols): New function.
18163 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18164
18165 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18166
18167 * configure.in: Test for -rdynamic.
18168 * configure: Regenerated.
18169 * Makefile (INTERNAL_LDFLAGS): New.
18170 (gdbserver, gdbreplay): Use it.
18171
18172 2004-09-02 Andrew Cagney <cagney@gnu.org>
18173
18174 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18175
18176 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18177
18178 * linux-low.c (linux_wait): Clear all_processes list also.
18179
18180 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18181
18182 * linux-low.c: Include <errno.h>. Remove extern declaration of
18183 errno.
18184
18185 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18186
18187 * gdbreplay.c, server.h, utils.c: Update copyright years.
18188
18189 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18190
18191 * server.c (main): Print child status or termination signal from
18192 variable 'signal', not 'sig'.
18193
18194 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18195
18196 * linux-low.c (linux_read_memory): Change return type to
18197 int. Check for and return error from ptrace().
18198 * target.c (read_inferior_memory): Change return type to int. Pass
18199 back return status from the_target->read_memory().
18200 * target.h (struct target_ops): Adapt *read_memory() prototype.
18201 Update comment.
18202 (read_inferior_memory): Adapt prototype.
18203 * server.c (main): Return an error packet if
18204 read_inferior_memory() returns an error.
18205
18206 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18207
18208 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18209 Unify with other clean targets.
18210
18211 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18212
18213 * server.c (handle_v_cont): Call set_desired_inferior.
18214
18215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18216
18217 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18218
18219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18220
18221 * linux-low.c (linux_wait): Unblock async I/O.
18222 (linux_resume): Block and enable async I/O.
18223 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18224 * server.h (block_async_io, unblock_async_io): Add prototypes.
18225
18226 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18227
18228 * remote-utils.c (remote_open): Print a status notice after
18229 opening a TCP port.
18230 * server.c (attach_inferior): Print a status notice after
18231 attaching.
18232
18233 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18234
18235 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18236
18237 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18238
18239 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18240 error packet.
18241 * server.c, target.h: Update copyright years.
18242
18243 2004-02-25 Roland McGrath <roland@redhat.com>
18244
18245 * target.h (struct target_ops): New member `read_auxv'.
18246 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18247 * linux-low.c (linux_read_auxv): New function.
18248 (linux_target_ops): Initialize `read_auxv' member to that.
18249
18250 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18251
18252 Committed by Jim Blandy <jimb@redhat.com>.
18253
18254 * linux-s390-low.c (s390_num_regs): Update.
18255 (s390_regmap): Remove control registers. Use __s390x__ predefine
18256 instead of GPR_SIZE to distiguish s390 and s390x targets.
18257
18258 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18259
18260 * linux-low.c: Update copyright year.
18261 (check_removed_breakpoint): Clear pending_is_breakpoint.
18262 (linux_set_resume_request, linux_queue_one_thread)
18263 (resume_status_pending_p): New functions.
18264 (linux_continue_one_thread): Use process->resume.
18265 (linux_resume): Only resume threads if there are no pending events.
18266 * linux-low.h (struct process_info): Add resume request
18267 pointer.
18268
18269 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18270
18271 * regcache.c (new_register_cache): Clear the allocated register
18272 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18273
18274 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18275
18276 * linux-low.c (linux_resume): Take a struct thread_resume *
18277 argument.
18278 (linux_wait): Update call.
18279 (resume_ptr): New static variable.
18280 (linux_continue_one_thread): Renamed from
18281 linux_continue_one_process. Use resume_ptr.
18282 (linux_resume): Use linux_continue_one_thread.
18283 * server.c (handle_v_cont, handle_v_requests): New functions.
18284 (myresume): New function.
18285 (main): Handle 'v' case.
18286 * target.h (struct thread_resume): New type.
18287 (struct target_ops): Change argument of "resume" to struct
18288 thread_resume *.
18289 (myresume): Delete macro.
18290
18291 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18292
18293 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18294 (uninstall): Support DESTDIR.
18295
18296 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18297
18298 * configure.srv: Add xscale*linux copy of arm*linux entry.
18299
18300 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18301
18302 * linux-arm-low.c (arm_reinsert_addr): New function.
18303 (the_low_target): Add arm_reinsert_addr.
18304
18305 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18306
18307 * mem-break.c: Remove whitespace at end of file.
18308
18309 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18310
18311 * configure.in: Check whether we need to prototype strerror.
18312 * server.h: Optionally prototype strerror.
18313 * gdbreplay.c (perror_with_name): Use strerror.
18314 * linux-low.c (linux_attach_lwp): Use strerror.
18315 * utils.c (perror_with_name): Use strerror.
18316 * config.in, configure: Regenerated.
18317
18318 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18319
18320 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18321 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18322
18323 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18324
18325 * Makefile.in (SFILES): Update.
18326 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18327 low-sun3.c: Remove files.
18328
18329 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18330
18331 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18332 (linux_detach_one_process, linux_detach): New functions.
18333 (linux_target_ops): Add linux_detach.
18334 * server.c (main): Handle 'D' packet.
18335 * target.h (struct target_ops): Add "detach" member.
18336 (detach_inferior): Define.
18337
18338 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18339
18340 From Kelley Cook <kelleycook@wideopenwest.com>:
18341 * configure.srv: Accept i[34567]86 variants.
18342
18343 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18344
18345 * linux-low.c (linux_wait_for_event): Correct comment typos.
18346 (linux_resume_one_process): Call check_removed_breakpoint.
18347 (linux_send_signal): New function.
18348 (linux_target_ops): Add linux_send_signal.
18349 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18350 of kill.
18351 * target.h (struct target_ops): Add send_signal.
18352
18353 2003-05-29 Jim Blandy <jimb@redhat.com>
18354
18355 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18356 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18357 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18358 away part of the register's value.
18359
18360 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18361
18362 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18363 (linux_wait_for_event, linux_init_signals): Likewise.
18364
18365 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18366
18367 * configure.in: Check for stdlib.h.
18368 * configure: Regenerated.
18369 * config.in: Regenerated.
18370
18371 2003-01-04 Andreas Schwab <schwab@suse.de>
18372
18373 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18374
18375 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18376
18377 * Makefile.in: Remove obsolete code.
18378
18379 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18380
18381 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18382 defined(PT_FPR0_HI).
18383
18384 2002-11-17 Stuart Hughes <seh@zee2.com>
18385
18386 * linux-arm-low.c (arm_num_regs): Increase.
18387 (arm_regmap): Include status register.
18388
18389 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18390
18391 * linux-low.c (register_addr): Remove incorrect -1 check.
18392
18393 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18394
18395 * linux-low.c (linux_create_inferior): Call setpgid. Return
18396 the new PID.
18397 (unstopped_p, linux_signal_pid): Remove.
18398 (linux_target_ops): Remove linux_signal_pid.
18399 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18400 global instead of target method.
18401 * target.h (struct target_ops): Remove signal_pid. Update comment
18402 for create_inferior.
18403 * server.c (signal_pid): New variable.
18404 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18405 gdbserver. Set the child to be the foreground process group.
18406 (attach_inferior): Set signal_pid.
18407
18408 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18409
18410 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18411
18412 2002-08-20 Jim Blandy <jimb@redhat.com>
18413
18414 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18415 default for this.
18416
18417 2002-08-01 Andrew Cagney <cagney@redhat.com>
18418
18419 * Makefile.in: Make chill references obsolete.
18420
18421 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18422
18423 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18424 * configure: Regenerate.
18425 * config.in: Regenerate.
18426
18427 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18428
18429 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18430 (perror_with_name, remote_close, remote_open, expect, play): Static.
18431
18432 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18433
18434 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18435 byte offsets instead of an array of indexes.
18436 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18437
18438 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18439
18440 * regcache.c: Add comment.
18441
18442 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18443
18444 * thread-db.c: New file.
18445 * proc-service.c: New file.
18446 * acinclude.m4: New file.
18447 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18448 proc-service.o, and thread-db.o.
18449 (linux-low.o): Add USE_THREAD_DB.
18450 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18451 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18452 * aclocal.m4: Regenerated.
18453 * config.in: Regenerated.
18454 * configure: Regenerated.
18455 * configure.in: Check for proc_service.h, sys/procfs.h,
18456 thread_db.h, and linux/elf.h headrs.
18457 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18458 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18459 Check for -lthread_db and thread support.
18460 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18461 PowerPC, and SuperH.
18462 * i387-fp.c: Constify arguments.
18463 * i387-fp.h: Likewise.
18464 * inferiors.c: (struct thread_info): Renamed from
18465 `struct inferior_info'. Remove PID member. Use generic inferior
18466 list header. All uses updated.
18467 (inferiors, signal_pid): Removed.
18468 (all_threads): New variable.
18469 (get_thread): Define.
18470 (add_inferior_to_list): New function.
18471 (for_each_inferior): New function.
18472 (change_inferior_id): New function.
18473 (add_inferior): Removed.
18474 (remove_inferior): New function.
18475 (add_thread): New function.
18476 (free_one_thread): New function.
18477 (remove_thread): New function.
18478 (clear_inferiors): Use for_each_inferior and free_one_thread.
18479 (find_inferior): New function.
18480 (find_inferior_id): New function.
18481 (inferior_target_data): Update argument type.
18482 (set_inferior_target_data): Likewise.
18483 (inferior_regcache_data): Likewise.
18484 (set_inferior_regcache_data): Likewise.
18485 * linux-low.c (linux_bp_reinsert): Remove.
18486 (all_processes, stopping_threads, using_thrads)
18487 (struct pending_signals, debug_threads, pid_of): New.
18488 (inferior_pid): Replace with macro.
18489 (struct inferior_linux_data): Remove.
18490 (get_stop_pc, add_process): New functions.
18491 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18492 Use add_process and add_thread.
18493 (linux_attach_lwp): New function, based on old linux_attach. Use
18494 add_process and add_thread. Set stop_expected for new threads.
18495 (linux_attach): New function.
18496 (linux_kill_one_process): New function.
18497 (linux_kill): Kill all LWPs.
18498 (linux_thread_alive): Use find_inferior_id.
18499 (check_removed_breakpoints, status_pending_p): New functions.
18500 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18501 Update. Use WNOHANG. Wait for cloned processes also. Update process
18502 struct for the found process.
18503 (linux_wait_for_event): New function.
18504 (linux_wait): Use it. Support LWPs.
18505 (send_sigstop, wait_for_sigstop, stop_all_processes)
18506 (linux_resume_one_process, linux_continue_one_process): New functions.
18507 (linux_resume): Support LWPs.
18508 (REGISTER_RAW_SIZE): Remove.
18509 (fetch_register): Use register_size instead. Call supply_register.
18510 (usr_store_inferior_registers): Likewise. Call collect_register.
18511 Fix recursive case.
18512 (regsets_fetch_inferior_registers): Improve error message.
18513 (regsets_store_inferior_registers): Add debugging.
18514 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18515 (unstopped_p, linux_signal_pid): New functions.
18516 (linux_target_ops): Add linux_signal_pid.
18517 (linux_init_signals): New function.
18518 (initialize_low): Call it. Initialize using_threads.
18519 * regcache.c (inferior_regcache_data): Add valid
18520 flag.
18521 (get_regcache): Fetch registers lazily. Add fetch argument
18522 and update all callers.
18523 (regcache_invalidate_one, regcache_invalidate): New
18524 functions.
18525 (new_register_cache): Renamed from create_register_cache.
18526 Return the new regcache.
18527 (free_register_cache): Change argument to a void *.
18528 (registers_to_string, registers_from_string): Call get_regcache
18529 with fetch flag set.
18530 (register_data): Make static. Pass fetch flag to get_regcache.
18531 (supply_register): Call get_regcache with fetch flag clear.
18532 (collect_register): Call get_regcache with fetch flag set.
18533 (collect_register_as_string): New function.
18534 * regcache.h: Update.
18535 * remote-utils.c (putpkt): Flush after debug output and use
18536 stderr.
18537 Handle input interrupts while waiting for an ACK.
18538 (input_interrupt): Use signal_pid method.
18539 (getpkt): Flush after debug output and use stderr.
18540 (outreg): Use collect_register_as_string.
18541 (new_thread_notify, dead_thread_notify): New functions.
18542 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18543 and general_thread.
18544 (look_up_one_symbol): Flush after debug output.
18545 * server.c (step_thread, server_waiting): New variables.
18546 (start_inferior): Don't use signal_pid. Update call to mywait.
18547 (attach_inferior): Update call to mywait.
18548 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18549 (main): Don't fetch/store registers explicitly. Use
18550 set_desired_inferior. Support proposed ``Hs'' packet. Update
18551 calls to mywait.
18552 * server.h: Update.
18553 (struct inferior_list, struct_inferior_list_entry): New.
18554 * target.c (set_desired_inferior): New.
18555 (write_inferior_memory): Constify.
18556 (mywait): New function.
18557 * target.h: Update.
18558 (struct target_ops): New signal_pid method.
18559 (mywait): Removed macro, added prototype.
18560
18561 * linux-low.h (regset_func): Removed.
18562 (regset_fill_func, regset_store_func): New.
18563 (enum regset_type): New.
18564 (struct regset_info): Add type field. Use new operation types.
18565 (struct linux_target_ops): stop_pc renamed to get_pc.
18566 Add decr_pc_after_break and breakpoint_at.
18567 (get_process, get_thread_proess, get_process_thread)
18568 (strut process_info, all_processes, linux_attach_lwp)
18569 (thread_db_init): New.
18570
18571 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18572 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18573 (the_low_target): Add new members.
18574 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18575 (i386_store_fpxregset): Constify.
18576 (target_regsets): Add new kind identifier.
18577 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18578 (i386_set_pc): Add debugging.
18579 (i386_breakpoint_at): New function.
18580 (the_low_target): Add new members.
18581 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18582 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18583 (mips_breakpoint_at): New.
18584 (the_low_target): Add new members.
18585 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18586 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18587 (the_low_target): Add new members.
18588 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18589 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18590 (the_low_target): Add new members.
18591 * linux-x86-64-low.c (target_regsets): Add new kind
18592 identifier.
18593
18594 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18595
18596 From Martin Pool <mbp@samba.org>:
18597 * server.c (gdbserver_usage): New function.
18598 (main): Call it.
18599
18600 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18601
18602 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18603 stop_at -> stop_pc.
18604
18605 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18606
18607 * Makefile.in: Remove obsolete code.
18608
18609 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18610
18611 * linux-low.c (regsets_fetch_inferior_registers),
18612 (regsets_store_inferior_registers): Removed cast to int from
18613 ptrace() calls.
18614 * regcache.h: Added declaration of struct inferior_info.
18615
18616 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18617
18618 * inferiors.c (struct inferior_info): Add regcache_data.
18619 (add_inferior): Call create_register_cache.
18620 (clear_inferiors): Call free_register_cache.
18621 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18622 * regcache.c (struct inferior_regcache_data): New.
18623 (registers): Remove.
18624 (get_regcache): New function.
18625 (create_register_cache, free_register_cache): New functions.
18626 (set_register_cache): Don't initialize the register cache here.
18627 (registers_to_string, registers_from_string, register_data): Call
18628 get_regcache.
18629 * regcache.h: Add prototypes.
18630 * server.h: Likewise.
18631
18632 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18633
18634 * mem-break.c: New file.
18635 * mem-break.h: New file.
18636 * Makefile.in: Add mem-break.o rule; update server.h
18637 dependencies.
18638 * inferiors.c (struct inferior_info): Add target_data
18639 member.
18640 (clear_inferiors): Free target_data member if set.
18641 (inferior_target_data, set_inferior_target_data): New functions.
18642 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18643 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18644 * linux-low.c (linux_bp_reinsert): New variable.
18645 (struct inferior_linux_data): New.
18646 (linux_create_inferior): Use set_inferior_target_data.
18647 (linux_attach): Likewise. Call add_inferior.
18648 (linux_wait_for_one_inferior): New function.
18649 (linux_wait): Call it.
18650 (linux_write_memory): Add const.
18651 (initialize_low): Call set_breakpoint_data.
18652 * linux-low.h (struct linux_target_ops): Add breakpoint
18653 handling members.
18654 * server.c (attach_inferior): Remove extra add_inferior
18655 call.
18656 * server.h: Include mem-break.h. Update inferior.c
18657 prototypes.
18658 * target.c (read_inferior_memory)
18659 (write_inferior_memory): New functions.
18660 * target.h (read_inferior_memory)
18661 (write_inferior_memory): Change macros to prototypes.
18662 (struct target_ops): Update comments. Add const to write_memory
18663 definition.
18664
18665 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18666
18667 * linux-low.c (usr_store_inferior_registers): Support
18668 registers which are allowed to fail to store.
18669 * linux-low.h (linux_target_ops): Likewise.
18670 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18671 (ppc_cannot_store_register): FPSCR may not be storable.
18672
18673 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18674
18675 * server.h: Include <string.h> if HAVE_STRING_H.
18676 * ChangeLog: Correct paths in last ChangeLog entry.
18677
18678 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18679
18680 * linux-low.h: Remove obsolete prototypes.
18681 (struct linux_target_ops): New.
18682 (extern the_low_target): New.
18683 * linux-low.c (num_regs, regmap): Remove declarations.
18684 (register_addr): Use the_low_target explicitly.
18685 (fetch_register): Likewise.
18686 (usr_fetch_inferior_registers): Likewise.
18687 (usr_store_inferior_registers): Likewise.
18688 * linux-arm-low.c (num_regs): Remove.
18689 (arm_num_regs): Define.
18690 (arm_regmap): Renamed from regmap, made static.
18691 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18692 made static.
18693 (arm_cannot_store_register): Renamed from cannot_store_register,
18694 made static.
18695 (the_low_target): New.
18696 * linux-i386-low.c (num_regs): Remove.
18697 (i386_num_regs): Define.
18698 (i386_regmap): Renamed from regmap, made static.
18699 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18700 made static.
18701 (i386_cannot_store_register): Renamed from cannot_store_register,
18702 made static.
18703 (the_low_target): New.
18704 * linux-ia64-low.c (num_regs): Remove.
18705 (ia64_num_regs): Define.
18706 (ia64_regmap): Renamed from regmap, made static.
18707 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18708 made static.
18709 (ia64_cannot_store_register): Renamed from cannot_store_register,
18710 made static.
18711 (the_low_target): New.
18712 * linux-m68k-low.c (num_regs): Remove.
18713 (m68k_num_regs): Define.
18714 (m68k_regmap): Renamed from regmap, made static.
18715 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18716 made static.
18717 (m68k_cannot_store_register): Renamed from cannot_store_register,
18718 made static.
18719 (the_low_target): New.
18720 * linux-mips-low.c (num_regs): Remove.
18721 (mips_num_regs): Define.
18722 (mips_regmap): Renamed from regmap, made static.
18723 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18724 made static.
18725 (mips_cannot_store_register): Renamed from cannot_store_register,
18726 made static.
18727 (the_low_target): New.
18728 * linux-ppc-low.c (num_regs): Remove.
18729 (ppc_num_regs): Define.
18730 (ppc_regmap): Renamed from regmap, made static.
18731 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18732 made static.
18733 (ppc_cannot_store_register): Renamed from cannot_store_register,
18734 made static.
18735 (the_low_target): New.
18736 * linux-s390-low.c (num_regs): Remove.
18737 (s390_num_regs): Define.
18738 (s390_regmap): Renamed from regmap, made static.
18739 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18740 made static.
18741 (s390_cannot_store_register): Renamed from cannot_store_register,
18742 made static.
18743 (the_low_target): New.
18744 * linux-sh-low.c (num_regs): Remove.
18745 (sh_num_regs): Define.
18746 (sh_regmap): Renamed from regmap, made static.
18747 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18748 made static.
18749 (sh_cannot_store_register): Renamed from cannot_store_register,
18750 made static.
18751 (the_low_target): New.
18752 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18753 (the_low_target): New.
18754
18755 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18756
18757 * Makefile.in: Add stamp-h target.
18758 * configure.in: Create stamp-h.
18759 * configure: Regenerated.
18760
18761 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18762
18763 * inferiors.c: New file.
18764 * target.c: New file.
18765 * target.h: New file.
18766 * Makefile.in: Add target.o and inferiors.o. Update
18767 dependencies.
18768 * linux-low.c (inferior_pid): New static variable,
18769 moved from server.c.
18770 (linux_create_inferior): Renamed from create_inferior.
18771 Call add_inferior. Return 0 on success instead of a PID.
18772 (linux_attach): Renamed from myattach.
18773 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18774 (linux_thread_alive): Renamed from mythread_alive.
18775 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18776 child dies.
18777 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18778 (regsets_store_inferior_registers): Correct error message.
18779 Add missing ``return 0''.
18780 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18781 (linux_store_registers): Renamed from store_inferior_registers.
18782 (linux_read_memory): Renamed from read_inferior_memory.
18783 (linux_write_memory): Renamed from write_inferior_memory.
18784 (linux_target_ops): New structure.
18785 (initialize_low): Call set_target_ops ().
18786 * remote-utils.c (unhexify): New function.
18787 (hexify): New function.
18788 (input_interrupt): Send signals to ``signal_pid''.
18789 * server.c (inferior_pid): Remove.
18790 (start_inferior): Update create_inferior call.
18791 (attach_inferior): Call add_inferior.
18792 (handle_query): New function.
18793 (main): Call handle_query for `q' packets.
18794 * server.h: Include "target.h". Remove obsolete prototypes.
18795 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18796
18797 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18798
18799 * Makefile.in: Add WARN_CFLAGS. Update configury
18800 dependencies.
18801 * configure.in: Check for <string.h>
18802 * configure: Regenerate.
18803 * config.in: Regenerate.
18804 * gdbreplay.c: Include needed system headers.
18805 (remote_open): Remove strchr prototype.
18806 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18807 * regcache.c (supply_register): Change buf argument to const void *.
18808 (supply_register_by_name): Likewise.
18809 (collect_register): Change buf argument to void *.
18810 (collect_register_by_name): Likewise.
18811 * regcache.h: Add missing prototypes.
18812 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18813 * server.c (handle_query): New function.
18814 (attached): New static variable, moved out of main.
18815 (main): Quiet longjmp clobber warnings.
18816 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18817 * utils.c (error): Remove NORETURN.
18818 (fatal): Likewise.
This page took 0.472351 seconds and 4 git commands to generate.