]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdbserver/ChangeLog
gdbserver: turn target op '{supports_}stopped_by_sw_breakpoint' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
4 ops into methods of process_target.
5
6 * target.h (struct process_stratum_target): Remove the target ops.
7 (class process_target): Add the target ops.
8 (target_stopped_by_sw_breakpoint): Update the macro.
9 (target_supports_stopped_by_sw_breakpoint): Update the macro.
10 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
11 (process_target::supports_stopped_by_sw_breakpoint): Define.
12
13 Update the derived classes and callers below.
14
15 * linux-low.cc (linux_target_ops): Update.
16 (linux_stopped_by_sw_breakpoint): Turn into ...
17 (linux_process_target::stopped_by_sw_breakpoint): ... this.
18 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
19 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
20 * linux-low.h (class linux_process_target): Update.
21 * lynx-low.cc (lynx_target_ops): Update.
22 * nto-low.cc (nto_target_ops): Update.
23 * win32-low.cc (win32_target_ops): Update.
24
25 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
26
27 Turn process_stratum_target's insert_point and remove_point ops
28 into methods of process_target.
29
30 * target.h (struct process_stratum_target): Remove the target ops.
31 (class process_target): Add the target ops.
32 * target.cc (process_target::insert_point): Define.
33 (process_target::remove_point): Define.
34
35 Update the derived classes and callers below.
36
37 * mem-break.cc (set_raw_breakpoint_at): Update.
38 (delete_raw_breakpoint): Update.
39 (uninsert_raw_breakpoint): Update.
40 (reinsert_raw_breakpoint): Update.
41 * linux-low.cc (linux_target_ops): Update.
42 (linux_insert_point): Turn into ...
43 (linux_process_target::insert_point): ... this.
44 (linux_remove_point): Turn into ...
45 (linux_process_target::remove_point): ... this.
46 * linux-low.h (class linux_process_target): Update.
47 * lynx-low.cc (lynx_target_ops): Update.
48 * nto-low.cc (nto_target_ops): Update.
49 (nto_insert_point): Turn into ...
50 (nto_process_target::insert_point): ... this.
51 (nto_remove_point): Turn into ...
52 (nto_process_target::remove_point): ... this.
53 * nto-low.h (class nto_process_target): Update.
54 * win32-low.cc (win32_target_ops): Update.
55 (win32_insert_point): Turn into ...
56 (win32_process_target::insert_point): ... this.
57 (win32_remove_point): Turn into ...
58 (win32_process_target::remove_point): ... this.
59 * win32-low.h (class win32_process_target): Update.
60
61 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
62
63 Turn process_stratum_target's supports_z_point_type op into a
64 method of process_target.
65
66 * target.h (struct process_stratum_target): Remove the target op.
67 (class process_target): Add the target op.
68 * target.cc (process_target::supports_z_point_type): Define.
69
70 Update the derived classes and callers below.
71
72 * mem-break.cc (z_type_supported): Update.
73 * linux-low.cc (linux_target_ops): Update.
74 (linux_supports_z_point_type): Turn into ...
75 (linux_process_target::supports_z_point_type): ... this.
76 * linux-low.h (class linux_process_target): Update.
77 * lynx-low.cc (lynx_target_ops): Update.
78 * nto-low.cc (nto_target_ops): Update.
79 (nto_supports_z_point_type): Turn into ...
80 (nto_process_target::supports_z_point_type): ... this.
81 * nto-low.h (class nto_process_target): Update.
82 * win32-low.cc (win32_target_ops): Update.
83 (win32_supports_z_point_type): Turn into ...
84 (win32_process_target::supports_z_point_type): ... this.
85 * win32-low.h (class win32_process_target): Update.
86
87 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
88
89 Turn process_stratum_target's read_auxv op into a method of
90 process_target.
91
92 * target.h (class process_stratum_target): Remove the target op.
93 (struct process_target): Add the target op. Also add
94 'supports_read_auxv'.
95 * target.cc (process_target::read_auxv): Define.
96 (process_target::supports_read_auxv): Define.
97
98 Update the derived classes and callers below.
99
100 * server.cc (handle_qxfer_auxv): Update.
101 (handle_query): Update.
102 * linux-low.cc (linux_target_ops): Update.
103 (linux_process_target::supports_read_auxv): Define.
104 (linux_read_auxv): Turn into ...
105 (linux_process_target::read_auxv): ... this.
106 * linux-low.h (class linux_process_target): Update.
107 * lynx-low.cc (lynx_target_ops): Update.
108 * nto-low.cc (nto_target_ops): Update.
109 (nto_process_target::supports_read_auxv): Define.
110 (nto_read_auxv): Turn into ...
111 (nto_process_target::read_auxv): ... this.
112 * nto-low.h (class nto_process_target): Update.
113 * win32-low.cc (win32_target_ops): Update.
114
115 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
116
117 Turn process_stratum_target's request_interrupt op into a method of
118 process_target.
119
120 * target.h (struct process_stratum_target): Remove the target op.
121 (class process_target): Add the target op.
122
123 Update the derived classes and callers below.
124
125 * remote-utils.cc (putpkt_binary_1): Update.
126 (input_interrupt): Update.
127 (getpkt): Update.
128 * server.cc (handle_v_requests): Update.
129 * linux-low.cc (linux_target_ops): Update.
130 (linux_request_interrupt): Turn into ...
131 (linux_process_target::request_interrupt): ... this.
132 * linux-low.h (class linux_process_target): Update.
133 * lynx-low.cc (lynx_target_ops): Update.
134 (lynx_request_interrupt): Turn into ...
135 (lynx_process_target::request_interrupt): ... this.
136 * lynx-low.h (class lynx_process_target): Update.
137 * nto-low.cc (nto_target_ops): Update.
138 (nto_request_interrupt): Turn into ...
139 (nto_process_target::request_interrupt): ... this.
140 * nto-low.h (class nto_process_target): Update.
141 * win32-low.cc (win32_target_ops): Update.
142 (win32_request_interrupt): Turn into ...
143 (win32_process_target::request_interrupt): ... this.
144 * win32-low.h (class win32_process_target): Update.
145
146 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
147
148 Turn process_stratum_target's look_up_symbols op into a method of
149 process_target.
150
151 * target.h (struct process_stratum_target): Remove the target op.
152 (class process_target): Add the target op.
153 * target.cc (process_target::look_up_symbols): Define.
154
155 Update the derived classes and callers below.
156
157 * server.cc (handle_query): Update.
158 * linux-low.cc (linux_target_ops): Update.
159 (linux_look_up_symbols): Turn into ...
160 (linux_process_target::look_up_symbols): ... this.
161 * linux-low.h (class linux_process_target): Update.
162 * lynx-low.cc (lynx_target_ops): Update.
163 * nto-low.cc (nto_target_ops): Update.
164 * win32-low.cc (win32_target_ops): Update.
165
166 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
167
168 Turn process_stratum_target's read_memory and write_memory
169 ops into methods of process_target.
170
171 * target.h (struct process_stratum_target): Remove the target ops.
172 (class process_target): Add the target ops.
173
174 Update the derived classes and callers below.
175
176 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
177 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
178 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
179 (arm_get_syscall_trapinfo): Update.
180 * linux-cris-low.cc (cris_breakpoint_at): Update.
181 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
182 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
183 * linux-mips-low.cc (mips_breakpoint_at): Update.
184 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
185 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
186 * linux-sh-low.cc (sh_breakpoint_at): Update.
187 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
188 (sparc_store_gregset_from_stack): Update.
189 (sparc_breakpoint_at): Update.
190 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
191 * linux-tile-low.cc (tile_breakpoint_at): Update.
192 * linux-x86-low.cc (x86_breakpoint_at): Update.
193 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
194 * mem-brea.cc (insert_memory_breakpoint): Update.
195 (validate_inserted_breakpoint): Update.
196 * target.cc (read_inferior_memory): Update.
197 (target_write_memory): Update.
198 * linux-low.cc (linux_target_ops): Update.
199 (linux_read_memory): Make a wrapper around the read_memory target
200 op call.
201 (linux_process_target::read_memory): Rename from linux_read_memory.
202 (linux_write_memory): Turn into ...
203 (linux_process_target::write_memory): ... this.
204 * linux-low.h (class linux_process_target): Update.
205 * lynx-low.cc (lynx_target_ops): Update.
206 (lynx_read_memory): Turn into ...
207 (lynx_process_target::read_memory): ... this.
208 (lynx_write_memory): Turn into ...
209 (lynx_process_target::write_memory): ... this.
210 * lynx-low.h (class lynx_process_target): Update.
211 * nto-low.cc (nto_target_ops): Update.
212 (nto_read_memory): Turn into ...
213 (nto_process_target::read_memory): ... this.
214 (nto_write_memory): Turn into ...
215 (nto_process_target::write_memory): ... this.
216 * nto-low.h (class nto_process_target): Update.
217 * win32-low.cc (win32_target_ops): Update.
218 (win32_read_inferior_memory): Turn into ...
219 (win32_process_target::read_memory): ... this.
220 (win32_write_inferior_memory): Turn into ...
221 (win32_process_target::write_memory): ... this.
222 * win32-low.h (class win32_process_target): Update.
223
224 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
225
226 Turn process_stratum_target's prepare_to_access_memory and
227 done_accessing_memory ops into methods of process_target.
228
229 * target.h (struct process_stratum_target): Remove the target ops.
230 (class process_target): Add the target ops.
231 * target.cc (process_target::prepare_to_access_memory): Define.
232 (process_target::done_accessing_memory): Define.
233 (prepare_to_access_memory): Update.
234 (done_accessing_memory): Update.
235
236 Update the derived classes and callers below.
237
238 * linux-low.cc (linux_target_ops): Update.
239 (linux_prepare_to_access_memory): Turn into ...
240 (linux_process_target::prepare_to_access_memory): ... this.
241 (linux_done_accessing_memory): Turn into ...
242 (linux_process_target::done_accessing_memory): ... this.
243 * linux-low.h (class linux_process_target): Update.
244 * lynx-low.cc (lynx_target_ops): Update.
245 * nto-low.cc (nto_target_ops): Update.
246 * win32-low.cc (win32_target_ops): Update.
247
248 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
249
250 Turn process_stratum_target's fetch_registers and store_registers
251 ops into methods of process_target.
252
253 * target.h (struct process_stratum_target): Remove the target ops.
254 (class process_target): Add the target ops.
255 (fetch_inferior_registers): Update the macro.
256 (store_inferior_registers): Update the macro.
257
258 Update the derived classes and callers below.
259
260 * linux-low.cc (linux_target_ops): Update.
261 (linux_fetch_registers): Turn into ...
262 (linux_process_target::fetch_registers): ... this.
263 (linux_store_registers): Turn into ...
264 (linux_process_target::store_registers): ... this.
265 * linux-low.h (class linux_process_target): Update.
266 * lynx-low.cc (lynx_target_ops): Update.
267 (lynx_fetch_registers): Turn into ...
268 (lynx_process_target::fetch_registers): ... this.
269 (lynx_store_registers): Turn into ...
270 (lynx_process_target::store_registers): ... this.
271 * lynx-low.h (class lynx_process_target): Update.
272 * nto-low.cc (nto_target_ops): Update.
273 (nto_fetch_registers): Turn into ...
274 (nto_process_target::fetch_registers): ... this.
275 (nto_store_registers): Turn into ...
276 (nto_process_target::store_registers): ... this.
277 * nto-low.h (class nto_process_target): Update.
278 * win32-low.cc (win32_target_ops): Update.
279 (win32_fetch_inferior_registers): Turn into ...
280 (win32_process_target::fetch_registers): ... this.
281 (win32_store_inferior_registers): Turn into ...
282 (win32_process_target::store_registers): ... this.
283 * win32-low.h (class win32_process_target): Update.
284
285 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
286
287 Turn process_stratum_target's wait op into a method of
288 process_target.
289
290 * target.h (struct process_stratum_target): Remove the target op.
291 (class process_target): Add the target op.
292
293 Update the derived classes and callers below.
294
295 * target.cc (target_wait): Update.
296 * linux-low.cc (linux_target_ops): Update.
297 (linux_wait): Turn into ...
298 (linux_process_target::wait): ... this.
299 * linux-low.h (class linux_process_target): Update.
300 * lynx-low.cc (lynx_target_ops): Update.
301 (lynx_wait): Turn into ...
302 (lynx_process_target::wait): ... this.
303 * lynx-low.h (class lynx_process_target): Update.
304 * nto-low.cc (nto_target_ops): Update.
305 (nto_wait): Turn into ...
306 (nto_process_target::wait): ... this.
307 * nto-low.h (class nto_process_target): Update.
308 * win32-low.cc (win32_target_ops): Update.
309 (win32_wait): Turn into ...
310 (win32_process_target::wait): ... this.
311 (do_initial_child_stuff): Update.
312 * win32-low.h (class win32_process_target): Update.
313
314 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
315
316 Turn process_stratum_target's resume op into a method of
317 process_target.
318
319 * target.h (struct process_stratum_target): Remove the target op.
320 (class process_target): Add the target op.
321
322 Update the derived classes and callers below.
323
324 * server.cc (resume): Update.
325 * target.cc (target_stop_and_wait): Update.
326 (target_continue_no_signal): Update.
327 (target_continue): Update.
328 * linux-low.cc (linux_target_ops): Update.
329 (linux_resume): Turn into ...
330 (linux_process_target::resume): ... this.
331 * linux-low.h (class linux_process_target): Update.
332 * lynx-low.cc (lynx_target_ops): Update.
333 (lynx_resume): Turn into ...
334 (lynx_process_target::resume): ... this.
335 * lynx-low.h (class lynx_process_target): Update.
336 * nto-low.cc (nto_target_ops): Update.
337 (nto_resume): Turn into ...
338 (nto_process_target::resume): ... this.
339 * nto-low.h (class nto_process_target): Update.
340 * win32-low.cc (win32_target_ops): Update.
341 (win32_resume): Turn into ...
342 (win32_process_target::resume): ... this.
343 (win32_process_target::detach): Update.
344 (do_initial_child_stuff): Update.
345 * win32-low.h (class win32_process_target): Update.
346
347 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
348
349 Turn process_stratum_target's thread_alive op into a method of
350 process_target.
351
352 * target.h (struct process_stratum_target): Remove the target op.
353 (class process_target): Add the target op.
354 (mythread_alive): Update the macro.
355
356 Update the derived classes and callers below.
357
358 * linux-low.cc (linux_target_ops): Update.
359 (linux_thread_alive): Turn into ...
360 (linux_process_target::thread_alive): ... this.
361 (wait_for_sigstop): Update.
362 * linux-low.h (class linux_process_target): Update.
363 * lynx-low.cc (lynx_target_ops): Update.
364 (lynx_thread_alive): Turn into ...
365 (lynx_process_target::thread_alive): ... this.
366 * lynx-low.h (class lynx_process_target): Update.
367 * nto-low.cc (nto_target_ops): Update.
368 (nto_thread_alive): Turn into ...
369 (nto_process_target::thread_alive): ... this.
370 * nto-low.h (class nto_process_target): Update.
371 * win32-low.cc (win32_target_ops): Update.
372 (win32_thread_alive): Turn into ...
373 (win32_process_target::thread_alive): ... this.
374 * win32-low.h (class win32_process_target): Update.
375
376 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
377
378 Turn process_stratum_target's join op into a method of
379 process_target.
380
381 * target.h (struct process_stratum_target): Remove the target op.
382 (class process_target): Add the target op.
383 (join_inferior): Update the macro.
384
385 Update the derived classes and callers below.
386
387 * linux-low.cc (linux_target_ops): Update.
388 (linux_join): Turn into ...
389 (linux_process_target::join): ... this.
390 * linux-low.h (class linux_process_target): Update.
391 * lynx-low.cc (lynx_target_ops): Update.
392 (lynx_join): Turn into ...
393 (lynx_process_target::join): ... this.
394 * lynx-low.h (class lynx_process_target): Update.
395 * nto-low.cc (nto_target_ops): Update.
396 (nto_process_target::join): Define.
397 * nto-low.h (class nto_process_target): Update.
398 * win32-low.cc (win32_target_ops): Update.
399 (win32_join): Turn into ...
400 (win32_process_target::join): ... this.
401 * win32-low.h (class win32_process_target): Update.
402
403 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
404
405 Turn process_stratum_target's mourn op into a method of
406 process_target.
407
408 * target.h (struct process_stratum_target): Remove the target op.
409 (class process_target): Add the target op.
410
411 Update the derived classes and callers below.
412
413 * target.cc (target_mourn_inferior): Update.
414 * linux-low.cc (linux_target_ops): Update.
415 (linux_mourn): Turn into ...
416 (linux_process_target::mourn): ... this.
417 (handle_extended_wait): Update.
418 (linux_process_target::kill): Update.
419 (linux_process_target::detach): Update.
420 * linux-low.h (class linux_process_target): Update.
421 * lynx-low.cc (lynx_target_ops): Update.
422 (lynx_mourn): Turn into ...
423 (lynx_process_target::mourn): ... this.
424 * lynx-low.h (class lynx_process_target): Update.
425 * nto-low.cc (nto_target_ops): Update.
426 (nto_mourn): Turn into ...
427 (nto_process_target::mourn): ... this.
428 * nto-low.h (class nto_process_target): Update.
429 * win32-low.cc (win32_target_ops): Update.
430 (win32_mourn): Turn into ...
431 (win32_process_target::mourn): ... this.
432 * win32-low.h (class win32_process_target): Update.
433
434 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
435
436 Turn process_stratum_target's detach op into a method of
437 process_target.
438
439 * target.h (struct process_stratum_target): Remove the target op.
440 (class process_target): Add the target op.
441 (detach_inferior): Update the macro.
442
443 Update the derived classes and callers below.
444
445 * linux-low.cc (linux_target_ops): Update.
446 (linux_detach): Turn into ...
447 (linux_process_target::detach): ... this.
448 * linux-low.h (class linux_process_target): Update.
449 * lynx-low.cc (lynx_target_ops): Update.
450 (lynx_detach): Turn into ...
451 (lynx_process_target::detach): ... this.
452 * lynx-low.h (class lynx_process_target): Update.
453 * nto-low.cc (nto_target_ops): Update.
454 (nto_detach): Turn into ...
455 (nto_process_target::detach): ... this.
456 * nto-low.h (class nto_process_target): Update.
457 * win32-low.cc (win32_target_ops): Update.
458 (win32_detach): Turn into ...
459 (win32_process_target::detach): ... this.
460 * win32-low.h (class win32_process_target): Update.
461
462 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
463
464 Turn process_stratum_target's kill op into a method of
465 process_target.
466
467 * target.h (struct process_stratum_target): Remove the target op.
468 (class process_target): Add the target op.
469
470 Update the derived classes and callers below.
471
472 * target.cc (kill_inferior): Update.
473 * linux-low.cc (linux_target_ops): Update.
474 (linux_kill): Turn into ...
475 (linux_process_target::kill): ... this.
476 * linux-low.h (class linux_process_target): Update.
477 * lynx-low.cc (lynx_target_ops): Update.
478 (lynx_kill): Turn into ...
479 (lynx_process_target::kill): ... this.
480 * lynx-low.h (class lynx_process_target): Update.
481 * nto-low.cc (nto_target_ops): Update.
482 (nto_kill): Turn into ...
483 (nto_process_target::kill): ... this.
484 * nto-low.h (class nto_process_target): Update.
485 * win32-low.cc (win32_target_ops): Update.
486 (win32_kill): Turn into ...
487 (win32_process_target::kill): ... this.
488 * win32-low.h (class win32_process_target): Update.
489
490 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
491
492 Turn process_stratum_target's attach op into a method of
493 process_target.
494
495 * target.h (struct process_stratum_target): Remove the target op.
496 (class process_target): Add the target op.
497 (myattach): Update the macro.
498
499 Update the derived classes and callers below.
500
501 * linux-low.cc (linux_target_ops): Update.
502 (linux_attach): Turn into ...
503 (linux_process_target::attach): ... this.
504 * linux-low.h (class linux_process_target): Update.
505 * lynx-low.cc (lynx_target_ops): Update.
506 (lynx_attach): Turn into ...
507 (lynx_process_target::attach): ... this.
508 * lynx-low.h (class lynx_process_target): Update.
509 * nto-low.cc (nto_target_ops): Update.
510 (nto_attach): Turn into ...
511 (nto_process_target::attach): ... this.
512 * nto-low.h (class nto_process_target): Update.
513 * win32-low.cc (win32_target_ops): Update.
514 (win32_attach): Turn into ...
515 (win32_process_target::attach): ... this.
516 * win32-low.h (class win32_process_target): Update.
517
518 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
519
520 Turn process_stratum_target's post_create_inferior op into a method
521 of process_target.
522
523 * target.h (struct process_stratum_target): Remove the target op.
524 (class process_target): Add the target op.
525 (target_post_create_inferior): Update the macro.
526 * target.cc (process_target::post_create_inferior): Define.
527
528 Update the derived classes and callers below.
529
530 * linux-low.cc (linux_target_ops): Update.
531 (linux_post_create_inferior): Turn into ...
532 (linux_process_target::post_create_inferior): ... this.
533 * linux-low.h (class linux_process_target): Update.
534 * lynx-low.cc (lynx_target_ops): Update.
535 * nto-low.cc (nto_target_ops): Update.
536 * win32-low.cc (win32_target_ops): Update.
537
538 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
539
540 Turn process_stratum_target's create_inferior op into a method of
541 process_target.
542
543 * target.h (struct process_stratum_target): Remove the target op.
544 (class process_target): Add the target op.
545 (create_inferior): Rename the macro to ...
546 (target_create_inferior): ... this.
547
548 Update the derived classes and callers below.
549
550 * server.cc (handle_v_run): Update.
551 (captured_main): Update.
552 (process_serial_event): Update.
553 * linux-low.cc (linux_target_ops): Update.
554 (linux_create_inferior): Turn into ...
555 (linux_process_target::create_inferior): ... this.
556 * linux-low.h (class linux_process_target): Update.
557 * lynx-low.cc (lynx_target_ops): Update.
558 (lynx_create_inferior): Turn into ...
559 (lynx_process_target::create_inferior): ... this.
560 * lynx-low.h (class lynx_process_target): Update.
561 * nto-low.cc (nto_target_ops): Update.
562 (nto_create_inferior): Turn into ...
563 (nto_process_target::create_inferior): ... this.
564 * nto-low.h (class nto_process_target): Update.
565 * win32-low.cc (win32_target_ops): Update.
566 (win32_create_inferior): Turn into ...
567 (win32_process_target::create_inferior): ... this.
568 * win32-low.h (class win32_process_target): Update.
569
570 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
571
572 * target.h (class process_target): New class definition.
573 (struct process_stratum_target) <pt>: New field with type
574 'process_target*'.
575 * linux-low.h (class linux_process_target): Define as a derived
576 class of 'process_target'.
577 * linux-low.cc (linux_target_ops): Add a linux_process_target*
578 as the 'pt' field.
579 * lynx-low.h (class lynx_process_target): Define as a derived
580 class of 'process_target'.
581 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
582 as the 'pt' field.
583 * nto-low.h (class nto_process_target): Define as a derived
584 class of 'process_target'.
585 * nto-low.cc (nto_target_ops): Add an nto_process_target*
586 as the 'pt' field.
587 * win32-low.h (class win32_process_target): Define as a derived
588 class of 'process_target'.
589 * win32-low.cc (win32_target_ops): Add a win32_process_target*
590 as the 'pt' field.
591
592 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
593
594 * configure: Regenerate.
595
596 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
597 Andrew Burgess <andrew.burgess@embecosm.com>
598
599 * linux-riscv-low.cc: New file.
600 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
601 and nat/riscv-linux-tdesc.c.
602 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
603 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
604 Define.
605
606 2020-02-14 Tom Tromey <tom@tromey.com>
607
608 * acinclude.m4: Don't include acx_configure_dir.m4.
609 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
610 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
611 (all, install-only, uninstall, clean-info, clean)
612 (maintainer-clean): Don't recurse.
613 (subdir_do, all-lib): Remove.
614 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
615 (GNULIB_H): Remove.
616 (generated_files): Update.
617 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
618 * configure: Rebuild.
619 * configure.ac: Don't configure gnulib or libiberty.
620 (GNULIB): Update.
621
622 2020-02-14 Eli Zaretskii <eliz@gnu.org>
623
624 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
625 preparing the command line for CreateProcess.
626 (win32_create_inferior): Reflect the program name in debugging
627 output that shows the process and its command line.
628
629 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
630
631 * Makefile.in: Rename source files from .c to .cc.
632 * %.c: Rename to %.cc.
633 * configure.ac: Rename server.c to server.cc.
634 * configure: Re-generate.
635
636 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
637
638 * Makefile.in: Rename gdbsupport source files from .c to .cc.
639
640 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
641
642 * win32-low.c (win32_create_inferior): Set signal_pid.
643
644 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
645 Pedro Alves <palves@redhat.com>
646
647 Skip building gdbserver in a cross-configuration.
648 * configure.srv: Set $gdbserver_host depending on whether $target
649 is $host. Use $gdbserver_host instead of $host.
650
651 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
652
653 * configure: Re-generate.
654
655 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
656
657 * configure: Re-generate.
658
659 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
660
661 * acinclude.m4: Update warning.m4 path.
662
663 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
664
665 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
666 (handle_exception): Set siginfo_er.
667 (win32_xfer_siginfo): New function.
668
669 2020-02-07 Tom Tromey <tom@tromey.com>
670 Pedro Alves <palves@redhat.com>
671
672 * README: Update build documentation.
673 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
674 host, not target.
675 * configure.ac: Update paths.
676 * configure: Rebuild.
677 * acinclude.m4: Update paths.
678 * Makefile.in: Update include paths.
679 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
680 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
681 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
682 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
683 (%-generated.c): Update paths.
684 * Move entire directory from ../gdb/gdbserver.
685
686 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
687
688 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
689
690 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
691
692 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
693 assignment instead of srv_linux_obj.
694
695 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
696
697 * server.c (handle_qxfer_libraries): Write segment-address with
698 paddress.
699
700 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
701
702 * Makefile.in (install-strip): New target.
703 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
704 * aclocal.m4: Regenerate.
705 * configure: Regenerate.
706 * configure.ac: Add AM_PROG_INSTALL_STRIP.
707
708 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
709
710 * Makefile.in (SFILES): Adjust paths to point to real files.
711 (OBS): Move waitstatus.o to target/waitstatus.o.
712 (TAGS): Transform paths appropriately.
713 (%.o): Rename to...
714 (nat/%.o): ... this pattern rule.
715 (%.o): Rename to...
716 (target/%.o): ... this pattern rule.
717 * configure.srv: Adjust paths throughout to include nat/ prefix
718 with the revant files.
719 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
720 * configure: Regenerate.
721
722 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
723
724 * Makefile.in (TAGS): Remove config files from the recipe.
725
726 2020-01-14 Tom Tromey <tom@tromey.com>
727
728 * configure: Rebuild.
729 * configure.ac: Remove any checks that were added to common.m4.
730 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
731 lib-link.m4.
732
733 2020-01-14 Tom Tromey <tom@tromey.com>
734
735 * server.h: Include config.h.
736 * gdbreplay.c: Include config.h.
737 * configure: Rebuild.
738 * configure.ac: Don't source common.host.
739 * acinclude.m4: Update path.
740 * Makefile.in (INCSUPPORT): New variable.
741 (INCLUDE_CFLAGS): Add INCSUPPORT.
742 (SFILES): Update paths.
743 (version-generated.c): Update path to create-version.sh.
744 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
745
746 2020-01-14 Tom Tromey <tom@tromey.com>
747
748 * configure.ac (LIBS): Use WIN32APILIBS.
749 (USE_WIN32API): Don't define.
750 * configure: Rebuild.
751
752 2020-01-14 Tom Tromey <tom@tromey.com>
753
754 * configure: Rebuild.
755
756 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
757
758 * Makefile.in (%-generated.c): Remove rule for files from
759 regformats/i386.
760
761 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
762
763 * configure: Re-generate.
764
765 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
766
767 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
768 Define to static.
769 * tracepoint.c (stop_tracing, flush_trace_buffer,
770 about_to_request_buffer_space, get_trace_state_variable_value,
771 set_trace_state_variable_value, gdb_collect): Add declaration.
772
773 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
774
775 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
776 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
777 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
778 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
779 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
780 static.
781
782 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
783
784 * inferiors.c: Include gdbsupport/common-inferior.h.
785
786 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
787
788 * hostio-errno.c: Include hostio.h.
789
790 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
791
792 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
793 prerequisite.
794
795 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
796
797 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
798 * linux-arm-tdesc.h: Include arch/arm.h.
799
800 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
801
802 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
803
804 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
805
806 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
807 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
808
809 2020-01-10 Pedro Alves <palves@redhat.com>
810
811 * fork-child.c (post_fork_inferior): Pass target down to
812 startup_inferior.
813 * inferiors.c (switch_to_thread): Add process_stratum_target
814 parameter.
815 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
816 * nto-low.c (nto_target_ops): Now a process_stratum_target.
817 * linux-low.c (linux_target_ops): Now a process_stratum_target.
818 * remote-utils.c (prepare_resume_reply): Pass the target to
819 switch_to_thread.
820 * target.c (the_target): Now a process_stratum_target.
821 (done_accessing_memory): Pass the target to switch_to_thread.
822 (set_target_ops): Ajust to use process_stratum_target.
823 * target.h (struct target_ops): Rename to ...
824 (struct process_stratum_target): ... this.
825 (the_target, set_target_ops): Adjust.
826 (prepare_to_access_memory): Adjust comment.
827 * win32-low.c (child_xfer_memory): Adjust to use
828 process_stratum_target.
829 (win32_target_ops): Now a process_stratum_target.
830
831 2020-01-06 Eli Zaretskii <eliz@gnu.org>
832 Pedro Alves <palves@redhat.com>
833
834 * win32-low.c (get_child_debug_event): Extract the fatal exception
835 from the exit status and convert to the equivalent Posix signal
836 number.
837 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
838 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
839
840 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
841
842 * Makefile.in: Use INSTALL_PROGRAM_ENV.
843
844 2020-01-01 Joel Brobecker <brobecker@adacore.com>
845
846 * server.c (gdbserver_version): Change copyright year to 2020.
847 * gdbreplay.c (gdbreplay_version): Likewise.
848
849 2019-12-19 Christian Biesinger <cbiesinger@google.com>
850
851 * configure: Regenerate.
852 * configure.ac: Quote variable arguments of test.
853
854 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
855
856 * Makefile.in: Fix build with GNU Make 3.81
857
858 2019-12-16 Tom Tromey <tromey@adacore.com>
859
860 * server.c (get_exec_file): Constify result.
861
862 2019-12-10 Christian Biesinger <cbiesinger@google.com>
863
864 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
865 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
866 * config.in: Regenerate.
867 * configure: Regenerate.
868 * configure.ac: Don't check for strerror.
869 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
870 Call safe_strerror instead of strerror.
871 * server.h (strerror): Remove this now-unnecessary declaration.
872 * tracepoint.c (init_named_socket): Call safe_strerror instead of
873 strerror.
874 (gdb_agent_helper_thread): Likewise.
875 * utils.c (perror_with_name): Likewise.
876
877 2019-11-26 Tom Tromey <tom@tromey.com>
878
879 * configure, config.in: Rebuild.
880
881 2019-11-26 Tom Tromey <tom@tromey.com>
882
883 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
884 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
885 gdb_sigmask.
886 * configure, config.in: Rebuild.
887
888 2019-11-26 Tom Tromey <tom@tromey.com>
889
890 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
891 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
892 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
893 * acinclude.m4: Include ax_pthread.m4.
894 * config.in, configure: Rebuild.
895
896 2019-11-26 Christian Biesinger <cbiesinger@google.com>
897
898 * debug.c (debug_set_output): Call safe_strerror instead of
899 strerror.
900 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
901 (linux_kill_one_lwp): Likewise.
902 (linux_detach_one_lwp): Likewise.
903 (linux_wait_for_event_filtered): Likewise.
904 (store_register): Likewise.
905 * lynx-low.c (lynx_attach): Likewise.
906 * mem-break.c (insert_memory_breakpoint): Likewise.
907 (remove_memory_breakpoint): Likewise.
908 (delete_fast_tracepoint_jump): Likewise.
909 (set_fast_tracepoint_jump): Likewise.
910 (uninsert_fast_tracepoint_jumps_at): Likewise.
911 (reinsert_fast_tracepoint_jumps_at): Likewise.
912 * nto-low.c (nto_xfer_memory): Likewise.
913 (nto_resume): Likewise.
914
915 2019-11-20 Luis Machado <luis.machado@linaro.org>
916
917 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
918 instead of register count.
919 * tdesc.c (tdesc_contains_feature): New function.
920 * tdesc.h (tdesc_contains_feature): New prototype.
921
922 2019-11-15 Christian Biesinger <cbiesinger@google.com>
923
924 * Makefile.in: Add safe-strerror.c.
925 * configure: Regenerate.
926 * configure.ac: Don't source common.host.
927
928 2019-11-15 Christian Biesinger <cbiesinger@google.com>
929
930 * config.in: Regenerate.
931 * configure: Regenerate.
932
933 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
934
935 * ax.c (ax_printf): Handle size_t_arg.
936
937 2019-11-06 Christian Biesinger <cbiesinger@google.com>
938
939 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
940 * mi/mi-main.c (output_cores): Likewise.
941 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
942 (linux_xfer_osdata_modules): Likewise.
943 * remote.c (register_remote_support_xml): Likewise.
944 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
945 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
946
947 2019-11-01 Christian Biesinger <cbiesinger@google.com>
948
949 * configure: Regenerate.
950 * configure.ac: Remove check for strerror_r.
951
952 2019-10-31 Christian Biesinger <cbiesinger@google.com>
953
954 * config.in: Regenerate.
955 * configure: Regenerate.
956 * configure.ac: Also check for strerror_r.
957
958 2019-10-31 Christian Biesinger <cbiesinger@google.com>
959
960 * ax.h (debug_agent): Remove duplicate declaration.
961
962 2019-10-26 Tom de Vries <tdevries@suse.de>
963
964 * linux-aarch64-low.c: Fix typos in comments.
965 * linux-arm-low.c: Same.
966 * linux-low.c: Same.
967 * linux-ppc-low.c: Same.
968 * proc-service.c: Same.
969 * regcache.h: Same.
970 * server.c: Same.
971 * tracepoint.c: Same.
972 * win32-low.c: Same.
973
974 2019-10-25 Tom Tromey <tromey@adacore.com>
975
976 * utils.c (xstrdup): Remove.
977
978 2019-10-23 Tom Tromey <tom@tromey.com>
979
980 * configure, config.in: Rebuild.
981
982 2019-10-23 Tom Tromey <tom@tromey.com>
983
984 * configure: Rebuild.
985 * acinclude.m4: Use m4_include, not sinclude.
986
987 2019-10-17 Tom Tromey <tromey@adacore.com>
988
989 * configure: Rebuild.
990 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
991 in AC_CONFIG_FILES invocation.
992 * Makefile.in (stamp-h, Makefile): Use new-style config.status
993 invocation.
994
995 2019-10-16 Christian Biesinger <cbiesinger@google.com>
996
997 * server.c: Include xml-builtin.h.
998 (get_xml_features): Don't declare xml_builtins here.
999
1000 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1001
1002 * Makefile.in: Remove references to vec-ipa.o.
1003
1004 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1005
1006 * Makefile.in: Remove references to vec.c.
1007
1008 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1009
1010 * server.c (server_waiting): Change to bool.
1011 (extended_protocol): Likewise.
1012 (response_needed): Likewise.
1013 (exit_requested): Likewise.
1014 (run_once): Likewise.
1015 (report_no_resumed): Likewise.
1016 (non_stop): Likewise.
1017 (disable_packet_vCont): Likewise.
1018 (disable_packet_Tthread): Likewise.
1019 (disable_packet_qC): Likewise.
1020 (disable_packet_qfThreadInfo): Likewise.
1021 (handle_general_set): Update.
1022 (handle_detach): Update.
1023 (handle_monitor_command): Update.
1024 (handle_query): Update.
1025 (captured_main): Update.
1026 (process_serial_event): Update.
1027 * server.h (server_waiting): Change to bool.
1028 (disable_packet_vCont): Likewise.
1029 (disable_packet_Tthread): Likewise.
1030 (disable_packet_qC): Likewise.
1031 (disable_packet_qfThreadInfo): Likewise.
1032 (run_once): Likewise.
1033 (non_stop): Likewise.
1034 * target.c (target_stop_and_wait): Update.
1035
1036 2019-10-02 Tom Tromey <tromey@adacore.com>
1037
1038 * Makefile.in (SFILES): Add common-inferior.c.
1039 (OBS): Add common-inferior.o.
1040 * server.c (startup_with_shell): Don't define.
1041
1042 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1043
1044 * linux-low.c (linux_low_read_btrace): Update for change to
1045 std::vector.
1046
1047 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1048
1049 * debug.c (debug_threads): Remove comment in favor of the header.
1050 * debug.h (using_threads): Add declaration.
1051 (debug_threads): Add comment.
1052 * linux-aarch64-low.c: Include debug.h and remove declaration of
1053 debug_threads.
1054 * nto-low.c: Likewise.
1055 * remote-utils.c: Likewise.
1056 * thread-db.c: Likewise.
1057
1058 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1059
1060 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1061 and powerpc-cell64l-ipa.o.
1062 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1063 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1064 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1065 (spu*-*-*): Remove.
1066
1067 * spu-low.c: Remove file.
1068
1069 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1070 (parse_spufs_run): Remove.
1071 (ppc_get_pc): Remove Cell/B.E. support.
1072 (ppc_set_pc): Likewise.
1073 (ppc_breakpoint_at): Likewise.
1074 (ppc_arch_setup): Likewise.
1075 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1076 tdesc_powerpc_cell32l.
1077 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1078 or init_registers_powerpc_cell32l.
1079 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1080 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1081 or init_registers_powerpc_cell32l.
1082 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1083 (init_registers_powerpc_cell32l): Remove prototype.
1084 (init_registers_powerpc_cell64l): Likewise.
1085
1086 * target.h (struct target_ops): Remove qxfer_spu member.
1087 * server.c (handle_qxfer_spu): Remove.
1088 (qxfer_packets): Remove entry for "spu".
1089 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1090 * linux-low.c (SPUFS_MAGIC): Remove.
1091 (spu_enumerate_spu_ids): Remove.
1092 (linux_qxfer_spu): Remove.
1093 (linux_target_ops): Remove qxfer_spu member.
1094 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1095 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1096 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1097
1098 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1099
1100 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1101 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1102 * config.in: Regenerate.
1103 * configure: Regenerate.
1104
1105 2019-08-15 Tom Tromey <tromey@adacore.com>
1106
1107 * target.c (target_write_memory): Use gdb::byte_vector.
1108
1109 2019-08-15 Tom Tromey <tromey@adacore.com>
1110
1111 * tracepoint.c (write_inferior_data_pointer)
1112 (write_inferior_integer, write_inferior_int8)
1113 (write_inferior_uinteger, m_tracepoint_action_download)
1114 (r_tracepoint_action_download, x_tracepoint_action_download)
1115 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1116 (download_agent_expr, download_tracepoint_1)
1117 (download_trace_state_variables, upload_fast_traceframes): Update.
1118 * server.c (gdb_write_memory): Update.
1119 * remote-utils.c (relocate_instruction): Update.
1120 * proc-service.c (ps_pdwrite): Update.
1121 * mem-break.c (remove_memory_breakpoint)
1122 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1123 (uninsert_fast_tracepoint_jumps_at)
1124 (reinsert_fast_tracepoint_jumps_at): Update.
1125 * linux-x86-low.c (append_insns)
1126 (i386_install_fast_tracepoint_jump_pad)
1127 (amd64_write_goto_address, i386_write_goto_address): Update.
1128 * linux-s390-low.c (append_insns, s390_write_goto_address):
1129 Update.
1130 * linux-ppc-low.c (ppc_relocate_instruction)
1131 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1132 (ppc_write_goto_address): Update.
1133 * linux-aarch64-low.c (append_insns): Update.
1134 * target.h (struct target_ops): Update.
1135 (write_inferior_memory): Don't declare.
1136 * target.c (target_write_memory): Rename from
1137 write_inferior_memory. Remove old target_write_memory.
1138
1139 2019-08-15 Tom Tromey <tromey@adacore.com>
1140
1141 * target.c (write_inferior_memory): Use std::vector.
1142
1143 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1144
1145 PR build/24886
1146 * configure.ac: Drop enable-libmcheck support.
1147 * configure, config.in: Rebuild.
1148 * acinclude.m4: Don't include it.
1149
1150 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1151
1152 * configure.srv: Remove Arm xml files.
1153
1154 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1155
1156 * configure.srv: Add new files. Remove xml generated files.
1157 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1158 registers.
1159 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1160 * linux-aarch32-tdesc.c: New file.
1161 * linux-aarch32-tdesc.h: New file.
1162 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1163 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1164 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1165 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1166 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1167 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1168 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1169 (arm_read_description): Call arm_linux_read_description.
1170 (initialize_low_arch): Don't init registers.
1171 * linux-arm-tdesc.c: New file.
1172 * linux-arm-tdesc.h: New file.
1173
1174 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1175
1176 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1177 Move counter inside for.
1178 (arm_read_description): Check ptrace earlier.
1179 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1180
1181 2019-07-09 Tom Tromey <tom@tromey.com>
1182
1183 * configure: Rebuild.
1184 * configure.ac: Change common to gdbsupport.
1185 * acinclude.m4: Change common to gdbsupport.
1186 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1187 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1188 common to gdbsupport.
1189 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1190 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1191 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1192 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1193 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1194 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1195 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1196 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1197 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1198 common to gdbsupport.
1199
1200 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1201
1202 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1203 defines.
1204 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1205
1206 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1207
1208 * configure.srv: Remove legacy xml.
1209 * linux-aarch64-low.c (initialize_low_arch): Remove
1210 initialize_low_tdesc call.
1211 * linux-aarch64-tdesc-selftest.c: Remove file.
1212 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1213 * linux-x86-low.c (initialize_low_arch): Remove
1214 initialize_low_tdesc call.
1215 * linux-x86-tdesc-selftest.c: Remove file.
1216 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1217
1218 2019-06-20 Tom de Vries <tdevries@suse.de>
1219
1220 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1221 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1222
1223 2019-06-19 Tom de Vries <tdevries@suse.de>
1224
1225 * debug.h (debug_write): Change return type to ssize_t.
1226 * debug.c (debug_write): Same.
1227
1228 2019-06-14 Tom Tromey <tom@tromey.com>
1229
1230 * configure.ac: Use new path to gnulib.
1231 * configure: Rebuild.
1232 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1233 to gnulib.
1234
1235 2019-06-11 Tom Tromey <tom@tromey.com>
1236
1237 * Makefile.in (SFILES): Add alloc.c.
1238 (OBS): Add alloc.o.
1239 (IPA_OBJS): Add alloc-ipa.o.
1240 (alloc-ipa.o): New target.
1241 (%.o: ../%.c): New pattern rule.
1242
1243 2019-06-10 Tom Tromey <tromey@adacore.com>
1244
1245 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1246 end warning with a newline.
1247 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1248 newline.
1249 * thread-db.c (attach_thread): Don't end warning with a newline.
1250 (thread_db_notice_clone): Likewise.
1251 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1252 newline.
1253 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1254 end warning with a newline.
1255
1256 2019-06-04 Pedro Alves <palves@redhat.com>
1257
1258 * server.c (captured_main): Use make_unique_xstrdup.
1259
1260 2019-06-02 Tom Tromey <tom@tromey.com>
1261
1262 * gdbreplay.c (fromhex): Remove.
1263 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1264
1265 2019-05-29 Tom Tromey <tromey@adacore.com>
1266
1267 * configure: Rebuild.
1268
1269 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1270
1271 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1272 sign extension code on 32-bit builds.
1273
1274 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1275
1276 * remote-utils.c:
1277 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1278
1279 2019-04-19 Tom Tromey <tom@tromey.com>
1280
1281 * server.c (struct vstop_notif): Derive from notif_event.
1282 <base>: Remove.
1283 (queue_stop_reply): Update.
1284 (remove_all_on_match_ptid): Change type. Rewrite.
1285 (discard_queued_stop_replies): Rewrite.
1286 (in_queued_stop_replies_ptid): Change type.
1287 (in_queued_stop_replies): Rewrite.
1288 (notif_stop): Update.
1289 (queue_stop_reply_callback): Update.
1290 (captured_main): Don't call initialize_notif.
1291 (push_stop_notification): Update.
1292 * notif.c (notif_write_event, handle_notif_ack)
1293 (notif_event_enque, notif_push): Update.
1294 (notif_event_xfree, initialize_notif): Remove.
1295 * notif.h (struct notif_event): Include <list>, not
1296 "common/queue.h".
1297 (struct notif_server) <queue>: Now a std::list.
1298 (notif_event_p): Remove typedef.
1299 (initialize_notif): Don't declare.
1300 (struct notif_event): Add virtual destructor.
1301
1302 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1303
1304 * ax.c (ax_vdebug): Call debug_printf.
1305 * debug.c (debug_write): New function.
1306 * debug.h (debug_write): New declaration.
1307 * linux-low.c (sigchld_handler): Call debug_write.
1308
1309 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1310
1311 * debug.c (debug_set_output): New function.
1312 (debug_vprintf): Send output to debug_file.
1313 (debug_flush): Likewise.
1314 * debug.h (debug_set_output): New declaration.
1315 * server.c (handle_monitor_command): Add debug-file option.
1316 (captured_main): Likewise.
1317
1318 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1319
1320 * debug.c (remote_debug): Add definition.
1321 * debug.h (remote_debug): Add declaration.
1322 * hostio.c (remote_debug): Remove declaration.
1323 * remote-utils.c (struct ui_file): Likewise.
1324 (remote_debug): Likewise.
1325 * remote-utils.h (remote_debug): Likewise,
1326 * server.c (remote_debug): Remove definition.
1327
1328 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1329
1330 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1331 when using a 64-bit gdbserver.
1332
1333 2019-04-09 Tom Tromey <tromey@adacore.com>
1334
1335 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1336
1337 2019-04-08 Tom Tromey <tom@tromey.com>
1338
1339 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1340 throw.
1341 (linux_resume_one_lwp): Likewise.
1342
1343 2019-04-08 Tom Tromey <tom@tromey.com>
1344
1345 * gdbreplay.c: Update.
1346 * linux-low.c: Update.
1347 * server.c: Update.
1348
1349 2019-04-08 Tom Tromey <tom@tromey.com>
1350
1351 * server.c: Use C++ exception handling.
1352 * linux-low.c: Use C++ exception handling.
1353 * gdbreplay.c: Use C++ exception handling.
1354
1355 2019-04-08 Tom Tromey <tom@tromey.com>
1356
1357 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1358 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1359 (captured_main, main): Update.
1360 * gdbreplay.c (main): Update.
1361
1362 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1363
1364 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1365 value in argument pointer, return 1 if the entry is found and 0
1366 otherwise. Move comment.
1367 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1368 * linux-low.h (linux_get_auxv): Declare.
1369 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1370
1371 2019-04-05 Tom Tromey <tromey@adacore.com>
1372
1373 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1374 variables.
1375
1376 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1377
1378 * linux-low.c (AT_HWCAP2): Add define if not already included.
1379
1380 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1381
1382 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1383 (aarch64_arch_setup): Call linux_get_hwcap.
1384 * linux-arm-low.c (arm_get_hwcap): Remove function.
1385 (arm_read_description): Call linux_get_hwcap.
1386 * linux-low.c (linux_get_auxv): New function.
1387 (linux_get_hwcap): Likewise.
1388 (linux_get_hwcap2): Likewise.
1389 * linux-low.h (linux_get_hwcap): New declaration.
1390 (linux_get_hwcap2): Likewise.
1391 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1392 (ppc_arch_setup): Call linux_get_hwcap.
1393 * linux-s390-low.c (s390_get_hwcap): Remove function.
1394 (s390_arch_setup): Call linux_get_hwcap.
1395
1396 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1397 Jiong Wang <jiong.wang@arm.com>
1398
1399 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1400 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1401 to fail.
1402 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1403
1404 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1405 Jiong Wang <jiong.wang@arm.com>
1406
1407 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1408 (aarch64_get_hwcap): New function.
1409 (aarch64_arch_setup): Read APIA hwcap.
1410
1411 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1412 Jiong Wang <jiong.wang@arm.com>
1413
1414 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1415 (initialize_low_tracepoint): Likewise.
1416 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1417 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1418 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1419 (aarch64_linux_read_description): Likewise.
1420 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1421
1422 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1423
1424 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1425 i386_create_target_description for 'segments' parameter.
1426 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1427 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1428 * win32-i386-low.c (i386_arch_setup): Likewise.
1429
1430 2019-03-12 Tom Tromey <tromey@adacore.com>
1431
1432 * linux-low.c (iterate_over_lwps): Update.
1433
1434 2019-03-06 Tom Tromey <tom@tromey.com>
1435
1436 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1437 (captured_main): Use SCOPE_EXIT.
1438
1439 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1440
1441 * configure.srv: Use '$enable_unittest' instead of '$development'
1442 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1443 case.
1444
1445 2019-02-27 Tom Tromey <tromey@adacore.com>
1446
1447 * gdbreplay.c (logchar): Handle \r\n.
1448
1449 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1450
1451 * linux-low.c (linux_attach): Add process before lwp.
1452 * server.c (attach_inferior): Check if already attached.
1453
1454 2019-02-07 Tom Tromey <tom@tromey.com>
1455
1456 * x86-tdesc.h: Rename include guard.
1457 * x86-low.h: Add include guard.
1458 * wincecompat.h: Rename include guard.
1459 * win32-low.h: Add include guard.
1460 * utils.h: Rename include guard.
1461 * tracepoint.h: Rename include guard.
1462 * tdesc.h: Rename include guard.
1463 * target.h: Rename include guard.
1464 * server.h: Rename include guard.
1465 * remote-utils.h: Rename include guard.
1466 * regcache.h: Rename include guard.
1467 * nto-low.h: Rename include guard.
1468 * notif.h: Add include guard.
1469 * mem-break.h: Rename include guard.
1470 * lynx-low.h: Add include guard.
1471 * linux-x86-tdesc.h: Add include guard.
1472 * linux-s390-tdesc.h: Add include guard.
1473 * linux-ppc-tdesc-init.h: Add include guard.
1474 * linux-low.h: Add include guard.
1475 * linux-aarch64-tdesc.h: Add include guard.
1476 * linux-aarch32-low.h: Add include guard.
1477 * inferiors.h: Rename include guard.
1478 * i387-fp.h: Rename include guard.
1479 * hostio.h: Rename include guard.
1480 * gdbthread.h: Rename include guard.
1481 * gdb_proc_service.h: Rename include guard.
1482 * event-loop.h: Rename include guard.
1483 * dll.h: Rename include guard.
1484 * debug.h: Rename include guard.
1485 * ax.h: Rename include guard.
1486
1487 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1488
1489 PR gdb/23985
1490 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1491 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1492
1493 2019-01-25 Tom Tromey <tom@tromey.com>
1494
1495 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1496
1497 2019-01-25 Tom Tromey <tom@tromey.com>
1498
1499 * win32-low.c: Fix common/ includes.
1500 * win32-i386-low.c: Fix common/ includes.
1501 * tracepoint.c: Fix common/ includes.
1502 * thread-db.c: Fix common/ includes.
1503 * target.h: Fix common/ includes.
1504 * symbol.c: Fix common/ includes.
1505 * spu-low.c: Fix common/ includes.
1506 * server.h: Fix common/ includes.
1507 * server.c: Fix common/ includes.
1508 * remote-utils.c: Fix common/ includes.
1509 * regcache.h: Fix common/ includes.
1510 * regcache.c: Fix common/ includes.
1511 * nto-x86-low.c: Fix common/ includes.
1512 * notif.h: Fix common/ includes.
1513 * mem-break.h: Fix common/ includes.
1514 * lynx-low.c: Fix common/ includes.
1515 * lynx-i386-low.c: Fix common/ includes.
1516 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1517 * linux-x86-low.c: Fix common/ includes.
1518 * linux-low.c: Fix common/ includes.
1519 * inferiors.h: Fix common/ includes.
1520 * i387-fp.c: Fix common/ includes.
1521 * hostio.c: Fix common/ includes.
1522 * hostio-errno.c: Fix common/ includes.
1523 * gdbthread.h: Fix common/ includes.
1524 * gdbreplay.c: Fix common/ includes.
1525 * fork-child.c: Fix common/ includes.
1526 * event-loop.c: Fix common/ includes.
1527 * ax.c:
1528 (enum gdb_agent_op): Fix common/ includes.
1529
1530 2019-01-21 Tom Tromey <tom@tromey.com>
1531
1532 * tracepoint.c: Fix includes.
1533 * remote-utils.c: Fix includes.
1534 * linux-x86-low.c: Fix includes.
1535
1536 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1537
1538 * gdbreplay.c (gdbreplay_version): Update copyright year in
1539 version message.
1540 * server.c (gdbserver_version): Likewise.
1541
1542 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1543
1544 * linux-low.c (add_lwp): Switch ordering.
1545
1546 2018-11-29 Tom Tromey <tom@tromey.com>
1547
1548 * win32-low.c (win32_join): Take pid, not process.
1549 * target.h (struct target_ops) <join>: Change argument type.
1550 (join_inferior): Change argument name.
1551 * spu-low.c (spu_join): Take pid, not process.
1552 * server.c (handle_detach): Preserve pid before destroying
1553 process.
1554 * lynx-low.c (lynx_join): Take pid, not process.
1555 * linux-low.c (linux_join): Take pid, not process.
1556
1557 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1558
1559 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1560 (aarch64_cannot_fetch_register): Likewise.
1561 (struct linux_target_ops): Update references.
1562
1563 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1564
1565 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1566
1567 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1568
1569 * configure.srv (ipa_ppc_linux_regobj): Add
1570 powerpc-isa207-htm-vsx32l-ipa.o and
1571 powerpc-isa207-htm-vsx64l-ipa.o.
1572 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1573 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1574 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1575 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1576 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1577 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1578 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1579 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1580 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1581 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1582 (init_registers_powerpc_isa207_htm_vsx32l)
1583 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1584 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1585 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1586 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1587 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1588 (ppc_store_tm_ctarregset): New functions.
1589 (ppc_regsets): Add entries for HTM regsets.
1590 (ppc_arch_setup): Set htm in features struct when needed. Set
1591 sizes for the HTM regsets.
1592 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1593 (initialize_low_arch): Call
1594 init_registers_powerpc_isa207_htm_vsx32l and
1595 init_registers_powerpc_isa207_htm_vsx64l.
1596 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1597 PPC_TDESC_ISA207_HTM_VSX.
1598 (initialize_low_tracepoint): Call
1599 init_registers_powerpc_isa207_htm_vsx32l and
1600 init_registers_powerpc_isa207_htm_vsx64l.
1601
1602 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1603
1604 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1605 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1606 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1607 (ppc_store_pmuregset): New functions.
1608 (ppc_regsets): Add entries for ebb and pmu regsets.
1609 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1610 pmu regsets are available. Set sizes for these regsets.
1611
1612 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1613
1614 * configure.srv (ipa_ppc_linux_regobj): Add
1615 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1616 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1617 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1618 rs6000/powerpc-isa207-vsx32l.xml, and
1619 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1620 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1621 <PPC_TDESC_ISA207_VSX>: New enum value.
1622 (init_registers_powerpc_isa207_vsx32l): Declare.
1623 (init_registers_powerpc_isa207_vsx64l): Declare.
1624 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1625 (ppc_store_tarregset): New function.
1626 (ppc_regsets): Add entry for the TAR regset.
1627 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1628 size for the TAR regsets.
1629 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1630 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1631 and init_registers_powerpc_isa207_vsx64l.
1632 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1633 (initialize_low_tracepoint): Call
1634 init_registers_powerpc_isa207_vsx32l and
1635 init_registers_powerpc_isa207_vsx64l.
1636
1637 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1638 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1639
1640 * configure.srv (ipa_ppc_linux_regobj): Add
1641 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1642 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1643 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1644 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1645 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1646 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1647 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1648 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1649 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1650 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1651 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1652 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1653 (ppc_hwcap): Add comment.
1654 (ppc_hwcap2): New global.
1655 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1656 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1657 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1658 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1659 when needed. Set sizes for the the DSCR and PPR regsets.
1660 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1661 (initialize_low_arch): Call
1662 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1663 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1664 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1665 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1666 (initialize_low_tracepoint): Call
1667 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1668 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1669
1670 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1671
1672 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1673
1674 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1675 Simon Marchi <simark@simark.ca>
1676
1677 * acinclude.m4: Include "../selftest.m4".
1678 * configure: Regenerate.
1679 * configure.ac: Use "GDB_AC_SELFTEST".
1680 * configure.srv: Use "$enable_unittests" instead of
1681 "$development" when checking whether unit tests have been
1682 enabled.
1683 * server.c (captured_main): Update message informing that
1684 selftests have been disabled.
1685
1686 2018-10-04 Tom Tromey <tom@tromey.com>
1687
1688 * configure: Rebuild.
1689
1690 2018-10-04 Tom Tromey <tom@tromey.com>
1691
1692 * server.c (handle_status): Rename inner "thread".
1693 (process_serial_event): Declare "res" in 'm' case.
1694 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1695 (iterate_over_lwps): Rename inner "thread".
1696 (linux_qxfer_libraries_svr4): Rename inner "len".
1697 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1698
1699 2018-10-01 Gary Benson <gbenson@redhat.com>
1700
1701 * gdb_proc_service.h: Moved common code to
1702 common/gdb_proc_service.h.
1703
1704 2018-10-01 Gary Benson <gbenson@redhat.com>
1705
1706 * gdb_proc_service.h: Synchronize comments and whitespace with
1707 GDB's version of this file.
1708
1709 2018-09-25 Tom Tromey <tom@tromey.com>
1710
1711 * configure: Rebuild.
1712 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1713
1714 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1715
1716 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1717 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1718 ($(IPA_LIB)): Sort IPA_OBJS.
1719
1720 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1721
1722 * Makefile.in: Remove references to $(ADD_DEPS).
1723
1724 2018-09-16 Tom Tromey <tom@tromey.com>
1725
1726 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1727 variables.
1728 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1729 variables.
1730
1731 2018-09-05 Tom Tromey <tom@tromey.com>
1732
1733 * configure: Rebuild.
1734
1735 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1736
1737 PR build/23399
1738 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1739
1740 2018-08-27 Tom Tromey <tom@tromey.com>
1741
1742 PR build/23087:
1743 * configure: Rebuild.
1744
1745 2018-08-27 Tom Tromey <tom@tromey.com>
1746
1747 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1748 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1749 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1750 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1751 (s390x_emit_stack_adjust): Add casts to unsigned char.
1752
1753 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1754
1755 PR gdb/23374
1756 PR gdb/23375
1757 * server.h (struct client_state) <disable_randomization>:
1758 Initialize to 1.
1759
1760 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1761
1762 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1763 variable.
1764 (mips_supply_ptrace_register): Likewise.
1765
1766 2018-07-22 Tom Tromey <tom@tromey.com>
1767
1768 * configure: Rebuild.
1769
1770 2018-07-22 Tom Tromey <tom@tromey.com>
1771
1772 * win32-low.c (win32_create_inferior): Remove unused variables.
1773 * gdbreplay.c (remote_open): Remove unused variable.
1774 * remote-utils.c (remote_prepare): Remove unused variable.
1775 * x86-tdesc.h (X86_TDESC_H): Define.
1776 (amd64_expedite_regs): Define conditionally.
1777 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1778 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1779 * remote-utils.c (readchar): Remove unused variable.
1780
1781 2018-07-13 Pedro Alves <palves@redhat.com>
1782
1783 * linux-low.c (linux_kill): Change parameter to process_info
1784 pointer instead of pid. Adjust.
1785 * lynx-low.c (lynx_kill): Likewise.
1786 * nto-low.c (nto_kill): Likewise.
1787 * spu-low.c (spu_kill): Likewise.
1788 * win32-low.c (win32_kill): Likewise.
1789 * server.c (handle_v_kill, kill_inferior_callback)
1790 (detach_or_kill_for_exit): Adjust.
1791 * target.c (kill_inferior): Change parameter to process_info
1792 pointer instead of pid. Adjust.
1793 * target.h (struct target_ops) <kill>: Change parameter to
1794 process_info pointer instead of pid. Adjust all implementations
1795 and callers.
1796 (kill_inferior): Likewise.
1797
1798 2018-07-13 Pedro Alves <palves@redhat.com>
1799
1800 * linux-low.c (linux_detach, linux_join): Change parameter to
1801 process_info pointer instead of pid. Adjust.
1802 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1803 * nto-low.c (nto_detach): Likewise.
1804 * spu-low.c (spu_detach, spu_join): Likewise.
1805 * win32-low.c (win32_detach, win32_join): Likewise.
1806 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1807 * target.h (struct target_ops) <detach, join>: Change parameter to
1808 process_info pointer instead of pid. Adjust all implementations
1809 and callers.
1810 (detach_inferior, join_inferior): Rename 'pid' parameter to
1811 'proc'.
1812
1813 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1814 Jan Kratochvil <jan.kratochvil@redhat.com>
1815 Paul Fertser <fercerpav@gmail.com>
1816 Tsutomu Seki <sekiriki@gmail.com>
1817
1818 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1819 (OBS): Add 'common/netstuff.o'.
1820 (GDBREPLAY_OBS): Likewise.
1821 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1822 (remote_open): Implement support for IPv6
1823 connections.
1824 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1825 and 'wspiapi.h'.
1826 (handle_accept_event): Accept connections from IPv6 sources.
1827 (remote_prepare): Handle IPv6-style hostnames; implement
1828 support for IPv6 connections.
1829 (remote_open): Implement support for printing connections from
1830 IPv6 sources.
1831
1832 2018-07-11 Pedro Alves <palves@redhat.com>
1833
1834 PR gdb/23377
1835 * mem-break.c (any_persistent_commands): Add process_info
1836 parameter and use it instead of relying on the current process.
1837 Change return type to bool.
1838 * mem-break.h (any_persistent_commands): Add process_info
1839 parameter and change return type to bool.
1840 * server.c (handle_detach): Remove require_running_or_return call.
1841 Look up the process_info for the process we're about to detach.
1842 If not found, return back error to GDB. Adjust
1843 any_persistent_commands call to pass down a process pointer.
1844
1845 2018-07-11 Pedro Alves <palves@redhat.com>
1846
1847 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1848 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1849 instead of collect_register_by_name.
1850 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1851 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1852
1853 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1854 Pedro Alves <palves@redhat.com>
1855
1856 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1857
1858 2018-07-03 Tom Tromey <tom@tromey.com>
1859
1860 * linux-low.c: Update.
1861 * lynx-low.c: Update.
1862 * mem-break.c: Update.
1863 * nto-low.c: Update.
1864 * remote-utils.c: Update.
1865 * server.c: Update.
1866 * spu-low.c: Update.
1867 * target.c: Update.
1868 * win32-low.c: Update.
1869
1870 2018-07-03 Tom Tromey <tom@tromey.com>
1871
1872 * server.c: Update.
1873
1874 2018-07-03 Tom Tromey <tom@tromey.com>
1875
1876 * linux-low.c: Update.
1877
1878 2018-07-03 Tom Tromey <tom@tromey.com>
1879
1880 * target.c: Update.
1881
1882 2018-07-03 Tom Tromey <tom@tromey.com>
1883
1884 * linux-low.c: Update.
1885 * linux-mips-low.c: Update.
1886 * lynx-low.c: Update.
1887 * nto-low.c: Update.
1888 * remote-utils.c: Update.
1889 * server.c: Update.
1890 * spu-low.c: Update.
1891 * target.c: Update.
1892 * thread-db.c: Update.
1893
1894 2018-07-03 Tom Tromey <tom@tromey.com>
1895
1896 * linux-low.c: Update.
1897 * linux-mips-low.c: Update.
1898 * lynx-low.c: Update.
1899 * mem-break.c: Update.
1900 * nto-low.c: Update.
1901 * remote-utils.c: Update.
1902 * server.c: Update.
1903 * spu-low.c: Update.
1904 * target.c: Update.
1905 * tracepoint.c: Update.
1906
1907 2018-07-03 Tom Tromey <tom@tromey.com>
1908
1909 * linux-low.c: Update.
1910 * linux-ppc-low.c: Update.
1911 * linux-x86-low.c: Update.
1912 * proc-service.c: Update.
1913 * server.c: Update.
1914 * spu-low.c: Update.
1915 * thread-db.c: Update.
1916 * win32-low.c: Update.
1917
1918 2018-07-03 Tom Tromey <tom@tromey.com>
1919
1920 * linux-low.c: Update.
1921 * lynx-low.c: Update.
1922 * nto-low.c: Update.
1923 * remote-utils.c: Update.
1924 * spu-low.c: Update.
1925 * thread-db.c: Update.
1926 * win32-low.c: Update.
1927
1928 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1929
1930 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1931 parameter in call to 'amd64_create_target_description'.
1932
1933 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1934
1935 * x86-tdesc.h: Remove executable permission flag.
1936
1937 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1938
1939 * configure.ac: Remove AC_PREREQ, add missing quoting.
1940 * configure: Re-generate.
1941 * config.in: Re-generate.
1942 * aclocal.m4: Re-generate.
1943
1944 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * tracepoint.h (current_traceframe): Remove declaration.
1947
1948 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1949
1950 * linux-aarch64-low.c (is_sve_tdesc): New function.
1951 (aarch64_sve_regs_copy_to_regcache): Likewise.
1952 (aarch64_sve_regs_copy_from_regcache): Likewise.
1953 (aarch64_regs_info): Add SVE checks.
1954 (initialize_low_arch): Initialize SVE.
1955
1956 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1957
1958 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1959
1960 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1961
1962 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1963 (initialize_low_tracepoint): Likewise
1964 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1965 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1966 param.
1967 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1968 checks.
1969 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1970
1971 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1972
1973 * server.h (PBUFSIZ): Increase size
1974
1975 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1976
1977 * regcache.c (regcache::raw_compare): New function.
1978 * regcache.h (regcache::raw_compare): New declaration.
1979
1980 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1981
1982 * regcache.c (new_register_cache): Use new.
1983 (free_register_cache): Use delete.
1984 (register_data): Use const.
1985 (supply_register): Move body inside regcache.
1986 (regcache::raw_supply): New override function.
1987 (collect_register): Move body inside regcache.
1988 (regcache::raw_collect): New override function.
1989 (regcache::get_register_status): New override function.
1990 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1991
1992 2018-06-09 Tom Tromey <tom@tromey.com>
1993
1994 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1995 declare queue.
1996 (event_queue): Use std::queue.
1997 (gdb_event_xfree): Remove.
1998 (initialize_event_loop, process_event, wait_for_event): Update.
1999
2000 2018-06-08 Stan Cox <scox@redhat.com>
2001
2002 * win32-low.c (win32_create_inferior): last_ptid and last_status
2003 moved to client_state.
2004
2005 2018-06-08 Pedro Alves <palves@redhat.com>
2006
2007 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2008 common/common-exceptions.o, common/common-utils.o,
2009 common/errors.o, common/print-utils.o and utils.o.
2010 * gdbreplay.c: Include "common-defs.h" instead of the two
2011 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2012 string.h or alloca.h.
2013 (perror_with_name): Delete.
2014 (remote_open): Use xstrdup instead of strdup.
2015 (main): Rename to ...
2016 (captured_main): ... this.
2017 (main): New.
2018
2019 2018-06-08 Tom Tromey <tom@tromey.com>
2020
2021 * linux-low.c (linux_low_read_btrace): Update.
2022
2023 2018-06-04 Stan Cox <scox@redhat.com>
2024
2025 * server.h (struct client_state): New.
2026 * server.c (cont_thread, general_thread, multi_process)
2027 (report_fork_events, report_vfork_events, report_exec_events)
2028 (report_thread_events, swbreak_feature, hwbreak_feature)
2029 (vCont_supported, disable_randomization, pass_signals)
2030 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2031 Moved to client_state.
2032 * remote-utils.c (remote_debug, noack_mode)
2033 (transport_is_reliable): Moved to client_state.
2034 * tracepoint.c (current_traceframe): Moved to client_state.
2035
2036 Update all callers.
2037 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2038 linux-low.c, remote-utils.h, target.c: Use client_state.
2039
2040 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2041
2042 * configure.srv: Add new c/h file.
2043
2044 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2045
2046 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2047 null VQ.
2048
2049 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2050
2051 * gdb.arch/mips-fpregset-core.exp: New test.
2052 * gdb.arch/mips-fpregset-core.c: New test source.
2053
2054 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2055
2056 PR server/23198
2057 * hostio.c (require_int): Do not report overflow for integers
2058 between 0xfffffff and 0x7fffffff.
2059
2060 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2061
2062 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2063 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2064 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2065 functions.
2066 (the_low_target): Wire them.
2067
2068 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2069
2070 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2071 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2072 mode. Call collect_register_by_name with vscr using
2073 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2074 (ppc_store_vrregset): Add and set vscr_offset variable as in
2075 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2076 vscr_offset.
2077
2078 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2079
2080 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2081 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2082 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2083
2084 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2085
2086 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2087 (ppc_store_vsxregset): Likewise.
2088 (ppc_fill_vrregset): Likewise.
2089 (ppc_store_vrregset): Likewise.
2090 (ppc_fill_evrregset): Likewise.
2091 (ppc_store_evrregset): Likewise.
2092 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2093 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2094 needed.
2095
2096 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2097
2098 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2099 wordsize of the inferior. Call ppc_linux_target_wordsize.
2100
2101 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2102
2103 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2104 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2105 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2106 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2107 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2108 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2109 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2110 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2111 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2112 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2113 (tdesc_powerpc_e500l): Remove.
2114 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2115 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2116 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2117 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2118 linux-ppc-tdesc.h.
2119 (ppc_arch_setup): Remove target description matching code. Fill a
2120 ppc_linux_features struct and call ppc_linux_match_description
2121 with it.
2122
2123 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2124
2125 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2126 width of the requested register exceeds the width of the
2127 `ptrace' data type.
2128 (mips_cannot_store_register): Likewise.
2129
2130 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2131
2132 * linux-mips-low.c (mips_fetch_register): New function. Update
2133 preceding comment.
2134 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2135 (the_low_target): Wire `mips_fetch_register'.
2136
2137 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2138
2139 * lynx-i386-low.c (LYNXOS_178): New macro.
2140 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2141 the layout on LynxOS-178.
2142 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2143 handle floating point registers that are not supported by
2144 LynxOS-178.
2145
2146 2018-05-10 Tom Tromey <tom@tromey.com>
2147
2148 * configure: Rebuild.
2149
2150 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2151
2152 PR server/23158:
2153 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2154 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2155 Use it to set the expedite_regs field in the given tdesc.
2156 * x86-tdesc.h: New file.
2157 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2158 Adjust following the addition of the new expedite_regs parameter
2159 to init_target_desc.
2160 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2161 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2162 (i386_linux_read_description, amd64_linux_read_description):
2163 Adjust following the addition of the new expedite_regs parameter
2164 to init_target_desc.
2165 * lynx-i386-low.c: #include "x86-tdesc.h".
2166 (lynx_i386_arch_setup): Adjust following the addition of the new
2167 expedite_regs parameter to init_target_desc.
2168 * nto-x86-low.c: #include "x86-tdesc.h".
2169 (nto_x86_arch_setup): Adjust following the addition of the new
2170 expedite_regs parameter to init_target_desc.
2171 * win32-i386-low.c: #include "x86-tdesc.h".
2172 (i386_arch_setup): Adjust following the addition of the new
2173 expedite_regs parameter to init_target_desc.
2174
2175 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2176
2177 PR server/23158:
2178 * win32-low.c (win32_create_inferior): Add call to my_wait
2179 setting last_status global.
2180
2181 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2182
2183 PR server/23158:
2184 * win32-low.c (create_process): Only call gdb_tilde_expand if
2185 inferior_cwd is not NULL.
2186
2187 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2188
2189 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2190 registers to the cache if their values have changed.
2191 (i387_xsave_to_cache): Provide default values for x87 control
2192 registers when these features are available, but disabled.
2193 * regcache.c (supply_register_by_name_zeroed): New function.
2194 * regcache.h (supply_register_by_name_zeroed): Declare new
2195 function.
2196
2197 2018-05-07 Tom Tromey <tom@tromey.com>
2198
2199 * configure: Rebuild.
2200
2201 2018-05-04 Tom Tromey <tom@tromey.com>
2202
2203 * configure: Rebuild.
2204
2205 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2206 Pedro Alves <palves@redhat.com>
2207
2208 * linux-aarch64-low.c (aarch64_stopped_data_address):
2209 Likewise.
2210
2211 2018-04-27 Tom Tromey <tom@tromey.com>
2212
2213 * configure: Rebuild.
2214
2215 2018-04-23 Tom Tromey <tom@tromey.com>
2216
2217 * configure: Rebuild.
2218
2219 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2220
2221 * Makefile.in (depcomp): Add "..".
2222 (all_deps_files): New and use it.
2223
2224 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2225
2226 * configure.srv (aarch64*-*-linux*): Don't include xml.
2227 (i[34567]86-*-cygwin*): Likewise.
2228 (i[34567]86-*-linux*): Likewise.
2229 (i[34567]86-*-lynxos*): Likewise.
2230 (i[34567]86-*-mingw32ce*): Likewise.
2231 (i[34567]86-*-mingw*): Likewise.
2232 (i[34567]86-*-nto*): Likewise.
2233 (tic6x-*-uclinux): Likewise.
2234 (x86_64-*-linux*): Likewise.
2235 (x86_64-*-mingw*): Likewise.
2236 (x86_64-*-cygwin*): Likewise.
2237
2238 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2239
2240 * tdesc.c: Remove xml parameter.
2241
2242 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2243
2244 * server.c (get_features_xml): Remove cast.
2245 * tdesc.c (void target_desc::accept): Fill in function.
2246 (tdesc_get_features_xml): Remove old xml creation.
2247 (print_xml_feature::visit_pre): Add xml vistor.
2248 * tdesc.h (struct target_desc): Make xmltarget mutable.
2249 (tdesc_get_features_xml): Remove declaration.
2250
2251 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2252
2253 * tdesc.c (tdesc_architecture_name): Add new function.
2254 (tdesc_osabi_name): Likewise.
2255 (tdesc_get_features_xml): Use new functions.
2256
2257 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2258
2259 * tdesc.c (tdesc_create_flags): Remove.
2260 (tdesc_add_flag): Likewise.
2261 (tdesc_named_type): Likewise.
2262 (tdesc_create_union): Likewise.
2263 (tdesc_create_struct): Likewise.
2264 (tdesc_create_vector): Likewise.
2265 (tdesc_add_bitfield): Likewise.
2266 (tdesc_add_field): Likewise.
2267 (tdesc_set_struct_size): Likewise.
2268
2269 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2270
2271 * tdesc.c (~target_desc): Remove implictly deleted items.
2272 (init_target_desc): Iterate all features.
2273 (tdesc_get_features_xml): Use vector.
2274 (tdesc_create_feature): Create feature.
2275 * tdesc.h (tdesc_feature) Remove
2276 (target_desc): Add features.
2277
2278 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2279
2280 * Makefile.in: Add common/tdesc.c
2281 * tdesc.c (init_target_desc): init all reg_defs from register
2282 vector.
2283 (tdesc_create_reg): Create tdesc_reg.
2284 * tdesc.h (tdesc_feature): Add register vector.
2285
2286 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2287
2288 * tdesc.h (struct target_desc) <features>: Change type to
2289 std::vector<std::string>.
2290 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2291 changes.
2292 (tdesc_get_features_xml): Likewise.
2293 (tdesc_create_feature): Likewise.
2294
2295 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2296
2297 * regcache.c (find_register_by_number): Return a ref.
2298 (find_regno): Use references.
2299 (register_size): Likewise.
2300 (register_data): Likewise.
2301 * tdesc.c (target_desc::~target_desc): Remove free calls.
2302 (target_desc::operator==): Use std::vector compare.
2303 (init_target_desc): Use reference.
2304 (tdesc_create_reg): Use reg constructors.
2305 * tdesc.h (struct target_desc): Replace pointer with object.
2306
2307 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2308
2309 * regcache.c (find_register_by_number): Make static.
2310 (find_regno): Use find_register_by_number
2311 * regcache.h (struct reg): Remove declaration.
2312
2313 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2314
2315 * tdesc.c (target_desc::~target_desc): Move to here.
2316 (target_desc::operator==): Likewise.
2317 * tdesc.h (target_desc::~target_desc): Move from here.
2318 (target_desc::operator==): Likewise.
2319
2320 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2321
2322 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2323
2324 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2325
2326 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2327 S390_TDESC_GS.
2328 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2329 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2330 and init_registers_s390_gs_linux64.
2331
2332 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2333
2334 * linux-s390-low.c (s390_fill_gs): Remove function.
2335 (s390_fill_gsbc): Remove function.
2336 (s390_regsets): Set fill functions for the guarded storage regsets
2337 to NULL.
2338
2339 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2340
2341 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2342 the word size. Add comment.
2343 (s390_get_wordsize): New function.
2344 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2345 pswm with it. Instead, use s390_get_wordsize to determine the
2346 word size first and derive the correct tdesc from that directly.
2347
2348 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2349
2350 * Makefile.in: Include silent-rules.mk.
2351 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2352 (COMPILE): Add ECHO_CXX.
2353 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2354 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2355 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2356 (version-generated.c): Add ECHO_GEN.
2357 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2358 (IPAGENT_COMPILE): Add ECHO_CXX.
2359 (%-generated.c): Add ECHO_REGDAT.
2360
2361 2018-03-14 Tom Tromey <tom@tromey.com>
2362
2363 PR cli/14977:
2364 * ax.c (ax_printf): Special case for NULL.
2365
2366 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2367
2368 * linux-low.c (linux_qxfer_libraries_svr4): Use
2369 xml_escape_text_append.
2370
2371 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2372
2373 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2374
2375 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2376
2377 * server.c (handle_general_set): Remove unnecessary xstrdup.
2378
2379 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2380
2381 * server.c (parse_debug_format_options): Adjust to
2382 delim_string_to_char_ptr_vec changes.
2383 * thread-db.c (thread_db_load_search): Adjust to
2384 dirnames_to_char_ptr_vec changes.
2385
2386 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2387
2388 * target.h (target_enable_btrace, target_disable_btrace)
2389 (target_read_btrace, target_read_btrace_conf): Turn macro into
2390 inline function. Throw error if target method is not defined.
2391 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2392 check for btrace target method. Be prepared to handle exceptions
2393 from btrace target methods.
2394
2395 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2396
2397 * server.c (captured_main): Change order of error message printed
2398 when the current working directory cannot be found.
2399
2400 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2401
2402 * server.c: Include "filenames.h" and "pathstuff.h".
2403 (program_name): Delete variable.
2404 (program_path): New anonymous class.
2405 (get_exec_wrapper): Use "program_path" instead of
2406 "program_name".
2407 (handle_v_run): Likewise.
2408 (captured_main): Likewise.
2409 (process_serial_event): Likewise.
2410
2411 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2412
2413 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2414 (OBJS): Add "pathstuff.o".
2415 * server.c (current_directory): New global variable.
2416 (captured_main): Initialize "current_directory".
2417
2418 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2419
2420 * tdesc.c: Use common/tdesc.h.
2421 * tdesc.h: Likewise.
2422
2423 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2424 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * Makefile.in: Switch order of make rules.
2427
2428 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2429
2430 * Makefile.in: Add common directory in build.
2431 * configure.ac: Add common reference.
2432 * configure: Regenerate.
2433
2434 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2435
2436 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2437 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2438 * spu-low.c (spu_target_ops): Likewise.
2439 * win32-low.c (win32_target_ops): Likewise.
2440 * server.c (supported_btrace_packets): Report packets unconditionally.
2441 * target.h (target_ops) <supports_btrace>: Remove.
2442 (target_supports_btrace): Remove.
2443
2444 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2445
2446 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2447 (handle_btrace_disable): Change return type to void. Use exceptions
2448 to report errors.
2449 (handle_btrace_general_set): Catch exception and copy message to
2450 return message.
2451
2452 2018-02-08 Tom Tromey <tom@tromey.com>
2453
2454 * linux-low.c (install_software_single_step_breakpoints): Use
2455 make_scoped_restore.
2456 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2457 (do_restore_current_thread_cleanup): Remove.
2458 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2459 declare.
2460
2461 2018-02-08 Tom Tromey <tom@tromey.com>
2462
2463 * mem-break.c (set_raw_breakpoint_at): Use
2464 gdb::unique_xmalloc_ptr.
2465
2466 2018-01-30 Pedro Alves <palves@redhat.com>
2467
2468 PR gdb/13211
2469 * target.c (target_terminal::terminal_state): Rename to ...
2470 (target_terminal::m_terminal_state): ... this.
2471
2472 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2473
2474 * linux-low.c (handle_extended_wait): Surround call to
2475 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2476
2477 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2478
2479 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2480 linux_ptrace_attach_fail_reason_string now returning an
2481 std::string.
2482 (linux_attach): Likewise.
2483 * thread-db.c (attach_thread): Likewise.
2484
2485 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2486
2487 PR gdb/21559
2488 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2489 checking for fs_base/gs_base fields in struct user_regs_struct.
2490 * configure: Regenerate.
2491
2492 2018-01-16 Yao Qi <yao.qi@linaro.org>
2493
2494 PR gdb/18749
2495 * linux-low.c (fetch_register): Call supply_register instead of
2496 error.
2497
2498 2018-01-08 Yao Qi <yao.qi@linaro.org>
2499 Simon Marchi <simon.marchi@ericsson.com>
2500
2501 * Makefile.in (OBS): Remove selftest.o.
2502 * configure.ac: Set srv_selftest_objs if $development is true.
2503 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2504 * configure: Re-generated.
2505 * server.c (captured_main): Wrap variable selftest_filter with
2506 GDB_SELF_TEST.
2507
2508 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2509
2510 * server.c (parse_debug_format_options): Return std::string.
2511 (handle_monitor_command, captured_main): Adjust.
2512
2513 2018-01-05 Pedro Alves <palves@redhat.com>
2514
2515 PR gdb/18653
2516 * server.c (captured_main): Pass quiet=false to
2517 save_original_signals_state.
2518
2519 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2520
2521 * gdbreplay.c (gdbreplay_version): Update copyright year in
2522 version message.
2523 * server.c (gdbserver_version): Likewise.
2524
2525 2017-12-08 Tom Tromey <tom@tromey.com>
2526
2527 * ax.c (ax_printf): Update.
2528
2529 2017-12-07 Yao Qi <yao.qi@linaro.org>
2530
2531 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2532 aarch64_linux_read_description.
2533 * linux-amd64-ipa.c (idx2mask): New array.
2534 (get_ipa_tdesc): Move idx2mask out.
2535 (initialize_low_tracepoint): Initialize target descriptions.
2536 * linux-i386-ipa.c (idx2mask): New array.
2537 (get_ipa_tdesc): Move idx2mask out.
2538 (initialize_low_tracepoint): Initialize target descriptions.
2539
2540 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2541
2542 * tdesc.c (struct tdesc_type): Change return type.
2543 (tdesc_add_flag): Change parameter type.
2544 (tdesc_add_bitfield): Likewise.
2545 (tdesc_add_field): Likewise.
2546 (tdesc_set_struct_size): Likewise.
2547
2548 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2549
2550 * regcache.c (registers_to_string): Remove unused variable.
2551
2552 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2553
2554 * inferiors.c (for_each_inferior_with_data): Remove.
2555 * inferiors.h (for_each_inferior_with_data): Remove.
2556 * server.c (handle_qxfer_threads_worker): Change parameter type.
2557 (handle_qxfer_threads_proper): Use for_each_thread.
2558
2559 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2560
2561 * inferiors.c (for_each_inferior): Remove.
2562 (clear_inferiors): Use for_each_thread.
2563 * inferiors.h (for_each_inferior): Remove.
2564 * linux-low.c (linux_wait_for_event_filtered): Use
2565 for_each_thread.
2566 (linux_stabilize_threads): Likewise.
2567 * regcache.c (regcache_release): Likewise.
2568 * server.c (gdb_wants_all_threads_stopped): Likewise.
2569 (clear_pending_status_callback): Remove.
2570 (handle_status): Use for_each_thread.
2571 (captured_main): Likewise.
2572 * win32-low.c (child_init_thread_list): Likewise.
2573 (win32_clear_inferiors): Likewise.
2574 (fake_breakpoint_event): Likewise.
2575
2576 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2577
2578 * inferiors.h (find_inferior): Remove.
2579 * inferiors.c (find_inferior): Remove.
2580
2581 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2582
2583 * linux-low.c (resume_status_pending_p): Update comment.
2584 (need_step_over_p): Update comment.
2585
2586 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2587
2588 * linux-low.c (proceed_one_lwp): Return void, change parameter
2589 type.
2590 (unsuspend_and_proceed_one_lwp): Likewise.
2591 (proceed_all_lwps): Use for_each_thread.
2592 (unstop_all_lwps): Likewise.
2593
2594 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2595
2596 * linux-low.c (linux_resume_one_thread): Return void, take
2597 parameter directly.
2598 (linux_resume): Use for_each_thread.
2599
2600 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2601
2602 * linux-low.c (send_sigstop_callback): Return void, change
2603 parameter type. Rename to...
2604 (send_sigstop): ... this.
2605 (suspend_and_send_sigstop_callback): Return void, change parameter
2606 type. Rename to...
2607 (suspend_and_send_sigstop): ... this.
2608 (stop_all_lwps): Use for_each_thread.
2609
2610 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2611
2612 * linux-low.c (lwp_running): Return bool, remove unused
2613 argument.
2614 (linux_stabilize_threads): Use find_thread.
2615
2616 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2617
2618 * linux-low.c (select_singlestep_lwp_callback): Remove.
2619 (count_events_callback): Remove.
2620 (select_event_lwp_callback): Remove.
2621 (select_event_lwp): Use find_thread/for_each_thread.
2622
2623 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2624
2625 * linux-low.c (not_stopped_callback): Return bool, take filter
2626 argument directly.
2627 (linux_wait_for_event_filtered): Use find_thread.
2628 (linux_wait_1): Likewise.
2629
2630 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2631
2632 * linux-low.c (same_lwp): Remove.
2633 (find_lwp_pid): Use find_thread.
2634
2635 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2636
2637 * linux-low.c (delete_lwp_callback): Remove.
2638 (linux_mourn): Use for_each_thread.
2639
2640 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2641
2642 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2643 args parameter, don't check for pid.
2644 (linux_detach): Use for_each_thread.
2645
2646 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2647
2648 * linux-low.c (struct counter): Remove.
2649 (second_thread_of_pid_p): Remove.
2650 (last_thread_of_process_p): Use find_thread.
2651
2652 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2653
2654 * inferiors.c (find_inferior_in_random): Remove.
2655 * inferiors.h (find_inferior_in_random): Remove.
2656 * linux-low.c (status_pending_p_callback): Return bool, accept
2657 parameter ptid directly.
2658 (linux_wait_for_event_filtered): Use find_thread_in_random.
2659 (linux_wait_1): Likewise.
2660
2661 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2662
2663 * inferiors.c (find_inferior_id): Remove.
2664 (find_thread_ptid): Move implemention from find_inferior_id to
2665 here.
2666 * inferiors.h (find_inferior_id): Remove.
2667 * server.c (handle_status): Use find_thread_ptid.
2668 (process_serial_event): Likewise.
2669 * thread-db.c (find_one_thread): Likewise.
2670 (thread_db_thread_handle): Likewise.
2671 * win32-low.c (thread_rec): Likewise.
2672 (child_delete_thread): Likewise.
2673 (win32_thread_alive): Likewise.
2674 (get_child_debug_event): Likewise.
2675
2676 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2677
2678 * linux-mips-low.c (update_watch_registers_callback): Return
2679 void, remove pid_p parameter, don't check for pid.
2680 (mips_insert_point, mips_remove_point): Use for_each_thread.
2681
2682 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2683
2684 * lynx.low (lynx_delete_thread_callback): Remove.
2685 (lynx_mourn): Use for_each_thread.
2686
2687 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2688
2689 * regcache.c (regcache_invalidate_one): Remove.
2690 (regcache_invalidate_pid): use for_each_thread.
2691
2692 2017-11-26 Tom Tromey <tom@tromey.com>
2693
2694 * linux-low.c (linux_create_inferior): Update.
2695
2696 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2697
2698 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2699
2700 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2701
2702 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2703 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2704 * linux-aarch64-tdesc-selftest.c: New file.
2705 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2706
2707 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2708
2709 * configure.srv: Add new file.
2710 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2711 * linux-aarch64-tdesc-selftest.c: New file.
2712 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2713
2714 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2715
2716 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2717 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2718 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2719
2720 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2721
2722 * configure.srv: Add new files.
2723 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2724 aarch64_linux_read_description.
2725 * linux-aarch64-low.c (aarch64_linux_read_description):
2726 Merge with aarch64_arch_setup.
2727 (aarch64_arch_setup): Call aarch64_linux_read_description.
2728 * linux-aarch64-tdesc.c: New file.
2729 * linux-aarch64-tdesc.h: New file.
2730
2731 2017-11-24 Yao Qi <yao.qi@linaro.org>
2732
2733 * configure.srv: Set $srv_regobj for tic6x-linux.
2734 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2735 (tic6x_read_description): Move some code to tic6x_arch_setup.
2736 (tic6x_tdesc_test): New function.
2737 (initialize_low_arch): Call selftests::register_test.
2738
2739 2017-11-22 Yao Qi <yao.qi@linaro.org>
2740
2741 * remote-utils.c (prepare_resume_reply): Use memcpy.
2742
2743 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2744
2745 * linux-low.c (kill_one_lwp_callback): Return void, take
2746 argument directly, don't filter on pid.
2747 (linux_kill): Use for_each_thread.
2748
2749 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2750
2751 * linux-low.c (need_step_over_p): Return bool, remove dummy
2752 argument.
2753 (linux_resume, proceed_all_lwps): Use find_thread.
2754
2755 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2756
2757 * linux-low.c (resume_status_pending_p): Return bool, remove
2758 flag_p argument.
2759 (linux_resume): Use find_thread.
2760
2761 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2762
2763 * linux-low.c (struct thread_resume_array): Remove.
2764 (linux_set_resume_request): Return void, take arguments
2765 directly.
2766 (linux_resume): Use for_each_thread.
2767
2768 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2771 return bool, remove data argument.
2772 (linux_stabilize_threads): Use find_thread.
2773
2774 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2775
2776 * linux-low.c (unsuspend_one_lwp): Remove.
2777 (unsuspend_all_lwps): Use for_each_thread, inline code from
2778 unsuspend_one_lwp.
2779
2780 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2781
2782 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2783 * linux-low.c (struct iterate_over_lwps_args): Remove.
2784 (iterate_over_lwps_filter): Remove.
2785 (iterate_over_lwps): Use find_thread.
2786
2787 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2788
2789 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2790 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2791 code from reset_lwp_ptrace_options_callback.
2792
2793 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2794
2795 * linux-arm-low.c (struct update_registers_data): Remove.
2796 (update_registers_callback): Return void, take arguments
2797 directly, don't check thread's pid.
2798 (arm_insert_point, arm_remove_point): Use for_each_thread.
2799
2800 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2801
2802 * win32-low.c (continue_one_thread): Return void, take argument
2803 directly.
2804 (child_continue): Use for_each_thread.
2805
2806 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2807
2808 * win32-i386-low.c (update_debug_registers_callback): Rename
2809 to ...
2810 (update_debug_registers): ... this, return void, remove pid_p arg.
2811 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2812
2813 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * inferiors.h (struct process_info): Add constructor, initialize
2816 fields..
2817 <syscalls_to_catch>: Change type to std::vector<int>.
2818 * inferiors.c (add_process): Allocate process_info with new.
2819 (remove_process): Free process_info with delete.
2820 * linux-low.c (handle_extended_wait): Adjust.
2821 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2822 * server.c (handle_general_set): Adjust.
2823
2824 2017-11-16 Pedro Alves <palves@redhat.com>
2825
2826 * remote-utils.c (remote_close): Block SIGIO signals instead of
2827 uninstalling the SIGIO handler.
2828
2829 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2830
2831 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2832
2833 2017-11-16 Yao Qi <yao.qi@linaro.org>
2834
2835 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2836 (tic6x_store_gregset): Likewise.
2837 (tic6x_usrregs_info): Move it up.
2838
2839 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2840
2841 * Makefile.in: Update arch rules.
2842 * configure.srv: Explicitly mark arch/ files.
2843
2844 2017-11-13 Andreas Schwab <schwab@suse.de>
2845
2846 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2847 function.
2848 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2849
2850 2017-11-06 Pedro Alves <palves@redhat.com>
2851
2852 * config.in, configure: Regenerate.
2853
2854 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2855
2856 * target.c (struct thread_search): Remove.
2857 (thread_search_callback): Remove.
2858 (prepare_to_access_memory): Use for_each_thread instead of
2859 find_inferior. Inline code from thread_search_callback.
2860
2861 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2862
2863 * server.c (struct visit_actioned_threads_data): Remove.
2864 (visit_actioned_threads): Change prototype to take arguments
2865 directly.
2866 (resume): Use find_thread instead of find_inferior.
2867
2868 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2869
2870 * server.c (queue_stop_reply_callback): Change prototype, return
2871 void.
2872 (find_status_pending_thread_callback): Remove.
2873 (handle_status): Replace find_inferior with find_thread and
2874 for_each_thread.
2875
2876 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2877
2878 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2879 with REGNO.
2880 (aarch64_store_gregset): Likewise.
2881 (aarch64_fill_fpregset): Likewise.
2882 (aarch64_store_fpregset): Likewise.
2883
2884 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2885
2886 * gdbthread.h (find_thread, for_each_thread): New functions.
2887 * inferiors.c (thread_of_pid): Remove.
2888 (find_any_thread_of_pid): Use find_thread.
2889 * linux-low.c (num_lwps): Use for_each_thread.
2890
2891 2017-10-17 Yao Qi <yao.qi@linaro.org>
2892
2893 * Makefile.in: Remove one rule.
2894 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2895
2896 2017-10-17 Yao Qi <yao.qi@linaro.org>
2897
2898 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2899 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2900
2901 2017-10-17 Yao Qi <yao.qi@linaro.org>
2902
2903 * configure.srv: Rename arm.o with arch/arm.o.
2904
2905 2017-10-17 Yao Qi <yao.qi@linaro.org>
2906
2907 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2908 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2909 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2910 (arch-i386.o, arch-amd64.o): Remove rules.
2911 (arch/%.o): New rule.
2912 Update POSTCOMPILE and COMPILE.pre.
2913 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2914 * configure: Re-generated.
2915 * configure.srv: Replace arch-i386.o with arch/i386.o.
2916 Replace arch-amd64.o with arch/amd64.o.
2917
2918 2017-10-16 Yao Qi <yao.qi@linaro.org>
2919
2920 * configure: Regenerated.
2921
2922 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2923
2924 * inferiors.h: (struct inferior_list): Remove.
2925 (struct inferior_list_entry); Remove.
2926 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2927 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2928 get_first_inferior): Remove.
2929 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2930 find_inferior_id, find_inferior_in_random): Change signature.
2931 * inferiors.c (all_threads): Change type to
2932 std::list<thread_info *>.
2933 (get_thread): Remove macro.
2934 (find_inferior, find_inferior_id): Change signature, implement
2935 using find_thread.
2936 (find_inferior_in_random): Change signature, implement using
2937 find_thread_in_random.
2938 (for_each_inferior, for_each_inferior_with_data): Change
2939 signature, implement using for_each_thread.
2940 (add_inferior_to_list, remove_inferior): Remove.
2941 (add_thread, get_first_thread, thread_of_pid,
2942 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2943 (get_first_inferior, one_inferior_p, clear_inferior_list):
2944 Remove.
2945 (clear_inferiors, get_thread_process): Update.
2946 * gdbthread.h: Include <list>.
2947 (struct thread_info) <entry>: Remove field.
2948 <id>: New field.
2949 (all_threads): Change type to std::list<thread_info *>.
2950 (get_first_inferior): Add doc.
2951 (find_thread, for_each_thread, find_thread_in_random): New
2952 functions.
2953 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2954 * linux-arm-low.c (update_registers_callback): Update.
2955 * linux-low.c (second_thread_of_pid_p): Update.
2956 (kill_one_lwp_callback, linux_detach_lwp_callback,
2957 delete_lwp_callback, status_pending_p_callback, same_lwp,
2958 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2959 iterate_over_lwps, not_stopped_callback,
2960 resume_stopped_resumed_lwps, count_events_callback,
2961 select_singlestep_lwp_callback, select_event_lwp_callback,
2962 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2963 suspend_and_send_sigstop_callback, wait_for_sigstop,
2964 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2965 lwp_running, linux_set_resume_request, resume_status_pending_p,
2966 need_step_over_p, start_step_over, linux_resume_one_thread,
2967 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2968 reset_lwp_ptrace_options_callback): Update.
2969 * linux-mips-low.c (update_watch_registers_callback): Update.
2970 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2971 Update.
2972 (free_register_cache_thread_one): Remove.
2973 (regcache_release): Update.
2974 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2975 handle_qxfer_threads_worker): Update.
2976 (handle_query): Update, use list iterator.
2977 (visit_actioned_threads, handle_pending_status,
2978 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2979 clear_pending_status_callback, set_pending_status_callback,
2980 find_status_pending_thread_callback, handle_status,
2981 process_serial_event): Update.
2982 * target.c (thread_search_callback): Update.
2983 * thread-db.c (thread_db_get_tls_address): Update.
2984 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2985 Update.
2986 * win32-i386-low.c (update_debug_registers_callback): Update.
2987 * win32-low.c (delete_thread_info, child_delete_thread,
2988 continue_one_thread, suspend_one_thread,
2989 get_child_debug_event): Adjust.
2990
2991 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2992
2993 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2994 * inferiors.h: Include <list>.
2995 (struct process_info) <entry>: Remove field.
2996 <pid>: New field.
2997 (pid_of): Change macro to function.
2998 (ptid_of, lwpid_of): Remove macro.
2999 (all_processes): Change type to std::list<process_info *>.
3000 (ALL_PROCESSES): Remove macro.
3001 (for_each_process, find_process): New function.
3002 * inferiors.c (all_processes): Change type to
3003 std::list<process_info *>.
3004 (find_thread_process): Adjust.
3005 (add_process): Likewise.
3006 (remove_process): Likewise.
3007 (find_process_pid): Likewise.
3008 (get_first_process): Likewise.
3009 (started_inferior_callback): Remove.
3010 (have_started_inferiors_p): Adjust.
3011 (attached_inferior_callback): Remove.
3012 (have_attached_inferiors_p): Adjust.
3013 * linux-low.c (check_zombie_leaders): Likewise.
3014 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3015 (x86_linux_update_xmltarget): Adjust.
3016 * server.c (handle_query): Likewise.
3017 (gdb_reattached_process): Remove.
3018 (handle_status): Adjust.
3019 (kill_inferior_callback): Likewise.
3020 (detach_or_kill_inferior): Remove.
3021 (print_started_pid): Likewise.
3022 (print_attached_pid): Likewise.
3023 (detach_or_kill_for_exit): Update.
3024 (process_serial_event): Likewise.
3025 * linux-arm-low.c (arm_new_fork): Likewise.
3026
3027 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3028
3029 * dll.h: Include <list>.
3030 (struct dll_info): Add constructor.
3031 <entry>: Remove field.
3032 (all_dlls): Change type to std::list<dll_info>.
3033 * dll.c: Include <algorithm>.
3034 (get_dll): Remove macro.
3035 (all_dlls): Change type to std::list<dll_info *>.
3036 (free_one_dll): Remove.
3037 (match_dll): Likewise.
3038 (loaded_dll): Adjust.
3039 (unloaded_dll): Adjust to all_dlls type change, use
3040 std::find_if. Inline code from match_dll.
3041 (clear_dlls): Adjust to all_dlls type change.
3042 * server.c (emit_dll_description): Remove.
3043 (handle_qxfer_libraries): Adjust to all_dlls type change,
3044 integrate emit_dll_description's functionality.
3045
3046 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3047
3048 * linux-low.h (struct linux_target_ops) <delete_process>: New
3049 field.
3050 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3051 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3052 (struct linux_target_ops): Add delete_process callback.
3053 * linux-arm-low.c (arm_delete_process): New.
3054 (struct linux_target_ops): Add delete_process callback.
3055 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3056 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3057 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3058 * linux-mips-low.c (mips_linux_delete_process): New.
3059 (struct linux_target_ops): Add delete_process callback.
3060 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3061 * linux-s390-low.c (struct linux_target_ops): Likewise.
3062 * linux-sh-low.c (struct linux_target_ops): Likewise.
3063 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3064 * linux-tile-low.c (struct linux_target_ops): Likewise.
3065 * linux-x86-low.c (x86_linux_delete_process): New.
3066 (struct linux_target_ops): Add delete_process callback.
3067 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3068
3069 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3070
3071 * linux-aarch64-low.c (the_low_target): Add thread delete
3072 callback.
3073 * linux-arm-low.c (arm_delete_thread): New function.
3074 (the_low_target): Add thread delete callback.
3075 * linux-bfin-low.c (the_low_target): Likewise.
3076 * linux-crisv32-low.c (the_low_target): Likewise.
3077 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3078 set.
3079 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3080 field.
3081 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3082 * linux-mips-low.c (mips_linux_delete_thread): New function.
3083 (the_low_target): Add thread delete callback.
3084 * linux-ppc-low.c (the_low_target): Likewise.
3085 * linux-s390-low.c (the_low_target): Likewise.
3086 * linux-sh-low.c (the_low_target): Likewise.
3087 * linux-tic6x-low.c (the_low_target): Likewise.
3088 * linux-tile-low.c (the_low_target): Likewise.
3089 * linux-x86-low.c (the_low_target): Likewise.
3090 * linux-xtensa-low.c (the_low_target): Likewise.
3091
3092 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3093
3094 * win32-low.c: Include "common-inferior.h".
3095
3096 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3097
3098 * inferiors.c (set_inferior_cwd): New function.
3099 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3100 (handle_query): Inform that QSetWorkingDir is supported.
3101 * win32-low.c (create_process): Pass the inferior's cwd to
3102 CreateProcess.
3103
3104 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3105
3106 * inferiors.c (current_inferior_cwd): New global variable.
3107 (get_inferior_cwd): New function.
3108 * inferiors.h (struct process_info) <cwd>: New field.
3109
3110 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3111
3112 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3113 (OBS): Add gdb_tilde_expand.o.
3114
3115 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3116
3117 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3118 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3119
3120 2017-09-29 Pedro Alves <palves@redhat.com>
3121
3122 * ax.c (gdb_parse_agent_expr): Constify.
3123 * ax.h (gdb_parse_agent_expr): Constify.
3124 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3125 Constify.
3126 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3127 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3128 * remote-utils.h (read_ptid): Constify.
3129 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3130 (process_point_options, process_serial_event): Constify.
3131 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3132 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3133 (cmd_qtbuffer): Constify.
3134
3135 2017-09-29 Pedro Alves <palves@redhat.com>
3136
3137 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3138 fails.
3139
3140 2017-09-29 Pedro Alves <palves@redhat.com>
3141
3142 * linux-low.c (handle_extended_wait): Pass parent thread instead
3143 of process to thread_db_notice_clone.
3144 * linux-low.h (thread_db_notice_clone): Replace parent process
3145 parameter with parent thread parameter.
3146 * thread-db.c (find_one_thread): Add comment.
3147 (thread_db_notice_clone): Replace parent process parameter with
3148 parent thread parameter. Temporarily switch to the parent thread.
3149
3150 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3151
3152 * gdbthread.h: Include "common-gdbthread.h".
3153 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3154 "if" when validating the ptid.
3155 * remote-utils.c: Include "gdbthread.h".
3156 (prepare_resume_reply): Use "switch_to_thread".
3157 * target.c (done_accessing_memory): Likewise.
3158
3159 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3160
3161 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3162 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3163 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3164 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3165 s390x-gs-linux64-ipa.o to ipa_obj.
3166 * linux-s390-low.c (HWCAP_S390_GS): New define.
3167 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3168 New functions.
3169 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3170 (s390_arch_setup): Check for guarded-storage support and choose
3171 appropriate tdesc.
3172 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3173 init_registers_s390x_gs_linux64.
3174 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3175 enum value.
3176 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3177 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3178
3179 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3180
3181 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3182
3183 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3184
3185 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3186 (thread_db_thread_handle): Declare.
3187 * linux-low.c (linux_target_ops): Initialize thread_handle.
3188 * server.c (handle_qxfer_threads_worker): Add support for
3189 "handle" attribute.
3190 * target.h (struct target_ops): Add new function pointer,
3191 thread_handle.
3192 (target_thread_handle): Define.
3193 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3194 field in lwp.
3195 (thread_db_thread_handle): New function.
3196
3197 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3198
3199 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3200 * linux-low.h (thread_db_notice_clone): Declare.
3201 * thread-db.c (thread_db_notice_clone): New function.
3202
3203 2017-09-21 Pedro Alves <palves@redhat.com>
3204
3205 * server.c (gdb_read_memory, handle_status, process_serial_event)
3206 (handle_serial_event, handle_target_event): Adjust to
3207 set_desired_thread prototype change.
3208 * target.c (set_desired_thread): Remove 'use_general' parameter
3209 and adjust.
3210 * target.h (set_desired_thread): Remove 'use_general' parameter.
3211
3212 2017-09-20 Tom Tromey <tom@tromey.com>
3213
3214 * target.c (target_terminal::terminal_state): Define.
3215 (target_terminal::init): Rename from target_terminal_init.
3216 (target_terminal::inferior): Rename from
3217 target_terminal_inferior.
3218 (target_terminal::ours): Rename from target_terminal_ours.
3219 (target_terminal::ours_for_output, target_terminal::info): New.
3220
3221 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3222
3223 * server.c (accumulate_file_name_length): Remove.
3224 (emit_dll_description): Adjust to std::string change.
3225 (handle_qxfer_libraries): Use std::string to hold document.
3226
3227 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3228
3229 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3230 return type of xml_escape_text.
3231 * server.c (emit_dll_description): Likewise.
3232
3233 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3234
3235 * server.c (captured_main): Accept argument for --selftest.
3236 Update run_tests call.
3237 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3238 when registering selftests.
3239
3240 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3241
3242 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3243 instead of "VEC" for "target_desc.reg_defs".
3244 (regcache_cpy): Likewise.
3245 (registers_to_string): Likewise.
3246 (registers_from_string): Likewise.
3247 (find_regno): Likewise.
3248 (supply_regblock): Likewise.
3249 (regcache_raw_read_unsigned): Likewise.
3250 * tdesc.c (init_target_desc): Likewise.
3251 (tdesc_create_reg): Likewise.
3252 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3253 (struct target_desc) <reg_defs>: Convert to "std::vector".
3254 (target_desc): Do not initialize "reg_defs".
3255 (~target_desc): Update code to use "std::vector" instead of "VEC"
3256 for "target_desc.reg_defs".
3257 (operator==): Likewise.
3258
3259 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3260
3261 * inferiors.h (thread_to_gdb_id): Remove.
3262 * inferiors.c (thread_to_gdb_id): Remove.
3263 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3264 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3265 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3266 Likewise.
3267 * nto-low.c (nto_fetch_registers, nto_store_registers,
3268 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3269
3270 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3271
3272 * inferiors.h (gdb_id_to_thread_id): Remove.
3273 * inferiors.c (gdb_id_to_thread_id): Remove.
3274 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3275 removal. Move pid declaration closer to where it's used.
3276
3277 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3278
3279 * server.c (handle_detach): New function.
3280 (process_serial_event): Move code out, call handle_detach.
3281
3282 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3283
3284 * server.c (require_running): Rename to ...
3285 (require_running_or_return): ... this ...
3286 (require_running_or_break): ... and this.
3287 (handle_query, process_serial_event): Adjust.
3288
3289 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3290
3291 * linux-low.c (linux_set_resume_request): Remove unused
3292 variables.
3293
3294 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3295
3296 * server.c (first_thread_of): Remove.
3297 (process_serial_event): Replace usage of first_thread_of with
3298 find_any_thread_of_pid.
3299 * tracepoint.c (same_process_p): Remove.
3300 (gdb_agent_about_to_close): Replace usage of same_process_p with
3301 find_any_thread_of_pid.
3302 * linux-x86-low.c (same_process_callback): Remove.
3303 (x86_arch_setup_process_callback): Replace usage of
3304 same_process_callback with find_any_thread_of_pid.
3305 * thread-db.c (any_thread_of): Remove.
3306 (switch_to_process): Replace usage of any_thread_of with
3307 find_any_thread_of_pid.
3308 * inferiors.c (thread_pid_matches_callback): Remove.
3309 (find_thread_process): Adjust to use find_any_thread_of_pid.
3310
3311 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3312
3313 * regcache.c (get_thread_regcache): Guard calls to "memset"
3314 with "!VEC_empty".
3315
3316 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3317
3318 * linux-low.c (handle_extended_wait): Use
3319 "allocate_target_description" instead of "XNEW".
3320 * linux-x86-low.c (initialize_low_arch): Likewise.
3321
3322 2017-09-05 Yao Qi <yao.qi@linaro.org>
3323
3324 * configure.srv (srv_i386_regobj): Remove.
3325 (srv_amd64_regobj): Remove.
3326 (srv_regobj): Set it to "" for x86 non-linux targets.
3327 * linux-x86-tdesc.c (i386_linux_read_description):
3328 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3329 (init_registers_i386): Remove the declaration.
3330 (tdesc_i386): Remove the declaration.
3331 (lynx_i386_arch_setup): Call i386_create_target_description.
3332 * nto-x86-low.c: Likewise.
3333 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3334 [!__x86_64__]: include arch/i386.h.
3335 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3336
3337 2017-09-05 Yao Qi <yao.qi@linaro.org>
3338
3339 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3340 i386/amd64-XXX-linux from it.
3341
3342 2017-09-05 Yao Qi <yao.qi@linaro.org>
3343
3344 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3345 false.
3346 (ipa_amd64_linux_regobj): Remove.
3347 (ipa_x32_linux_regobj): Remove.
3348
3349 2017-09-05 Yao Qi <yao.qi@linaro.org>
3350
3351 * Makefile.in (arch-amd64.o): New rule.
3352 * configure.srv: Append arch-amd64.o.
3353 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3354 (get_ipa_tdesc): Call amd64_linux_read_description.
3355 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3356 and init_registers_amd64_XXX.
3357 * linux-x86-low.c (x86_linux_read_description): Call
3358 amd64_linux_read_description.
3359 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3360 (initialize_low_arch): Don't call init_registers_x32_XXX and
3361 init_registers_amd64_XXX.
3362 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3363 and tdesc_amd64_XXX.
3364 [__x86_64__] (amd64_tdesc_test): New function.
3365 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3366 and init_registers_amd64_XXX.
3367 * linux-x86-tdesc.c: Include arch/amd64.h.
3368 (xcr0_to_tdesc_idx): New function.
3369 (i386_linux_read_description): New function.
3370 (amd64_get_ipa_tdesc_idx): New function.
3371 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3372 (amd64_get_ipa_tdesc): Declare.
3373
3374 2017-09-05 Yao Qi <yao.qi@linaro.org>
3375
3376 * configure.srv (srv_i386_linux_xmlfiles): Remove
3377 i386/i386-XXX-linux.xml from it.
3378
3379 2017-09-05 Yao Qi <yao.qi@linaro.org>
3380
3381 * configure.srv: Set srv_i386_linux_regobj empty if $development
3382 is false.
3383 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3384 initialize_low_tdesc.
3385 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3386 with #if initialize_low_tdesc.
3387 * linux-x86-tdesc-selftest.c: New file.
3388 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3389
3390 2017-09-05 Yao Qi <yao.qi@linaro.org>
3391
3392 * Makefile.in (arch-i386.o): New rule.
3393 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3394 (x86_64-*-linux*): Likewise.
3395 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3396 include arch/i386.h.
3397 (i386_linux_read_description): Remove code and call
3398 i386_create_target_description.
3399 * tdesc.c (allocate_target_description): New function.
3400 * tdesc.h (set_tdesc_architecture): Remove declaration.
3401 (set_tdesc_osabi): Likewise.
3402
3403 2017-09-05 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3406 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3407 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3408 .xmltarget.
3409 * server.c (get_features_xml): Call tdesc_get_features_xml.
3410 * tdesc.c (set_tdesc_architecture): New function.
3411 (set_tdesc_osabi): New function.
3412 (tdesc_get_features_xml): New function.
3413 (tdesc_create_feature): Add an argument.
3414 * tdesc.h (struct target_desc) <features>: New field.
3415 <arch, osabi>: New field.
3416 (~target_desc): xfree features, arch, and osabi.
3417 (target_desc::oerator==): Don't compare .xmltarget.
3418 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3419 (set_tdesc_osabi): Likewise.
3420 (tdesc_get_features_xml): Likewise.
3421
3422 2017-09-05 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-x86-tdesc.c: Include selftest.h.
3425 (i386_tdesc_test): New function.
3426 (initialize_low_tdesc): Call selftests::register_test.
3427 * tdesc.h: Include regdef.h.
3428 (target_desc): Override operator == and !=.
3429
3430 2017-09-05 Yao Qi <yao.qi@linaro.org>
3431
3432 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3433 (ipa_obj): Likewise.
3434 * linux-i386-ipa.c: Include common/x86-xstate.h
3435 (get_ipa_tdesc): Call i386_linux_read_description.
3436 (initialize_low_tracepoint): Don't call init_registers_XXX
3437 functions, call initialize_low_tdesc instead.
3438 * linux-x86-low.c (x86_linux_read_description): Call
3439 i386_linux_read_description.
3440 (initialize_low_arch): Don't call init_registers_i386_XXX
3441 functions, call initialize_low_tdesc.
3442 * linux-x86-tdesc.c: New file.
3443 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3444 (i386_get_ipa_tdesc_idx): Declare.
3445 (i386_get_ipa_tdesc): Declare.
3446 (initialize_low_tdesc): Declare.
3447
3448 2017-09-05 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3451 instead of 0.
3452
3453 2017-09-05 Yao Qi <yao.qi@linaro.org>
3454
3455 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3456 * regcache.c (get_thread_regcache): Use VEC_length.
3457 (init_register_cache): Likewise.
3458 (regcache_cpy): Likewise.
3459 (registers_to_string): Iterate reg_defs via VEC_iterate.
3460 (find_regno): Likewise.
3461 (find_register_by_number): Use VEC_index.
3462 (register_size): Call find_register_by_number.
3463 (register_data): Call find_register_by_number.
3464 (supply_regblock): Use VEC_length.
3465 (regcache_raw_read_unsigned): Likewise.
3466 * tdesc.c (init_target_desc): Iterate reg_defs via
3467 VEC_iterate.
3468 (default_description): Update initializer.
3469 (copy_target_description): Don't update field num_registers.
3470 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3471 <num_registers>: Remove.
3472
3473 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3474
3475 * Makefile.in (.SECONDARY): Define target.
3476
3477 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3478
3479 * linux-low.c (linux_wait_1): Adjust.
3480 * server.c (queue_stop_reply_callback): Adjust.
3481
3482 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3483
3484 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3485 QEnvironmentUnset and QEnvironmentReset packets.
3486 (handle_query): Inform remote that QEnvironmentHexEncoded,
3487 QEnvironmentUnset and QEnvironmentReset are supported.
3488
3489 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3490
3491 * inferiors.h (inferior_target_data): Rename to ...
3492 (thread_target_data): ... this.
3493 (inferior_regcache_data): Rename to ...
3494 (thread_regcache_data): ... this.
3495 (set_inferior_regcache_data): Rename to ...
3496 (set_thread_regcache_data): ... this.
3497 * inferiors.c (inferior_target_data): Rename to ...
3498 (thread_target_data): ... this.
3499 (inferior_regcache_data): Rename to ...
3500 (thread_regcache_data): ... this.
3501 (set_inferior_regcache_data): Rename to ...
3502 (set_thread_regcache_data): ... this.
3503 (free_one_thread): Update.
3504 * linux-low.h (get_thread_lwp): Update.
3505 * regcache.c (get_thread_regcache): Update.
3506 (regcache_invalidate_thread): Update.
3507 (free_register_cache_thread): Update.
3508 * win32-i386-low.c (update_debug_registers_callback): Update.
3509 (win32_get_current_dr): Update.
3510 * win32-low.c (thread_rec): Update.
3511 (delete_thread_info): Update.
3512 (continue_one_thread): Update.
3513 (suspend_one_thread): Update.
3514
3515 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3516
3517 * inferiors.c (set_inferior_target_data): Remove.
3518 * inferiors.h (set_inferior_target_data): Remove.
3519
3520 2017-08-18 Yao Qi <yao.qi@linaro.org>
3521
3522 * Makefile.in (OBS): Add selftest.o.
3523 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3524 * configure, config.in: Re-generated.
3525 * server.c: Include common/sefltest.h.
3526 (captured_main): Handle option --selftest.
3527
3528 2017-08-09 Yao Qi <yao.qi@linaro.org>
3529
3530 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3531 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3532 i386-avx-mpx.o and i386-mmx.o.
3533 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3534 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3535 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3536 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3537 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3538 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3539 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3540 i386/amd64-avx-mpx.xml.
3541
3542 2017-08-09 Yao Qi <yao.qi@linaro.org>
3543
3544 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3545 and x32-avx-avx512.o.
3546 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3547 i386/x32-avx-avx512.xml.
3548
3549 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3550
3551 * tracepoint.h (enum class fast_tpoint_collect_result): New
3552 enumeration.
3553 (fast_tracepoint_collecting): Change return type to
3554 fast_tpoint_collect_result.
3555 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3556 * linux-low.h: Include tracepoint.h.
3557 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3558 fast_tpoint_collect_result.
3559 * linux-low.c (handle_tracepoints): Adjust.
3560 (linux_fast_tracepoint_collecting): Change return type to
3561 fast_tpoint_collect_result.
3562 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3563 linux_wait_1, stuck_in_jump_pad_callback,
3564 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3565 proceed_one_lwp): Adjust to type change.
3566
3567 2017-07-10 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3570
3571 2017-06-29 Yao Qi <yao.qi@linaro.org>
3572
3573 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3574 Remove.
3575 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3576
3577 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3578
3579 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3580
3581 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3582
3583 * linux-low.c (linux_create_inferior): Adjust code to access the
3584 environment information via 'gdb_environ' class.
3585 * lynx-low.c (lynx_create_inferior): Likewise.
3586 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3587 (get_environ): Return a pointer to 'our_environ'.
3588 (captured_main): Initialize 'our_environ'.
3589 * server.h (get_environ): Adjust prototype.
3590 * spu-low.c (spu_create_inferior): Adjust code to access the
3591 environment information via 'gdb_environ' class.
3592
3593 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3594
3595 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3596 usage of "register" keyword.
3597
3598 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3599
3600 * configure: Re-generate.
3601
3602 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3603
3604 * configure: Re-generate.
3605
3606 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3607
3608 * Makefile.in (COMPILE.pre): Add "-x c++".
3609
3610 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3611
3612 * fork-child.c: Conditionally include <signal.h>.
3613
3614 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3615
3616 * server.c (handle_general_set): Handle new packet
3617 "QStartupWithShell".
3618 (handle_query): Add "QStartupWithShell" to the list of supported
3619 packets.
3620 (gdbserver_usage): Add help text explaining the
3621 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3622 options.
3623 (captured_main): Recognize and act upon the presence of the new
3624 CLI options.
3625
3626 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3627 Pedro Alves <palves@redhat.com>
3628
3629 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3630 * configure: Regenerate.
3631 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3632 "fork-inferior.o".
3633 (i[34567]86-*-lynxos*): Likewise.
3634 (spu*-*-*): Likewise.
3635 * fork-child.c: New file.
3636 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3637 and "environ.h".
3638 (linux_ptrace_fun): New function.
3639 (linux_create_inferior): Adjust function prototype to reflect
3640 change on "target.h". Adjust function code to use
3641 "fork_inferior".
3642 (linux_request_interrupt): Delete "signal_pid".
3643 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3644 (lynx_ptrace_fun): New function.
3645 (lynx_create_inferior): Adjust function prototype to reflect
3646 change on "target.h". Adjust function code to use
3647 "fork_inferior".
3648 * nto-low.c (nto_create_inferior): Adjust function prototype and
3649 code to reflect change on "target.h". Update comments.
3650 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3651 "common-terminal.h" and "environ.h".
3652 (terminal_fd): Moved to fork-child.c.
3653 (old_foreground_pgrp): Likewise.
3654 (restore_old_foreground_pgrp): Likewise.
3655 (last_status): Make it global.
3656 (last_ptid): Likewise.
3657 (our_environ): New variable.
3658 (startup_with_shell): Likewise.
3659 (program_name): Likewise.
3660 (program_argv): Rename to...
3661 (program_args): ...this.
3662 (wrapper_argv): New variable.
3663 (start_inferior): Delete function.
3664 (get_exec_wrapper): New function.
3665 (get_exec_file): Likewise.
3666 (get_environ): Likewise.
3667 (prefork_hook): Likewise.
3668 (post_fork_inferior): Likewise.
3669 (postfork_hook): Likewise.
3670 (postfork_child_hook): Likewise.
3671 (handle_v_run): Update code to deal with arguments coming from the
3672 remote host. Update calls from "start_inferior" to
3673 "create_inferior".
3674 (captured_main): Likewise. Initialize environment variable. Call
3675 "have_job_control".
3676 * server.h (post_fork_inferior): New prototype.
3677 (get_environ): Likewise.
3678 (last_status): Declare.
3679 (last_ptid): Likewise.
3680 (signal_pid): Likewise.
3681 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3682 (spu_ptrace_fun): New function.
3683 (spu_create_inferior): Adjust function prototype to reflect change
3684 on "target.h". Adjust function code to use "fork_inferior".
3685 * target.c (target_terminal_init): New function.
3686 (target_terminal_inferior): Likewise.
3687 (target_terminal_ours): Likewise.
3688 * target.h: Include <vector>.
3689 (struct target_ops) <create_inferior>: Update prototype.
3690 (create_inferior): Update macro.
3691 * utils.c (gdb_flush_out_err): New function.
3692 * win32-low.c (win32_create_inferior): Adjust function prototype
3693 and code to reflect change on "target.h".
3694
3695 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3696
3697 * inferiors.c (switch_to_thread): New function.
3698
3699 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3700
3701 * Makefile.in (SFILE): Add "common/job-control.c".
3702 (OBS): Add "job-control.o".
3703
3704 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3705
3706 * Makefile: Remove "@host_makefile_frag@".
3707
3708 2017-05-05 Pedro Alves <palves@redhat.com>
3709
3710 * configure: Regenerate.
3711
3712 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3713
3714 * configure: Regenerate.
3715
3716 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3717
3718 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3719 software_single_step change of return type to
3720 std::vector<CORE_ADDR>.
3721 * linux-low.c (install_software_single_step_breakpoints):
3722 Likewise.
3723 * linux-low.h (install_software_single_step_breakpoints):
3724 Likewise.
3725
3726 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3727
3728 * remote-utils.c: Include "gdb_termios.h" instead of
3729 "terminal.h".
3730 * terminal.h: Delete file.
3731
3732 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3733
3734 * server.c: Include <vector>.
3735 <program_argv, wrapper_argv>: Convert to std::vector.
3736 (start_inferior): Rewrite function to use C++.
3737 (handle_v_run): Likewise. Update code that calculates the argv
3738 based on the vRun packet; use C++.
3739 (captured_main): Likewise.
3740
3741 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3742
3743 * server.c (handle_v_cont): Initialize thread_resume::thread
3744 with null_ptid.
3745
3746 2017-04-05 Pedro Alves <palves@redhat.com>
3747
3748 * configure: Regenerate.
3749
3750 2017-04-05 Pedro Alves <palves@redhat.com>
3751
3752 * gdbreplay.c (sync_error): Constify.
3753 * linux-x86-low.c (push_opcode): Constify.
3754
3755 2017-04-05 Pedro Alves <palves@redhat.com>
3756
3757 * win32-low.c (get_child_debug_event)
3758 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3759 Report TARGET_WAITKIND_SPURIOUS instead.
3760
3761 2017-04-05 Pedro Alves <palves@redhat.com>
3762
3763 * remote-utils.c (remote_prepare, remote_open): Constify.
3764 * remote-utils.h (remote_prepare, remote_open): Constify.
3765 * server.c (captured_main): Constify 'port' handling.
3766
3767 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3768
3769 * Makefile.in (clean): Clear .deps.
3770
3771 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3772
3773 * .gitignore: Remove generated files, replace with wildcard.
3774 * (clean): Replace removal of generated files with wildcard.
3775 (version.c): Replace with...
3776 (version-generated.c): ...this.
3777 (xml-builtin.c): Replace with...
3778 (xml-builtin-generated.c): ...this.
3779 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3780 (%.c: *regformats*): Replace with...
3781 (%-generated.c: *regformats*): ...this.
3782
3783 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3784
3785 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3786 (xtensa_fill_gregset): Call collect_register_by_name for
3787 threadptr register.
3788 (xtensa_store_gregset): Call supply_register_by_name for
3789 threadptr register.
3790
3791 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3792
3793 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3794 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3795 (xtensa_store_gregset): Call supply_register for all registers in
3796 a0_regnum..a0_regnum + C0_NREGS range.
3797
3798 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3799
3800 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3801 (ax-ipa.o: ax.c): Remove.
3802 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3803 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3804 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3805 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3806 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3807
3808 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3809
3810 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3811 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3812 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3813 (errors-ipa.o: ../common/errors.c): Remove.
3814 (format-ipa.o: ../common/format.c): Remove.
3815 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3816
3817 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3818
3819 * Makefile.in (%-ipa.o: %.c): New rule.
3820 (tracepoint-ipa.o: tracepoint.c): Remove.
3821 (utils-ipa.o: utils.c): Remove.
3822 (remote-utils-ipa.o: remote-utils.c): Remove.
3823 (regcache-ipa.o: regcache.c): Remove.
3824 (i386-linux-ipa.o: i386-linux.c): Remove.
3825 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3826 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3827 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3828 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3829 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3830 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3831 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3832 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3833 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3834 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3835 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3836 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3837 (aarch64-ipa.o: aarch64.c): Remove.
3838 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3839 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3840 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3841 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3842 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3843 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3844 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3845 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3846 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3847 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3848 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3849 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3850 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3851 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3852 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3853 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3854 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3855 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3856 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3857 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3858 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3859 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3860 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3861 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3862 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3863 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3864 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3865 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3866 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3867 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3868 (tdesc-ipa.o: tdesc.c): Remove.
3869 (x32-linux-ipa.o: x32-linux.c): Remove.
3870 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3871 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3872
3873 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3874
3875 * Makefile.in (%.o: ../arch/%.c): New rule.
3876 (arm.o: ../arch/arm.c): Remove.
3877 (arm-linux.o: ../arch/arm-linux.c): Remove.
3878 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3879 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3880
3881 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3882
3883 * Makefile.in (%.o: ../nat/%.c): New rule.
3884 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3885 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3886 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3887 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3888 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3889 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3890 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3891 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3892 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3893 (linux-personality.o: ../nat/linux-personality.c): Remove.
3894 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3895 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3896 (x86-linux.o: ../nat/x86-linux.c): Remove.
3897 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3898 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3899
3900 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3901
3902 * Makefile.in (%.o: ../common/%.c): New rule.
3903 (signals.o: ../common/signals.c): Remove.
3904 (print-utils.o: ../common/print-utils.c): Remove.
3905 (rsp-low.o: ../common/rsp-low.c): Remove.
3906 (common-utils.o: ../common/common-utils.c): Remove.
3907 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3908 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3909 (vec.o: ../common/vec.c): Remove.
3910 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3911 (xml-utils.o: ../common/xml-utils.c): Remove.
3912 (ptid.o: ../common/ptid.c): Remove.
3913 (buffer.o: ../common/buffer.c): Remove.
3914 (format.o: ../common/format.c): Remove.
3915 (filestuff.o: ../common/filestuff.c): Remove.
3916 (agent.o: ../common/agent.c): Remove.
3917 (errors.o: ../common/errors.c): Remove.
3918 (environ.o: ../common/environ.c): Remove.
3919 (common-debug.o: ../common/common-debug.c): Remove.
3920 (cleanups.o: ../common/cleanups.c): Remove.
3921 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3922 (fileio.o: ../common/fileio.c): Remove.
3923 (common-regcache.o: ../common/common-regcache.c): Remove.
3924 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3925 (new-op.o: ../common/new-op.c): Remove.
3926 (btrace-common.o: ../common/btrace-common.c): Remove.
3927
3928 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3929
3930 * Makefile.in (%.o: ../target/%.c): New rule.
3931 (waitstatus.o: ../target/waitstatus.c): Remove.
3932
3933 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3934
3935 * Makefile.in
3936 (%.c: ../regformats/%.dat,
3937 (%.c: ../regformats/arm/%.dat,
3938 (%.c: ../regformats/i386/%.dat,
3939 (%.c: ../regformats/rs6000/%.dat): New rules.
3940 (aarch64.c): Remove.
3941 (reg-arm.c): Remove.
3942 (arm-with-iwmmxt.c): Remove.
3943 (arm-with-vfpv2.c): Remove.
3944 (arm-with-vfpv3.c): Remove.
3945 (arm-with-neon.c): Remove.
3946 (reg-bfin.c): Remove.
3947 (reg-cris.c): Remove.
3948 (reg-crisv32.c): Remove.
3949 (i386.c): Remove.
3950 (i386-linux.c): Remove.
3951 (i386-avx.c): Remove.
3952 (i386-avx-linux.c): Remove.
3953 (i386-avx-avx512.c): Remove.
3954 (i386-avx-avx512-linux.c): Remove.
3955 (i386-mpx.c): Remove.
3956 (i386-mpx-linux.c): Remove.
3957 (i386-avx-mpx-avx512-pku.c): Remove.
3958 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3959 (i386-avx-mpx.c): Remove.
3960 (i386-avx-mpx-linux.c): Remove.
3961 (i386-mmx.c): Remove.
3962 (i386-mmx-linux.c): Remove.
3963 (reg-ia64.c): Remove.
3964 (reg-m32r.c): Remove.
3965 (reg-m68k.c): Remove.
3966 (reg-cf.c): Remove.
3967 (mips-linux.c): Remove.
3968 (mips-dsp-linux.c): Remove.
3969 (mips64-linux.c): Remove.
3970 (mips64-dsp-linux.c): Remove.
3971 (nios2-linux.c): Remove.
3972 (powerpc-32.c): Remove.
3973 (powerpc-32l.c): Remove.
3974 (powerpc-altivec32l.c): Remove.
3975 (powerpc-cell32l.c): Remove.
3976 (powerpc-vsx32l.c): Remove.
3977 (powerpc-isa205-32l.c): Remove.
3978 (powerpc-isa205-altivec32l.c): Remove.
3979 (powerpc-isa205-vsx32l.c): Remove.
3980 (powerpc-e500l.c): Remove.
3981 (powerpc-64l.c): Remove.
3982 (powerpc-altivec64l.c): Remove.
3983 (powerpc-cell64l.c): Remove.
3984 (powerpc-vsx64l.c): Remove.
3985 (powerpc-isa205-64l.c): Remove.
3986 (powerpc-isa205-altivec64l.c): Remove.
3987 (powerpc-isa205-vsx64l.c): Remove.
3988 (s390-linux32.c): Remove.
3989 (s390-linux32v1.c): Remove.
3990 (s390-linux32v2.c): Remove.
3991 (s390-linux64.c): Remove.
3992 (s390-linux64v1.c): Remove.
3993 (s390-linux64v2.c): Remove.
3994 (s390-te-linux64.c): Remove.
3995 (s390-vx-linux64.c): Remove.
3996 (s390-tevx-linux64.c): Remove.
3997 (s390x-linux64.c): Remove.
3998 (s390x-linux64v1.c): Remove.
3999 (s390x-linux64v2.c): Remove.
4000 (s390x-te-linux64.c): Remove.
4001 (s390x-vx-linux64.c): Remove.
4002 (s390x-tevx-linux64.c): Remove.
4003 (tic6x-c64xp-linux.c): Remove.
4004 (tic6x-c64x-linux.c): Remove.
4005 (tic6x-c62x-linux.c): Remove.
4006 (reg-sh.c): Remove.
4007 (reg-sparc64.c): Remove.
4008 (reg-spu.c): Remove.
4009 (amd64.c): Remove.
4010 (amd64-linux.c): Remove.
4011 (amd64-avx.c): Remove.
4012 (amd64-avx-linux.c): Remove.
4013 (amd64-avx-avx512.c): Remove.
4014 (amd64-avx-avx512-linux.c): Remove.
4015 (amd64-mpx.c): Remove.
4016 (amd64-mpx-linux.c): Remove.
4017 (amd64-avx-mpx-avx512-pku.c): Remove.
4018 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4019 (amd64-avx-mpx.c): Remove.
4020 (amd64-avx-mpx-linux.c): Remove.
4021 (x32.c): Remove.
4022 (x32-linux.c): Remove.
4023 (x32-avx.c): Remove.
4024 (x32-avx-linux.c): Remove.
4025 (x32-avx-avx512.c): Remove.
4026 (x32-avx-avx512-linux.c): Remove.
4027 (reg-xtensa.c): Remove.
4028 (reg-tilegx.c): Remove.
4029 (reg-tilegx32.c): Remove.
4030
4031 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4032
4033 * Makefile.in (SFILES): Add "common/environ.c".
4034 (OBJS): Add "common/environ.h".
4035
4036 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4037
4038 * configure.ac: Check if the fs_base and gs_base members of
4039 `struct user_regs_struct' exist.
4040 * config.in: Regenerated.
4041 * configure: Likewise.
4042
4043 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4044
4045 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4046 target_read_memory.
4047 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4048 (get_next_pcs_syscall_next_pc): Likewise.
4049
4050 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4051
4052 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4053 * nto-x86-low.c: Likewise.
4054
4055 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4056
4057 * Makefile.in: Include disable-implicit-rules.mk.
4058
4059 2016-11-23 Pedro Alves <palves@redhat.com>
4060
4061 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4062 (debug_vprintf): Use std::chrono::steady_clock instead of
4063 gettimeofday. Use '.' instead of ':'.
4064 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4065 (get_timestamp): Use std::chrono::steady_clock instead of
4066 gettimeofday.
4067
4068 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4069
4070 * Makefile.in: Fix whitespace formatting.
4071
4072 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4073
4074 * Makefile.in (SFILES, OBS): Flatten list and order
4075 alphabetically.
4076
4077 2016-11-23 Pedro Alves <palves@redhat.com>
4078
4079 * event-loop.c (handle_file_event): Use warning.
4080 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4081 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4082 Use warning.
4083
4084 2016-11-23 Pedro Alves <palves@redhat.com>
4085
4086 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4087 output.
4088 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4089 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4090 debug_printf and debug_flush for debug output.
4091 * server.c (handle_general_set): Likewise.
4092 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4093 output.
4094
4095 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4096
4097 * Makefile.in (.c.o): Replace rule with ...
4098 (%.o: %.c): ... this one.
4099
4100 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4101
4102 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4103 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4104 make.
4105 * configure.ac: Remove checks for the make program.
4106 * configure: Re-generate.
4107
4108 2016-10-28 Pedro Alves <palves@redhat.com>
4109
4110 * Makefile.in (CXX_DIALECT): Get from configure.
4111 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4112 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4113 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4114 * config.in: Regenerate.
4115 * configure: Regenerate.
4116
4117 2016-10-27 Yao Qi <yao.qi@linaro.org>
4118
4119 * linux-low.c (linux_supports_range_stepping): Return true if
4120 can_software_single_step return true.
4121
4122 2016-10-27 Yao Qi <yao.qi@linaro.org>
4123
4124 * inferiors.c (find_inferior_in_random): New function.
4125 * inferiors.h (find_inferior_in_random): Declare.
4126 * linux-low.c (linux_wait_for_event_filtered): Call
4127 find_inferior_in_random instead of find_inferior.
4128
4129 2016-10-27 Yao Qi <yao.qi@linaro.org>
4130
4131 * linux-low.c (linux_wait_1): If single-step breakpoints are
4132 inserted, remove them.
4133
4134 2016-10-26 Pedro Alves <palves@redhat.com>
4135
4136 * linux-low.c (handle_extended_wait): Link parent/child fork
4137 threads.
4138 (linux_wait_1): Unlink them.
4139 (linux_set_resume_request): Ignore resume requests for
4140 already-resumed and unhandled fork child threads.
4141 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4142 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4143 New functions.
4144 (handle_v_requests) <vCont>: Don't call require_running.
4145 * server.h (in_queued_stop_replies): New declaration.
4146
4147 2016-10-24 Yao Qi <yao.qi@linaro.org>
4148
4149 PR server/20733
4150 * linux-aarch64-low.c (append_insns): Cast the return value to
4151 'uint32_t *'.
4152
4153 2016-10-10 Yao Qi <yao.qi@linaro.org>
4154
4155 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4156
4157 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4158
4159 * target.c (target_supports_multi_process): New function, moved
4160 from...
4161 * target.h (target_supports_multi_process): ... here. Remove
4162 macro.
4163
4164 2016-10-05 Tom Tromey <tom@tromey.com>
4165
4166 PR remote/20655:
4167 * tracepoint.c (handle_tracepoint_bkpts): Check
4168 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4169
4170 2016-10-05 Yao Qi <yao.qi@linaro.org>
4171
4172 * configure.srv: Update the path of arm-*.xml files.
4173
4174 2016-10-05 Terry Guo <terry.guo@arm.com>
4175 Yao Qi <yao.qi@linaro.org>
4176
4177 * Makefile.in: Adjust the path of rules.
4178 * configure.srv: Update the path of xml files.
4179 * regformats/arm-with-iwmmxt.dat: Regenerated.
4180 * regformats/arm-with-neon.dat: Likewise.
4181 * regformats/arm-with-vfpv2.dat: Likewise.
4182 * regformats/arm-with-vfpv3.dat Likewise.
4183
4184 2016-09-30 Yao Qi <yao.qi@linaro.org>
4185
4186 PR gdbserver/20627
4187 * target.c (target_stop_and_wait): Don't call
4188 target_continue_no_signal, use resume_stop instead.
4189
4190 2016-09-26 Yao Qi <yao.qi@linaro.org>
4191
4192 * linux-low.c (linux_wait_1): Call debug_exit.
4193
4194 2016-09-23 Pedro Alves <palves@redhat.com>
4195
4196 * Makefile.in (SFILES): Add common/new-op.c.
4197 (OBS): Add common/new-op.o.
4198 (new-op.o): New rule.
4199
4200 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4201
4202 * .gitinore: Ignore more files.
4203
4204 2016-09-21 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4207 23.
4208
4209 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4210
4211 * server.c (start_inferior): Call target_mourn_inferior instead of
4212 mourn_inferior; pass ptid_t argument to it.
4213 (resume): Likewise.
4214 (handle_target_event): Likewise.
4215 * target.c (target_mourn_inferior): New function.
4216 * target.h (mourn_inferior): Delete macro.
4217
4218 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4219
4220 * linux-low.c (lwp_is_stepping): New function.
4221
4222 2016-09-06 Carl Love <cel@us.ibm.com>
4223
4224 * server.c (start_inferior): Fixed comment, requested comment change
4225 didn't get updated correctly. Removed reference to ptrace () call as
4226 it is only true on Linux systems.
4227
4228 2016-09-06 Carl Love <cel@us.ibm.com>
4229
4230 * server.c (start_inferior): Do not call
4231 function target_post_create_inferior () if the
4232 inferior process has already exited.
4233
4234 2016-09-05 Pedro Alves <palves@redhat.com>
4235
4236 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4237 (COMPILE.pre, CC_LD): Use CXX directly.
4238 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4239 * acinclude.m4: Don't include build-with-cxx.m4.
4240 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4241 * configure: Regenerate.
4242
4243 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4244
4245 PR gdb/19495
4246 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4247 call writing data to own_buf.
4248
4249 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4250
4251 * target.c (mywait): Call target_wait instead of
4252 the_target->wait.
4253 (target_wait): New function.
4254
4255 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4256
4257 * server.c (start_inferior): New variable 'ptid'. Replace calls
4258 to the_target->resume by target_continue{,_no_signal}, depending
4259 on the case.
4260 * target.c (target_stop_and_wait): Call target_continue_no_signal
4261 instead of the_target->resume.
4262 (target_continue): New function.
4263
4264 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4265
4266 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4267
4268 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4269
4270 PR server/20491
4271 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4272 ps_prochandle.
4273 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4274 * linux-arm-low.c (ps_get_thread_area): Likewise.
4275 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4276 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4277 * linux-mips-low.c (ps_get_thread_area): Likewise.
4278 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4279 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4280 * linux-x86-low.c (ps_get_thread_area): Likewise.
4281 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4282
4283 2016-08-19 Pedro Alves <palves@redhat.com>
4284
4285 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4286
4287 2016-08-19 Pedro Alves <palves@redhat.com>
4288
4289 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4290 comment. Use memcpy instead of casting through unsigned long.
4291
4292 2016-08-19 Pedro Alves <palves@redhat.com>
4293
4294 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4295 allocating around 0x80000000.
4296
4297 2016-08-19 Pedro Alves <palves@redhat.com>
4298
4299 PR gdb/20415
4300 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4301 (x32-avx512-linux-ipa.o): New rules.
4302 * configure.ac (x86_64-*-linux*): New x32 check.
4303 * configure.srv (ipa_x32_linux_regobj): New.
4304 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4305 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4306 descriptions.
4307 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4308 descriptions.
4309 * configure: Regenerate.
4310
4311 2016-08-09 Pedro Alves <palves@redhat.com>
4312
4313 PR gdb/18653
4314 * Makefile.in (OBS): Add signals-state-save-restore.o.
4315 (signals-state-save-restore.o): New rule.
4316 * config.in: Regenerate.
4317 * configure: Regenerate.
4318 * linux-low.c: Include "signals-state-save-restore.h".
4319 (linux_create_inferior): Call
4320 restore_original_signals_state.
4321 * server.c: Include "dispositions-save-restore.h".
4322 (captured_main): Call save_original_signals_state.
4323
4324 2016-08-05 Pedro Alves <palves@redhat.com>
4325
4326 * configure: Regenerate.
4327
4328 2016-08-04 Yao Qi <yao.qi@linaro.org>
4329
4330 * linux-low.c (regsets_fetch_inferior_registers): Check
4331 errno is ESRCH or not.
4332
4333 2016-08-02 Yao Qi <yao.qi@linaro.org>
4334
4335 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4336 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4337 (thread_db_load_search): Update.
4338 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4339 td_ta_set_event and td_ta_event_getmsg.
4340
4341 2016-07-26 Pedro Alves <palves@redhat.com>
4342
4343 PR server/20414
4344 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4345 of unsigned long for 64-bit registers and use uint32_t instead of
4346 unsigned int for 32-bit registers.
4347
4348 2016-07-26 Pedro Alves <palves@redhat.com>
4349
4350 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4351 to 'ptrace'.
4352
4353 2016-07-21 Tom Tromey <tom@tromey.com>
4354
4355 * configure: Rebuild.
4356
4357 2016-07-21 Yao Qi <yao.qi@linaro.org>
4358
4359 * mem-break.c (find_gdb_breakpoint): Cast bp to
4360 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4361
4362 2016-07-21 Yao Qi <yao.qi@linaro.org>
4363
4364 * server.c (handle_v_requests): Support s and S actions
4365 if target_supports_software_single_step return true.
4366
4367 2016-07-21 Yao Qi <yao.qi@linaro.org>
4368
4369 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4370 is resume_step, call maybe_hw_step.
4371 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4372 and unstop them.
4373 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4374 breakpoints or not.
4375 (proceed_one_lwp): If resume request is resume_step, install
4376 reinsert breakpoints and call maybe_hw_step.
4377
4378 2016-07-21 Yao Qi <yao.qi@linaro.org>
4379
4380 * linux-low.c (proceed_one_lwp): Declare.
4381 (linux_resume_one_thread): Remove local variable 'step'.
4382 Lift code enqueue signal. Call proceed_one_lwp instead of
4383 linux_resume_one_lwp.
4384
4385 2016-07-21 Yao Qi <yao.qi@linaro.org>
4386
4387 * linux-low.c (linux_resume_one_thread): Call
4388 enqueue_pending_signal.
4389
4390 2016-07-21 Yao Qi <yao.qi@linaro.org>
4391
4392 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4393 * inferiors.c (do_restore_current_thread_cleanup): New function.
4394 (make_cleanup_restore_current_thread): Likewise.
4395 * linux-low.c (install_software_single_step_breakpoints): Call
4396 make_cleanup_restore_current_thread. Switch current_thread to
4397 thread.
4398
4399 2016-07-21 Yao Qi <yao.qi@linaro.org>
4400
4401 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4402 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4403 (clone_one_breakpoint): Likewise.
4404 (delete_reinsert_breakpoints): Change parameter to thread.
4405 Callers updated.
4406 (has_reinsert_breakpoints): Likewise.
4407 (uninsert_reinsert_breakpoints): Likewise.
4408 (reinsert_reinsert_breakpoints): Likewise.
4409 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4410 (delete_reinsert_breakpoints): Likewise.
4411 (reinsert_reinsert_breakpoints): Likewise.
4412 (uninsert_reinsert_breakpoints): Likewise.
4413 (has_reinsert_breakpoints): Likewise.
4414
4415 2016-07-21 Yao Qi <yao.qi@linaro.org>
4416
4417 * inferiors.c (get_thread_process): Make parameter const.
4418 * inferiors.h (get_thread_process): Update declaration.
4419 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4420 Add new parameters child_thread and parent_thread. Callers
4421 updated.
4422 * mem-break.h (clone_all_breakpoints): Update declaration.
4423
4424 2016-07-21 Yao Qi <yao.qi@linaro.org>
4425
4426 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4427 <command_list, handler>: Remove.
4428 (struct gdb_breakpoint): New.
4429 (struct other_breakpoint): New.
4430 (struct reinsert_breakpoint): New.
4431 (is_gdb_breakpoint): New function.
4432 (any_persistent_commands): Update command_list if
4433 is_gdb_breakpoint returns true.
4434 (set_breakpoint): Create breakpoints according to their types.
4435 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4436 (set_gdb_breakpoint_1): Likewise.
4437 (set_gdb_breakpoint): Likewise.
4438 (clear_breakpoint_conditions): Change parameter type to
4439 'struct gdb_breakpoint *'.
4440 (clear_breakpoint_commands): Likewise.
4441 (clear_breakpoint_conditions_and_commands): Likewise.
4442 (add_condition_to_breakpoint): Likewise.
4443 (add_breakpoint_condition): Likewise.
4444 (add_commands_to_breakpoint): Likewise.
4445 (check_breakpoints): Check other_breakpoint.
4446 (clone_one_breakpoint): Clone breakpopint according to its type.
4447 * mem-break.h (struct gdb_breakpoint): Declare.
4448 (set_gdb_breakpoint): Update declaration.
4449 (clear_breakpoint_conditions_and_commands): Likewise.
4450 (add_breakpoint_condition): Likewise.
4451 (add_breakpoint_commands): Likewise.
4452 * server.c (process_point_options): Change parameter type to
4453 'struct gdb_breakpoint *'.
4454
4455 2016-07-21 Yao Qi <yao.qi@linaro.org>
4456
4457 * mem-break.c (set_breakpoint_at): Rename it to ...
4458 (set_breakpoint_type_at): ... it.
4459 (set_breakpoint_at): Call set_breakpoint_type_at.
4460 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4461 * mem-break.h (set_breakpoint_at): Update comments.
4462
4463 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4464
4465 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4466 to buf parameter.
4467 (nios2_store_gregset): Likewise.
4468
4469 2016-07-01 Pedro Alves <palves@redhat.com>
4470 Antoine Tremblay <antoine.tremblay@ericsson.com>
4471
4472 * linux-low.c: Change interface to take the target lwp_info
4473 pointer directly and return void. Handle detaching from a zombie
4474 thread.
4475 (linux_detach_lwp_callback): New function.
4476 (linux_detach): Detach from the leader thread after detaching from
4477 the clone threads.
4478
4479 2016-06-28 Yao Qi <yao.qi@linaro.org>
4480
4481 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4482 for variable new_offset.
4483 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4484 (aarch64_ftrace_insn_reloc_cb): Likewise.
4485 (aarch64_ftrace_insn_reloc_tb): Likewise.
4486 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4487 PRIx64 instead of PRIx32.
4488
4489 2016-06-28 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4492 (the_low_target): Install arm_get_syscall_trapinfo.
4493
4494 2016-06-28 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4497 function.
4498 (the_low_target): Install aarch64_get_syscall_trapinfo.
4499
4500 2016-06-28 Yao Qi <yao.qi@linaro.org>
4501
4502 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4503 Callers updated.
4504 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4505 Remove parameter sysno.
4506 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4507 sysret.
4508
4509 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4510
4511 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4512 (s390_emit_ne_goto): Likewise.
4513 (s390_emit_lt_goto): Likewise.
4514 (s390_emit_le_goto): Likewise.
4515 (s390_emit_gt_goto): Likewise.
4516 (s390_emit_ge_goto): Likewise.
4517 (s390x_emit_eq_goto): Likewise.
4518 (s390x_emit_ne_goto): Likewise.
4519 (s390x_emit_lt_goto): Likewise.
4520 (s390x_emit_le_goto): Likewise.
4521 (s390x_emit_gt_goto): Likewise.
4522 (s390x_emit_ge_goto): Likewise.
4523 (s390_emit_ops_impl): Mark variable static.
4524 (s390x_emit_ops): Likewise.
4525
4526 2016-06-17 Yao Qi <yao.qi@linaro.org>
4527
4528 * linux-low.c (handle_extended_wait): Call
4529 uninsert_reinsert_breakpoints for the parent process. Remove
4530 reinsert breakpoints from the child process. Reinsert them to
4531 the parent process when vfork is done.
4532 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4533 (reinsert_reinsert_breakpoints): New function.
4534 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4535 (reinsert_reinsert_breakpoints): Declare.
4536
4537 2016-06-17 Yao Qi <yao.qi@linaro.org>
4538
4539 * linux-low.c (handle_extended_wait): If the parent is doing
4540 step-over, remove the reinsert breakpoints from the forked child.
4541
4542 2016-06-17 Yao Qi <yao.qi@linaro.org>
4543
4544 * linux-low.c (unsuspend_all_lwps): Declare.
4545 (linux_low_filter_event): If thread exited, call finish_step_over.
4546 If step-over is finished, unsuspend other threads.
4547
4548 2016-06-17 Yao Qi <yao.qi@linaro.org>
4549
4550 * linux-low.c (linux_resume_one_lwp_throw): Assert
4551 has_reinsert_breakpoints returns false.
4552 * mem-break.c (delete_disabled_breakpoints): Assert
4553 bp type isn't reinsert_breakpoint.
4554
4555 2016-06-17 Yao Qi <yao.qi@linaro.org>
4556
4557 * linux-low.c (maybe_hw_step): New function.
4558 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4559 (finish_step_over): Switch current_thread to lwp temporarily,
4560 and assert has_reinsert_breakpoints returns true.
4561 (proceed_one_lwp): Call maybe_hw_step.
4562 * mem-break.c (has_reinsert_breakpoints): New function.
4563 * mem-break.h (has_reinsert_breakpoints): Declare.
4564
4565 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4566
4567 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4568
4569 2016-05-17 Yao Qi <yao.qi@linaro.org>
4570
4571 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4572 instead of find_inferior.
4573
4574 2016-05-05 Yao Qi <yao.qi@linaro.org>
4575
4576 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4577 Initialize res to zero.
4578
4579 2016-05-05 Yao Qi <yao.qi@linaro.org>
4580
4581 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4582 to uint32_t.
4583
4584 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4585
4586 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4587 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4588 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4589
4590 2016-04-28 Par Olsson <par.olsson@windriver.com>
4591 Simon Marchi <simon.marchi@ericsson.com>
4592
4593 * tracepoint.c (write_inferior_int8): New function.
4594 (cmd_qtenable_disable): Write enable flag using
4595 write_inferior_int8.
4596
4597 2016-04-25 Yao Qi <yao.qi@linaro.org>
4598
4599 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4600 (need_step_over_p): Return zero if the LWP has pending signals
4601 can be delivered on software single step target.
4602
4603 2016-04-25 Yao Qi <yao.qi@linaro.org>
4604
4605 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4606 return instead of error.
4607
4608 2016-04-22 Yao Qi <yao.qi@linaro.org>
4609
4610 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4611 to 23.
4612
4613 2016-04-22 Yao Qi <yao.qi@linaro.org>
4614
4615 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4616 signal when stepping over breakpoint with software single
4617 step.
4618
4619 2016-04-21 Pedro Alves <palves@redhat.com>
4620
4621 * linux-s390-low.c (s390_collect_ptrace_register)
4622 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4623 add casts.
4624 (s390_check_regset): Use void * instead of gdb_byte *.
4625
4626 2016-04-20 Pedro Alves <palves@redhat.com>
4627
4628 * configure: Renegerate.
4629
4630 2016-04-20 Yao Qi <yao.qi@linaro.org>
4631
4632 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4633 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4634 number 16.
4635 (arm_store_gregset): Likewise.
4636
4637 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4638
4639 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4640 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4641 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4642 (amd64-avx-mpx-linux.c): New rules.
4643 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4644 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4645 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4646 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4647 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4648 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4649 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4650 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4651 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4652 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4653 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4654 * linux-x86-low.c (x86_linux_read_description): Add case for
4655 X86_XSTATE_AVX_MPX_MASK.
4656 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4657 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4658 init_registers_i386_avx_mpx_linux.
4659 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4660 (initialize_low_tracepoint): Call
4661 init_registers_i386_avx_mpx_linux.
4662 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4663 (initialize_low_tracepoint): Call
4664 init_registers_amd64_avx_mpx_linux.
4665 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4666 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4667 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4668 declarations.
4669
4670 2016-04-18 Pedro Alves <palves@redhat.com>
4671
4672 * configure: Regenerate.
4673
4674 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4675
4676 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4677 (aarch64_emit_sub): Likewise.
4678
4679 2016-04-12 Pedro Alves <palves@redhat.com>
4680
4681 * utils.c (prepare_to_throw_exception): Delete.
4682
4683 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4684
4685 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4686
4687 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4688
4689 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4690
4691 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4692
4693 * linux-aarch64-ipa.c: Add <elf.h> include.
4694 * linux-ppc-ipa.c: Add <elf.h> include.
4695 * linux-s390-ipa.c: Add <elf.h> include.
4696
4697 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4698
4699 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4700 (get_raw_reg_ptr): Likewise.
4701 (get_trace_state_variable_value_ptr): Likewise.
4702 (set_trace_state_variable_value_ptr): Likewise.
4703 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4704 char *.
4705
4706 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4707 Marcin Kościelnicki <koriakin@0x04.net>
4708
4709 PR/17221
4710 * linux-ppc-low.c (emit_insns): New function.
4711 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4712 (ppc_emit_prologue): New function.
4713 (ppc_emit_epilogue): New function.
4714 (ppc_emit_add): New function.
4715 (ppc_emit_sub): New function.
4716 (ppc_emit_mul): New function.
4717 (ppc_emit_lsh): New function.
4718 (ppc_emit_rsh_signed): New function.
4719 (ppc_emit_rsh_unsigned): New function.
4720 (ppc_emit_ext): New function.
4721 (ppc_emit_zero_ext): New function.
4722 (ppc_emit_log_not): New function.
4723 (ppc_emit_bit_and): New function.
4724 (ppc_emit_bit_or): New function.
4725 (ppc_emit_bit_xor): New function.
4726 (ppc_emit_bit_not): New function.
4727 (ppc_emit_equal): New function.
4728 (ppc_emit_less_signed): New function.
4729 (ppc_emit_less_unsigned): New function.
4730 (ppc_emit_ref): New function.
4731 (ppc_emit_const): New function.
4732 (ppc_emit_reg): New function.
4733 (ppc_emit_pop): New function.
4734 (ppc_emit_stack_flush): New function.
4735 (ppc_emit_swap): New function.
4736 (ppc_emit_stack_adjust): New function.
4737 (ppc_emit_call): New function.
4738 (ppc_emit_int_call_1): New function.
4739 (ppc_emit_void_call_2): New function.
4740 (ppc_emit_if_goto): New function.
4741 (ppc_emit_goto): New function.
4742 (ppc_emit_eq_goto): New function.
4743 (ppc_emit_ne_goto): New function.
4744 (ppc_emit_lt_goto): New function.
4745 (ppc_emit_le_goto): New function.
4746 (ppc_emit_gt_goto): New function.
4747 (ppc_emit_ge_goto): New function.
4748 (ppc_write_goto_address): New function.
4749 (ppc_emit_ops_impl): New static variable.
4750 (ppc64v1_emit_prologue): New function.
4751 (ppc64v2_emit_prologue): New function.
4752 (ppc64_emit_epilogue): New function.
4753 (ppc64_emit_add): New function.
4754 (ppc64_emit_sub): New function.
4755 (ppc64_emit_mul): New function.
4756 (ppc64_emit_lsh): New function.
4757 (ppc64_emit_rsh_signed): New function.
4758 (ppc64_emit_rsh_unsigned): New function.
4759 (ppc64_emit_ext): New function.
4760 (ppc64_emit_zero_ext): New function.
4761 (ppc64_emit_log_not): New function.
4762 (ppc64_emit_bit_and): New function.
4763 (ppc64_emit_bit_or): New function.
4764 (ppc64_emit_bit_xor): New function.
4765 (ppc64_emit_bit_not): New function.
4766 (ppc64_emit_equal): New function.
4767 (ppc64_emit_less_signed): New function.
4768 (ppc64_emit_less_unsigned): New function.
4769 (ppc64_emit_ref): New function.
4770 (ppc64_emit_const): New function.
4771 (ppc64v1_emit_reg): New function.
4772 (ppc64v2_emit_reg): New function.
4773 (ppc64_emit_pop): New function.
4774 (ppc64_emit_stack_flush): New function.
4775 (ppc64_emit_swap): New function.
4776 (ppc64v1_emit_call): New function.
4777 (ppc64v2_emit_call): New function.
4778 (ppc64v1_emit_int_call_1): New function.
4779 (ppc64v2_emit_int_call_1): New function.
4780 (ppc64v1_emit_void_call_2): New function.
4781 (ppc64v2_emit_void_call_2): New function.
4782 (ppc64_emit_if_goto): New function.
4783 (ppc64_emit_eq_goto): New function.
4784 (ppc64_emit_ne_goto): New function.
4785 (ppc64_emit_lt_goto): New function.
4786 (ppc64_emit_le_goto): New function.
4787 (ppc64_emit_gt_goto): New function.
4788 (ppc64_emit_ge_goto): New function.
4789 (ppc64v1_emit_ops_impl): New static variable.
4790 (ppc64v2_emit_ops_impl): New static variable.
4791 (ppc_emit_ops): New function.
4792 (linux_low_target): Wire in ppc_emit_ops.
4793
4794 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4795 Marcin Kościelnicki <koriakin@0x04.net>
4796
4797 PR/17221
4798 * Makefile.in: Add powerpc-*-ipa.o
4799 * configure.srv: Add ipa_obj for powerpc*-linux.
4800 * linux-ppc-ipa.c: New file.
4801 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4802 includes.
4803 (PPC_FIELD): New macro.
4804 (PPC_SEXT): New macro.
4805 (PPC_OP6): New macro.
4806 (PPC_BO): New macro.
4807 (PPC_LI): New macro.
4808 (PPC_BD): New macro.
4809 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4810 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4811 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4812 (ppc_get_thread_area): New function.
4813 (is_elfv2_inferior): New function.
4814 (gen_ds_form): New function.
4815 (GEN_STD): New macro.
4816 (GEN_STDU): New macro.
4817 (GEN_LD): New macro.
4818 (GEN_LDU): New macro.
4819 (gen_d_form): New function.
4820 (GEN_ADDI): New macro.
4821 (GEN_ADDIS): New macro.
4822 (GEN_LI): New macro.
4823 (GEN_LIS): New macro.
4824 (GEN_ORI): New macro.
4825 (GEN_ORIS): New macro.
4826 (GEN_LWZ): New macro.
4827 (GEN_STW): New macro.
4828 (GEN_STWU): New macro.
4829 (gen_xfx_form): New function.
4830 (GEN_MFSPR): New macro.
4831 (GEN_MTSPR): New macro.
4832 (GEN_MFCR): New macro.
4833 (GEN_MTCR): New macro.
4834 (GEN_SYNC): New macro.
4835 (GEN_LWSYNC): New macro.
4836 (gen_x_form): New function.
4837 (GEN_OR): New macro.
4838 (GEN_MR): New macro.
4839 (GEN_LWARX): New macro.
4840 (GEN_STWCX): New macro.
4841 (GEN_CMPW): New macro.
4842 (gen_md_form): New function.
4843 (GEN_RLDICL): New macro.
4844 (GEN_RLDICR): New macro.
4845 (gen_i_form): New function.
4846 (GEN_B): New macro.
4847 (GEN_BL): New macro.
4848 (gen_b_form): New function.
4849 (GEN_BNE): New macro.
4850 (GEN_LOAD): New macro.
4851 (GEN_STORE): New macro.
4852 (gen_limm): New function.
4853 (gen_atomic_xchg): New function.
4854 (gen_call): New function.
4855 (ppc_relocate_instruction): New function.
4856 (ppc_install_fast_tracepoint_jump_pad): New function.
4857 (ppc_get_min_fast_tracepoint_insn_len): New function.
4858 (ppc_get_ipa_tdesc_idx): New function.
4859 (the_low_target): Wire in the new functions.
4860 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4861 tdescs.
4862 * linux-ppc-tdesc.h: New file.
4863
4864 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4865
4866 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4867 (alloc_jump_pad_buffer): New function.
4868 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4869 (alloc_jump_pad_buffer): New function.
4870 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4871 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4872 (alloc_jump_pad_buffer): New function.
4873 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4874 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4875 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4876 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4877
4878 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4879
4880 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4881 * linux-amd64-ipa.c: Likewise.
4882 * linux-i386-ipa.c: Likewise.
4883 * linux-s390-ipa.c: Likewise.
4884 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4885 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4886 set_trace_state_variable_value_ptr.
4887 (struct ipa_sym_addresses): Likewise.
4888 (symbol_list): Likewise.
4889 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4890 accessing gdb_collect directly.
4891 (gdb_collect_ptr_type): New typedef.
4892 (get_raw_reg_ptr_type): New typedef.
4893 (get_trace_state_variable_value_ptr_type): New typedef.
4894 (set_trace_state_variable_value_ptr_type): New typedef.
4895 (gdb_collect_ptr): New global.
4896 (get_raw_reg_ptr): New global.
4897 (get_trace_state_variable_value_ptr): New global.
4898 (set_trace_state_variable_value_ptr): New global.
4899 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4900 accessing get_raw_reg directly.
4901 (get_get_tsv_func_addr): Likewise for
4902 get_trace_state_variable_value_ptr.
4903 (get_set_tsv_func_addr): Likewise for
4904 set_trace_state_variable_value_ptr.
4905 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4906
4907 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4908
4909 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4910
4911 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4912
4913 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4914 packets.
4915 (relocate_instruction): Remove own_buf.
4916 * server.c (own_buf): Make global.
4917 (handle_v_requests): Make global.
4918 * server.h (own_buf): New declaration.
4919 (handle_v_requests): New prototype.
4920
4921 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4922
4923 PR 18377
4924 * linux-s390-low.c (add_insns): New function.
4925 (s390_emit_prologue): New function.
4926 (s390_emit_epilogue): New function.
4927 (s390_emit_add): New function.
4928 (s390_emit_sub): New function.
4929 (s390_emit_mul): New function.
4930 (s390_emit_lsh): New function.
4931 (s390_emit_rsh_signed): New function.
4932 (s390_emit_rsh_unsigned): New function.
4933 (s390_emit_ext): New function.
4934 (s390_emit_log_not): New function.
4935 (s390_emit_bit_and): New function.
4936 (s390_emit_bit_or): New function.
4937 (s390_emit_bit_xor): New function.
4938 (s390_emit_bit_not): New function.
4939 (s390_emit_equal): New function.
4940 (s390_emit_less_signed): New function.
4941 (s390_emit_less_unsigned): New function.
4942 (s390_emit_ref): New function.
4943 (s390_emit_if_goto): New function.
4944 (s390_emit_goto): New function.
4945 (s390_write_goto_address): New function.
4946 (s390_emit_litpool): New function.
4947 (s390_emit_const): New function.
4948 (s390_emit_call): New function.
4949 (s390_emit_reg): New function.
4950 (s390_emit_pop): New function.
4951 (s390_emit_stack_flush): New function.
4952 (s390_emit_zero_ext): New function.
4953 (s390_emit_swap): New function.
4954 (s390_emit_stack_adjust): New function.
4955 (s390_emit_set_r2): New function.
4956 (s390_emit_int_call_1): New function.
4957 (s390_emit_void_call_2): New function.
4958 (s390_emit_eq_goto): New function.
4959 (s390_emit_ne_goto): New function.
4960 (s390_emit_lt_goto): New function.
4961 (s390_emit_le_goto): New function.
4962 (s390_emit_gt_goto): New function.
4963 (s390_emit_ge_goto): New function.
4964 (s390x_emit_prologue): New function.
4965 (s390x_emit_epilogue): New function.
4966 (s390x_emit_add): New function.
4967 (s390x_emit_sub): New function.
4968 (s390x_emit_mul): New function.
4969 (s390x_emit_lsh): New function.
4970 (s390x_emit_rsh_signed): New function.
4971 (s390x_emit_rsh_unsigned): New function.
4972 (s390x_emit_ext): New function.
4973 (s390x_emit_log_not): New function.
4974 (s390x_emit_bit_and): New function.
4975 (s390x_emit_bit_or): New function.
4976 (s390x_emit_bit_xor): New function.
4977 (s390x_emit_bit_not): New function.
4978 (s390x_emit_equal): New function.
4979 (s390x_emit_less_signed): New function.
4980 (s390x_emit_less_unsigned): New function.
4981 (s390x_emit_ref): New function.
4982 (s390x_emit_if_goto): New function.
4983 (s390x_emit_const): New function.
4984 (s390x_emit_call): New function.
4985 (s390x_emit_reg): New function.
4986 (s390x_emit_pop): New function.
4987 (s390x_emit_stack_flush): New function.
4988 (s390x_emit_zero_ext): New function.
4989 (s390x_emit_swap): New function.
4990 (s390x_emit_stack_adjust): New function.
4991 (s390x_emit_int_call_1): New function.
4992 (s390x_emit_void_call_2): New function.
4993 (s390x_emit_eq_goto): New function.
4994 (s390x_emit_ne_goto): New function.
4995 (s390x_emit_lt_goto): New function.
4996 (s390x_emit_le_goto): New function.
4997 (s390x_emit_gt_goto): New function.
4998 (s390x_emit_ge_goto): New function.
4999 (s390_emit_ops): New function.
5000 (struct linux_target_ops): Fill in emit_ops hook.
5001
5002 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5003
5004 PR 18377
5005 * Makefile.in: Add s390 IPA files.
5006 * configure.srv: Build IPA for s390.
5007 * linux-s390-ipa.c: New file.
5008 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5009 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5010 (tdesc_s390_linux32): Likewise.
5011 (init_registers_s390_linux32v1): Likewise.
5012 (tdesc_s390_linux32v1): Likewise.
5013 (init_registers_s390_linux32v2): Likewise.
5014 (tdesc_s390_linux32v2): Likewise.
5015 (init_registers_s390_linux64): Likewise.
5016 (tdesc_s390_linux64): Likewise.
5017 (init_registers_s390_linux64v1): Likewise.
5018 (tdesc_s390_linux64v1): Likewise.
5019 (init_registers_s390_linux64v2): Likewise.
5020 (tdesc_s390_linux64v2): Likewise.
5021 (init_registers_s390_te_linux64): Likewise.
5022 (tdesc_s390_te_linux64): Likewise.
5023 (init_registers_s390_vx_linux64): Likewise.
5024 (tdesc_s390_vx_linux64): Likewise.
5025 (init_registers_s390_tevx_linux64): Likewise.
5026 (tdesc_s390_tevx_linux64): Likewise.
5027 (init_registers_s390x_linux64): Likewise.
5028 (tdesc_s390x_linux64): Likewise.
5029 (init_registers_s390x_linux64v1): Likewise.
5030 (tdesc_s390x_linux64v1): Likewise.
5031 (init_registers_s390x_linux64v2): Likewise.
5032 (tdesc_s390x_linux64v2): Likewise.
5033 (init_registers_s390x_te_linux64): Likewise.
5034 (tdesc_s390x_te_linux64): Likewise.
5035 (init_registers_s390x_vx_linux64): Likewise.
5036 (tdesc_s390x_vx_linux64): Likewise.
5037 (init_registers_s390x_tevx_linux64): Likewise.
5038 (tdesc_s390x_tevx_linux64): Likewise.
5039 (have_hwcap_s390_vx): New static variable.
5040 (s390_arch_setup): Fill have_hwcap_s390_vx.
5041 (s390_get_thread_area): New function.
5042 (s390_ft_entry_gpr_esa): New const.
5043 (s390_ft_entry_gpr_zarch): New const.
5044 (s390_ft_entry_misc): New const.
5045 (s390_ft_entry_fr): New const.
5046 (s390_ft_entry_vr): New const.
5047 (s390_ft_main_31): New const.
5048 (s390_ft_main_64): New const.
5049 (s390_ft_exit_fr): New const.
5050 (s390_ft_exit_vr): New const.
5051 (s390_ft_exit_misc): New const.
5052 (s390_ft_exit_gpr_esa): New const.
5053 (s390_ft_exit_gpr_zarch): New const.
5054 (append_insns): New function.
5055 (s390_relocate_instruction): New function.
5056 (s390_install_fast_tracepoint_jump_pad): New function.
5057 (s390_get_min_fast_tracepoint_insn_len): New function.
5058 (s390_get_ipa_tdesc_idx): New function.
5059 (struct linux_target_ops): Wire in the above functions.
5060 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5061 * linux-s390-tdesc.h: New file.
5062
5063 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5064
5065 * linux-s390-low.c (s390_supports_tracepoints): New function.
5066 (struct linux_target_ops): Fill supports_tracepoints hook.
5067
5068 2016-03-18 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-low.c (lwp_signal_can_be_delivered): New function.
5071 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5072
5073 2016-03-18 Yao Qi <yao.qi@linaro.org>
5074
5075 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5076 0 if signal is enqueued. Remove 'signal' from one debugging
5077 message. Move one debugging message to some lines below.
5078 Remove code setting 'signal' to 0.
5079
5080 2016-03-18 Yao Qi <yao.qi@linaro.org>
5081
5082 * linux-low.c (linux_low_filter_event): Remove redundant
5083 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5084
5085 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5086
5087 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5088 (struct linux_target_ops): Wire in the above.
5089
5090 2016-03-03 Yao Qi <yao.qi@linaro.org>
5091
5092 * linux-low.c: Update comments to start_step_over.
5093
5094 2016-03-03 Yao Qi <yao.qi@linaro.org>
5095
5096 PR server/19736
5097 * linux-low.c (handle_extended_wait): Set child suspended
5098 if event_lwp->bp_reinsert isn't zero.
5099
5100 2016-03-02 Yao Qi <yao.qi@linaro.org>
5101
5102 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5103 enqueue_pending_signal.
5104
5105 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5106
5107 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5108 is actually loaded.
5109
5110 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5111
5112 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5113 (s390_regmap_3264) [!__s390x__]: New global.
5114 (s390_collect_ptrace_register): Skip map entries containing -1.
5115 (s390_supply_ptrace_register): Ditto.
5116 (s390_fill_gprs_high): New function.
5117 (s390_store_gprs_high): New function.
5118 (s390_regsets): Add NT_S390_HIGH_GPRS.
5119 (s390_get_hwcap): Enable on 31-bit.
5120 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5121 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5122 Detect NT_S390_HIGH_GPRS.
5123 (s390_usrregs_info_3264): Enable on 31-bit.
5124 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5125 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5126
5127 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5128
5129 PR gdb/13808
5130 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5131 * configure.srv: Ditto.
5132 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5133 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5134 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5135 (init_registers_amd64_linux): Remove prototype.
5136 (tdesc_amd64_linux): Remove declaration.
5137 (get_ipa_tdesc): New function.
5138 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5139 initialize remaining tdescs.
5140 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5141 (init_registers_i386_linux): Remove prototype.
5142 (tdesc_i386_linux): Remove declaration.
5143 (get_ipa_tdesc): New function.
5144 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5145 initialize remaining tdescs.
5146 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5147 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5148 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5149 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5150 (x86_get_ipa_tdesc_idx): New function.
5151 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5152 * linux-x86-tdesc.h: New file.
5153 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5154 (target_get_ipa_tdesc_idx): New macro.
5155 * tracepoint.c (ipa_tdesc_idx): New macro.
5156 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5157 (symbol_list): Add ipa_tdesc_idx.
5158 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5159 (ipa_tdesc): Remove.
5160 (ipa_tdesc_idx): New variable.
5161 (get_context_regcache): Use get_ipa_tdesc.
5162 (gdb_collect): Ditto.
5163 (gdb_probe): Ditto.
5164 * tracepoint.h (get_ipa_tdesc): New prototype.
5165 (ipa_tdesc): Remove.
5166
5167 2016-02-24 Pedro Alves <palves@redhat.com>
5168
5169 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5170 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5171 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5172 Factor out common code between the USE_SIGTRAP_SIGINFO and
5173 !USE_SIGTRAP_SIGINFO blocks.
5174 (linux_low_filter_event): Call save_stop_reason instead of
5175 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5176 Update comments.
5177 (linux_wait_1): Update comments.
5178
5179 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5180
5181 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5182 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5183 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5184 ppc_insert_point, ppc_remove_point.
5185
5186 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5187
5188 * linux-s390-low.c (s390_supports_z_point_type): New function.
5189 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5190
5191 2016-02-16 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5194 PC. Get pc from regcache_read_pc.
5195
5196 2016-02-12 Yao Qi <yao.qi@linaro.org>
5197
5198 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5199 or linux_get_pc_32bit.
5200 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5201
5202 2016-02-12 Yao Qi <yao.qi@linaro.org>
5203
5204 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5205 arm_linux_get_next_pcs_fixup.
5206
5207 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5208
5209 * tracepoint.c (x_tracepoint_action_download): Change
5210 write_inferior_data_ptr to write_inferior_data_pointer.
5211 (cmd_qtstart): Likewise.
5212 (write_inferior_data_ptr): Remove.
5213 (download_agent_expr): Change write_inferior_data_ptr to
5214 write_inferior_data_pointer.
5215 (download_tracepoint_1): Likewise.
5216 (download_tracepoint): Likewise.
5217 (download_trace_state_variables): Likewise.
5218
5219 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5220 Marcin Kościelnicki <koriakin@0x04.net>
5221
5222 * tracepoint.c (struct tracepoint_action_ops): Remove.
5223 (struct tracepoint_action): Remove ops.
5224 (m_tracepoint_action_download, r_tracepoint_action_download)
5225 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5226 size and offset accordingly.
5227 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5228 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5229 (tracepoint_action_send, tracepoint_action_download): New functions.
5230 Helpers for trace action handlers.
5231 (add_tracepoint_action): Remove setup actions ops.
5232 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5233
5234 2016-02-10 Yao Qi <yao.qi@linaro.org>
5235
5236 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5237
5238 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5239
5240 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5241 to AC_OUTPUT.
5242 * configure: Regenerate.
5243
5244 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5245
5246 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5247 void * to gdb_byte *.
5248 * linux-low.c (siginfo_fixup): Likewise.
5249 (linux_xfer_siginfo): Likewise.
5250 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5251 Likewise.
5252 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5253
5254 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5255
5256 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5257 to srv_tgtobj.
5258 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5259 to srv_tgtobj.
5260 * linux-x86-low.c [__x86_64__]: Include
5261 "nat/amd64-linux-siginfo.h".
5262 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5263 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5264 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5265 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5266 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5267 (cpt_si_fd, si_timerid, si_overrun): Move from
5268 nat/amd64-linux-siginfo.c.
5269 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5270
5271 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5272
5273 * server.c (skip_to_semicolon): Remove.
5274 (process_point_options): Use strchrnul instead of
5275 skip_to_semicolon.
5276
5277 2016-01-26 Yao Qi <yao.qi@linaro.org>
5278
5279 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5280 * linux-low.c (install_software_single_step_breakpoints): Don't
5281 call regcache_read_pc.
5282 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5283 argument pc.
5284
5285 2016-01-26 Yao Qi <yao.qi@linaro.org>
5286
5287 * linux-low.c (install_software_single_step_breakpoints): Call
5288 regcache_read_pc instead of get_pc.
5289
5290 2016-01-26 Yao Qi <yao.qi@linaro.org>
5291
5292 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5293 (unblock_async_io): Rename to ...
5294 (block_unblock_async_io): ... it. New function.
5295 (enable_async_io): Don't install SIGIO handler. Unblock it
5296 instead.
5297 (disable_async_io): Don't ignore SIGIO. Block it instead.
5298 (initialize_async_io): Install SIGIO handler. Don't call
5299 unblock_async_io.
5300
5301 2016-01-26 Yao Qi <yao.qi@linaro.org>
5302
5303 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5304 first character is '\003', call *the_target->request_interrupt.
5305
5306 2016-01-25 Yao Qi <yao.qi@linaro.org>
5307
5308 * remote-utils.c (new_thread_notify): Remove.
5309 (dead_thread_notify): Likewise.
5310 * remote-utils.h (new_thread_notify): Remove declaration.
5311 (dead_thread_notify): Likewise.
5312
5313 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5314
5315 * gdb.trace/pending.exp: Fix expected message on continue.
5316
5317 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5318
5319 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5320 it works properly on big-endian machines where sizeof (CORE_ADDR)
5321 != sizeof (void *).
5322
5323 2016-01-21 Pedro Alves <palves@redhat.com>
5324
5325 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5326 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5327 * configure: Regenerate.
5328
5329 2016-01-21 Yao Qi <yao.qi@linaro.org>
5330
5331 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5332 is_thumb and set it according to CPSR saved on the stack.
5333 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5334 arm_sigreturn_next_pc.
5335
5336 2016-01-18 Yao Qi <yao.qi@linaro.org>
5337
5338 * linux-low.c (linux_set_pc_64bit): New function.
5339 (linux_get_pc_64bit): New function.
5340 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5341 Declare.
5342 * linux-sparc-low.c (debug_threads): Remove declaration.
5343 (sparc_get_pc): Remove.
5344 (the_low_target): Use linux_get_pc_64bit instead of
5345 sparc_get_pc.
5346 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5347 (the_low_target): Use linux_get_pc_64bit and
5348 linux_set_pc_64bit.
5349
5350 2016-01-18 Yao Qi <yao.qi@linaro.org>
5351
5352 * linux-arm-low.c (debug_threads): Remove declaration.
5353 (arm_get_pc, arm_set_pc): Remove.
5354 (the_low_target): Use linux_get_pc_32bit and
5355 linux_set_pc_32bit.
5356 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5357 (the_low_target): Use linux_get_pc_32bit and
5358 linux_set_pc_32bit.
5359 * linux-cris-low.c (debug_threads): Remove declaration.
5360 (cris_get_pc, cris_set_pc,): Remove.
5361 (the_low_target): Use linux_get_pc_32bit and
5362 linux_set_pc_32bit.
5363 * linux-crisv32-low.c (debug_threads): Remove declaration.
5364 (cris_get_pc, cris_set_pc): Remove.
5365 (the_low_target): Use linux_get_pc_32bit and
5366 linux_set_pc_32bit.
5367 * linux-low.c: Include inttypes.h.
5368 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5369 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5370 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5371 (the_low_target): Use linux_get_pc_32bit and
5372 linux_set_pc_32bit.
5373 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5374 (the_low_target): Use linux_get_pc_32bit and
5375 linux_set_pc_32bit.
5376 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5377 (the_low_target): Use linux_get_pc_32bit and
5378 linux_set_pc_32bit.
5379 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5380 (the_low_target): Use linux_get_pc_32bit and
5381 linux_set_pc_32bit.
5382 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5383 (the_low_target): Use linux_get_pc_32bit and
5384 linux_set_pc_32bit.
5385
5386 2016-01-18 Gary Benson <gbenson@redhat.com>
5387
5388 * configure.ac (AC_FUNC_FORK): New check.
5389 * config.in: Regenerate.
5390 * configure: Likewise.
5391
5392 2016-01-14 Yao Qi <yao.qi@linaro.org>
5393
5394 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5395 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5396 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5397 arm_get_next_pcs_ctor.
5398
5399 2016-01-12 Josh Stone <jistone@redhat.com>
5400 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5401
5402 * inferiors.h: Include "gdb_vecs.h".
5403 (struct process_info): Add syscalls_to_catch.
5404 * inferiors.c (remove_process): Free syscalls_to_catch.
5405 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5406 syscall_return stops.
5407 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5408 * server.c (handle_general_set): Handle QCatchSyscalls.
5409 (handle_query): Report support for QCatchSyscalls.
5410 * target.h (struct target_ops): Add supports_catch_syscall.
5411 (target_supports_catch_syscall): New macro.
5412 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5413 (struct lwp_info): Add syscall_state.
5414 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5415 Maintain syscall_state and syscalls_to_catch across exec.
5416 (get_syscall_trapinfo): New function, proxy to the_low_target.
5417 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5418 (linux_low_filter_event): Toggle syscall_state entry/return for
5419 syscall traps, and set it ignored for all others.
5420 (gdb_catching_syscalls_p): New function.
5421 (gdb_catch_this_syscall_p): New function.
5422 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5423 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5424 (linux_supports_catch_syscall): New function.
5425 (linux_target_ops): Install it.
5426 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5427 (the_low_target): Install it.
5428
5429 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5430
5431 * acinclude.m4: Include new ../warning.m4 file.
5432 * configure: Regenerated.
5433 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5434
5435 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5436
5437 * ax.c (is_goto_target): Mark static.
5438 * linux-low.c (register_addr): Likewise.
5439 (linux_fetch_registers, linux_store_registers): Likewise.
5440 * mem-break.c (any_persistent_commands): Fix old prototype.
5441 (add_commands_to_breakpoint): Mark static.
5442 * regcache.c (find_register_by_name): Delete unused func.
5443 * remote-utils.c (hex_or_minus_one): Mark static.
5444 * server.c (monitor_show_help): Mark static.
5445 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5446 handle_v_requests): Likewise.
5447
5448 2016-01-12 Pedro Alves <palves@redhat.com>
5449
5450 Remove use of the registered trademark symbol throughout.
5451
5452 2016-01-08 Yao Qi <yao.qi@linaro.org>
5453
5454 * remote-utils.c (getpkt): If c is '\003', call target hook
5455 request_interrupt.
5456
5457 2016-01-06 Yao Qi <yao.qi@linaro.org>
5458
5459 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5460 linux-aarch32-low.c.
5461 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5462 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5463 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5464 (thumb2_breakpoint): Declare.
5465 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5466 linux-aarch32-low.h.
5467 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5468 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5469 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5470
5471 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5472
5473 * gdbreplay.c (gdbreplay_version): Change copyright year in
5474 version message.
5475 * server.c (gdbserver_version): Likewise.
5476
5477 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5478
5479 * server.c (crc32_table): Delete.
5480 (crc32): Use libiberty's xcrc32 function.
5481
5482 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5483
5484 * lynx-low.c (lynx_delete_thread_callback): New function.
5485 (lynx_mourn): Properly delete our process and all of its
5486 threads. Remove call to clear_inferiors.
5487
5488 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5489
5490 * target.c (thread_search_callback): Add check that
5491 the thread_stopped target callback is not NULL before
5492 calling it.
5493
5494 2015-12-21 Yao Qi <yao.qi@linaro.org>
5495
5496 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5497 arm breakpoint.
5498
5499 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5500
5501 * server.c (handle_query): Call target_supports_software_single_step.
5502
5503 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5504
5505 * linux-low.c (single_step): New function.
5506 (linux_resume_one_lwp_throw): Call single_step.
5507 (start_step_over): Likewise.
5508
5509 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5510
5511 * Makefile.in (SFILES): Append arch/arm-linux.c,
5512 arch/arm-get-next-pcs.c.
5513 (arm-linux.o): New rule.
5514 (arm-get-next-pcs.o): New rule.
5515 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5516 arm-linux.o.
5517 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5518 to linux-aarch32-low.c.
5519 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5520 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5521 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5522 (thumb2_breakpoint_len): Likewise.
5523 (arm_is_thumb_mode): Make non-static.
5524 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5525 from linux-aarch32-low.c.
5526 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5527 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5528 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5529 (thumb2_breakpoint_len): Likewise.
5530 (arm_is_thumb_mode): New declaration.
5531 * linux-arm-low.c: Include arch/arm-linux.h
5532 aarch/arm-get-next-pcs.h, sys/syscall.h.
5533 (get_next_pcs_ops): New struct.
5534 (get_next_pcs_addr_bits_remove): New function.
5535 (get_next_pcs_is_thumb): New function.
5536 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5537 (arm_sigreturn_next_pc): Likewise.
5538 (get_next_pcs_syscall_next_pc): Likewise.
5539 (arm_gdbserver_get_next_pcs): Likewise.
5540 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5541 Initialize.
5542 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5543 * server.h: Include gdb_vecs.h.
5544
5545 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5546
5547 * Makefile.in (SFILES): Append common/common-regcache.c.
5548 (OBS): Append common-regcache.o.
5549 (common-regcache.o): New rule.
5550 * regcache.c (init_register_cache): Initialize cache to
5551 REG_UNAVAILABLE.
5552 (regcache_raw_read_unsigned): New function.
5553 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5554 register_status enum.
5555
5556 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5557
5558 * linux-aarch64-low.c (the_low_targets): Rename
5559 breakpoint_reinsert_addr to get_next_pcs.
5560 * linux-arm-low.c (the_low_targets): Likewise.
5561 * linux-bfin-low.c (the_low_targets): Likewise.
5562 * linux-cris-low.c (the_low_targets): Likewise.
5563 * linux-crisv32-low.c (the_low_targets): Likewise.
5564 * linux-low.c (can_software_single_step): Likewise.
5565 (install_software_single_step_breakpoints): New function.
5566 (start_step_over): Use install_software_single_step_breakpoints.
5567 * linux-low.h: New CORE_ADDR vector.
5568 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5569 get_next_pcs.
5570 * linux-mips-low.c (the_low_targets): Likewise.
5571 * linux-nios2-low.c (the_low_targets): Likewise.
5572 * linux-sparc-low.c (the_low_targets): Likewise.
5573
5574 2015-12-17 Pedro Alves <palves@redhat.com>
5575
5576 * linux-low.c (linux_kill_one_lwp): Remove references to
5577 LinuxThreads.
5578 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5579 to 'kill'.
5580 (linux_init_signals): Delete.
5581 (initialize_low): Adjust.
5582 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5583
5584 2015-12-16 Pedro Alves <palves@redhat.com>
5585
5586 * configure.ac (compiler warning flags): When testing a
5587 -Wno-foo option, check whether -Wfoo works instead.
5588 * configure: Regenerate.
5589
5590 2015-12-11 Don Breazeal <donb@codesourcery.com>
5591
5592 * server.c (process_serial_event): Don't exit from gdbserver
5593 in remote mode if there are still active inferiors.
5594
5595 2015-12-11 Yao Qi <yao.qi@linaro.org>
5596
5597 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5598 arm_breakpoint_at if the process is 32-bit.
5599
5600 2015-12-11 Yao Qi <yao.qi@linaro.org>
5601
5602 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5603 arm breakpoint.
5604
5605 2015-12-07 Yao Qi <yao.qi@linaro.org>
5606
5607 * configure.srv: Append arm.o to srv_tgtobj for
5608 aarch64*-*-linux* target.
5609 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5610 from linux-arm-low.c.
5611 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5612 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5613 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5614 (thumb2_breakpoint_len): Likewise.
5615 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5616 (arm_breakpoint_kinds): Likewise.
5617 (arm_breakpoint_kind_from_pc): Likewise.
5618 (arm_sw_breakpoint_from_kind): Likewise.
5619 (arm_breakpoint_kind_from_current_state): Likewise.
5620 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5621 (arm_sw_breakpoint_from_kind): Declare.
5622 (arm_breakpoint_kind_from_current_state): Declare.
5623 (arm_breakpoint_at): Declare.
5624 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5625 arm_sw_breakpoint_from_kind if process is 32-bit.
5626 (aarch64_breakpoint_kind_from_pc): New function.
5627 (aarch64_breakpoint_kind_from_current_state): New function.
5628 (the_low_target): Initialize fields breakpoint_kind_from_pc
5629 and breakpoint_kind_from_current_state.
5630 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5631 linux-aarch32-low.c.
5632 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5633 (arm_breakpoint, arm_breakpoint_len): Likewise.
5634 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5635 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5636 (arm_is_thumb_mode): Likewise.
5637 (arm_breakpoint_at): Likewise.
5638 (arm_breakpoint_kind_from_pc): Likewise.
5639 (arm_sw_breakpoint_from_kind): Likewise.
5640 (arm_breakpoint_kind_from_current_state): Likewise.
5641
5642 Revert:
5643 2015-08-04 Yao Qi <yao.qi@linaro.org>
5644
5645 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5646 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5647 * server.c (extended_protocol): Remove "static".
5648 * server.h (extended_protocol): Declare it.
5649
5650 2015-12-04 Josh Stone <jistone@redhat.com>
5651
5652 * target.h (struct target_ops) <arch_setup>: Rename to ...
5653 (struct target_ops) <post_create_inferior>: ... this.
5654 (target_arch_setup): Rename to ...
5655 (target_post_create_inferior): ... this, calling post_create_inferior.
5656 * server.c (start_inferior): Update target_arch_setup calls to
5657 target_post_create_inferior.
5658 * linux-low.c (linux_low_ptrace_options): Forward declare.
5659 (linux_arch_setup): Update its comment for general use.
5660 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5661 (struct linux_target_ops): Use linux_post_create_inferior.
5662 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5663 to post_create_inferior.
5664 * nto-low.c (struct nto_target_ops): Likewise.
5665 * spu-low.c (struct spu_target_ops): Likewise.
5666 * win32-low.c (struct win32_target_ops): Likewise.
5667
5668 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5669
5670 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5671
5672 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5673
5674 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5675 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5676 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5677 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5678 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5679 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5680 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5681 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5682 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5683 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5684 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5685 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5686
5687 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5688
5689 * linux-low.c (linux_look_up_symbols): Don't call
5690 linux_supports_traceclone.
5691 * linux-low.h (thread_db_init): Remove use_events argument.
5692 * thread-db.c (thread_db_use_event): Remove global variable.
5693 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5694 (struct thread_db) <td_create_bp>: Remove field.
5695 (thread_db_create_event): Remove function.
5696 (thread_db_enable_reporting): Likewise.
5697 (find_one_thread): Don't check for thread_db_use_events.
5698 (attach_thread): Likewise.
5699 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5700 (try_thread_db_load_1): Don't check for thread_db_use_events.
5701 (thread_db_init): Remove use_events argument and thread events
5702 handling.
5703 (remove_thread_event_breakpoints): Remove function.
5704 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5705
5706 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5707
5708 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5709 New function.
5710 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5711 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5712 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5713 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5714 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5715 Initialize.
5716 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5717 New function.
5718 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5719 * linux-low.c (can_hardware_single_step): Use
5720 supports_hardware_single_step.
5721 (can_software_single_step): New function.
5722 (start_step_over): Call can_software_single_step.
5723 (linux_supports_hardware_single_step): New function.
5724 (struct target_ops) <supports_software_single_step>: Initialize.
5725 * linux-low.h (struct linux_target_ops)
5726 <supports_hardware_single_step>: Initialize.
5727 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5728 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5729 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5730 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5731 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5732 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5733 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5734 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5735 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5736 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5737 Initialize.
5738 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5739 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5740 Initialize.
5741 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5742 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5743 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5744 New function.
5745 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5746 * target.h (struct target_ops): <supports_software_single_step>:
5747 New field.
5748 (target_supports_software_single_step): New macro.
5749
5750 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5751
5752 * linux-low.c (linux_wait_1): Fix pc advance condition.
5753 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5754 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5755
5756 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5757
5758 * linux-arm-low.c (arm_is_thumb_mode): New function.
5759 (arm_breakpoint_at): Use arm_is_thumb_mode.
5760 (arm_breakpoint_kind_from_current_state): New function.
5761 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5762 Initialize.
5763 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5764 (linux_breakpoint_kind_from_current_state): New function.
5765 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5766 * linux-low.h (struct linux_target_ops)
5767 <breakpoint_kind_from_current_state>: New field.
5768 * target.h (struct target_ops): Likewise.
5769 (target_breakpoint_kind_from_current_state): New macro.
5770
5771 2015-11-30 Pedro Alves <palves@redhat.com>
5772
5773 * linux-low.c (linux_resume): Wake up the event loop before
5774 returning.
5775
5776 2015-11-30 Pedro Alves <palves@redhat.com>
5777
5778 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5779 check.
5780 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5781 to -1.
5782 * target.c (struct thread_search): New structure.
5783 (thread_search_callback): New function.
5784 (prev_general_thread): New global.
5785 (prepare_to_access_memory, done_accessing_memory): New functions.
5786 * target.h (prepare_to_access_memory, done_accessing_memory):
5787 Replace macros with function declarations.
5788
5789 2015-11-30 Pedro Alves <palves@redhat.com>
5790
5791 PR 14618
5792 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5793 report TARGET_WAITKIND_NO_RESUMED.
5794 * remote-utils.c (prepare_resume_reply): Handle
5795 TARGET_WAITKIND_NO_RESUMED.
5796 * server.c (report_no_resumed): New global.
5797 (handle_query) <qSupported>: Handle "no-resumed+". Report
5798 "no-resumed+" support.
5799 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5800 return error if the client doesn't support no-resumed events.
5801 (push_stop_notification): New function.
5802 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5803 events if the client supports them.
5804
5805 2015-11-30 Pedro Alves <palves@redhat.com>
5806
5807 * linux-low.c (thread_still_has_status_pending_p): Don't check
5808 vCont;t here.
5809 (lwp_resumed): New function.
5810 (status_pending_p_callback): Return early if the LWP is not
5811 supposed to be resumed.
5812
5813 2015-11-30 Pedro Alves <palves@redhat.com>
5814
5815 * linux-low.c (handle_extended_wait): Assert that the LWP's
5816 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5817 thread create events, leave the new child's status pending.
5818 (linux_low_filter_event): If GDB wants to hear about thread exit
5819 events, leave the LWP marked dead and don't delete it.
5820 (linux_wait_for_event_filtered): Don't check for thread exit.
5821 (filter_exit_event): New function.
5822 (linux_wait_1): Use it, when returning an exit event.
5823 (linux_resume_one_lwp_throw): Assert that the LWP's
5824 waitstatus is TARGET_WAITKIND_IGNORE.
5825 * remote-utils.c (prepare_resume_reply): Handle
5826 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5827 * server.c (report_thread_events): New global.
5828 (handle_general_set): Handle QThreadEvents.
5829 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5830 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5831 TARGET_WAITKIND_THREAD_EXITED.
5832 * server.h (report_thread_events): Declare.
5833
5834 2015-11-30 Pedro Alves <palves@redhat.com>
5835
5836 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5837 the thread's last_resume_kind was resume_stop.
5838
5839 2015-11-30 Pedro Alves <palves@redhat.com>
5840
5841 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5842 before returning.
5843
5844 2015-11-30 Pedro Alves <palves@redhat.com>
5845
5846 * server.c (handle_v_requests): Handle vCtrlC.
5847
5848 2015-11-30 Pedro Alves <palves@redhat.com>
5849
5850 * gdbthread.h (find_any_thread_of_pid): Declare.
5851 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5852 functions.
5853 * server.c (handle_query): If current_thread is NULL, look for
5854 another thread of the selected process.
5855
5856 2015-11-26 Daniel Colascione <dancol@dancol.org>
5857 Simon Marchi <simon.marchi@ericsson.com>
5858
5859 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5860 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5861 name in reply.
5862 * target.h (struct target_ops) <thread_name>: New field.
5863 (target_thread_name): New macro.
5864
5865 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5866
5867 * regcache.h (regcache_invalidate_pid): Add declaration.
5868 * regcache.c (regcache_invalidate_pid): New function, extracted
5869 from regcache_invalidate.
5870 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5871 Add trivial documentation comment.
5872 * lynx-low.c: Use regcache_invalidate_pid instead of
5873 regcache_invalidate.
5874
5875 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5876
5877 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5878 and Elf64_auxv_t if the target is Android.
5879
5880 2015-11-22 Doug Evans <xdje42@gmail.com>
5881
5882 * target.h: #include <sys/types.h>.
5883
5884 2015-11-19 Pedro Alves <palves@redhat.com>
5885
5886 * linux-low.c (linux_process_qsupported): Change prototype.
5887 Adjust.
5888 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5889 Change prototype.
5890 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5891 and adjust to loop over all features.
5892 * server.c (handle_query) <qSupported>: Adjust to call
5893 target_process_qsupported once, passing it a vector of unprocessed
5894 features.
5895 * target.h (struct target_ops) <process_qsupported>: Change
5896 prototype.
5897 (target_process_qsupported): Adjust.
5898
5899 2015-11-19 Pedro Alves <palves@redhat.com>
5900
5901 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5902 mode.
5903 * configure: Regenerate.
5904
5905 2015-11-19 Pedro Alves <palves@redhat.com>
5906
5907 * configure: Regenerate.
5908
5909 2015-11-19 Yao Qi <yao.qi@linaro.org>
5910
5911 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5912 type to uint32_t.
5913
5914 2015-11-19 Yao Qi <yao.qi@linaro.org>
5915
5916 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5917 (struct aarch64_operand): Move enum out.
5918
5919 2015-11-19 Yao Qi <yao.qi@linaro.org>
5920
5921 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5922 struct user_fpsimd_state *.
5923 (aarch64_store_fpregset): Likewise.
5924
5925 2015-11-19 Yao Qi <yao.qi@linaro.org>
5926
5927 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5928 struct user_pt_regs *.
5929 (aarch64_store_gregset): Likewise.
5930
5931 2015-11-18 Pedro Alves <palves@redhat.com>
5932
5933 * Makefile.in (all_object_files): Add $IPA_OBJS.
5934
5935 2015-11-17 Pedro Alves <palves@redhat.com>
5936
5937 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5938 GDB_SIGNAL_0 and gdb_signal_to_string.
5939
5940 2015-11-17 Pedro Alves <palves@redhat.com>
5941
5942 * win32-low.c (handle_output_debug_string): Remove parameter.
5943 (win32_kill): Remove our_status local and adjust call to
5944 handle_output_debug_string.
5945 (get_child_debug_event): Adjust call to
5946 handle_output_debug_string.
5947
5948 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5949
5950 * linux-mips-low.c (mips_fill_gregset): Add cast.
5951 (mips_store_gregset): Likewise.
5952 (mips_fill_fpregset): Likewise.
5953 (mips_store_fpregset): Likewise.
5954
5955 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5956
5957 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5958 priv.
5959
5960 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5961
5962 * linux-mips-low.c (mips_linux_new_thread): Change type of
5963 watch_type to enum target_hw_bp_type.
5964
5965 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5966
5967 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5968 Change return type to arm_hwbp_type.
5969
5970 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5971
5972 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5973 (arm_store_gregset): Likewise.
5974 * linux-arm-low.c (arm_get_hwcap): Likewise.
5975 (arm_read_description): Likewise.
5976
5977 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5978
5979 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5980
5981 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5982
5983 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5984 (ppc_fill_vsxregset): Likewise.
5985 (ppc_store_vsxregset): Likewise.
5986 (ppc_fill_vrregset): Likewise.
5987 (ppc_store_vrregset): Likewise.
5988 (ppc_fill_evrregset): Likewise.
5989 (ppc_store_evrregset): Likewise.
5990
5991 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5992
5993 * linux-ppc-low.c (ppc_usrregs_info): Remove
5994 forward-declaration.
5995 (ppc_arch_setup): Move lower in file.
5996
5997 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5998
5999 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6000 (ps_pdwrite): Likewise.
6001
6002 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6003
6004 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6005 to after assert checks.
6006
6007 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6008
6009 * proc-service.c (ps_pdread): Add/adjust casts.
6010 (ps_pdwrite): Add/adjust casts.
6011
6012 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6013
6014 * server.c (handle_search_memory_1): Cast return value of
6015 memmem.
6016
6017 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6018
6019 * server.c (write_qxfer_response): Change type of data to
6020 gdb_byte *.
6021
6022 2015-10-29 Pedro Alves <palves@redhat.com>
6023
6024 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6025
6026 2015-10-29 Pedro Alves <palves@redhat.com>
6027
6028 * tracepoint.c (clear_installed_tracepoints): Add casts.
6029
6030 2015-10-29 Pedro Alves <palves@redhat.com>
6031
6032 * server.c (handle_v_cont, process_serial_event): Add enum
6033 gdb_signal casts to signal parsing code.
6034
6035 2015-10-29 Pedro Alves <palves@redhat.com>
6036
6037 * linux-low.h (NULL_REGSET): Define.
6038 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6039 * linux-arm-low.c (arm_regsets): Likewise.
6040 * linux-crisv32-low.c (cris_regsets): Likewise.
6041 * linux-m68k-low.c (m68k_regsets): Likewise.
6042 * linux-mips-low.c (mips_regsets): Likewise.
6043 * linux-nios2-low.c (nios2_regsets): Likewise.
6044 * linux-ppc-low.c (ppc_regsets): Likewise.
6045 * linux-s390-low.c (s390_regsets): Likewise.
6046 * linux-sh-low.c (sh_regsets): Likewise.
6047 * linux-sparc-low.c (sparc_regsets): Likewise.
6048 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6049 * linux-tile-low.c (tile_regsets): Likewise.
6050 * linux-x86-low.c (x86_regsets): Likewise.
6051 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6052
6053 2015-10-29 Pedro Alves <palves@redhat.com>
6054
6055 * linux-low.h (NULL_REGSET): Define.
6056 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6057 * linux-arm-low.c (arm_regsets): Likewise.
6058 * linux-crisv32-low.c (cris_regsets): Likewise.
6059 * linux-m68k-low.c (m68k_regsets): Likewise.
6060 * linux-mips-low.c (mips_regsets): Likewise.
6061 * linux-nios2-low.c (nios2_regsets): Likewise.
6062 * linux-ppc-low.c (ppc_regsets): Likewise.
6063 * linux-s390-low.c (s390_regsets): Likewise.
6064 * linux-sh-low.c (sh_regsets): Likewise.
6065 * linux-sparc-low.c (sparc_regsets): Likewise.
6066 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6067 * linux-tile-low.c (tile_regsets): Likewise.
6068 * linux-x86-low.c (x86_regsets): Likewise.
6069 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6070
6071 2015-10-26 Doug Evans <dje@google.com>
6072
6073 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6074
6075 2015-10-26 Doug Evans <dje@google.com>
6076
6077 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6078
6079 2015-10-26 Doug Evans <dje@google.com>
6080
6081 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6082 for debug_printf.
6083 (attach_thread, find_new_threads_callback): Ditto.
6084
6085 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6086
6087 * mem-break.h (set_breakpoint_data): Remove.
6088
6089 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6090
6091 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6092 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6093 (initialize_low): Remove set_breakpoint_data call.
6094 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6095 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6096 (initialize_low): Remove set_breakpoint_data call.
6097 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6098 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6099 (initialize_low): Remove set_breakpoint_data call.
6100
6101 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6102
6103 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6104 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6105 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6106 * target.h (target_breakpoint_kind_from_pc): New macro.
6107
6108 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6109
6110 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6111 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6112 the default breakpoint kind.
6113
6114 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6115
6116 * linux-arm-low.c (arm_supports_z_point_type): Add software
6117 breakpoint support.
6118
6119 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6120
6121 * linux-arm-low.c: Refactor breakpoint definitions.
6122 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6123 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6124
6125 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6126
6127 * Makefile.in: Add arm.c/o.
6128 * configure.srv: Likewise.
6129 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6130 (arm_breakpoint_kind_from_pc): New function.
6131 (arm_sw_breakpoint_from_kind): Return proper kind.
6132 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6133
6134 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6135
6136 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6137 removal.
6138 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6139 (struct raw_breakpoint) <size>: Remove.
6140 (struct raw_breakpoint) <kind>: Add.
6141 (bp_size): New function.
6142 (bp_opcode): Likewise.
6143 (find_raw_breakpoint_at): Adjust for kind.
6144 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6145 (remove_memory_breakpoint): Adjust for kind call bp_size.
6146 (set_raw_breakpoint_at): Adjust for kind.
6147 (set_breakpoint): Likewise.
6148 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6149 (delete_raw_breakpoint): Adjust for kind.
6150 (delete_breakpoint): Likewise.
6151 (find_gdb_breakpoint): Likewise.
6152 (set_gdb_breakpoint_1): Likewise.
6153 (set_gdb_breakpoint): Likewise.
6154 (delete_gdb_breakpoint_1): Likewise.
6155 (delete_gdb_breakpoint): Likewise.
6156 (uninsert_raw_breakpoint): Likewise.
6157 (reinsert_raw_breakpoint): Likewise.
6158 (set_breakpoint_data): Remove.
6159 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6160 (check_mem_read): Adjust for kind call bp_size.
6161 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6162 (clone_one_breakpoint): Adjust for kind.
6163 * mem-break.h (set_gdb_breakpoint): Likewise.
6164 (delete_gdb_breakpoint): Likewise.
6165 * server.c (process_serial_event): Likewise.
6166
6167 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6168
6169 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6170 (struct linux_target_ops) <breakpoint>: Remove.
6171 (struct linux_target_ops) <breakpoint_len>: Remove.
6172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6174 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6175 (arm_sw_breakpoint_from_kind): New function.
6176 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6177 (struct linux_target_ops) <breakpoint>: Remove.
6178 (struct linux_target_ops) <breakpoint_len>: Remove.
6179 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6180 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6181 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6182 (struct linux_target_ops) <breakpoint>: Remove.
6183 (struct linux_target_ops) <breakpoint_len>: Remove.
6184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6185 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6186 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6187 (struct linux_target_ops) <breakpoint>: Remove.
6188 (struct linux_target_ops) <breakpoint_len>: Remove.
6189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6190 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6191 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6192 and sw_breakpoint_from_kind to increment the pc.
6193 (linux_breakpoint_kind_from_pc): New function.
6194 (linux_sw_breakpoint_from_kind): New function.
6195 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6196 (initialize_low): Call breakpoint_kind_from_pc and
6197 sw_breakpoint_from_kind to replace breakpoint_data/len.
6198 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6199 New field.
6200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6201 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6202 (struct linux_target_ops) <breakpoint>: Remove.
6203 (struct linux_target_ops) <breakpoint_len>: Remove.
6204 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6205 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6206 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6207 (struct linux_target_ops) <breakpoint>: Remove.
6208 (struct linux_target_ops) <breakpoint_len>: Remove.
6209 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6210 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6211 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6212 (struct linux_target_ops) <breakpoint>: Remove.
6213 (struct linux_target_ops) <breakpoint_len>: Remove.
6214 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6215 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6216 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6217 (struct linux_target_ops) <breakpoint>: Remove.
6218 (struct linux_target_ops) <breakpoint_len>: Remove.
6219 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6220 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6221 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6222 (struct linux_target_ops) <breakpoint>: Remove.
6223 (struct linux_target_ops) <breakpoint_len>: Remove.
6224 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6225 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6226 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6227 (struct linux_target_ops) <breakpoint>: Remove.
6228 (struct linux_target_ops) <breakpoint_len>: Remove.
6229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6231 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6232 (struct linux_target_ops) <breakpoint>: Remove.
6233 (struct linux_target_ops) <breakpoint_len>: Remove.
6234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6235 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6236 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6237 (struct linux_target_ops) <breakpoint>: Remove.
6238 (struct linux_target_ops) <breakpoint_len>: Remove.
6239 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6240 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6241 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6242 (struct linux_target_ops) <breakpoint>: Remove.
6243 (struct linux_target_ops) <breakpoint_len>: Remove.
6244 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6245 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6246 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6247 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6248 (struct linux_target_ops) <breakpoint>: Remove.
6249 (struct linux_target_ops) <breakpoint_len>: Remove.
6250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6252 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6253 (struct linux_target_ops) <breakpoint>: Remove.
6254 (struct linux_target_ops) <breakpoint_len>: Remove.
6255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6257
6258 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6259
6260 * linux-cris-low.c (cris_get_pc): Remove void arg.
6261
6262 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6263
6264 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6265 variable name.
6266
6267 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6268
6269 * inferiors.c (thread_pid_matches_callback): New function.
6270 (find_thread_process): New function.
6271 (remove_thread): Reset current_thread.
6272 (remove_process): Assert threads have been removed first.
6273
6274 2015-10-15 Yao Qi <yao.qi@linaro.org>
6275
6276 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6277 if it is 3.
6278 (aarch64_remove_point): Likewise.
6279 * regcache.c (regcache_register_size): New function.
6280
6281 2015-10-12 Yao Qi <yao.qi@linaro.org>
6282
6283 * linux-aarch64-low.c: Update all callers as emit_load_store
6284 is renamed to aarch64_emit_load_store.
6285
6286 2015-10-12 Yao Qi <yao.qi@linaro.org>
6287
6288 * linux-aarch64-low.c: Update all callers of function renaming
6289 from emit_insn to aarch64_emit_insn.
6290
6291 2015-10-12 Yao Qi <yao.qi@linaro.org>
6292
6293 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6294 arch/aarch64-insn.h.
6295 (struct aarch64_memory_operand): Likewise.
6296 (ENCODE): Likewise.
6297 (emit_insn): Move to arch/aarch64-insn.c.
6298 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6299 (emit_load_store): Move to arch/aarch64-insn.c.
6300 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6301 (can_encode_int32): Remove.
6302
6303 2015-10-12 Yao Qi <yao.qi@linaro.org>
6304
6305 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6306 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6307 (aarch64_relocate_instruction): Likewise.
6308 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6309 (struct aarch64_insn_visitor): Likewise.
6310
6311 2015-10-12 Yao Qi <yao.qi@linaro.org>
6312
6313 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6314 (struct aarch64_insn_visitor): New.
6315 (struct aarch64_insn_relocation_data): New.
6316 (aarch64_ftrace_insn_reloc_b): New function.
6317 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6318 (aarch64_ftrace_insn_reloc_cb): Likewise.
6319 (aarch64_ftrace_insn_reloc_tb): Likewise.
6320 (aarch64_ftrace_insn_reloc_adr): Likewise.
6321 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6322 (aarch64_ftrace_insn_reloc_others): Likewise.
6323 (visitor): New.
6324 (aarch64_relocate_instruction): Use visitor.
6325
6326 2015-10-12 Yao Qi <yao.qi@linaro.org>
6327
6328 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6329 int. Add argument buf.
6330 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6331 aarch64_relocate_instruction.
6332
6333 2015-10-12 Yao Qi <yao.qi@linaro.org>
6334
6335 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6336 argument insn. Remove local variable insn. Don't call
6337 target_read_uint32.
6338 (aarch64_install_fast_tracepoint_jump_pad): Call
6339 target_read_uint32.
6340
6341 2015-09-30 Yao Qi <yao.qi@linaro.org>
6342
6343 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6344 (emit_load_store_pair): Likewise.
6345
6346 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6347
6348 * dll.c (match_dll): Add cast(s).
6349 (unloaded_dll): Likewise.
6350 * linux-low.c (second_thread_of_pid_p): Likewise.
6351 (delete_lwp_callback): Likewise.
6352 (count_events_callback): Likewise.
6353 (select_event_lwp_callback): Likewise.
6354 (linux_set_resume_request): Likewise.
6355 * server.c (accumulate_file_name_length): Likewise.
6356 (emit_dll_description): Likewise.
6357 (handle_qxfer_threads_worker): Likewise.
6358 (visit_actioned_threads): Likewise.
6359 * thread-db.c (any_thread_of): Likewise.
6360 * tracepoint.c (same_process_p): Likewise.
6361 (match_blocktype): Likewise.
6362 (build_traceframe_info_xml): Likewise.
6363
6364 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6365
6366 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6367 assignment.
6368 (gdb_unparse_agent_expr): Likewise.
6369 * hostio.c (require_data): Likewise.
6370 (handle_pread): Likewise.
6371 * linux-low.c (disable_regset): Likewise.
6372 (fetch_register): Likewise.
6373 (store_register): Likewise.
6374 (get_dynamic): Likewise.
6375 (linux_qxfer_libraries_svr4): Likewise.
6376 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6377 (set_fast_tracepoint_jump): Likewise.
6378 (uninsert_fast_tracepoint_jumps_at): Likewise.
6379 (reinsert_fast_tracepoint_jumps_at): Likewise.
6380 (validate_inserted_breakpoint): Likewise.
6381 (clone_agent_expr): Likewise.
6382 * regcache.c (init_register_cache): Likewise.
6383 * remote-utils.c (putpkt_binary_1): Likewise.
6384 (decode_M_packet): Likewise.
6385 (decode_X_packet): Likewise.
6386 (look_up_one_symbol): Likewise.
6387 (relocate_instruction): Likewise.
6388 (monitor_output): Likewise.
6389 * server.c (handle_search_memory): Likewise.
6390 (handle_qxfer_exec_file): Likewise.
6391 (handle_qxfer_libraries): Likewise.
6392 (handle_qxfer): Likewise.
6393 (handle_query): Likewise.
6394 (handle_v_cont): Likewise.
6395 (handle_v_run): Likewise.
6396 (captured_main): Likewise.
6397 * target.c (write_inferior_memory): Likewise.
6398 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6399 * tracepoint.c (init_trace_buffer): Likewise.
6400 (add_tracepoint_action): Likewise.
6401 (add_traceframe): Likewise.
6402 (add_traceframe_block): Likewise.
6403 (cmd_qtdpsrc): Likewise.
6404 (cmd_qtdv): Likewise.
6405 (cmd_qtstatus): Likewise.
6406 (response_source): Likewise.
6407 (response_tsv): Likewise.
6408 (cmd_qtnotes): Likewise.
6409 (gdb_collect): Likewise.
6410 (initialize_tracepoint): Likewise.
6411
6412 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6413
6414 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6415 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6416 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6417 <NOP>: New.
6418 (enum aarch64_condition_codes): New enum.
6419 (w0): New static global.
6420 (fp): Likewise.
6421 (lr): Likewise.
6422 (struct aarch64_memory_operand) <type>: New
6423 MEMORY_OPERAND_POSTINDEX type.
6424 (postindex_memory_operand): New helper function.
6425 (emit_ret): New function.
6426 (emit_load_store_pair): New function, factored out of emit_stp
6427 with support for MEMORY_OPERAND_POSTINDEX.
6428 (emit_stp): Rewrite using emit_load_store_pair.
6429 (emit_ldp): New function.
6430 (emit_load_store): Likewise.
6431 (emit_ldr): Mention post-index instruction in comment.
6432 (emit_ldrh): New function.
6433 (emit_ldrb): New function.
6434 (emit_ldrsw): Mention post-index instruction in comment.
6435 (emit_str): Likewise.
6436 (emit_subs): New function.
6437 (emit_cmp): Likewise.
6438 (emit_and): Likewise.
6439 (emit_orr): Likewise.
6440 (emit_orn): Likewise.
6441 (emit_eor): Likewise.
6442 (emit_mvn): Likewise.
6443 (emit_lslv): Likewise.
6444 (emit_lsrv): Likewise.
6445 (emit_asrv): Likewise.
6446 (emit_mul): Likewise.
6447 (emit_sbfm): Likewise.
6448 (emit_sbfx): Likewise.
6449 (emit_ubfm): Likewise.
6450 (emit_ubfx): Likewise.
6451 (emit_csinc): Likewise.
6452 (emit_cset): Likewise.
6453 (emit_nop): Likewise.
6454 (emit_ops_insns): New helper function.
6455 (emit_pop): Likewise.
6456 (emit_push): Likewise.
6457 (aarch64_emit_prologue): New function.
6458 (aarch64_emit_epilogue): Likewise.
6459 (aarch64_emit_add): Likewise.
6460 (aarch64_emit_sub): Likewise.
6461 (aarch64_emit_mul): Likewise.
6462 (aarch64_emit_lsh): Likewise.
6463 (aarch64_emit_rsh_signed): Likewise.
6464 (aarch64_emit_rsh_unsigned): Likewise.
6465 (aarch64_emit_ext): Likewise.
6466 (aarch64_emit_log_not): Likewise.
6467 (aarch64_emit_bit_and): Likewise.
6468 (aarch64_emit_bit_or): Likewise.
6469 (aarch64_emit_bit_xor): Likewise.
6470 (aarch64_emit_bit_not): Likewise.
6471 (aarch64_emit_equal): Likewise.
6472 (aarch64_emit_less_signed): Likewise.
6473 (aarch64_emit_less_unsigned): Likewise.
6474 (aarch64_emit_ref): Likewise.
6475 (aarch64_emit_if_goto): Likewise.
6476 (aarch64_emit_goto): Likewise.
6477 (aarch64_write_goto_address): Likewise.
6478 (aarch64_emit_const): Likewise.
6479 (aarch64_emit_call): Likewise.
6480 (aarch64_emit_reg): Likewise.
6481 (aarch64_emit_pop): Likewise.
6482 (aarch64_emit_stack_flush): Likewise.
6483 (aarch64_emit_zero_ext): Likewise.
6484 (aarch64_emit_swap): Likewise.
6485 (aarch64_emit_stack_adjust): Likewise.
6486 (aarch64_emit_int_call_1): Likewise.
6487 (aarch64_emit_void_call_2): Likewise.
6488 (aarch64_emit_eq_goto): Likewise.
6489 (aarch64_emit_ne_goto): Likewise.
6490 (aarch64_emit_lt_goto): Likewise.
6491 (aarch64_emit_le_goto): Likewise.
6492 (aarch64_emit_gt_goto): Likewise.
6493 (aarch64_emit_ge_got): Likewise.
6494 (aarch64_emit_ops_impl): New static global variable.
6495 (aarch64_emit_ops): New target function, return
6496 &aarch64_emit_ops_impl.
6497 (struct linux_target_ops): Install it.
6498
6499 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6500
6501 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6502 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6503 aarch64-ipa.o.
6504 * linux-aarch64-ipa.c: New file.
6505 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6506 and endian.h.
6507 (aarch64_get_thread_area): New target method.
6508 (extract_signed_bitfield): New helper function.
6509 (aarch64_decode_ldr_literal): New function.
6510 (enum aarch64_opcodes): New enum.
6511 (struct aarch64_register): New struct.
6512 (struct aarch64_operand): New struct.
6513 (x0): New static global.
6514 (x1): Likewise.
6515 (x2): Likewise.
6516 (x3): Likewise.
6517 (x4): Likewise.
6518 (w2): Likewise.
6519 (ip0): Likewise.
6520 (sp): Likewise.
6521 (xzr): Likewise.
6522 (aarch64_register): New helper function.
6523 (register_operand): Likewise.
6524 (immediate_operand): Likewise.
6525 (struct aarch64_memory_operand): New struct.
6526 (offset_memory_operand): New helper function.
6527 (preindex_memory_operand): Likewise.
6528 (enum aarch64_system_control_registers): New enum.
6529 (ENCODE): New macro.
6530 (emit_insn): New helper function.
6531 (emit_b): New function.
6532 (emit_bcond): Likewise.
6533 (emit_cb): Likewise.
6534 (emit_tb): Likewise.
6535 (emit_blr): Likewise.
6536 (emit_stp): Likewise.
6537 (emit_ldp_q_offset): Likewise.
6538 (emit_stp_q_offset): Likewise.
6539 (emit_load_store): Likewise.
6540 (emit_ldr): Likewise.
6541 (emit_ldrsw): Likewise.
6542 (emit_str): Likewise.
6543 (emit_ldaxr): Likewise.
6544 (emit_stxr): Likewise.
6545 (emit_stlr): Likewise.
6546 (emit_data_processing_reg): Likewise.
6547 (emit_data_processing): Likewise.
6548 (emit_add): Likewise.
6549 (emit_sub): Likewise.
6550 (emit_mov): Likewise.
6551 (emit_movk): Likewise.
6552 (emit_mov_addr): Likewise.
6553 (emit_mrs): Likewise.
6554 (emit_msr): Likewise.
6555 (emit_sevl): Likewise.
6556 (emit_wfe): Likewise.
6557 (append_insns): Likewise.
6558 (can_encode_int32_in): New helper function.
6559 (aarch64_relocate_instruction): New function.
6560 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6561 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6562 (struct linux_target_ops): Install aarch64_get_thread_area,
6563 aarch64_install_fast_tracepoint_jump_pad and
6564 aarch64_get_min_fast_tracepoint_insn_len.
6565
6566 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6567
6568 * Makefile.in (aarch64-insn.o): New rule.
6569 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6570
6571 2015-09-21 Yao Qi <yao.qi@linaro.org>
6572
6573 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6574
6575 2015-09-21 Yao Qi <yao.qi@linaro.org>
6576
6577 * tracepoint.c (max_jump_pad_size): Remove.
6578
6579 2015-09-18 Yao Qi <yao.qi@linaro.org>
6580
6581 * linux-aarch64-low.c: Don't include sys/uio.h.
6582 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6583
6584 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6585
6586 * tracepoint.c (eval_result_type): Change prototype.
6587 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6588
6589 2015-09-15 Pedro Alves <palves@redhat.com>
6590
6591 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6592 Check whether to report exec events instead of checking whether
6593 multiprocess is enabled.
6594
6595 2015-09-15 Pedro Alves <palves@redhat.com>
6596
6597 PR remote/18965
6598 * remote-utils.c (prepare_resume_reply): Merge
6599 TARGET_WAITKIND_VFORK_DONE switch case with the
6600 TARGET_WAITKIND_FORKED case.
6601
6602 2015-09-15 Yao Qi <yao.qi@linaro.org>
6603
6604 * server.c (handle_query): Check string comparison using
6605 "else if" instead of "if".
6606
6607 2015-09-15 Yao Qi <yao.qi@linaro.org>
6608
6609 * server.c (vCont_supported): New global variable.
6610 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6611 matches. Append ";vContSupported+" to own_buf.
6612 (handle_v_requests): Append ";s;S" to own_buf if target supports
6613 hardware single step or vCont_supported is false.
6614 (capture_main): Set vCont_supported to zero.
6615
6616 2015-09-15 Yao Qi <yao.qi@linaro.org>
6617
6618 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6619 it to ...
6620 (linux_supports_hardware_single_step): ... New function.
6621 (linux_target_ops): Update.
6622 * lynx-low.c (lynx_target_ops): Set field
6623 supports_hardware_single_step to target_can_do_hardware_single_step.
6624 * nto-low.c (nto_target_ops): Likewise.
6625 * spu-low.c (spu_target_ops): Likewise.
6626 * win32-low.c (win32_target_ops): Likewise.
6627 * target.c (target_can_do_hardware_single_step): New function.
6628 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6629 Remove. <supports_hardware_single_step>: New field.
6630 (target_supports_conditional_breakpoints): Remove.
6631 (target_supports_hardware_single_step): New macro.
6632 (target_can_do_hardware_single_step): Declare.
6633 * server.c (handle_query): Use target_supports_hardware_single_step
6634 instead of target_supports_conditional_breakpoints.
6635
6636 2015-09-15 Yao Qi <yao.qi@linaro.org>
6637
6638 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6639 function.
6640 (struct linux_target_ops the_low_target): Install
6641 aarch64_linux_siginfo_fixup.
6642
6643 2015-09-11 Don Breazeal <donb@codesourcery.com>
6644 Luis Machado <lgustavo@codesourcery.com>
6645
6646 * linux-low.c (linux_mourn): Static declaration.
6647 (linux_arch_setup): Move in front of
6648 handle_extended_wait.
6649 (linux_arch_setup_thread): New function.
6650 (handle_extended_wait): Handle exec events. Call
6651 linux_arch_setup_thread. Make event_lwp argument a
6652 pointer-to-a-pointer.
6653 (check_zombie_leaders): Do not check stopped threads.
6654 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6655 (linux_low_filter_event): Add lwp and thread for exec'ing
6656 non-leader thread if leader thread has been deleted.
6657 Refactor code into linux_arch_setup_thread and call it.
6658 Pass child lwp pointer by reference to handle_extended_wait.
6659 (linux_wait_for_event_filtered): Update comment.
6660 (linux_wait_1): Prevent clobbering exec event status.
6661 (linux_supports_exec_events): New function.
6662 (linux_target_ops) <supports_exec_events>: Initialize new member.
6663 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6664 new member.
6665 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6666 * server.c (report_exec_events): New global variable.
6667 (handle_query): Handle qSupported query for exec-events feature.
6668 (captured_main): Initialize report_exec_events.
6669 * server.h (report_exec_events): Declare new global variable.
6670 * target.h (struct target_ops) <supports_exec_events>: New
6671 member.
6672 (target_supports_exec_events): New macro.
6673 * win32-low.c (win32_target_ops) <supports_exec_events>:
6674 Initialize new member.
6675
6676 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6677
6678 * linux-low.c (linux_low_enable_btrace): Remove.
6679 (linux_target_ops): Replace linux_low_enable_btrace with
6680 linux_enable_btrace.
6681
6682 2015-09-03 Yao Qi <yao.qi@linaro.org>
6683
6684 * linux-aarch64-low.c (aarch64_insert_point): Call
6685 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6686 returns true.
6687
6688 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6689
6690 * linux-low.c (check_stopped_by_breakpoint): Use
6691 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6692
6693 2015-08-27 Pedro Alves <palves@redhat.com>
6694
6695 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6696
6697 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6698
6699 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6700 the XNEW-family equivalent.
6701 (compile_bytecodes): Likewise.
6702 * dll.c (loaded_dll): Likewise.
6703 * event-loop.c (append_callback_event): Likewise.
6704 (create_file_handler): Likewise.
6705 (create_file_event): Likewise.
6706 * hostio.c (handle_open): Likewise.
6707 * inferiors.c (add_thread): Likewise.
6708 (add_process): Likewise.
6709 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6710 * linux-arm-low.c (arm_new_process): Likewise.
6711 (arm_new_thread): Likewise.
6712 * linux-low.c (add_to_pid_list): Likewise.
6713 (linux_add_process): Likewise.
6714 (handle_extended_wait): Likewise.
6715 (add_lwp): Likewise.
6716 (enqueue_one_deferred_signal): Likewise.
6717 (enqueue_pending_signal): Likewise.
6718 (linux_resume_one_lwp_throw): Likewise.
6719 (linux_resume_one_thread): Likewise.
6720 (linux_read_memory): Likewise.
6721 (linux_write_memory): Likewise.
6722 * linux-mips-low.c (mips_linux_new_process): Likewise.
6723 (mips_linux_new_thread): Likewise.
6724 (mips_add_watchpoint): Likewise.
6725 * linux-x86-low.c (initialize_low_arch): Likewise.
6726 * lynx-low.c (lynx_add_process): Likewise.
6727 * mem-break.c (set_raw_breakpoint_at): Likewise.
6728 (set_breakpoint): Likewise.
6729 (add_condition_to_breakpoint): Likewise.
6730 (add_commands_to_breakpoint): Likewise.
6731 (clone_agent_expr): Likewise.
6732 (clone_one_breakpoint): Likewise.
6733 * regcache.c (new_register_cache): Likewise.
6734 * remote-utils.c (look_up_one_symbol): Likewise.
6735 * server.c (queue_stop_reply): Likewise.
6736 (start_inferior): Likewise.
6737 (queue_stop_reply_callback): Likewise.
6738 (handle_target_event): Likewise.
6739 * spu-low.c (fetch_ppc_memory): Likewise.
6740 (store_ppc_memory): Likewise.
6741 * target.c (set_target_ops): Likewise.
6742 * thread-db.c (thread_db_load_search): Likewise.
6743 (try_thread_db_load_1): Likewise.
6744 * tracepoint.c (add_tracepoint): Likewise.
6745 (add_tracepoint_action): Likewise.
6746 (create_trace_state_variable): Likewise.
6747 (cmd_qtdpsrc): Likewise.
6748 (cmd_qtro): Likewise.
6749 (add_while_stepping_state): Likewise.
6750 * win32-low.c (child_add_thread): Likewise.
6751 (get_image_name): Likewise.
6752
6753 2015-08-25 Yao Qi <yao.qi@linaro.org>
6754
6755 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6756
6757 2015-08-25 Yao Qi <yao.qi@linaro.org>
6758
6759 * Makefile.in (aarch64-linux.o): New rule.
6760 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6761 srv_tgtobj.
6762 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6763 (aarch64_init_debug_reg_state): Make it extern.
6764 (aarch64_linux_prepare_to_resume): Remove.
6765
6766 2015-08-25 Yao Qi <yao.qi@linaro.org>
6767
6768 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6769 lwp_arch_private_info and ptid_of_lwp.
6770
6771 2015-08-25 Yao Qi <yao.qi@linaro.org>
6772
6773 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6774 Find proc_info by find_process_pid. All callers updated.
6775
6776 2015-08-25 Yao Qi <yao.qi@linaro.org>
6777
6778 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6779 Remove.
6780 (debug_reg_change_callback): Remove.
6781 (aarch64_notify_debug_reg_change): Remove.
6782
6783 2015-08-25 Yao Qi <yao.qi@linaro.org>
6784
6785 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6786 Call current_lwp_ptid.
6787
6788 2015-08-25 Yao Qi <yao.qi@linaro.org>
6789
6790 * linux-aarch64-low.c (debug_reg_change_callback): Use
6791 debug_printf.
6792
6793 2015-08-25 Yao Qi <yao.qi@linaro.org>
6794
6795 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6796
6797 2015-08-25 Yao Qi <yao.qi@linaro.org>
6798
6799 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6800
6801 2015-08-25 Yao Qi <yao.qi@linaro.org>
6802
6803 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6804 the code.
6805
6806 2015-08-25 Yao Qi <yao.qi@linaro.org>
6807
6808 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6809 Remove.
6810 (debug_reg_change_callback): Remove argument entry and add argument
6811 lwp. Remove local variable thread. Don't print thread id in the
6812 debugging output. Don't check whether pid of thread equals to pid.
6813 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6814 iterate_over_lwps instead find_inferior.
6815
6816 2015-08-24 Pedro Alves <palves@redhat.com>
6817
6818 * inferiors.c (get_first_process): New function.
6819 * inferiors.h (get_first_process): New declaration.
6820 * remote-utils.c (read_ptid): Default to the first process in the
6821 list, instead of to the current thread's process.
6822
6823 2015-08-24 Pedro Alves <palves@redhat.com>
6824
6825 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6826 * event-loop.c: Likewise.
6827 * remote-utils.c: Likewise.
6828 * tracepoint.c: Likewise.
6829
6830 2015-08-24 Pedro Alves <palves@redhat.com>
6831
6832 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6833 ptid_get_lwp.
6834
6835 2015-08-21 Pedro Alves <palves@redhat.com>
6836
6837 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6838 instead of literal 1.
6839
6840 2015-08-21 Pedro Alves <palves@redhat.com>
6841
6842 * tdesc.c (default_description): Explicitly zero-initialize.
6843
6844 2015-08-21 Pedro Alves <palves@redhat.com>
6845
6846 PR gdb/18749
6847 * inferiors.c (remove_thread): Discard any pending stop reply for
6848 this thread.
6849 * server.c (remove_all_on_match_pid): Rename to ...
6850 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6851 instead of a pid.
6852 (discard_queued_stop_replies): Change parameter to a ptid. Now
6853 extern.
6854 (handle_v_kill, kill_inferior_callback, captured_main)
6855 (process_serial_event): Adjust.
6856 * server.h (discard_queued_stop_replies): Declare.
6857
6858 2015-08-21 Pedro Alves <palves@redhat.com>
6859
6860 * linux-low.c (wait_for_sigstop): Always switch to no thread
6861 selected if the previously current thread dies.
6862 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6863 process instead of the current thread's.
6864 * remote-utils.c (input_interrupt): Don't check if there's no
6865 current thread.
6866 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6867 current thread to the general thread fails, error out.
6868 (handle_qxfer_auxv, handle_qxfer_libraries)
6869 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6870 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6871 (handle_query): Check if there's a thread selected instead of
6872 checking whether there's any thread in the thread list.
6873 (handle_qxfer_threads, handle_qxfer_btrace)
6874 (handle_qxfer_btrace_conf): Don't error out early if there's no
6875 thread in the thread list.
6876 (handle_v_cont, myresume): Don't set the current thread to the
6877 continue thread.
6878 (process_serial_event) <Hg handling>: Also set thread_id if the
6879 previous general thread is still alive.
6880 (process_serial_event) <g/G handling>: If setting the current
6881 thread to the general thread fails, error out.
6882 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6883 thread's lwp instead of the current thread's.
6884 * target.c (set_desired_thread): If the desired thread was not
6885 found, leave the current thread pointing to NULL. Return an int
6886 (boolean) indicating success.
6887 * target.h (set_desired_thread): Change return type to int.
6888
6889 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6890
6891 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6892 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6893 #includes.
6894 (ps_get_thread_area): New function.
6895
6896 2015-08-19 Gary Benson <gbenson@redhat.com>
6897
6898 * hostio.c (handle_pread): Do not attempt to read more data
6899 than hostio_reply_with_data can fit in a packet.
6900
6901 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6902
6903 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6904
6905 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6906
6907 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6908
6909 2015-08-06 Pedro Alves <palves@redhat.com>
6910
6911 * tracepoint.c (expr_eval_result): Now an int.
6912
6913 2015-08-06 Pedro Alves <palves@redhat.com>
6914
6915 * gdbthread.h (struct regcache): Forward declare.
6916 (struct thread_info) <regcache_data>: Now a struct regcache
6917 pointer.
6918 * inferiors.c (inferior_regcache_data)
6919 (set_inferior_regcache_data): Now work with struct regcache
6920 pointers.
6921 * inferiors.h (struct regcache): Forward declare.
6922 (inferior_regcache_data, set_inferior_regcache_data): Now work
6923 with struct regcache pointers.
6924 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6925 (free_register_cache_thread): Remove struct regcache pointer
6926 casts.
6927
6928 2015-08-06 Pedro Alves <palves@redhat.com>
6929
6930 * server.c (captured_main): On error, print the exception message
6931 to stderr, and if run_once is set, throw a quit.
6932
6933 2015-08-06 Pedro Alves <palves@redhat.com>
6934
6935 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6936 the current thread.
6937
6938 2015-08-06 Pedro Alves <palves@redhat.com>
6939
6940 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6941 reading beyond the passed in buffer length.
6942
6943 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6944
6945 * tracepoint.c (symbol_list) <required>: Remove.
6946
6947 2015-08-06 Pedro Alves <palves@redhat.com>
6948
6949 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6950 count if stopping and suspending threads.
6951 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6952 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6953 (linux_detach): Complete an ongoing step-over.
6954 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6955 throughout.
6956 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6957 (linux_wait_1): If passing a signal to the inferior after
6958 finishing a step-over, unsuspend and re-resume all lwps. If we
6959 see a single-step event but the thread should be continuing, don't
6960 pass the trap to gdb.
6961 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6962 internal_error instead of gdb_assert.
6963 (enqueue_pending_signal): New function.
6964 (check_ptrace_stopped_lwp_gone): Add debug output.
6965 (start_step_over): Use internal_error instead of gdb_assert.
6966 (complete_ongoing_step_over): New function.
6967 (linux_resume_one_thread): Don't resume a suspended thread.
6968 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6969 it stepping.
6970
6971 2015-08-06 Pedro Alves <palves@redhat.com>
6972
6973 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6974 (linux_thread_alive): Use lwp_is_marked_dead.
6975 (extended_event_reported): Delete.
6976 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6977 instead of extended_event_reported.
6978 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6979 as well.
6980 (lwp_is_marked_dead): New function.
6981 (lwp_running): Use lwp_is_marked_dead.
6982 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6983 comment.
6984
6985 2015-08-06 Pedro Alves <palves@redhat.com>
6986
6987 * linux-low.c (linux_wait_1): Move fork event output out of the
6988 !report_to_gdb check. Pass event_child->waitstatus to
6989 target_waitstatus_to_string instead of ourstatus.
6990
6991 2015-08-04 Yao Qi <yao.qi@linaro.org>
6992
6993 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6994 if current_thread is 32 bit.
6995
6996 2015-08-04 Yao Qi <yao.qi@linaro.org>
6997
6998 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6999 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7000 * server.c (extended_protocol): Remove "static".
7001 * server.h (extended_protocol): Declare it.
7002
7003 2015-08-04 Yao Qi <yao.qi@linaro.org>
7004
7005 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7006 both aarch64 and aarch32.
7007 (aarch64_set_pc): Likewise.
7008
7009 2015-08-04 Yao Qi <yao.qi@linaro.org>
7010
7011 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7012 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7013 arm-with-neon.xml to srv_xmlfiles.
7014 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7015 (is_64bit_tdesc): New function.
7016 (aarch64_linux_read_description): New function.
7017 (aarch64_arch_setup): Call aarch64_linux_read_description.
7018 (regs_info): Rename to regs_info_aarch64.
7019 (aarch64_regs_info): Return right regs_info.
7020 (initialize_low_arch): Call initialize_low_arch_aarch32.
7021
7022 2015-08-04 Yao Qi <yao.qi@linaro.org>
7023
7024 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7025 * linux-aarch32-low.c: New file.
7026 * linux-aarch32-low.h: New file.
7027 * linux-arm-low.c (arm_fill_gregset): Move it to
7028 linux-aarch32-low.c.
7029 (arm_store_gregset): Likewise.
7030 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7031 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7032 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7033 (regs_info): Rename to regs_info_arm.
7034 (arm_regs_info): Return regs_info_aarch32 if
7035 have_ptrace_getregset is 1 and target description is
7036 arm_with_neon or arm_with_vfpv3.
7037 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7038 Call initialize_low_arch_aarch32 instead.
7039
7040 2015-08-04 Yao Qi <yao.qi@linaro.org>
7041
7042 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7043 * linux-low.c: ... here.
7044 * linux-low.h (have_ptrace_getregset): Declare it.
7045
7046 2015-08-04 Pedro Alves <palves@redhat.com>
7047
7048 * thread-db.c (struct thread_db): Use new typedefs.
7049 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7050 CHK calls.
7051 (disable_thread_event_reporting): Cast result of dlsym to
7052 destination function pointer type.
7053 (thread_db_mourn): Use td_ta_delete_ftype.
7054
7055 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7056
7057 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7058 arch variant.
7059 (CDX_BREAKPOINT): Define for R2.
7060 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7061 (the_low_target): Add comments.
7062
7063 2015-07-30 Yao Qi <yao.qi@linaro.org>
7064
7065 * linux-arm-low.c (arm_hwcap): Remove it.
7066 (arm_read_description): New local variable arm_hwcap. Don't
7067 set arm_hwcap to zero.
7068
7069 2015-07-30 Yao Qi <yao.qi@linaro.org>
7070
7071 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7072 Use regcache->tdesc instead.
7073 (arm_store_wmmxregset): Likewise.
7074 (arm_fill_vfpregset): Likewise.
7075 (arm_store_vfpregset): Likewise.
7076
7077 2015-07-30 Yao Qi <yao.qi@linaro.org>
7078
7079 * linux-arm-low.c: Include arch/arm.h.
7080 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7081 (arm_store_gregset): Likewise.
7082
7083 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7084
7085 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7086 ptrace's 4th parameter.
7087
7088 2015-07-27 Yao Qi <yao.qi@linaro.org>
7089
7090 * configure.srv (case aarch64*-*-linux*): Don't set
7091 srv_linux_usrregs.
7092
7093 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7094
7095 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7096 sys/ptrace.h.
7097 * linux-arm-low.c: Likewise.
7098 * linux-cris-low.c: Likewise.
7099 * linux-crisv32-low.c: Likewise.
7100 * linux-low.c: Likewise.
7101 * linux-m68k-low.c: Likewise.
7102 * linux-mips-low.c: Likewise.
7103 * linux-nios2-low.c: Likewise.
7104 * linux-s390-low.c: Likewise.
7105 * linux-sparc-low.c: Likewise.
7106 * linux-tic6x-low.c: Likewise.
7107 * linux-tile-low.c: Likewise.
7108 * linux-x86-low.c: Likewise.
7109
7110 2015-07-24 Pedro Alves <palves@redhat.com>
7111
7112 * config.in: Regenerate.
7113 * configure: Regenerate.
7114
7115 2015-07-24 Pedro Alves <palves@redhat.com>
7116
7117 * acinclude.m4: Include ../ptrace.m4.
7118 * configure.ac: Call GDB_AC_PTRACE.
7119 * config.in, configure: Regenerate.
7120
7121 2015-07-24 Yao Qi <yao.qi@linaro.org>
7122
7123 * linux-low.c (linux_create_inferior): Remove setting to
7124 proc->priv->new_inferior.
7125 (linux_attach): Likewise.
7126 (linux_low_filter_event): Likewise.
7127 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7128
7129 2015-07-24 Yao Qi <yao.qi@linaro.org>
7130
7131 * linux-low.c (linux_arch_setup): New function.
7132 (linux_low_filter_event): If proc->tdesc is NULL and
7133 proc->attached is true, call the_low_target.arch_setup.
7134 Otherwise, keep status pending, and return.
7135 (linux_resume_one_lwp_throw): Don't call get_pc if
7136 thread->while_stepping isn't NULL. Don't call
7137 get_thread_regcache if proc->tdesc is NULL.
7138 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7139 (linux_target_ops): Install arch_setup.
7140 * server.c (start_inferior): Call the_target->arch_setup.
7141 * target.h (struct target_ops) <arch_setup>: New field.
7142 (target_arch_setup): New marco.
7143 * lynx-low.c (lynx_target_ops): Update.
7144 * nto-low.c (nto_target_ops): Update.
7145 * spu-low.c (spu_target_ops): Update.
7146 * win32-low.c (win32_target_ops): Update.
7147
7148 2015-07-24 Yao Qi <yao.qi@linaro.org>
7149
7150 * linux-low.c (linux_add_process): Don't set
7151 proc->priv->new_inferior.
7152 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7153 (linux_attach): Likewise.
7154
7155 2015-07-24 Yao Qi <yao.qi@linaro.org>
7156
7157 * server.c (start_inferior): Code refactor.
7158
7159 2015-07-24 Yao Qi <yao.qi@linaro.org>
7160
7161 * server.c (process_serial_event): Set general_thread.
7162
7163 2015-07-21 Yao Qi <yao.qi@linaro.org>
7164
7165 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7166 aarch64_linux_get_debug_reg_capacity.
7167
7168 2015-07-17 Yao Qi <yao.qi@linaro.org>
7169
7170 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7171 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7172 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7173 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7174 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7175 (AARCH64_HWP_ALIGNMENT): Likewise.
7176 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7177 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7178 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7179 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7180 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7181 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7182 (struct aarch64_debug_reg_state): Likewise.
7183 (struct arch_lwp_info): Likewise.
7184 (aarch64_align_watchpoint): Likewise.
7185 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7186 (aarch64_watchpoint_length): Likewise.
7187 (aarch64_point_encode_ctrl_reg): Likewise
7188 (aarch64_point_is_aligned): Likewise.
7189 (aarch64_align_watchpoint): Likewise.
7190 (aarch64_linux_set_debug_regs):
7191 (aarch64_dr_state_insert_one_point): Likewise.
7192 (aarch64_dr_state_remove_one_point): Likewise.
7193 (aarch64_handle_breakpoint): Likewise.
7194 (aarch64_handle_aligned_watchpoint): Likewise.
7195 (aarch64_handle_unaligned_watchpoint): Likewise.
7196 (aarch64_handle_watchpoint): Likewise.
7197
7198 2015-07-17 Yao Qi <yao.qi@linaro.org>
7199
7200 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7201 and don't aarch64_get_debug_reg_state. All callers update.
7202 (aarch64_handle_aligned_watchpoint): Likewise.
7203 (aarch64_handle_unaligned_watchpoint): Likewise.
7204 (aarch64_handle_watchpoint): Likewise.
7205 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7206 (aarch64_remove_point): Likewise.
7207
7208 2015-07-17 Yao Qi <yao.qi@linaro.org>
7209
7210 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7211 debug_printf.
7212 (aarch64_handle_unaligned_watchpoint): Likewise.
7213
7214 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7215
7216 Revert the previous 3 commits:
7217 Move gdb_regex* to common/
7218 Move linux_find_memory_regions_full & co.
7219 gdbserver build-id attribute generator
7220
7221 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7222 Jan Kratochvil <jan.kratochvil@redhat.com>
7223
7224 gdbserver build-id attribute generator.
7225 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7226 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7227 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7228 (find_phdr): New.
7229 (get_dynamic): Use find_pdhr to traverse program headers.
7230 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7231 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7232 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7233 (get_hex_build_id): New.
7234 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7235 to reply XML document.
7236
7237 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7238 Jan Kratochvil <jan.kratochvil@redhat.com>
7239
7240 * target.c: Include target/target-utils.h and fcntl.h.
7241 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7242 (target_fileio_read_stralloc): New functions.
7243
7244 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7245
7246 * Makefile.in (OBS): Add gdb_regex.o.
7247 (gdb_regex.o): New.
7248 * config.in: Rebuilt.
7249 * configure: Rebuilt.
7250
7251 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7252 Jan Kratochvil <jan.kratochvil@redhat.com>
7253
7254 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7255 * Makefile.in (OBS): Add target-utils.o.
7256 (linux-maps.o, target-utils.o): New.
7257 * configure.srv (srv_linux_obj): Add linux-maps.o.
7258
7259 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7260
7261 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7262 function, return 1.
7263 (the_low_target): Install it.
7264
7265 2015-07-14 Pedro Alves <palves@redhat.com>
7266
7267 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7268 Instead, ignore ECHILD, and throw an error for other errnos.
7269
7270 2015-07-10 Pedro Alves <palves@redhat.com>
7271
7272 * event-loop.c (struct callback_event) <data>: Change type to
7273 gdb_client_data instance instead of gdb_client_data pointer.
7274 (append_callback_event): Adjust.
7275
7276 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7277
7278 * linux-aarch64-low.c: Add comments for each linux_target_ops
7279 method. Remove comments already covered in target_ops and
7280 linux_target_ops definitions.
7281 (the_low_target): Add comments for each unimplemented method.
7282
7283 2015-07-09 Yao Qi <yao.qi@linaro.org>
7284
7285 * linux-aarch64-low.c (aarch64_regmap): Remove.
7286 (aarch64_usrregs_info): Remove.
7287 (regs_info): Set field usrregs to NULL.
7288
7289 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7290
7291 * linux-low.c: Include "rsp-low.h"
7292 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7293 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7294 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7295 (handle_btrace_enable_pt): New.
7296 (handle_btrace_general_set): Support "pt".
7297 (handle_btrace_conf_general_set): Support "pt:size".
7298
7299 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7300
7301 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7302 Z_PACKET_SW_BP.
7303
7304 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7305
7306 * linux-aarch64-low.c: Remove comment about endianness.
7307 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7308 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7309 memcmp.
7310
7311 2015-06-24 Gary Benson <gbenson@redhat.com>
7312
7313 * linux-i386-ipa.c (stdint.h): Do not include.
7314 * lynx-i386-low.c (stdint.h): Likewise.
7315 * lynx-ppc-low.c (stdint.h): Likewise.
7316 * mem-break.c (stdint.h): Likewise.
7317 * thread-db.c (stdint.h): Likewise.
7318 * tracepoint.c (stdint.h): Likewise.
7319 * win32-low.c (stdint.h): Likewise.
7320
7321 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7322
7323 * server.c (write_qxfer_response): Update call to
7324 remote_escape_output.
7325
7326 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7327 Jan Kratochvil <jan.kratochvil@redhat.com>
7328
7329 Merge multiple hex conversions.
7330 * gdbreplay.c (tohex): Rename to 'fromhex'.
7331 (logchar): Use fromhex.
7332
7333 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7334
7335 * server.c (handle_qxfer_libraries): Set `version' attribute for
7336 <library-list>.
7337
7338 2015-06-10 Gary Benson <gbenson@redhat.com>
7339
7340 * target.h (struct target_ops) <multifs_open>: New field.
7341 <multifs_unlink>: Likewise.
7342 <multifs_readlink>: Likewise.
7343 * linux-low.c (nat/linux-namespaces.h): New include.
7344 (linux_target_ops): Initialize the_target->multifs_open,
7345 the_target->multifs_unlink and the_target->multifs_readlink.
7346 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7347 * hostio.c (hostio_fs_pid): New static variable.
7348 (hostio_handle_new_gdb_connection): New function.
7349 (handle_setfs): Likewise.
7350 (handle_open): Use the_target->multifs_open as appropriate.
7351 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7352 (handle_readlink): Use the_target->multifs_readlink as
7353 appropriate.
7354 (handle_vFile): Handle vFile:setfs packets.
7355 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7356 after target_handle_new_gdb_connection.
7357
7358 2015-06-10 Gary Benson <gbenson@redhat.com>
7359
7360 * configure.ac (AC_CHECK_FUNCS): Add setns.
7361 * config.in: Regenerate.
7362 * configure: Likewise.
7363 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7364 (linux-namespaces.o): New rule.
7365 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7366
7367 2015-06-09 Gary Benson <gbenson@redhat.com>
7368
7369 * hostio.c (handle_open): Process mode argument with
7370 fileio_to_host_mode.
7371
7372 2015-06-01 Yao Qi <yao.qi@linaro.org>
7373
7374 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7375 * linux-x86-low.c: Likewise.
7376
7377 2015-05-28 Don Breazeal <donb@codesourcery.com>
7378
7379 * linux-low.c (handle_extended_wait): Initialize
7380 thread_info.last_resume_kind for new fork children.
7381
7382 2015-05-15 Pedro Alves <palves@redhat.com>
7383
7384 * target.h (target_handle_new_gdb_connection): Rewrite using if
7385 wrapped in do/while.
7386
7387 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7388
7389 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7390 * configure, config.in: Regenerate.
7391 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7392 Declare typedef.
7393
7394 2015-05-12 Don Breazeal <donb@codesourcery.com>
7395
7396 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7397 PTRACE_EVENT_VFORK_DONE.
7398 (linux_low_ptrace_options, extended_event_reported): Add vfork
7399 events.
7400 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7401 and "vforkdone" for RSP 'T' Stop Reply Packet.
7402 * server.h (report_vfork_events): Declare
7403 global variable.
7404
7405 2015-05-12 Don Breazeal <donb@codesourcery.com>
7406
7407 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7408 (the_low_target) <new_fork>: Initialize new member.
7409 * linux-arm-low.c (arm_new_fork): New function.
7410 (the_low_target) <new_fork>: Initialize new member.
7411 * linux-low.c (handle_extended_wait): Call new target function
7412 new_fork.
7413 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7414 * linux-mips-low.c (mips_add_watchpoint): New function
7415 extracted from mips_insert_point.
7416 (the_low_target) <new_fork>: Initialize new member.
7417 (mips_linux_new_fork): New function.
7418 (mips_insert_point): Call mips_add_watchpoint.
7419 * linux-x86-low.c (x86_linux_new_fork): New function.
7420 (the_low_target) <new_fork>: Initialize new member.
7421
7422 2015-05-12 Don Breazeal <donb@codesourcery.com>
7423
7424 * linux-low.c (handle_extended_wait): Implement return value,
7425 rename argument 'event_child' to 'event_lwp', handle
7426 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7427 (linux_low_ptrace_options): New function.
7428 (linux_low_filter_event): Call linux_low_ptrace_options,
7429 use different argument fo linux_enable_event_reporting,
7430 use return value from handle_extended_wait.
7431 (extended_event_reported): New function.
7432 (linux_wait_1): Call extended_event_reported and set
7433 status to report fork events.
7434 (linux_write_memory): Add pid to debug message.
7435 (reset_lwp_ptrace_options_callback): New function.
7436 (linux_handle_new_gdb_connection): New function.
7437 (linux_target_ops): Initialize new structure member.
7438 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7439 * lynx-low.c: Initialize new structure member.
7440 * remote-utils.c (prepare_resume_reply): Implement stop reason
7441 "fork" for "T" stop message.
7442 * server.c (handle_query): Call handle_new_gdb_connection.
7443 * server.h (report_fork_events): Declare global flag.
7444 * target.h (struct target_ops) <handle_new_gdb_connection>:
7445 New member.
7446 (target_handle_new_gdb_connection): New macro.
7447 * win32-low.c: Initialize new structure member.
7448
7449 2015-05-12 Don Breazeal <donb@codesourcery.com>
7450
7451 * mem-break.c (APPEND_TO_LIST): Define macro.
7452 (clone_agent_expr): New function.
7453 (clone_one_breakpoint): New function.
7454 (clone_all_breakpoints): New function.
7455 * mem-break.h: Declare new functions.
7456
7457 2015-05-12 Don Breazeal <donb@codesourcery.com>
7458
7459 * linux-low.c (linux_supports_fork_events): New function.
7460 (linux_supports_vfork_events): New function.
7461 (linux_target_ops): Initialize new structure members.
7462 (initialize_low): Call linux_check_ptrace_features.
7463 * lynx-low.c (lynx_target_ops): Initialize new structure
7464 members.
7465 * server.c (report_fork_events, report_vfork_events):
7466 New global flags.
7467 (handle_query): Add new features to qSupported packet and
7468 response.
7469 (captured_main): Initialize new global variables.
7470 * target.h (struct target_ops) <supports_fork_events>:
7471 New member.
7472 <supports_vfork_events>: New member.
7473 (target_supports_fork_events): New macro.
7474 (target_supports_vfork_events): New macro.
7475 * win32-low.c (win32_target_ops): Initialize new structure
7476 members.
7477
7478 2015-05-12 Gary Benson <gbenson@redhat.com>
7479
7480 * server.c (handle_qxfer_exec_file): Use current process
7481 if annex is empty.
7482
7483 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7484
7485 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7486 Remove HAVE_PTRACE_GETREGS conditionals.
7487 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7488 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7489
7490 2015-05-08 Yao Qi <yao.qi@linaro.org>
7491
7492 * linux-low.c (linux_supports_conditional_breakpoints): New
7493 function.
7494 (linux_target_ops): Install new target method.
7495 * lynx-low.c (lynx_target_ops): Install NULL hook for
7496 supports_conditional_breakpoints.
7497 * nto-low.c (nto_target_ops): Likewise.
7498 * spu-low.c (spu_target_ops): Likewise.
7499 * win32-low.c (win32_target_ops): Likewise.
7500 * server.c (handle_query): Check
7501 target_supports_conditional_breakpoints.
7502 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7503 New field.
7504 (target_supports_conditional_breakpoints): New macro.
7505
7506 2015-05-06 Pedro Alves <palves@redhat.com>
7507
7508 PR server/18081
7509 * server.c (start_inferior): If the process exits, mourn it.
7510
7511 2015-04-21 Gary Benson <gbenson@redhat.com>
7512
7513 * hostio.c (fileio_open_flags_to_host): Factored out to
7514 fileio_to_host_openflags in common/fileio.c. Single use
7515 updated.
7516
7517 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7518
7519 * linux-xtensa-low.c (xtensa_fill_gregset)
7520 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7521 XCHAL_HAVE_LOOP.
7522
7523 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7524
7525 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7526 (regs_info): Replace usrregs pointer with NULL.
7527
7528 2015-04-17 Gary Benson <gbenson@redhat.com>
7529
7530 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7531 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7532 * server.c (handle_qxfer_exec_file): New function.
7533 (qxfer_packets): Add exec-file entry.
7534 (handle_query): Report qXfer:exec-file:read as supported packet.
7535
7536 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7537
7538 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7539
7540 2015-04-09 Gary Benson <gbenson@redhat.com>
7541
7542 * hostio-errno.c (errno_to_fileio_error): Remove function.
7543 Update caller to use remote_fileio_to_fio_error.
7544
7545 2015-04-09 Yao Qi <yao.qi@linaro.org>
7546
7547 * linux-low.c (linux_insert_point): Call
7548 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7549 (linux_remove_point): Call remove_memory_breakpoint if type is
7550 raw_bkpt_type_sw.
7551 * linux-x86-low.c (x86_insert_point): Don't call
7552 insert_memory_breakpoint.
7553 (x86_remove_point): Don't call remove_memory_breakpoint.
7554
7555 2015-04-01 Pedro Alves <palves@redhat.com>
7556 Cleber Rosa <crosa@redhat.com>
7557
7558 * server.c (gdbserver_usage): Reorganize and extend the usage
7559 message.
7560
7561 2015-03-24 Pedro Alves <palves@redhat.com>
7562
7563 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7564 output. Also dump TRAP_TRACE.
7565 (linux_low_filter_event): In debug output, distinguish a
7566 resume_stop SIGSTOP from a delayed SIGSTOP.
7567
7568 2015-03-24 Gary Benson <gbenson@redhat.com>
7569
7570 * linux-x86-low.c (x86_linux_new_thread): Moved to
7571 nat/x86-linux.c.
7572 (x86_linux_prepare_to_resume): Likewise.
7573
7574 2015-03-24 Gary Benson <gbenson@redhat.com>
7575
7576 * Makefile.in (x86-linux-dregs.o): New rule.
7577 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7578 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7579 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7580 (x86_linux_dr_get): Likewise.
7581 (x86_linux_dr_set): Likewise.
7582 (update_debug_registers_callback): Likewise.
7583 (x86_linux_dr_set_addr): Likewise.
7584 (x86_linux_dr_get_addr): Likewise.
7585 (x86_linux_dr_set_control): Likewise.
7586 (x86_linux_dr_get_control): Likewise.
7587 (x86_linux_dr_get_status): Likewise.
7588 (x86_linux_update_debug_registers): Likewise.
7589
7590 2015-03-24 Gary Benson <gbenson@redhat.com>
7591
7592 * linux-x86-low.c (x86_linux_update_debug_registers):
7593 New function, factored out from...
7594 (x86_linux_prepare_to_resume): ...this.
7595
7596 2015-03-24 Gary Benson <gbenson@redhat.com>
7597
7598 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7599 (x86_linux_dr_set): Likewise.
7600 (update_debug_registers_callback): Likewise.
7601 (x86_linux_dr_set_addr): Likewise.
7602 (x86_linux_dr_get_addr): Likewise.
7603 (x86_linux_dr_set_control): Likewise.
7604 (x86_linux_dr_get_control): Likewise.
7605 (x86_linux_dr_get_status): Likewise.
7606 (x86_linux_prepare_to_resume): Likewise.
7607
7608 2015-03-24 Gary Benson <gbenson@redhat.com>
7609
7610 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7611 Use perror_with_name. Pass string through gettext.
7612 (x86_linux_dr_set): Likewise.
7613
7614 2015-03-24 Gary Benson <gbenson@redhat.com>
7615
7616 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7617 (x86_linux_dr_set_addr): ...this.
7618 (x86_dr_low_get_addr): Rename to...
7619 (x86_linux_dr_get_addr): ...this.
7620 (x86_dr_low_set_control): Rename to...
7621 (x86_linux_dr_set_control): ...this.
7622 (x86_dr_low_get_control): Rename to...
7623 (x86_linux_dr_get_control): ...this.
7624 (x86_dr_low_get_status): Rename to...
7625 (x86_linux_dr_get_status): ...this.
7626 (x86_dr_low): Update with new function names.
7627
7628 2015-03-24 Gary Benson <gbenson@redhat.com>
7629
7630 * Makefile.in (x86-linux.o): New rule.
7631 * configure.srv: Add x86-linux.o to relevant targets.
7632 * linux-low.c (lwp_set_arch_private_info): New function.
7633 (lwp_arch_private_info): Likewise.
7634 * linux-x86-low.c: Include nat/x86-linux.h.
7635 (arch_lwp_info): Removed structure.
7636 (update_debug_registers_callback):
7637 Use lwp_set_debug_registers_changed.
7638 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7639 and lwp_set_debug_registers_changed.
7640 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7641
7642 2015-03-24 Gary Benson <gbenson@redhat.com>
7643
7644 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7645 * linux-arm-low.c (arm_new_thread): Likewise.
7646 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7647 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7648 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7649 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7650
7651 2015-03-24 Gary Benson <gbenson@redhat.com>
7652
7653 * linux-low.c (ptid_of_lwp): New function.
7654 (lwp_is_stopped): Likewise.
7655 (lwp_stop_reason): Likewise.
7656 * linux-x86-low.c (update_debug_registers_callback):
7657 Use lwp_is_stopped.
7658 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7659 lwp_stop_reason.
7660
7661 2015-03-24 Gary Benson <gbenson@redhat.com>
7662
7663 * linux-low.h (linux_stop_lwp): Remove declaration.
7664
7665 2015-03-24 Gary Benson <gbenson@redhat.com>
7666
7667 * linux-low.h: Include nat/linux-nat.h.
7668 * linux-low.c (iterate_over_lwps_args): New structure.
7669 (iterate_over_lwps_filter): New function.
7670 (iterate_over_lwps): Likewise.
7671 * linux-x86-low.c (update_debug_registers_callback):
7672 Update signature to what iterate_over_lwps expects.
7673 Remove PID check that iterate_over_lwps now performs.
7674 (x86_dr_low_set_addr): Use iterate_over_lwps.
7675 (x86_dr_low_set_control): Likewise.
7676
7677 2015-03-24 Gary Benson <gbenson@redhat.com>
7678
7679 * linux-x86-low.c (x86_debug_reg_state): New function.
7680 (x86_linux_prepare_to_resume): Use the above.
7681
7682 2015-03-24 Gary Benson <gbenson@redhat.com>
7683
7684 * linux-low.c (current_lwp_ptid): New function.
7685 * linux-x86-low.c: Include nat/linux-nat.h.
7686 (x86_dr_low_get_addr): Use current_lwp_ptid.
7687 (x86_dr_low_get_control): Likewise.
7688 (x86_dr_low_get_status): Likewise.
7689
7690 2015-03-20 Pedro Alves <palves@redhat.com>
7691
7692 * tracepoint.c (cmd_qtstatus): Make "str" const.
7693
7694 2015-03-20 Pedro Alves <palves@redhat.com>
7695
7696 * server.c (handle_general_set): Make "req_str" const.
7697
7698 2015-03-19 Pedro Alves <palves@redhat.com>
7699
7700 * linux-low.c (linux_resume_one_lwp): Rename to ...
7701 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7702 instead call perror_with_name.
7703 (check_ptrace_stopped_lwp_gone): New function.
7704 (linux_resume_one_lwp): Reimplement as wrapper around
7705 linux_resume_one_lwp_throw that swallows errors if the LWP is
7706 gone.
7707
7708 2015-03-19 Pedro Alves <palves@redhat.com>
7709
7710 * linux-low.c (count_events_callback, select_event_lwp_callback):
7711 No longer check whether the thread has resume_stop as last resume
7712 kind.
7713
7714 2015-03-19 Pedro Alves <palves@redhat.com>
7715
7716 * linux-low.c (count_events_callback, select_event_lwp_callback):
7717 Use the lwp's status_pending_p field, not the thread's.
7718
7719 2015-03-19 Pedro Alves <palves@redhat.com>
7720
7721 * linux-low.c (select_event_lwp_callback): Update comments to
7722 no longer mention SIGTRAP.
7723
7724 2015-03-18 Gary Benson <gbenson@redhat.com>
7725
7726 * server.c (handle_query): Do not report vFile:fstat as supported.
7727
7728 2015-03-11 Gary Benson <gbenson@redhat.com>
7729
7730 * hostio.c (sys/types.h): New include.
7731 (sys/stat.h): Likewise.
7732 (common-remote-fileio.h): Likewise.
7733 (handle_fstat): New function.
7734 (handle_vFile): Handle vFile:fstat packets.
7735
7736 2015-03-11 Gary Benson <gbenson@redhat.com>
7737
7738 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7739 struct stat.st_blocks and struct stat.st_blksize.
7740 * configure: Regenerate.
7741 * config.in: Likewise.
7742 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7743 (OBS): Add common-remote-fileio.o.
7744 (common-remote-fileio.o): New rule.
7745
7746 2015-03-09 Pedro Alves <palves@redhat.com>
7747
7748 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7749 'struct sockaddr' pointer in 'accept' call.
7750
7751 2015-03-09 Pedro Alves <palves@redhat.com>
7752
7753 Revert:
7754 2015-03-07 Pedro Alves <palves@redhat.com>
7755 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7756 or <winsock2.h> here. Instead include "gdb_socket.h".
7757 (remote_open): Use union gdb_sockaddr_u.
7758 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7759 or <winsock2.h> here. Instead include "gdb_socket.h".
7760 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7761 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7762 or <sys/un.h>.
7763 (init_named_socket, gdb_agent_helper_thread): Use union
7764 gdb_sockaddr_u.
7765
7766 2015-03-07 Pedro Alves <palves@redhat.com>
7767
7768 * configure.ac (build_warnings): Move
7769 -Wdeclaration-after-statement to the C-specific set.
7770 * configure: Regenerate.
7771
7772 2015-03-07 Pedro Alves <palves@redhat.com>
7773
7774 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7775 or <winsock2.h> here. Instead include "gdb_socket.h".
7776 (remote_open): Use union gdb_sockaddr_u.
7777 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7778 or <winsock2.h> here. Instead include "gdb_socket.h".
7779 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7780 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7781 or <sys/un.h>.
7782 (init_named_socket, gdb_agent_helper_thread): Use union
7783 gdb_sockaddr_u.
7784
7785 2015-03-07 Pedro Alves <palves@redhat.com>
7786
7787 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7788 instead.
7789
7790 2015-03-06 Yao Qi <yao.qi@linaro.org>
7791
7792 * linux-aarch64-low.c (aarch64_insert_point): Use
7793 show_debug_regs as a boolean.
7794 (aarch64_remove_point): Likewise.
7795
7796 2015-03-05 Pedro Alves <palves@redhat.com>
7797
7798 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7799 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7800 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7801 * nto-low.c (nto_target_ops): Likewise.
7802 * spu-low.c (spu_target_ops): Likewise.
7803 * win32-low.c (win32_target_ops): Likewise.
7804
7805 2015-03-04 Pedro Alves <palves@redhat.com>
7806
7807 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7808 Decide whether a breakpoint triggered based on the SIGTRAP's
7809 siginfo.si_code.
7810 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7811 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7812 (linux_low_filter_event): Check for breakpoints before checking
7813 watchpoints.
7814 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7815 siginfo.si_code.
7816 (linux_stopped_by_sw_breakpoint)
7817 (linux_supports_stopped_by_sw_breakpoint)
7818 (linux_stopped_by_hw_breakpoint)
7819 (linux_supports_stopped_by_hw_breakpoint): New functions.
7820 (linux_target_ops): Install new target methods.
7821
7822 2015-03-04 Pedro Alves <palves@redhat.com>
7823
7824 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7825 * server.c (swbreak_feature, hwbreak_feature): New globals.
7826 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7827 (captured_main): Clear swbreak_feature and hwbreak_feature.
7828 * server.h (swbreak_feature, hwbreak_feature): Declare.
7829 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7830 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7831 supports_stopped_by_hw_breakpoint>: New fields.
7832 (target_supports_stopped_by_sw_breakpoint)
7833 (target_stopped_by_sw_breakpoint)
7834 (target_supports_stopped_by_hw_breakpoint)
7835 (target_stopped_by_hw_breakpoint): Declare.
7836
7837 2015-03-04 Pedro Alves <palves@redhat.com>
7838
7839 enum lwp_stop_reason -> enum target_stop_reason
7840 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7841 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7842 (linux_wait_1, stuck_in_jump_pad_callback)
7843 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7844 (linux_stopped_by_watchpoint):
7845 * linux-low.h (enum lwp_stop_reason): Delete.
7846 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7847 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7848
7849 2015-03-04 Yao Qi <yao.qi@linaro.org>
7850
7851 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7852
7853 2015-03-03 Gary Benson <gbenson@redhat.com>
7854
7855 * hostio.c (handle_vFile): Fix prefix lengths.
7856
7857 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7858
7859 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7860 ptr_bits.
7861
7862 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7863
7864 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7865 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7866 (clean): Add "rm -f" for above C files.
7867 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7868 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7869 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7870 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7871 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7872 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7873 (init_registers_s390x_vx_linux64)
7874 (init_registers_s390x_tevx_linux64)
7875 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7876 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7877 declarations.
7878 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7879 (s390_store_vxrs_high): New functions.
7880 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7881 NT_S390_VXRS_HIGH.
7882 (s390_arch_setup): Add logic for selecting one of the new target
7883 descriptions. Activate the new vector regsets if applicable.
7884 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7885 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7886 and init_registers_s390x_tevx_linux64.
7887
7888 2015-03-01 Pedro Alves <palves@redhat.com>
7889
7890 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7891 parameter.
7892
7893 2015-02-27 Pedro Alves <palves@redhat.com>
7894
7895 * linux-x86-low.c (u_debugreg_offset): New function.
7896 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7897
7898 2015-02-27 Pedro Alves <palves@redhat.com>
7899
7900 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7901 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7902 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7903 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7904 (ps_lsetfpregs, ps_getpid)
7905 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7906 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7907 (ps_lsetxregs, ps_plog): Declare.
7908
7909 2015-02-27 Pedro Alves <palves@redhat.com>
7910
7911 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7912 IP_AGENT_EXPORT_FUNC.
7913 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7914 IP_AGENT_EXPORT_FUNC.
7915 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7916 (IP_AGENT_EXPORT): Delete.
7917 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7918 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7919 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7920 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7921 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7922 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7923 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7924 (traceframe_read_count, traceframe_write_count)
7925 (traceframes_created, trace_state_variables, get_raw_reg)
7926 (get_trace_state_variable_value, set_trace_state_variable_value)
7927 (ust_loaded, helper_thread_id, cmd_buf): Use
7928 IPA_SYM_EXPORTED_NAME.
7929 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7930 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7931 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7932 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7933 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7934 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7935 EXTERN_C_PUSH/EXTERN_C_POP.
7936 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7937 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7938 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7939 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7940 (traceframe_write_count, traceframe_read_count)
7941 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7942 (about_to_request_buffer_space, get_trace_state_variable_value)
7943 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7944 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7945 EXTERN_C_PUSH/EXTERN_C_POP.
7946 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7947 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7948 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7949 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7950 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7951 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7952 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7953 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7954 Define.
7955 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7956 (IP_AGENT_EXPORT_VAR_DECL): Define.
7957 (tracing): Declare.
7958 (gdb_agent_get_raw_reg): Declare.
7959
7960 2015-02-27 Tom Tromey <tromey@redhat.com>
7961 Pedro Alves <palves@redhat.com>
7962
7963 Rename symbols whose names are reserved C++ keywords throughout.
7964
7965 2015-02-27 Pedro Alves <palves@redhat.com>
7966
7967 * Makefile.in (COMPILER): New, get it from autoconf.
7968 (CXX): Get from autoconf instead.
7969 (COMPILE.pre): Use COMPILER.
7970 (CC-LD): Rename to ...
7971 (CC_LD): ... this. Use COMPILER.
7972 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7973 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7974 * acinclude.m4: Include build-with-cxx.m4.
7975 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7976 Disable -Werror by default if building in C++ mode.
7977 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7978 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7979 the C++ compiler. Save/restore CXXFLAGS too.
7980 * configure: Regenerate.
7981
7982 2015-02-27 Pedro Alves <palves@redhat.com>
7983
7984 * acinclude.m4: Include libiberty.m4.
7985 * configure.ac: Call libiberty_INIT.
7986 * config.in, configure: Regenerate.
7987
7988 2015-02-26 Pedro Alves <palves@redhat.com>
7989
7990 * linux-low.c (linux_wait_1): When incrementing the PC past a
7991 program breakpoint always use the_low_target.breakpoint_len as
7992 increment, rather than the maximum between that and
7993 the_low_target.decr_pc_after_break.
7994
7995 2015-02-23 Pedro Alves <palves@redhat.com>
7996
7997 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7998 thread was doing a step-over; always adjust the PC if
7999 we stepped over a permanent breakpoint.
8000 (linux_wait_1): If we stepped over breakpoint that was on top of a
8001 permanent breakpoint, manually advance the PC past it.
8002
8003 2015-02-23 Pedro Alves <palves@redhat.com>
8004
8005 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8006 modes.
8007 (x86_fill_gregset, x86_store_gregset): Use it when handling
8008 $orig_eax.
8009
8010 2015-02-20 Pedro Alves <palves@redhat.com>
8011
8012 * thread-db.c: Include "nat/linux-procfs.h".
8013 (thread_db_init): Skip listing new threads if the kernel supports
8014 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8015
8016 2015-02-20 Pedro Alves <palves@redhat.com>
8017
8018 * linux-low.c (status_pending_p_callback): Use ptid_match.
8019
8020 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8021
8022 PR breakpoints/16812
8023 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8024 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8025 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8026
8027 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8028
8029 PR breakpoints/15956
8030 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8031
8032 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8033
8034 * linux-low.c (linux_low_btrace_conf): Print size.
8035 * server.c (handle_btrace_conf_general_set): New.
8036 (hanle_general_set): Call handle_btrace_conf_general_set.
8037 (handle_query): Report Qbtrace-conf:bts:size as supported.
8038
8039 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8040
8041 * linux-low.c (linux_low_enable_btrace): Update parameters.
8042 (linux_low_btrace_conf): New.
8043 (linux_target_ops)<to_btrace_conf>: Initialize.
8044 * server.c (current_btrace_conf): New.
8045 (handle_btrace_enable): Rename to ...
8046 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8047 to target_enable_btrace. Update comment. Update users.
8048 (handle_qxfer_btrace_conf): New.
8049 (qxfer_packets): Add btrace-conf entry.
8050 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8051 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8052 (target_ops)<read_btrace_conf>: New.
8053 (target_enable_btrace): Update parameters.
8054 (target_read_btrace_conf): New.
8055
8056 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8057
8058 * server.c (handle_btrace_general_set): Remove call to
8059 target_supports_btrace.
8060 (supported_btrace_packets): New.
8061 (handle_query): Call supported_btrace_packets.
8062 * target.h: include btrace-common.h.
8063 (btrace_target_info): Removed.
8064 (supports_btrace, target_supports_btrace): Update parameters.
8065
8066 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8067
8068 * Makefile.in (SFILES): Add common/btrace-common.c.
8069 (OBS): Add common/btrace-common.o.
8070 (btrace-common.o): Add build rules.
8071 * linux-low: Include btrace-common.h.
8072 (linux_low_read_btrace): Use struct btrace_data. Call
8073 btrace_data_init and btrace_data_fini.
8074
8075 2015-02-06 Pedro Alves <palves@redhat.com>
8076
8077 * thread-db.c (find_new_threads_callback): Add debug output.
8078
8079 2015-02-04 Pedro Alves <palves@redhat.com>
8080
8081 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8082 (resume_stopped_resumed_lwps): New function.
8083 (linux_wait_for_event_filtered): Use it.
8084
8085 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8086
8087 * Makefile.in (SFILES): Add linux-personality.c.
8088 (linux-personality.o): New rule.
8089 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8090 list of objects to be built.
8091 * linux-low.c: Include nat/linux-personality.h.
8092 (linux_create_inferior): Remove code to disable address space
8093 randomization (moved to ../nat/linux-personality.c). Create
8094 cleanup to disable address space randomization.
8095
8096 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8097
8098 * Makefile.in (posix-strerror.o): New rule.
8099 (mingw-strerror.o): Likewise.
8100 * configure: Regenerated.
8101 * configure.ac: Source file ../common/common.host. Initialize new
8102 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8103
8104 2015-01-14 Yao Qi <yao@codesourcery.com>
8105
8106 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8107 (ppc-linux.o): New rule.
8108 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8109 * configure.ac: AC_CHECK_FUNCS(getauxval).
8110 * config.in: Re-generated.
8111 * configure: Re-generated.
8112 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8113 ppc64_64bit_inferior_p
8114
8115 2015-01-14 Yao Qi <yao@codesourcery.com>
8116
8117 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8118 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8119 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8120 (PT_ORIG_R3, PT_TRAP): Likewise.
8121 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8122 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8123 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8124
8125 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8126
8127 * i387-fp.c (i387_cache_to_xsave): In look over
8128 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8129 zmmh_low_space field by use of zmmh_high_space.
8130
8131 2015-01-09 Pedro Alves <palves@redhat.com>
8132
8133 * linux-low.c (step_over_bkpt): Move higher up in the file.
8134 (handle_extended_wait): Don't store the stop_pc here.
8135 (get_stop_pc): Adjust comments and rename to ...
8136 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8137 stopped for a software breakpoint or hardware breakpoint.
8138 (thread_still_has_status_pending_p): New function.
8139 (status_pending_p_callback): Use
8140 thread_still_has_status_pending_p. If the event is no longer
8141 interesting, resume the LWP.
8142 (handle_tracepoints): Add assert.
8143 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8144 (wstatus_maybe_breakpoint): New function.
8145 (cancel_breakpoint): Delete function.
8146 (check_stopped_by_watchpoint): New function, factored out from
8147 linux_low_filter_event.
8148 (lp_status_maybe_breakpoint): Delete function.
8149 (linux_low_filter_event): Remove filter_ptid argument.
8150 Leave thread group exits pending here. Store the LWP's stop PC.
8151 Always leave events pending.
8152 (linux_wait_for_event_filtered): Pull all events out of the
8153 kernel, and leave them all pending.
8154 (count_events_callback, select_event_lwp_callback): Consider all
8155 events.
8156 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8157 (select_event_lwp): Only give preference to the stepping LWP in
8158 all-stop mode. Adjust comments.
8159 (ignore_event): New function.
8160 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8161 references to cancel_breakpoints. Adjust to renames. Also give
8162 equal priority to all LWPs that have had events in non-stop mode.
8163 If reporting a software breakpoint event, unadjust the LWP's PC.
8164 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8165 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8166 Adjust.
8167 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8168 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8169 (linux_stopped_by_watchpoint): Adjust.
8170 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8171 * linux-low.h (enum lwp_stop_reason): New.
8172 (struct lwp_info) <stop_pc>: Adjust comment.
8173 <stopped_by_watchpoint>: Delete field.
8174 <stop_reason>: New field.
8175 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8176 * mem-break.c (software_breakpoint_inserted_here)
8177 (hardware_breakpoint_inserted_here): New function.
8178 * mem-break.h (software_breakpoint_inserted_here)
8179 (hardware_breakpoint_inserted_here): Declare.
8180 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8181 (cancel_breakpoints): Delete.
8182 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8183 (upload_fast_traceframes): Remove references to
8184 cancel_breakpoints.
8185
8186 2015-01-09 Pedro Alves <palves@redhat.com>
8187
8188 * thread-db.c (find_new_threads_callback): Ignore thread if the
8189 kernel thread ID is -1.
8190
8191 2015-01-09 Pedro Alves <palves@redhat.com>
8192
8193 * linux-low.c (linux_attach_fail_reason_string): Move to
8194 nat/linux-ptrace.c, and rename.
8195 (linux_attach_lwp): Update comment.
8196 (attach_proc_task_lwp_callback): New function.
8197 (linux_attach): Adjust to rename and use
8198 linux_proc_attach_tgid_threads.
8199 (linux_attach_fail_reason_string): Delete declaration.
8200
8201 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8202
8203 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8204 * server.c (gdbserver_version): Likewise.
8205
8206 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8207
8208 * remote-utils.c: Include ctype.h.
8209 (input_interrupt): Explicitly handle the case when the char
8210 received is the NUL byte. Improve the printing of non-ASCII
8211 characters.
8212
8213 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8214
8215 * linux-low.c (linux_low_filter_event): Update call to
8216 linux_enable_event_reporting following the addition of
8217 a new parameter to that function.
8218
8219 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8220
8221 PR server/17457
8222 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8223 (AARCH64_FPCR_REGNO): Likewise.
8224 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8225 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8226 (aarch64_store_fpregset): Likewise.
8227
8228 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8229
8230 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8231 Remove FIXME comment about assumption about N.
8232
8233 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8234
8235 * configure.ac: If large-file support is disabled in GDBserver,
8236 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8237 * configure: Regenerate.
8238
8239 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8240
8241 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8242 warning upon ENODATA from ptrace.
8243 * linux-s390-low.c (s390_store_tdb): New.
8244 (s390_regsets): Add regset for NT_S390_TDB.
8245
8246 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8247
8248 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8249 without a fill_function.
8250 * linux-s390-low.c (s390_fill_last_break): Remove.
8251 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8252 (s390_arch_setup): Use regset's size instead of fill_function for
8253 loop end condition.
8254
8255 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8256
8257 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8258 the regset's store function when ptrace returned an error.
8259 * regcache.c (get_thread_regcache): Invalidate register cache
8260 before fetching inferior's registers.
8261
8262 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8263
8264 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8265 while-loop as for-loop.
8266 (regsets_store_inferior_registers): Likewise.
8267
8268 2014-11-28 Yao Qi <yao@codesourcery.com>
8269
8270 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8271 * config.in, configure: Re-generate.
8272 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8273 is defined.
8274
8275 2014-11-21 Yao Qi <yao@codesourcery.com>
8276
8277 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8278 (AC_CHECK_HEADERS): Remove malloc.h.
8279 * configure: Re-generated.
8280 * config.in: Re-generated.
8281 * server.h: Don't include alloca.h and malloc.h.
8282 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8283 Don't include malloc.h.
8284
8285 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8286
8287 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8288 corresponding ERRNO check in same block.
8289
8290 2014-11-12 Pedro Alves <palves@redhat.com>
8291
8292 * server.c (cont_thread): Update comment.
8293 (start_inferior, attach_inferior): No longer clear cont_thread.
8294 (handle_v_cont): No longer set cont_thread.
8295 (captured_main): Clear cont_thread each time a GDB connects.
8296
8297 2014-11-12 Pedro Alves <palves@redhat.com>
8298
8299 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8300 thread, and don't resume all threads if the Hc thread has exited.
8301
8302 2014-11-12 Pedro Alves <palves@redhat.com>
8303
8304 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8305 the process group instead of to a specific LWP.
8306
8307 2014-10-15 Pedro Alves <palves@redhat.com>
8308
8309 PR server/17487
8310 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8311 parameter.
8312 (arm_set_thread_context): Delete.
8313 (the_low_target): Adjust.
8314 * win32-i386-low.c (debug_registers_changed)
8315 (debug_registers_used): Delete.
8316 (update_debug_registers_callback): New function.
8317 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8318 needing to update their debug registers.
8319 (win32_get_current_dr): New function.
8320 (x86_dr_low_get_addr, x86_dr_low_get_control)
8321 (x86_dr_low_get_status): Fetch the debug register from the thread
8322 record's context.
8323 (i386_initial_stuff): Adjust.
8324 (i386_get_thread_context): Remove current_event parameter. Don't
8325 clear debug_registers_changed nor copy DR values to
8326 debug_reg_state.
8327 (i386_set_thread_context): Delete.
8328 (i386_prepare_to_resume): New function.
8329 (i386_thread_added): Mark the thread as needing to update irs
8330 debug registers.
8331 (the_low_target): Remove i386_set_thread_context and install
8332 i386_prepare_to_resume.
8333 * win32-low.c (win32_get_thread_context): Adjust.
8334 (win32_set_thread_context): Use SetThreadContext
8335 directly.
8336 (win32_prepare_to_resume): New function.
8337 (win32_require_context): New function, factored out from ...
8338 (thread_rec): ... this.
8339 (continue_one_thread): Call win32_prepare_to_resume on each thread
8340 we're about to continue.
8341 (win32_resume): Call win32_prepare_to_resume on the event thread.
8342 * win32-low.h (struct win32_thread_info)
8343 <debug_registers_changed>: New field.
8344 (struct win32_target_ops): Change prototype of set_thread_context,
8345 delete set_thread_context and add prepare_to_resume.
8346 (win32_require_context): New declaration.
8347
8348 2014-10-08 Gary Benson <gbenson@redhat.com>
8349
8350 * server.h: Do not include common-exceptions.h.
8351
8352 2014-10-08 Gary Benson <gbenson@redhat.com>
8353
8354 * server.h: Do not include cleanups.h.
8355
8356 2014-09-30 James Hogan <james.hogan@imgtec.com>
8357
8358 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8359 mips64-dsp-linux.c.
8360
8361 2014-09-23 Yao Qi <yao@codesourcery.com>
8362
8363 * linux-low.c (lp_status_maybe_breakpoint): New function.
8364 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8365 (count_events_callback): Likewise.
8366 (select_event_lwp_callback): Likewise.
8367 (cancel_breakpoints_callback): Likewise.
8368
8369 2014-09-19 Don Breazeal <donb@codesourcery.com>
8370
8371 * linux-low.c (handle_extended_wait): Call
8372 linux_ptrace_get_extended_event.
8373 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8374 linux_is_extended_waitstatus.
8375
8376 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8377
8378 * Makefile.in (CPPFLAGS): Define.
8379 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8380 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8381
8382 2014-09-16 Gary Benson <gbenson@redhat.com>
8383
8384 * inferiors.h (current_inferior): Renamed as...
8385 (current_thread): New variable. All uses updated.
8386 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8387 (maybe_move_out_of_jump_pad): Likewise.
8388 (cancel_breakpoint): Likewise.
8389 (linux_low_filter_event): Likewise.
8390 (wait_for_sigstop): Likewise.
8391 (linux_resume_one_lwp): Likewise.
8392 (need_step_over_p): Likewise.
8393 (start_step_over): Likewise.
8394 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8395 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8396 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8397 and save_inferior as saved_thread.
8398 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8399 saved_thread.
8400 (regcache_invalidate_thread): Likewise.
8401 * remote-utils.c (prepare_resume_reply): Likewise.
8402 * thread-db.c (thread_db_get_tls_address): Likewise.
8403 (disable_thread_event_reporting): Likewise.
8404 (remove_thread_event_breakpoints): Likewise.
8405 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8406 as saved_thread.
8407 * target.h (set_desired_inferior): Renamed as...
8408 (set_desired_thread): New declaration. All uses updated.
8409 * server.c (myresume): Updated comment to reference thread instead
8410 of inferior.
8411 (handle_serial_event): Likewise.
8412 (handle_target_event): Likewise.
8413
8414 2014-09-12 Tom Tromey <tromey@redhat.com>
8415 Gary Benson <gbenson@redhat.com>
8416
8417 * regcache.h: Include common-regcache.h.
8418 (regcache_read_pc): Don't declare.
8419 * regcache.c (get_thread_regcache_for_ptid): New function.
8420
8421 2014-09-11 Tom Tromey <tromey@redhat.com>
8422 Gary Benson <gbenson@redhat.com>
8423
8424 * symbol.c: New file.
8425 * Makefile.in (SFILES): Add symbol.c.
8426 (OBS): Add symbol.o.
8427
8428 2014-09-11 Gary Benson <gbenson@redhat.com>
8429
8430 * target.c (target_stop_ptid, target_continue_ptid): New
8431 functions.
8432
8433 2014-09-11 Tom Tromey <tromey@redhat.com>
8434 Gary Benson <gbenson@redhat.com>
8435
8436 * target.h: Include target/target.h.
8437 * target.c (target_read_memory, target_read_uint32)
8438 (target_write_memory): New functions.
8439
8440 2014-09-11 Gary Benson <gbenson@redhat.com>
8441
8442 * server.h (debug_hw_points): Don't declare.
8443 * server.c (debug_hw_points): Don't define. Replace all uses
8444 with show_debug_regs.
8445 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8446 all uses with show_debug_regs.
8447
8448 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8449
8450 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8451 endianness into account.
8452 (ppc_supply_ptrace_register): Likewise.
8453
8454 2014-09-03 James Hogan <james.hogan@imgtec.com>
8455
8456 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8457 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8458
8459 2014-09-03 Gary Benson <gbenson@redhat.com>
8460
8461 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8462 ALL_DEBUG_ADDRESS_REGISTERS.
8463
8464 2014-09-02 Gary Benson <gbenson@redhat.com>
8465
8466 * i386-low.h: Renamed as...
8467 * x86-low.h: New file. All type, function and variable name
8468 prefixes changed from "i386_" to "x86_". All references updated.
8469 * i386-low.c: Renamed as...
8470 * x86-low.c: New file. All type, function and variable name
8471 prefixes changed from "i386_" to "x86_". All references updated.
8472
8473 2014-09-02 Gary Benson <gbenson@redhat.com>
8474
8475 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8476 (x86_linux_new_thread): Likewise.
8477
8478 2014-08-29 Gary Benson <gbenson@redhat.com>
8479
8480 * server.h (setjmp.h): Do not include.
8481 (toplevel): Do not declare.
8482 (common-exceptions.h): Include.
8483 (cleanups.h): Likewise.
8484 * server.c (toplevel): Do not define.
8485 (exit_code): New static global.
8486 (detach_or_kill_for_exit_cleanup): New function.
8487 (main): New function. Original main renamed to...
8488 (captured_main): New function.
8489 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8490
8491 2014-08-29 Gary Benson <gbenson@redhat.com>
8492
8493 * Makefile.in (SFILES): Add common/common-exceptions.c.
8494 (OBS): Add common-exceptions.o.
8495 (common-exceptions.o): New rule.
8496 * utils.c (prepare_to_throw_exception): New function.
8497
8498 2014-08-29 Gary Benson <gbenson@redhat.com>
8499
8500 * config.in: Regenerate.
8501 * configure: Likewise.
8502
8503 2014-08-29 Gary Benson <gbenson@redhat.com>
8504
8505 * Makefile.in (SFILES): Add common/cleanups.c.
8506 (OBS): cleanups.o.
8507 (cleanups.o): New rule.
8508
8509 2014-08-29 Gary Benson <gbenson@redhat.com>
8510
8511 * utils.c (internal_vwarning): New function.
8512
8513 2014-08-28 Gary Benson <gbenson@redhat.com>
8514
8515 * utils.h (fatal): Remove declaration.
8516 * utils.c (fatal): Remove function.
8517
8518 2014-08-28 Gary Benson <gbenson@redhat.com>
8519
8520 * tracepoint.c (gdb_agent_init): Replace fatal with
8521 perror_with_name.
8522 (initialize_tracepoint): Likewise.
8523
8524 2014-08-28 Gary Benson <gbenson@redhat.com>
8525
8526 * remote-utils.c (remote_prepare): Replace fatal with error.
8527
8528 2014-08-28 Gary Benson <gbenson@redhat.com>
8529
8530 * linux-low.c (linux_async): Replace fatal with warning.
8531 Tidy up and return.
8532 (linux_start_non_stop): Return -1 if linux_async failed.
8533
8534 2014-08-28 Gary Benson <gbenson@redhat.com>
8535
8536 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8537 gdb_assert.
8538 (i386_dr_low_get_addr): Remove vague comment.
8539 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8540 gdb_assert.
8541
8542 2014-08-28 Gary Benson <gbenson@redhat.com>
8543
8544 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8545 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8546 internal_error.
8547 (linux_resume_one_lwp): Likewise.
8548 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8549 gdb_assert.
8550 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8551 with internal_error.
8552 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8553 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8554 (find_register_by_name): Replace fatal with internal_error.
8555 (find_regno): Likewise.
8556 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8557 * thread-db.c (thread_db_create_event): Likewise.
8558 (thread_db_load_search): Likewise.
8559 (try_thread_db_load_1): Likewise.
8560 * tracepoint.c (get_jump_space_head): Replace fatal with
8561 internal_error.
8562 (claim_trampoline_space): Likewise.
8563 (have_fast_tracepoint_trampoline_buffer): Likewise.
8564 (cmd_qtstart): Likewise.
8565 (stop_tracing): Likewise.
8566 (fast_tracepoint_collecting): Likewise.
8567 (target_malloc): Likewise.
8568 (download_tracepoint): Likewise.
8569 (download_trace_state_variables): Replace check with gdb_assert.
8570 (upload_fast_traceframes): Replace fatal with internal_error.
8571
8572 2014-08-19 Tom Tromey <tromey@redhat.com>
8573 Gary Benson <gbenson@redhat.com>
8574
8575 * Makefile.in (SFILES): Add common/common-debug.c.
8576 (OBS): Add common-debug.o.
8577 (common-debug.o): New rule.
8578 * debug.h (debug_printf): Don't declare.
8579 * debug.c (debug_printf): Renamed and rewritten as...
8580 (debug_vprintf): New function.
8581
8582 2014-08-19 Gary Benson <gbenson@redhat.com>
8583
8584 * utils.h: Do not include print-utils.h.
8585
8586 2014-08-19 Tom Tromey <tromey@redhat.com>
8587 Gary Benson <gbenson@redhat.com>
8588
8589 * server.h: Add static assertion.
8590 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8591
8592 2014-08-19 Tom Tromey <tromey@redhat.com>
8593 Gary Benson <gbenson@redhat.com>
8594
8595 * Makefile.in (SFILES): Add common/errors.c.
8596 (OBS): Add errors.o.
8597 (IPA_OBS): Add errors-ipa.o.
8598 (errors.o): New rule.
8599 (errors-ipa.o): Likewise.
8600 * utils.h (perror_with_name, error, warning): Don't declare.
8601 * utils.c (warning): Renamed and rewritten as...
8602 (vwarning): New function.
8603 (error): Renamed and rewritten as...
8604 (verror): New function.
8605 (internal_error): Renamed and rewritten as...
8606 (internal_verror): New function.
8607
8608 2014-08-07 Gary Benson <gbenson@redhat.com>
8609
8610 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8611 * configure: Regenerate.
8612 * config.in: Likewise.
8613 * server.h: Do not include errno.h.
8614 * event-loop.c: Likewise.
8615 * hostio-errno.c: Likewise.
8616 * linux-low.c: Likewise.
8617 * remote-utils.c: Likewise.
8618 * spu-low.c: Likewise.
8619 * utils.c: Likewise.
8620 * gdbreplay.c: Unconditionally include errno.h.
8621
8622 2014-08-07 Gary Benson <gbenson@redhat.com>
8623
8624 * server.h: Do not include string.h.
8625 * event-loop.c: Likewise.
8626 * linux-low.c: Likewise.
8627 * regcache.c: Likewise.
8628 * remote-utils.c: Likewise.
8629 * spu-low.c: Likewise.
8630 * utils.c: Likewise.
8631
8632 2014-08-07 Gary Benson <gbenson@redhat.com>
8633
8634 * server.h: Do not include gdb_assert.h.
8635
8636 2014-08-07 Gary Benson <gbenson@redhat.com>
8637
8638 * server.h: Do not include common-utils.h.
8639
8640 2014-08-07 Gary Benson <gbenson@redhat.com>
8641
8642 * server.h: Do not include ptid.h.
8643 * notif.h: Likewise.
8644
8645 2014-08-07 Gary Benson <gbenson@redhat.com>
8646
8647 * server.h: Do not include gdb_locale.h.
8648
8649 2014-08-07 Gary Benson <gbenson@redhat.com>
8650
8651 * server.h: Do not include gdb/signals.h.
8652 * win32-low.c: Likewise.
8653
8654 2014-08-07 Gary Benson <gbenson@redhat.com>
8655
8656 * server.h: Do not include pathmax.h.
8657
8658 2014-08-07 Gary Benson <gbenson@redhat.com>
8659
8660 * server.h: Do not include libiberty.h.
8661 * linux-bfin-low.c: Likewise.
8662
8663 2014-08-07 Gary Benson <gbenson@redhat.com>
8664
8665 * server.h: Do not include ansidecl.h.
8666
8667 2014-08-07 Gary Benson <gbenson@redhat.com>
8668
8669 * linux-x86-low.c: Do not include stddef.h.
8670 * lynx-ppc-low.c: Likewise.
8671 * tracepoint.c: Likewise.
8672
8673 2014-08-07 Gary Benson <gbenson@redhat.com>
8674
8675 * server.h: Do not include stdarg.h.
8676 * nto-low.c: Likewise.
8677
8678 2014-08-07 Gary Benson <gbenson@redhat.com>
8679
8680 * server.h: Do not include stdlib.h.
8681 * inferiors.c: Likewise.
8682 * linux-low.c: Likewise.
8683 * regcache.c: Likewise.
8684 * spu-low.c: Likewise.
8685 * tracepoint.c: Likewise.
8686 * utils.c: Likewise.
8687
8688 2014-08-07 Gary Benson <gbenson@redhat.com>
8689
8690 * server.h: Do not include stdio.h.
8691 * linux-low.c: Likewise.
8692 * remote-utils.c: Likewise.
8693 * spu-low.c: Likewise.
8694 * utils.c: Likewise.
8695 * wincecompat.c: Likewise.
8696
8697 2014-08-06 Gary Benson <gbenson@redhat.com>
8698
8699 * regcache.c (init_register_cache): Move conditionals inside if.
8700
8701 2014-08-06 Gary Benson <gbenson@redhat.com>
8702
8703 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8704
8705 2014-07-31 Gary Benson <gbenson@redhat.com>
8706
8707 * ax.h: Do not include server.h.
8708 * gdbthread.h: Likewise.
8709 * lynx-low.h: Likewise.
8710 * notif.h: Likewise.
8711
8712 2014-07-30 Gary Benson <gbenson@redhat.com>
8713
8714 * server.h: Include common-defs.h.
8715 Do not include config.h or build-gnulib-gdbserver/config.h.
8716
8717 2014-07-30 Gary Benson <gbenson@redhat.com>
8718
8719 * hostio-errno.c: Move server.h to top of includes list.
8720 * inferiors.c: Likewise.
8721 * linux-x86-low.c: Likewise.
8722 * notif.c: Include server.h.
8723
8724 2014-07-24 Tom Tromey <tromey@redhat.com>
8725 Gary Benson <gbenson@redhat.com>
8726
8727 * server.h (CORE_ADDR): Now unsigned.
8728
8729 2014-07-16 Pedro Alves <palves@redhat.com>
8730
8731 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8732
8733 2014-07-15 Pedro Alves <palves@redhat.com>
8734
8735 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8736 copy.
8737
8738 2014-07-11 Pedro Alves <palves@redhat.com>
8739
8740 * linux-low.c (kill_wait_lwp): New function, based on
8741 kill_one_lwp_callback, but use my_waitpid directly.
8742 (kill_one_lwp_callback, linux_kill): Use it.
8743
8744 2014-06-23 Pedro Alves <palves@redhat.com>
8745
8746 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8747 before setting DR0..DR3.
8748
8749 2014-06-20 Gary Benson <gbenson@redhat.com>
8750
8751 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8752 * configure: Regenerated.
8753 * config.in: Likewise.
8754
8755 2014-06-20 Gary Benson <gbenson@redhat.com>
8756
8757 * Makefile.in (SFILES): Update locations for files moved
8758 from common to nat.
8759 (object file files): Reordered.
8760
8761 2014-06-20 Gary Benson <gbenson@redhat.com>
8762
8763 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8764 (i386_dr_low_set_addr): Likewise.
8765 (i386_dr_low_get_addr): Likewise.
8766 (i386_dr_low_can_set_control): Likewise.
8767 (i386_dr_low_set_control): Likewise.
8768 (i386_dr_low_get_control): Likewise.
8769 (i386_dr_low_get_status): Likewise.
8770 (i386_get_debug_register_length): Likewise.
8771 * linux-x86-low.c (i386_dr_low_set_addr):
8772 Changed signature. Made static.
8773 (i386_dr_low_get_addr): Likewise.
8774 (i386_dr_low_set_control): Likewise.
8775 (i386_dr_low_get_control): Likewise.
8776 (i386_dr_low_get_status): Likewise.
8777 (i386_dr_low): New global variable.
8778 * win32-i386-low.c (i386_dr_low_set_addr):
8779 Changed signature. Made static.
8780 (i386_dr_low_get_addr): Likewise.
8781 (i386_dr_low_set_control): Likewise.
8782 (i386_dr_low_get_control): Likewise.
8783 (i386_dr_low_get_status): Likewise.
8784 (i386_dr_low): New global variable.
8785
8786 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8787
8788 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8789 * Makefile.in (AR, AR_FLAGS): Define.
8790 * configure: Regenerate.
8791
8792 2014-06-19 Gary Benson <gbenson@redhat.com>
8793
8794 * Makefile.in (i386-dregs.o): New rule.
8795 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8796 * i386-low.c (target.h): Remove include.
8797 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8798 (DR_CONTROL_SHIFT): Likewise.
8799 (DR_CONTROL_SIZE): Likewise.
8800 (DR_RW_EXECUTE): Likewise.
8801 (DR_RW_WRITE): Likewise.
8802 (DR_RW_READ): Likewise.
8803 (DR_RW_IORW): Likewise.
8804 (DR_LEN_1): Likewise.
8805 (DR_LEN_2): Likewise.
8806 (DR_LEN_4): Likewise.
8807 (DR_LEN_8): Likewise.
8808 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8809 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8810 (DR_ENABLE_SIZE): Likewise.
8811 (DR_LOCAL_SLOWDOWN): Likewise.
8812 (DR_GLOBAL_SLOWDOWN): Likewise.
8813 (DR_CONTROL_RESERVED): Likewise.
8814 (I386_DR_CONTROL_MASK): Likewise.
8815 (I386_DR_VACANT): Likewise.
8816 (I386_DR_LOCAL_ENABLE): Likewise.
8817 (I386_DR_GLOBAL_ENABLE): Likewise.
8818 (I386_DR_DISABLE): Likewise.
8819 (I386_DR_SET_RW_LEN): Likewise.
8820 (I386_DR_GET_RW_LEN): Likewise.
8821 (I386_DR_WATCH_HIT): Likewise.
8822 (i386_wp_op_t): Likewise.
8823 (i386_show_dr): Likewise.
8824 (i386_length_and_rw_bits): Likewise.
8825 (i386_insert_aligned_watchpoint): Likewise.
8826 (i386_remove_aligned_watchpoint): Likewise.
8827 (i386_handle_nonaligned_watchpoint): Likewise.
8828 i386_update_inferior_debug_regs(): Likewise.
8829 (i386_dr_insert_watchpoint): Likewise.
8830 (i386_dr_remove_watchpoint): Likewise.
8831 (i386_dr_region_ok_for_watchpoint): Likewise.
8832 (i386_dr_stopped_data_address): Likewise.
8833 (i386_dr_stopped_by_watchpoint): Likewise.
8834
8835 2014-06-19 Gary Benson <gbenson@redhat.com>
8836
8837 * i386-low.c (i386_dr_show): Renamed to
8838 i386_show_dr and made static. All uses updated.
8839 (i386_dr_length_and_rw_bits): Renamed to
8840 i386_length_and_rw_bits and made static.
8841 All uses updated.
8842 (i386_dr_insert_aligned_watchpoint): Renamed to
8843 i386_insert_aligned_watchpoint and made static.
8844 All uses updated.
8845 (i386_dr_remove_aligned_watchpoint): Renamed to
8846 i386_remove_aligned_watchpoint and made static.
8847 All uses updated.
8848 (i386_dr_update_inferior_debug_regs): Renamed to
8849 i386_update_inferior_debug_regs and made static.
8850 All uses updated.
8851
8852 2014-06-18 Gary Benson <gbenson@redhat.com>
8853
8854 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8855 (i386_dr_low_can_set_control): Likewise.
8856 (i386_get_debug_register_length): Likewise.
8857 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8858 (i386_dr_low_can_set_control): Likewise.
8859 (i386_get_debug_register_length): Likewise.
8860
8861 2014-06-17 Gary Benson <gbenson@redhat.com>
8862
8863 * i386-low.h (i386-dregs.h): New include.
8864 (DR_FIRSTADDR): Now in i386-dregs.h.
8865 (DR_LASTADDR): Likewise.
8866 (DR_NADDR): Likewise.
8867 (DR_STATUS): Likewise.
8868 (DR_CONTROL): Likewise.
8869 (i386_debug_reg_state): Likewise.
8870 (i386_dr_insert_watchpoint): Likewise.
8871 (i386_dr_remove_watchpoint): Likewise.
8872 (i386_dr_region_ok_for_watchpoint): Likewise.
8873 (i386_dr_stopped_data_address): Likewise.
8874 (i386_dr_stopped_by_watchpoint): Likewise.
8875 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8876
8877 2014-06-18 Gary Benson <gbenson@redhat.com>
8878
8879 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8880 i386_dr_insert_watchpoint.
8881 (i386_low_remove_watchpoint): Renamed to
8882 i386_dr_remove_watchpoint.
8883 (i386_low_region_ok_for_watchpoint): Renamed to
8884 i386_dr_region_ok_for_watchpoint.
8885 (i386_low_stopped_data_address): Renamed to
8886 i386_dr_stopped_data_address.
8887 (i386_low_stopped_by_watchpoint): Renamed to
8888 i386_dr_stopped_by_watchpoint.
8889 * i386-low.c (i386_show_dr): Renamed to
8890 i386_dr_show and made nonstatic. All uses updated.
8891 (i386_length_and_rw_bits): Renamed to
8892 i386_dr_length_and_rw_bits and made nonstatic.
8893 All uses updated.
8894 (i386_insert_aligned_watchpoint): Renamed to
8895 i386_dr_insert_aligned_watchpoint and made nonstatic.
8896 All uses updated.
8897 (i386_remove_aligned_watchpoint): Renamed to
8898 i386_dr_remove_aligned_watchpoint and made nonstatic.
8899 All uses updated.
8900 (i386_update_inferior_debug_regs): Renamed to
8901 i386_dr_update_inferior_debug_regs and made nonstatic.
8902 All uses updated.
8903 (i386_low_insert_watchpoint): Renamed to
8904 i386_dr_insert_watchpoint. All uses updated.
8905 (i386_low_remove_watchpoint): Renamed to
8906 i386_dr_remove_watchpoint. All uses updated.
8907 (i386_low_region_ok_for_watchpoint): Renamed to
8908 i386_dr_region_ok_for_watchpoint. All uses updated.
8909 (i386_low_stopped_data_address): Renamed to
8910 i386_dr_stopped_data_address. All uses updated.
8911 (i386_low_stopped_by_watchpoint): Renamed to
8912 i386_dr_stopped_by_watchpoint. All uses updated.
8913
8914 2014-06-18 Gary Benson <gbenson@redhat.com>
8915
8916 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8917 (i386_dr_low_can_set_control): Likewise.
8918 (i386_insert_aligned_watchpoint): New check.
8919
8920 2014-06-18 Gary Benson <gbenson@redhat.com>
8921
8922 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8923 Renamed to state.
8924
8925 2014-06-18 Gary Benson <gbenson@redhat.com>
8926
8927 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8928 instead of fatal and error.
8929 (i386_handle_nonaligned_watchpoint): Likewise.
8930
8931 2014-06-18 Gary Benson <gbenson@redhat.com>
8932
8933 * i386-low.c (i386_get_debug_register_length): New macro.
8934 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8935 (i386_show_dr): Use debug_printf instead of fprintf. Use
8936 phex to format values.
8937
8938 2014-06-18 Gary Benson <gbenson@redhat.com>
8939
8940 * i386-low.h: Comment changes.
8941 * i386-low.c: Likewise.
8942
8943 2014-06-18 Gary Benson <gbenson@redhat.com>
8944
8945 * i386-low.c: Whitespace changes.
8946
8947 2014-06-12 Tom Tromey <tromey@redhat.com>
8948
8949 * utils.c (freeargv): Remove.
8950
8951 2014-06-12 Tom Tromey <tromey@redhat.com>
8952
8953 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8954 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8955 (parse_debug_format_options): Likewise.
8956 (gdbserver_usage): Likewise.
8957 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8958 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8959 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8960 against libiberty.
8961 ($(LIBGNU)): Depend on libiberty.
8962 (all-lib): Recurse into all subdirs.
8963 (install-only): Invoke "install" target in subdirs.
8964 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8965 targets.
8966 * configure: Rebuild.
8967 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8968 for vasprintf, vsnprintf, or gettimeofday.
8969 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8970 srv_tgtobj.
8971
8972 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8973
8974 * development.sh: Delete.
8975 * Makefile.in (config.status): Adjust dependency on development.sh.
8976 * configure.ac: Adjust development.sh source call.
8977 * configure: Regenerate.
8978
8979 2014-06-02 Pedro Alves <palves@redhat.com>
8980
8981 * ax.c (gdb_free_agent_expr): New function.
8982 * ax.h (gdb_free_agent_expr): New declaration.
8983 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8984 list.
8985 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8986 static.
8987 (clear_breakpoint_conditions_and_commands): New function.
8988 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8989 (clear_breakpoint_conditions_and_commands): New declaration.
8990
8991 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8992
8993 * linux-aarch64-low.c (asm/ptrace.h): Include.
8994
8995 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8996
8997 Fix TLS access for -static -pthread.
8998 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8999 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9000 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9001
9002 2014-05-20 Pedro Alves <palves@redhat.com>
9003
9004 * linux-aarch64-low.c (aarch64_insert_point)
9005 (aarch64_remove_point): No longer check whether the type is
9006 supported here. Adjust to new interface.
9007 (the_low_target): Install aarch64_supports_z_point_type as
9008 supports_z_point_type method.
9009 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9010 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9011 instead of a Z packet char. Adjust.
9012 (arm_supports_z_point_type): New function.
9013 (arm_insert_point, arm_remove_point): Adjust to new interface.
9014 (the_low_target): Install arm_supports_z_point_type.
9015 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9016 (cris_insert_point, cris_remove_point): Adjust to new interface.
9017 Don't check whether the type is supported here.
9018 (the_low_target): Install cris_supports_z_point_type.
9019 * linux-low.c (linux_supports_z_point_type): New function.
9020 (linux_insert_point, linux_remove_point): Adjust to new interface.
9021 * linux-low.h (struct linux_target_ops) <insert_point,
9022 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9023 raw_breakpoint pointer parameter.
9024 <supports_z_point_type>: New method.
9025 * linux-mips-low.c (mips_supports_z_point_type): New function.
9026 (mips_insert_point, mips_remove_point): Adjust to new interface.
9027 Use mips_supports_z_point_type.
9028 (the_low_target): Install mips_supports_z_point_type.
9029 * linux-ppc-low.c (the_low_target): Install NULL as
9030 supports_z_point_type method.
9031 * linux-s390-low.c (the_low_target): Install NULL as
9032 supports_z_point_type method.
9033 * linux-sparc-low.c (the_low_target): Install NULL as
9034 supports_z_point_type method.
9035 * linux-x86-low.c (x86_supports_z_point_type): New function.
9036 (x86_insert_point): Adjust to new insert_point interface. Use
9037 insert_memory_breakpoint. Adjust to new
9038 i386_low_insert_watchpoint interface.
9039 (x86_remove_point): Adjust to remove_point interface. Use
9040 remove_memory_breakpoint. Adjust to new
9041 i386_low_remove_watchpoint interface.
9042 (the_low_target): Install x86_supports_z_point_type.
9043 * lynx-low.c (lynx_target_ops): Install NULL as
9044 supports_z_point_type callback.
9045 * nto-low.c (nto_supports_z_point_type): New.
9046 (nto_insert_point, nto_remove_point): Adjust to new interface.
9047 (nto_target_ops): Install nto_supports_z_point_type.
9048 * mem-break.c: Adjust intro comment.
9049 (struct raw_breakpoint) <raw_type, size>: New fields.
9050 <inserted>: Update comment.
9051 <shlib_disabled>: Delete field.
9052 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9053 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9054 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9055 (raw_bkpt_type_to_target_hw_bp_type): New function.
9056 (find_enabled_raw_code_breakpoint_at): New function.
9057 (find_raw_breakpoint_at): New type and size parameters. Use them.
9058 (insert_memory_breakpoint): New function, based off
9059 set_raw_breakpoint_at.
9060 (remove_memory_breakpoint): New function.
9061 (set_raw_breakpoint_at): Reimplement.
9062 (set_breakpoint): New, based on set_breakpoint_at.
9063 (set_breakpoint_at): Reimplement.
9064 (delete_raw_breakpoint): Go through the_target->remove_point
9065 instead of assuming memory breakpoints.
9066 (find_gdb_breakpoint_at): Delete.
9067 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9068 (find_gdb_breakpoint): New function.
9069 (set_gdb_breakpoint_at): Delete.
9070 (z_type_supported): New function.
9071 (set_gdb_breakpoint_1): New function, loosely based off
9072 set_gdb_breakpoint_at.
9073 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9074 (delete_gdb_breakpoint_at): Delete.
9075 (delete_gdb_breakpoint_1): New function, loosely based off
9076 delete_gdb_breakpoint_at.
9077 (delete_gdb_breakpoint): New function.
9078 (clear_gdb_breakpoint_conditions): Rename to ...
9079 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9080 breakpoint.
9081 (add_condition_to_breakpoint): Make static.
9082 (add_breakpoint_condition): Take a struct breakpoint pointer
9083 instead of an address. Adjust.
9084 (gdb_condition_true_at_breakpoint): Rename to ...
9085 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9086 z_type parameter.
9087 (gdb_condition_true_at_breakpoint): Reimplement.
9088 (add_breakpoint_commands): Take a struct breakpoint pointer
9089 instead of an address. Adjust.
9090 (gdb_no_commands_at_breakpoint): Rename to ...
9091 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9092 parameter. Return true if no breakpoint was found. Change debug
9093 output.
9094 (gdb_no_commands_at_breakpoint): Reimplement.
9095 (run_breakpoint_commands): Rename to ...
9096 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9097 and change return type to boolean.
9098 (run_breakpoint_commands): New function.
9099 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9100 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9101 breakpoint. Go through the_target->remove_point instead of
9102 assuming memory breakpoint.
9103 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9104 software and hardware breakpoints.
9105 (reinsert_raw_breakpoint): Go through the_target->insert_point
9106 instead of assuming memory breakpoint.
9107 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9108 software and hardware breakpoints.
9109 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9110 Check both software and hardware breakpoints.
9111 (validate_inserted_breakpoint): Assert the breakpoint is a
9112 software breakpoint. Set the inserted flag to -1 instead of
9113 setting shlib_disabled.
9114 (delete_disabled_breakpoints): Adjust.
9115 (validate_breakpoints): Only validate software breakpoints.
9116 Adjust to inserted flag change.
9117 (check_mem_read, check_mem_write): Skip breakpoint types other
9118 than software breakpoints. Adjust to inserted flag change.
9119 * mem-break.h (enum raw_bkpt_type): New enum.
9120 (raw_breakpoint, struct process_info): Forward declare.
9121 (Z_packet_to_target_hw_bp_type): Delete declaration.
9122 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9123 (set_gdb_breakpoint, delete_gdb_breakpoint)
9124 (clear_breakpoint_conditions): New declarations.
9125 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9126 (breakpoint_inserted_here): Update comment.
9127 (add_breakpoint_condition, add_breakpoint_commands): Replace
9128 address parameter with a breakpoint pointer parameter.
9129 (gdb_breakpoint_here): Update comment.
9130 (delete_gdb_breakpoint_at): Delete.
9131 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9132 * server.c (process_point_options): Take a struct breakpoint
9133 pointer instead of an address. Adjust.
9134 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9135 delete_gdb_breakpoint.
9136 * spu-low.c (spu_target_ops): Install NULL as
9137 supports_z_point_type method.
9138 * target.h: Include mem-break.h.
9139 (struct target_ops) <prepare_to_access_memory>: Update comment.
9140 <supports_z_point_type>: New field.
9141 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9142 instead of a char. Also take a raw breakpoint pointer.
9143 * win32-arm-low.c (the_low_target): Install NULL as
9144 supports_z_point_type.
9145 * win32-i386-low.c (i386_supports_z_point_type): New function.
9146 (i386_insert_point, i386_remove_point): Adjust to new interface.
9147 (the_low_target): Install i386_supports_z_point_type.
9148 * win32-low.c (win32_supports_z_point_type): New function.
9149 (win32_insert_point, win32_remove_point): Adjust to new interface.
9150 (win32_target_ops): Install win32_supports_z_point_type.
9151 * win32-low.h (struct win32_target_ops):
9152 <supports_z_point_type>: New method.
9153 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9154 instead of a char. Also take a raw breakpoint pointer.
9155
9156 2014-05-20 Pedro Alves <palves@redhat.com>
9157
9158 * mem-break.h: Include break-common.h.
9159 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9160 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9161 (Z_packet_to_target_hw_bp_type): New declaration.
9162 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9163 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9164 (Z_PACKET_ACCESS_WP): Delete macros.
9165 (Z_packet_to_hw_type): Delete function.
9166 * i386-low.h: Don't include break-common.h here.
9167 (Z_packet_to_hw_type): Delete declaration.
9168 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9169 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9170 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9171 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9172 * linux-aarch64-low.c: Don't include break-common.h here.
9173 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9174 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9175 (Z_packet_to_target_hw_bp_type): Delete function.
9176 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9177 function.
9178 (mips_insert_point, mips_remove_point): Use
9179 Z_packet_to_target_hw_bp_type.
9180
9181 2014-05-20 Pedro Alves <palves@redhat.com>
9182
9183 * linux-aarch64-low.c: Include break-common.h.
9184 (enum target_point_type): Delete.
9185 (Z_packet_to_point_type): Rename to ...
9186 (Z_packet_to_target_hw_bp_type): ... this, and return a
9187 target_hw_bp_type instead.
9188 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9189 instead of an enum target_point_type.
9190 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9191 breakpoint type.
9192 (aarch64_dr_state_insert_one_point)
9193 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9194 (aarch64_handle_aligned_watchpoint)
9195 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9196 Take an enum target_hw_bp_type instead of an enum
9197 target_point_type.
9198 (aarch64_supports_z_point_type): New function.
9199 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9200 use Z_packet_to_target_hw_bp_type.
9201
9202 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9203
9204 * configure.ac: Only use -Werror by default when DEVELOPMENT
9205 is true.
9206 * configure: Regenerate.
9207
9208 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9209
9210 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9211 * linux-x86-low.c (X86_64_USER_REGS): New.
9212 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9213
9214 2014-04-28 Yao Qi <yao@codesourcery.com>
9215
9216 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9217 name.
9218
9219 2014-04-25 Pedro Alves <palves@redhat.com>
9220
9221 PR server/16255
9222 * linux-low.c (linux_attach_fail_reason_string): New function.
9223 (linux_attach_lwp): Delete.
9224 (linux_attach_lwp_1): Rename to ...
9225 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9226 argument. Remove "initial" parameter. Return int instead of
9227 void. Don't error or warn here.
9228 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9229 failure to attach to the tgid. Call warning when failing to
9230 attach to an lwp.
9231 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9232 argument. Remove "initial" parameter. Return int instead of
9233 void. Don't error or warn here.
9234 (linux_attach_fail_reason_string): New declaration.
9235 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9236 interface change. Use linux_attach_fail_reason_string.
9237
9238 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9239 Walfred Tedeschi <walfred.tedeschi@intel.com>
9240
9241 * Makefile.in: Added rules to handle new files
9242 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9243 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9244 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9245 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9246 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9247 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9248 x32-avx512-linux.o.
9249 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9250 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9251 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9252 i386/x32-avx512.xml.
9253 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9254 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9255 i386/x32-avx512-linux.xml.
9256 * i387-fp.c (num_avx512_k_registers): New constant for number
9257 of K registers.
9258 (num_avx512_zmmh_low_registers): New constant for number of
9259 lower ZMM registers (0-15).
9260 (num_avx512_zmmh_high_registers): New constant for number of
9261 higher ZMM registers (16-31).
9262 (num_avx512_ymmh_registers): New contant for number of higher
9263 YMM registers (ymm16-31 added by avx521 on x86_64).
9264 (num_avx512_xmm_registers): New constant for number of higher
9265 XMM registers (xmm16-31 added by AVX512 on x86_64).
9266 (struct i387_xsave): Add space for AVX512 registers.
9267 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9268 Add code to handle AVX512 registers.
9269 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9270 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9271 prototypei from generated file.
9272 (tdesc_amd64_avx512_linux): Likewise.
9273 (init_registers_x32_avx512_linux): Likewise.
9274 (tdesc_x32_avx512_linux): Likewise.
9275 (init_registers_i386_avx512_linux): Likewise.
9276 (tdesc_i386_avx512_linux): Likewise.
9277 (x86_64_regmap): Add AVX512 registers.
9278 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9279 mask.
9280 (initialize_low_arch): Add code to initialize AVX512 registers.
9281
9282 2014-04-23 Pedro Alves <palves@redhat.com>
9283
9284 * mem-break.c (find_gdb_breakpoint_at): Make static.
9285 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9286
9287 2014-04-23 Pedro Alves <palves@redhat.com>
9288
9289 * i386-low.c: Don't include break-common.h here.
9290 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9291 prototype to take target_hw_bp_type as argument instead of a Z
9292 packet char.
9293 * i386-low.h: Include break-common.h here.
9294 (Z_packet_to_hw_type): Declare.
9295 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9296 prototypes.
9297 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9298 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9299 (x86_remove_point): Convert the packet number to a
9300 target_hw_bp_type before calling i386_low_remove_watchpoint.
9301 * win32-i386-low.c (i386_insert_point): Convert the packet number
9302 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9303 (i386_remove_point): Convert the packet number to a
9304 target_hw_bp_type before calling i386_low_remove_watchpoint.
9305
9306 2014-04-23 Pedro Alves <palves@redhat.com>
9307
9308 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9309
9310 2014-04-10 Pedro Alves <palves@redhat.com>
9311
9312 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9313 Check if the condition or command is NULL before checking if the
9314 breakpoint is known. On success, return true.
9315 * mem-break.h (add_breakpoint_condition): Document return.
9316 (add_breakpoint_commands): Add describing comment.
9317 * server.c (skip_to_semicolon): New function.
9318 (process_point_options): Use it.
9319
9320 2014-04-09 Pedro Alves <palves@redhat.com>
9321
9322 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9323 to lwpid_of.
9324
9325 2014-02-27 Pedro Alves <palves@redhat.com>
9326
9327 PR 12702
9328 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9329 macros.
9330 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9331 output.
9332 (last_thread_of_process_p): Take a PID argument instead of a
9333 thread pointer.
9334 (linux_wait_for_lwp): Delete.
9335 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9336 functions.
9337 (linux_low_filter_event): New function, party factored out from
9338 linux_wait_for_event.
9339 (linux_wait_for_event): Rename to ...
9340 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9341 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9342 sigsuspend. Check for zombie leaders.
9343 (linux_wait_for_event): Reimplement as wrapper around
9344 linux_wait_for_event_filtered.
9345 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9346 a normal or signal exit is seen, it's the whole process exiting.
9347 (wait_for_sigstop): No longer a for_each_inferior callback.
9348 Rewrite on top of linux_wait_for_event_filtered.
9349 (stop_all_lwps): Call wait_for_sigstop directly.
9350 * server.c (resume, handle_target_event): Handle
9351 TARGET_WAITKIND_NO_RESUMED.
9352
9353 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9354
9355 * win32-low.c (psapi_get_dll_name,
9356 * win32_CreateToolhelp32Snapshot): Delete.
9357 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9358 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9359 Delete.
9360 (handle_load_dll): Add function description.
9361 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9362
9363 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9364
9365 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9366 Add comment.
9367 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9368 base address when calling win32_add_one_solib.
9369 (handle_load_dll): Delete local variable load_addr.
9370 Remove 0x1000 offset applied to DLL base address when calling
9371 win32_add_one_solib.
9372 (handle_unload_dll): Add comment.
9373
9374 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9375
9376 * win32-low.c (win32_add_all_dlls): Renames
9377 win32_ensure_ntdll_loaded. Rewrite function documentation.
9378 Adjust implementation to always load all DLLs.
9379 Add 0x1000 offset to DLL base address when calling
9380 win32_add_one_solib.
9381 (child_initialization_done): New static global.
9382 (do_initial_child_stuff): Set child_initialization_done to
9383 zero during child initialization, and 1 after. Replace call
9384 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9385 Add comment.
9386 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9387 (handle_unload_dll): Add function documentation.
9388 (get_child_debug_event): Ignore load and unload DLL events
9389 during child initialization.
9390
9391 2014-02-20 Doug Evans <dje@google.com>
9392
9393 Remove global all_lwps.
9394 * inferiors.h (ptid_of): Move here from linux-low.h.
9395 (pid_of, lwpid_of): Ditto.
9396 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9397 parameter is a struct thread_info * now.
9398 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9399 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9400 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9401 directly.
9402 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9403 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9404 * linux-arm-low.c (update_registers_callback): Update, "entry"
9405 parameter is a struct thread_info * now.
9406 Fetch lwpid from current_inferior directly.
9407 (arm_insert_point): Pass &all_threads to find_inferior instead of
9408 &all_lwps.
9409 (arm_remove_point): Ditto.
9410 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9411 (arm_prepare_to_resume): Fetch pid from thread.
9412 (arm_read_description): Fetch lwpid from current_inferior directly.
9413 * linux-low.c (all_lwps): Delete.
9414 (delete_lwp): Delete call to remove_inferior.
9415 (handle_extended_wait): Fetch lwpid from thread.
9416 (add_lwp): Don't set lwp->entry.id. Remove call to
9417 add_inferior_to_list.
9418 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9419 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9420 (kill_one_lwp_callback): Ditto.
9421 (linux_kill): Don't dereference NULL pointer.
9422 Fetch ptid,lwpid from thread.
9423 (get_detach_signal): Fetch ptid from thread.
9424 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9425 Simplify call to regcache_invalidate_thread.
9426 (delete_lwp_callback): Update, "entry" parameter is a
9427 struct thread_info * now. Fetch pid from thread.
9428 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9429 (status_pending_p_callback): Update, "entry" parameter is a
9430 struct thread_info * now. Fetch ptid from thread.
9431 (find_lwp_pid): Update, "entry" parameter is a
9432 struct thread_info * now.
9433 (linux_wait_for_lwp): Fetch pid from thread.
9434 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9435 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9436 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9437 (dequeue_one_deferred_signal): Ditto.
9438 (cancel_breakpoint): Fetch ptid from current_inferior.
9439 (linux_wait_for_event): Pass &all_threads to find_inferior,
9440 not &all_lwps. Fetch ptid, lwpid from thread.
9441 (count_events_callback): Update, "entry" parameter is a
9442 struct thread_info * now.
9443 (select_singlestep_lwp_callback): Ditto.
9444 (select_event_lwp_callback): Ditto.
9445 (cancel_breakpoints_callback): Ditto.
9446 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9447 not &all_lwps.
9448 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9449 (unsuspend_one_lwp): Update, "entry" parameter is a
9450 struct thread_info * now.
9451 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9452 not &all_lwps.
9453 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9454 Fetch lwpid from thread, not lwp.
9455 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9456 Pass &all_threads to find_inferior, not &all_lwps.
9457 (send_sigstop): Fetch lwpid from thread, not lwp.
9458 (send_sigstop_callback): Update, "entry" parameter is a
9459 struct thread_info * now.
9460 (suspend_and_send_sigstop_callback): Ditto.
9461 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9462 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9463 struct thread_info * now.
9464 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9465 from thread, lwp.
9466 (lwp_running): Update, "entry" parameter is a
9467 struct thread_info * now.
9468 (stop_all_lwps): Fetch ptid from thread.
9469 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9470 (linux_resume_one_lwp): Fetch lwpid from thread.
9471 (linux_set_resume_request): Update, "entry" parameter is a
9472 struct thread_info * now. Fetch pid, lwpid from thread.
9473 (resume_status_pending_p): Update, "entry" parameter is a
9474 struct thread_info * now.
9475 (need_step_over_p): Ditto. Fetch lwpid from thread.
9476 (start_step_over): Fetch lwpid from thread.
9477 (linux_resume_one_thread): Update, "entry" parameter is a
9478 struct thread_info * now. Fetch lwpid from thread.
9479 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9480 (proceed_one_lwp): Update, "entry" parameter is a
9481 struct thread_info * now. Fetch lwpid from thread.
9482 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9483 struct thread_info * now.
9484 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9485 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9486 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9487 directly.
9488 (regsets_store_inferior_registers): Ditto.
9489 (fetch_register, store_register): Ditto.
9490 (linux_read_memory, linux_write_memory): Ditto.
9491 (linux_request_interrupt): Ditto.
9492 (linux_read_auxv): Ditto.
9493 (linux_xfer_siginfo): Ditto.
9494 (linux_qxfer_spu): Ditto.
9495 (linux_qxfer_libraries_svr4): Ditto.
9496 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9497 moved to inferiors.h.
9498 (get_lwp): Delete.
9499 (get_thread_lwp): Update.
9500 (struct lwp_info): Delete member "entry". Simplify comment for
9501 member "thread".
9502 (all_lwps): Delete.
9503 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9504 current_inferior directly.
9505 (update_watch_registers_callback): Update, "entry" parameter is a
9506 struct thread_info * now. Fetch pid from thread.
9507 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9508 (mips_insert_point): Fetch lwpid from current_inferior.
9509 Pass &all_threads to find_inferior, not &all_lwps.
9510 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9511 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9512 directly.
9513 (mips_stopped_data_address): Ditto.
9514 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9515 directly.
9516 * linux-tile-low.c (tile_arch_setup): Ditto.
9517 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9518 (update_debug_registers_callback): Update, "entry" parameter is a
9519 struct thread_info * now. Fetch pid from thread.
9520 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9521 Pass &all_threads to find_inferior, not &all_lwps.
9522 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9523 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9524 Pass &all_threads to find_inferior, not &all_lwps.
9525 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9526 (i386_dr_low_get_status): Ditto.
9527 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9528 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9529 (x86_linux_read_description): Ditto.
9530 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9531
9532 2014-02-20 Doug Evans <dje@google.com>
9533
9534 * inferiors.c (get_first_inferior): Fix buglet.
9535
9536 2014-02-19 Doug Evans <dje@google.com>
9537
9538 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9539 * inferiors.c (add_thread): Change result type to struct thread_info *.
9540 All callers updated.
9541 (add_lwp): Call add_thread here instead of in callers.
9542 All callers updated.
9543 * linux-low.h (get_lwp_thread): Rewrite.
9544 (struct lwp_info): New member "thread".
9545
9546 2014-02-19 Doug Evans <dje@google.com>
9547
9548 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9549 All callers updated.
9550
9551 2014-02-19 Doug Evans <dje@google.com>
9552
9553 * inferiors.c (add_thread): Fix whitespace.
9554
9555 2014-02-19 Doug Evans <dje@google.com>
9556
9557 * dll.c (clear_dlls): Replace accessing list implemention details
9558 with API function.
9559 * gdbthread.h (get_first_thread): Declare.
9560 * inferiors.c (for_each_inferior_with_data): New function.
9561 (get_first_thread): New function.
9562 (find_thread_ptid): Simplify.
9563 (get_first_inferior): New function.
9564 (clear_list): Delete.
9565 (one_inferior_p): New function.
9566 (clear_inferior_list): New function.
9567 (clear_inferiors): Update.
9568 * inferiors.h (for_each_inferior_with_data): Declare.
9569 (clear_inferior_list): Declare.
9570 (one_inferior_p): Declare.
9571 (get_first_inferior): Declare.
9572 * linux-low.c (linux_wait_for_event): Replace accessing list
9573 implemention details with API function.
9574 * server.c (target_running): Ditto.
9575 (accumulate_file_name_length): New function.
9576 (emit_dll_description): New function.
9577 (handle_qxfer_libraries): Replace accessing list implemention
9578 details with API function.
9579 (handle_qxfer_threads_worker): New function.
9580 (handle_qxfer_threads_proper): Replace accessing list implemention
9581 details with API function.
9582 (handle_query): Ditto.
9583 (visit_actioned_threads_callback_ftype): New typedef.
9584 (visit_actioned_threads_data): New struct.
9585 (visit_actioned_threads): Rewrite to be find_inferior callback.
9586 (resume): Call find_inferior.
9587 (handle_status): Replace accessing list implemention
9588 details with API function.
9589 (process_serial_event): Replace accessing list implemention details
9590 with API function.
9591 * target.c (set_desired_inferior): Replace accessing list implemention
9592 details with API function.
9593 * tracepoint.c (same_process_p): New function.
9594 (gdb_agent_about_to_close): Replace accessing list implemention
9595 details with API function.
9596 * win32-low.c (child_delete_thread): Replace accessing list
9597 implemention details with API function.
9598 (match_dll_by_basename): New function.
9599 (dll_is_loaded_by_basename): New function.
9600 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9601 details call to dll_is_loaded_by_basename.
9602
9603 2014-02-19 Doug Evans <dje@google.com>
9604
9605 * dll.h (struct dll_info): Add comment.
9606 * gdbthread.h (struct thread_info): Add comment.
9607 (current_ptid): Simplify.
9608 * inferiors.c (add_process): Update.
9609 (remove_process): Update.
9610 * inferiors.h (struct process_info): Rename member "head" to "entry".
9611 * linux-low.c (delete_lwp): Update.
9612 (add_lwp): Update.
9613 (last_thread_of_process_p): Update.
9614 (kill_one_lwp_callback, linux_kill): Update.
9615 (status_pending_p_callback): Update.
9616 (wait_for_sigstop): Update. Simplify read of ptid.
9617 (start_step_over): Update.
9618 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9619 (get_lwp_thread): Update.
9620 (struct lwp_info): Rename member "head" to "entry".
9621 * regcache.h (inferior_list_entry): Delete.
9622 * server.c (kill_inferior_callback): Update.
9623 (detach_or_kill_inferior_callback): Update.
9624 (print_started_pid): Update.
9625 (print_attached_pid): Update.
9626 (process_serial_event): Simplify read of ptid.
9627 * thread-db.c (thread_db_create_event): Update.
9628 (thread_db_get_tls_address): Update.
9629 * win32-low.c (current_inferior_ptid): Simplify.
9630
9631 2014-02-19 Tom Tromey <tromey@redhat.com>
9632
9633 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9634 argument.
9635 (target_supports_btrace): Update.
9636
9637 2014-02-14 Yao Qi <yao@codesourcery.com>
9638
9639 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9640 (rsp-low-ipa.o): New target.
9641
9642 2014-02-12 Tom Tromey <tromey@redhat.com>
9643
9644 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9645 convert_ascii_to_int.
9646 * regcache.c (registers_to_string): Likewise.
9647 * remote-utils.c (decode_M_packet): Likewise.
9648 * server.c (process_serial_event): Likewise.
9649
9650 2014-02-12 Tom Tromey <tromey@redhat.com>
9651
9652 * server.c (handle_query, handle_v_run): Use hex2bin, not
9653 unhexify.
9654 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9655
9656 2014-02-12 Tom Tromey <tromey@redhat.com>
9657
9658 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9659 convert_int_to_ascii.
9660 * regcache.c (registers_to_string, collect_register_as_string):
9661 Likewise.
9662 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9663 Likewise.
9664 * server.c (process_serial_event): Likewise.
9665 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9666 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9667
9668 2014-02-12 Tom Tromey <tromey@redhat.com>
9669
9670 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9671 bin2hex, not hexify.
9672 * tracepoint.c (cmd_qtstatus): Likewise.
9673
9674 2014-02-12 Tom Tromey <tromey@redhat.com>
9675
9676 * remote-utils.c (monitor_output): Pass explicit length to
9677 hexify.
9678
9679 2014-02-12 Tom Tromey <tromey@redhat.com>
9680
9681 * tracepoint.c: Include rsp-low.h.
9682 * server.c: Include rsp-low.h.
9683 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9684 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9685 declare.
9686 * remote-utils.c: Include rsp-low.h.
9687 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9688 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9689 (convert_int_to_ascii, convert_ascii_to_int): Move to
9690 common/rsp-low.c.
9691 * regcache.c: Include rsp-low.h.
9692 * ax.c: Include rsp-low.h.
9693 * Makefile.in (SFILES): Add common/rsp-low.c.
9694 (OBS): Add rsp-low.o.
9695 (rsp-low.o): New target.
9696
9697 2014-02-12 Tom Tromey <tromey@redhat.com>
9698
9699 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9700 Include print-utils.h.
9701 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9702 (plongest, thirty_two, phex_nz): Remove.
9703 * Makefile.in (SFILES): Add common/print-utils.c.
9704 (OBS): Add print-utils.o.
9705 (print-utils-ipa.o): New target.
9706 (print-utils.o): New target.
9707 (IPA_OBJS): Add print-utils-ipa.o.
9708
9709 2014-02-06 Tom Tromey <tromey@redhat.com>
9710
9711 * Makefile.in (SFILES): Fix indentation.
9712
9713 2014-02-05 Doug Evans <dje@google.com>
9714
9715 * linux-low.c (linux_wait_for_event): Improve comment.
9716 (linux_wait_1): Keep current_inferior in sync with event_child.
9717
9718 2014-01-22 Doug Evans <dje@google.com>
9719
9720 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9721
9722 2014-01-22 Doug Evans <dje@google.com>
9723
9724 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9725 * configure: Regenerate.
9726 * config.in: Regenerate.
9727 * Makefile.in (SFILES): Add debug.c.
9728 (OBS): Add debug.o.
9729 * debug.c: New file.
9730 * debug.h: New file.
9731 * linux-aarch64-low.c (*): Update all debugging printfs to use
9732 debug_printf instead of fprintf.
9733 * linux-arm-low.c (*): Ditto.
9734 * linux-cris-low.c (*): Ditto.
9735 * linux-crisv32-low.c (*): Ditto.
9736 * linux-m32r-low.c (*): Ditto.
9737 * linux-sparc-low.c (*): Ditto.
9738 * linux-x86.c (*): Ditto.
9739 * linux-low.c (*): Ditto.
9740 (linux_wait_1): Add calls to debug_enter, debug_exit.
9741 (linux_wait): Remove redundant debugging printf.
9742 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9743 (linux_resume, unstop_all_lwps): Ditto.
9744 * mem-break.c (*): Update all debugging printfs to use
9745 debug_printf instead of fprintf.
9746 * remote-utils.c (*): Ditto.
9747 * thread-db.c (*): Ditto.
9748 * server.c #include <ctype.h>, "gdb_vecs.h".
9749 (debug_threads): Moved to debug.c.
9750 (*): Update all debugging printfs to use debug_printf instead of
9751 fprintf.
9752 (start_inferior): Replace call to fflush with call to debug_flush.
9753 (monitor_show_help): Mention set debug-format.
9754 (parse_debug_format_options): New function.
9755 (handle_monitor_command): Handle "monitor set debug-format".
9756 (gdbserver_usage): Mention --debug-format.
9757 (main): Parse --debug-format.
9758 * server.h (debug_threads): Declaration moved to debug.h.
9759 #include "debug.h".
9760 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9761 trace_debug_1 that uses debug_printf.
9762 (tracepoint_look_up_symbols): Update all debugging printfs to use
9763 debug_printf instead of fprintf.
9764
9765 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9766
9767 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9768 sys/ptrace.h.
9769
9770 2014-01-17 Pedro Alves <palves@redhat.com>
9771
9772 PR build/16445
9773 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9774 defined after including gdb_proc_service.h.
9775
9776 2014-01-16 Doug Evans <dje@google.com>
9777
9778 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9779 (match_dll): Use it.
9780
9781 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9782
9783 * target.h (target_ops) <read_btrace>: Change parameters and
9784 return type to allow error reporting.
9785 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9786 trace reading errors on.
9787 * linux-low.c (linux_low_read_btrace): Pass trace reading
9788 errors on.
9789 (linux_low_disable_btrace): New.
9790
9791 2014-01-15 Doug Evans <dje@google.com>
9792
9793 * inferiors.c (thread_id_to_gdb_id): Delete.
9794 * inferiors.h (thread_id_to_gdb_id): Delete.
9795
9796 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9797
9798 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9799 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9800 versions.
9801
9802 2014-01-08 Pedro Alves <palves@redhat.com>
9803
9804 * server.c (handle_status): Don't discard previous queued stop
9805 replies or thread's pending status here.
9806 (main) <disconnection>: Do it here instead.
9807
9808 2014-01-08 Pedro Alves <palves@redhat.com>
9809
9810 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9811 * server.c (visit_actioned_threads, handle_pending_status): New
9812 function.
9813 (handle_v_cont): Factor out parts to ...
9814 (resume): ... this new function. If in all-stop, and a thread
9815 being resumed has a pending status, report it without actually
9816 resuming.
9817 (myresume): Adjust to use the new 'resume' function.
9818 (clear_pending_status_callback, set_pending_status_callback)
9819 (find_status_pending_thread_callback): New functions.
9820 (handle_status): Handle the case of multiple threads having
9821 interesting statuses to report. Report threads' real last signal
9822 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9823 with an interesting thread to report the status for, instead of
9824 always reporting the status of the first thread.
9825
9826 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9827
9828 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9829 * gdbreplay.c (gdbreplay_version): Likewise.
9830
9831 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9832
9833 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9834 iov.iov_len with the real length in use.
9835
9836 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9837
9838 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9839 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9840 for all targets that use win32-low.c.
9841 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9842 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9843
9844 2013-12-13 Pedro Alves <palves@redhat.com>
9845
9846 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9847 if equal to TARGET_WAITKIND_LOADED.
9848 * win32-low.c (cached_status): New static global.
9849 (win32_wait): Add declaration.
9850 (do_initial_child_stuff): Flush all initial pending debug events
9851 up to the initial breakpoint.
9852 (win32_wait): If CACHED_STATUS was set, return that instead
9853 of doing a real wait. Remove the code resuming the execution
9854 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9855 during the initial phase. Also remove the code changing
9856 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9857 TARGET_WAITKIND_STOPPED.
9858
9859 2013-12-11 Yao Qi <yao@codesourcery.com>
9860
9861 * notif.c (handle_notif_ack): Return 0 if no notification
9862 matches.
9863
9864 2013-11-20 Doug Evans <dje@google.com>
9865
9866 * linux-low.c (linux_set_resume_request): Fix comment.
9867
9868 2013-11-20 Doug Evans <dje@google.com>
9869
9870 * linux-low.c (resume_status_pending_p): Tweak comment.
9871
9872 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9873
9874 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9875 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9876 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9877 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9878 (srv_amd64_regobj): Add amd64-mpx.o.
9879 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9880 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9881 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9882 * i387-fp.c (num_pl_bnd_register) Added constant.
9883 (num_pl_bnd_cfg_registers) Added constant.
9884 (struct i387_xsave) Added reserved area and MPX fields.
9885 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9886 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9887 function.
9888 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9889 (init_registers_amd64_mpx_linux): Declare new function.
9890 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9891 (x86_64_regmap): Add MPX registers.
9892 (x86_linux_read_description): Add MPX case.
9893 (initialize_low_arch): Initialize MPX targets.
9894
9895 2013-11-18 Tom Tromey <tromey@redhat.com>
9896
9897 * configure: Rebuild.
9898 * configure.ac: Don't check for stdlib.h.
9899 * gdbreplay.c: Unconditionally include stdlib.h.
9900
9901 2013-11-18 Tom Tromey <tromey@redhat.com>
9902
9903 * config.in: Rebuild.
9904 * configure: Rebuild.
9905 * configure.ac: Don't use AC_HEADER_DIRENT.
9906
9907 2013-11-18 Tom Tromey <tromey@redhat.com>
9908
9909 * server.h: Don't check HAVE_STRING_H.
9910 * gdbreplay.c: Don't check HAVE_STRING_H.
9911 * configure: Rebuild.
9912
9913 2013-11-18 Tom Tromey <tromey@redhat.com>
9914
9915 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9916 LIBGNU.
9917
9918 2013-11-08 Tom Tromey <tromey@redhat.com>
9919
9920 * configure, config.in: Rebuild.
9921 * configure.ac: Remove unused configury.
9922
9923 2013-11-08 Tom Tromey <tromey@redhat.com>
9924
9925 * acinclude.m4: Include common.m4, codeset.m4.
9926 * configure, config.in: Rebuild.
9927 * configure.ac: Use GDB_AC_COMMON.
9928
9929 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9930
9931 * linux-s390-low.c (HWCAP_S390_TE): New define.
9932 (s390_arch_setup): Consider the TE field in the HWCAP for
9933 determining 'have_regset_tdb'.
9934
9935 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9936
9937 PR gdb/16014
9938 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9939 call to sizeof.
9940
9941 2013-10-02 Pedro Alves <palves@redhat.com>
9942
9943 * server.c (process_serial_event): Don't output "GDBserver
9944 exiting" if GDB is connected through stdio.
9945 * target.c (mywait): Likewise, be silent if GDB is connected
9946 through stdio.
9947
9948 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9949
9950 * lynx-low.c (lynx_add_threads_after_attach): New function.
9951 (lynx_attach): Remove call to add_thread. Add call to
9952 lynx_add_threads_after_attach instead.
9953
9954 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9955
9956 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9957 * config.in, configure: Regenerated.
9958
9959 2013-09-18 Yao Qi <yao@codesourcery.com>
9960
9961 PR server/15959
9962 * server.c (start_inferior): Clear 'resume_info'.
9963
9964 2013-09-16 Jiong Wang <jiwang@tilera.com>
9965
9966 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9967 for each register.
9968
9969 2013-09-16 Jiong Wang <jiwang@tilera.com>
9970
9971 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9972 linux-tile-low.o to srv_tgtobj.
9973
9974 2013-09-16 Will Newton <will.newton@linaro.org>
9975
9976 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9977 out regs.
9978
9979 2013-09-06 Pedro Alves <palves@redhat.com>
9980
9981 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9982 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9983 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9984 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9985 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9986 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9987
9988 2013-09-06 Pedro Alves <palves@redhat.com>
9989
9990 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9991 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9992
9993 2013-09-06 Pedro Alves <palves@redhat.com>
9994
9995 * linux-amd64-ipa.c: Include tracepoint.h.
9996 * linux-i386-ipa.c: Include tracepoint.h.
9997
9998 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9999
10000 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10001 (ps_get_thread_area): New function.
10002
10003 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10004
10005 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10006 (initialize_low_arch): Call init_registers_crisv32 rather than
10007 init_register_crisv32.
10008
10009 2013-09-05 Pedro Alves <palves@redhat.com>
10010
10011 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10012 to ...
10013 * hostio.h: ... this new file.
10014 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10015 win32-low.c: Include hostio.h.
10016
10017 2013-09-05 Pedro Alves <palves@redhat.com>
10018
10019 * server.h (gdb_client_data, handler_func, callback_handler_func)
10020 (delete_file_handler, add_file_handler, append_callback_event)
10021 (delete_callback_event, start_event_loop, initialize_event_loop):
10022 Move to event-loop.h and include it.
10023 * event-loop.h: New file.
10024
10025 2013-09-05 Pedro Alves <palves@redhat.com>
10026
10027 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10028 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10029 (loaded_dll, unloaded_dll): Move to ...
10030 * dll.h: ... this new file.
10031 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10032
10033 2013-09-05 Pedro Alves <palves@redhat.com>
10034
10035 * server.h (current_process, get_thread_process, all_processes)
10036 (add_inferior_to_list, for_each_inferior, current_inferior)
10037 (remove_inferior, add_process, remove_process, find_process_pid)
10038 (have_started_inferiors_p, have_attached_inferiors_p)
10039 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10040 (clear_inferiors, find_inferior, find_inferior_id)
10041 (inferior_target_data, set_inferior_target_data)
10042 (inferior_regcache_data, set_inferior_regcache_data): Move to
10043 inferiors.h, and include it.
10044 * inferiors.h: New file.
10045
10046 2013-09-05 Pedro Alves <palves@redhat.com>
10047
10048 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10049 Move ...
10050 * ax.h: ... here.
10051
10052 2013-09-05 Pedro Alves <palves@redhat.com>
10053
10054 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10055 tracepoint.h.
10056 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10057 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10058 (handle_tracepoint_general_set, handle_tracepoint_query)
10059 (tracepoint_finished_step, tracepoint_was_hit)
10060 (release_while_stepping_state_list, current_traceframe)
10061 (in_readonly_region, traceframe_read_mem)
10062 (fetch_traceframe_registers, traceframe_read_sdata)
10063 (traceframe_read_info, struct fast_tpoint_collect_status)
10064 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10065 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10066 (supply_fast_tracepoint_registers)
10067 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10068 (ipa_tdesc, claim_trampoline_space)
10069 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10070 (agent_mem_read, agent_get_trace_state_variable_value)
10071 (agent_set_trace_state_variable_value, agent_tsv_read)
10072 (agent_mem_read_string, get_raw_reg_func_addr)
10073 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10074 * tracepoint.h: ... this new file.
10075
10076 2013-09-05 Pedro Alves <palves@redhat.com>
10077
10078 * server.h (perror_with_name, error, fatal, warning, paddress)
10079 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10080 include it.
10081 * utils.h: New file.
10082
10083 2013-09-05 Pedro Alves <palves@redhat.com>
10084
10085 * server.h (remote_debug, noack_mode, transport_is_reliable)
10086 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10087 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10088 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10089 (write_enn, initialize_async_io, enable_async_io)
10090 (disable_async_io, check_remote_input_interrupt_request)
10091 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10092 (dead_thread_notify, prepare_resume_reply)
10093 (decode_address_to_semicolon, decode_address, decode_m_packet)
10094 (decode_M_packet, decode_X_packet, decode_xfer_write)
10095 (decode_search_memory_packet, unhexify, hexify)
10096 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10097 (look_up_one_symbol, relocate_instruction)
10098 (monitor_output): Move to remote-utils.h, and include it.
10099 * remote-utils.h: New file.
10100
10101 2013-09-05 Pedro Alves <palves@redhat.com>
10102
10103 * server.h (_): Delete.
10104
10105 2013-09-02 Pedro Alves <palves@redhat.com>
10106
10107 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10108 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10109 allocated.
10110 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10111
10112 2013-09-02 Pierre Muller <muller@sourceware.org>
10113
10114 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10115 or WriteProcessMemory complete successfully and handle
10116 ERROR_PARTIAL_COPY error.
10117
10118 2013-09-02 Pedro Alves <palves@redhat.com>
10119
10120 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10121 error instead of EIO.
10122
10123 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10124
10125 PR server/15604
10126 * linux-low.c: Include filestuff.h.
10127 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10128 * lynx-low.c: Include filestuff.h.
10129 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10130 * server.c: Include filestuff.h.
10131 (main): Call notice_open_fds.
10132 * spu-low.c: Include filestuff.h.
10133 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10134
10135 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10136
10137 * Makefile.in: Explain why ../target and ../nat are not
10138 listed as include file search paths.
10139 (linux-waitpid.o): New object file rule.
10140 * configure.srv (srv_native_linux_obj): New variable.
10141 Replace all occurrences of linux native object files with
10142 $srv_native_linux_obj.
10143 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10144 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10145 (linux_enable_event_reporting): Remove declaration.
10146 (my_waitpid): Moved to common/linux-waitpid.c.
10147 (linux_wait_for_event): Pass ptid when calling
10148 linux_enable_event_reporting.
10149 (linux_supports_tracefork_flag): Remove.
10150 (linux_enable_event_reporting): Likewise.
10151 (linux_tracefork_grandchild): Remove.
10152 (STACK_SIZE): Moved to common/linux-ptrace.c.
10153 (linux_tracefork_child): Remove.
10154 (linux_test_for_tracefork): Remove.
10155 (linux_look_up_symbols): Call linux_supports_traceclone.
10156 (initialize_low): Remove call to linux_test_for_tracefork.
10157 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10158 common/linux-ptrace.h.
10159 (PTRACE_TYPE_ARG4): Likewise.
10160 Include linux-ptrace.h.
10161
10162 2013-08-21 Pedro Alves <palves@redhat.com>
10163
10164 * config.in: Renegerate.
10165
10166 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10167
10168 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10169 (SFILES): Remove $(srcdir)/common/target-common.c and
10170 add $(srcdir)/target/waitstatus.c.
10171 (OBS): Remove target-common.o and add waitstatus.o.
10172 (server_h): Remove $(srcdir)/../common/target-common.h and
10173 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10174 and $(srcdir)/../target/waitstatus.h.
10175 (target-common.o): Remove.
10176 (waitstatus.o): New target object file.
10177 * target.h: Do not include target-common.h and
10178 include target/resume.h, target/wait.h and
10179 target/waitstatus.h.
10180
10181 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10182
10183 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10184 to PTRACE_TYPE_ARG3.
10185 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10186 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10187 PTRACE_TYPE_ARG4.
10188 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10189 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10190
10191 2013-07-27 Jie Zhang <jie@codesourcery.com>
10192 Daniel Jacobowitz <dan@codesourcery.com>
10193 Yao Qi <yao@codesourcery.com>
10194
10195 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10196 (mips-linux-watch.o): New rule.
10197 (mips_linux_watch_h): New variable.
10198 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10199 srv_tgtobj.
10200 * linux-mips-low.c: Include mips-linux-watch.h.
10201 (struct arch_process_info, struct arch_lwp_info): New.
10202 (update_watch_registers_callback): New function.
10203 (mips_linux_new_process, mips_linux_new_thread) New functions.
10204 (mips_linux_prepare_to_resume, mips_insert_point): New
10205 functions.
10206 (mips_remove_point, mips_stopped_by_watchpoint): New
10207 functions.
10208 (rsp_bp_type_to_target_hw_bp_type): New function.
10209 (mips_stopped_data_address): New function.
10210 (the_low_target): Add watchpoint support functions.
10211
10212 2013-07-27 Yao Qi <yao@codesourcery.com>
10213
10214 * i386-low.c: Include break-common.h.
10215 (enum target_hw_bp_type): Remove.
10216
10217 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10218
10219 * Makefile.in (SFILES): /common/target-common.c.
10220 (OBS): Add target-common.o.
10221 (server_h): Add $(srcdir)/../common/target-common.h.
10222 (target-common.o): New target.
10223 * server.c (queue_stop_reply_callback): Free
10224 status string after use.
10225 * target.c (target_waitstatus_to_string): Remove.
10226 * target.h: Include target-common.h.
10227 (resume_kind): Likewise.
10228 (target_waitkind): Likewise.
10229 (target_waitstatus): Likewise.
10230 (TARGET_WNOHANG): Likewise.
10231
10232 2013-07-04 Yao Qi <yao@codesourcery.com>
10233
10234 * Makefile.in (host_alias): Use @host_noncanonical@.
10235 (target_alias): Use @target_noncanonical@.
10236 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10237 ACX_NONCANONICAL_HOST.
10238 * configure: Regenerated.
10239
10240 Revert:
10241 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10242
10243 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10244 * configure: Rebuild.
10245 * Makefile.in (version_host, version_target): Get from configure.
10246 (version.c): Use $(version_host) and $(version_target).
10247
10248 2013-07-03 Pedro Alves <palves@redhat.com>
10249
10250 * Makefile.in (config.status): Depend on development.sh.
10251 * acinclude.m4: Include libmcheck.m4.
10252 * configure: Regenerate.
10253
10254 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10255
10256 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10257 attribute inside the parentheses.
10258 (winapi_DebugSetProcessKillOnExit): Ditto.
10259 (winapi_DebugBreakProcess): Ditto.
10260 (winapi_GenerateConsoleCtrlEvent): Ditto.
10261
10262 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10263
10264 * notif.h (notif_event): Add a dummy member to avoid compiler
10265 errors.
10266
10267 2013-07-01 Pedro Alves <palves@redhat.com>
10268
10269 * hostio.c (HOSTIO_PATH_MAX): Define.
10270 (require_filename, handle_open, handle_unlink, handle_readlink):
10271 Use it.
10272
10273 2013-07-01 Pedro Alves <palves@redhat.com>
10274
10275 * server.h: Include "pathmax.h".
10276 * linux-low.c: Don't include sys/param.h.
10277 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10278 MAXPATHLEN.
10279 * win32-low.c: Don't include sys/param.h.
10280 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10281
10282 2013-07-01 Pedro Alves <palves@redhat.com>
10283
10284 * event-loop.c: Don't check HAVE_UNISTD_H before including
10285 <unistd.h>.
10286 * gdbreplay.c: Likewise.
10287 * remote-utils.c: Likewise.
10288 * server.c: Likewise.
10289 * configure.ac: Don't check for unistd.h.
10290 * configure: Regenerate.
10291
10292 2013-06-28 Tom Tromey <tromey@redhat.com>
10293
10294 * Makefile.in (version.c): Use version.in, not
10295 common/version.in.
10296
10297 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10298
10299 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10300 * configure: Rebuild.
10301 * Makefile.in (version_host, version_target): Get from configure.
10302 (version.c): Use $(version_host) and $(version_target).
10303
10304 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10305
10306 Fix trace-status to output user name without trailing colon.
10307 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10308
10309 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10310
10311 Fix trace-status to output proper start-time and stop-time.
10312 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10313 output start time and stop time in hex as gdb expects.
10314
10315 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10316
10317 * tracepoint.c (build_traceframe_info_xml): Output trace state
10318 variables present in the trace buffer.
10319
10320 2013-06-24 Tom Tromey <tromey@redhat.com>
10321
10322 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10323 create-version.sh.
10324 (version.o): Remove.
10325 * gdbreplay.c: Include version.h.
10326 (version, host_name): Don't declare.
10327 * server.h: Include version.h.
10328 (version, host_name): Don't declare.
10329
10330 2013-06-12 Pedro Alves <palves@redhat.com>
10331
10332 * linux-x86-low.c (linux_is_elf64): Delete global.
10333 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10334 with local linux_pid_exe_is_elf_64_file use.
10335
10336 2013-06-11 Pedro Alves <palves@redhat.com>
10337
10338 * linux-low.c (regset_disabled, disable_regset): New functions.
10339 (regsets_fetch_inferior_registers)
10340 (regsets_store_inferior_registers): Use them.
10341 (initialize_regsets_info); Don't allocate the disabled_regsets
10342 array here.
10343 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10344 comment.
10345
10346 2013-06-11 Pedro Alves <palves@redhat.com>
10347
10348 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10349 xmalloc.
10350
10351 2013-06-11 Pedro Alves <palves@redhat.com>
10352
10353 * linux-x86-low.c (initialize_low_arch): Call
10354 init_registers_x32_avx_linux.
10355
10356 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10357
10358 Fix compatibility with Android Bionic.
10359 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10360 it is not empty.
10361
10362 2013-06-07 Pedro Alves <palves@redhat.com>
10363
10364 PR server/14823
10365 * Makefile.in (OBS): Add tdesc.o.
10366 (IPA_OBJS): Add tdesc-ipa.o.
10367 (tdesc-ipa.o): New rule.
10368 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10369 interface.
10370 * linux-low.c (new_inferior): Delete.
10371 (disabled_regsets, num_regsets): Delete.
10372 (linux_add_process): Adjust to set the new per-process
10373 new_inferior flag.
10374 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10375 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10376 was a stop. When calling arch_setup, switch the current inferior
10377 to the thread that got an event.
10378 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10379 (regsets_fetch_inferior_registers)
10380 (regsets_store_inferior_registers): New regsets_info parameter.
10381 Adjust to use it.
10382 (linux_register_in_regsets): New regs_info parameter. Adjust to
10383 use it.
10384 (register_addr, fetch_register, store_register): New usrregs_info
10385 parameter. Adjust to use it.
10386 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10387 parameter regs_info. Adjust to use it.
10388 (linux_fetch_registers): Get the current inferior's regs_info, and
10389 adjust to use it.
10390 (linux_store_registers): Ditto.
10391 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10392 (initialize_low): Don't initialize the target_regsets here. Call
10393 initialize_low_arch.
10394 * linux-low.h (target_regsets): Delete declaration.
10395 (struct regsets_info): New.
10396 (struct usrregs_info): New.
10397 (struct regs_info): New.
10398 (struct process_info_private) <new_inferior>: New field.
10399 (struct linux_target_ops): Delete the num_regs, regmap, and
10400 regset_bitmap fields. New field regs_info.
10401 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10402 * i387-fp.c (num_xmm_registers): Delete.
10403 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10404 calls to new interface.
10405 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10406 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10407 Infer the number of xmm registers from the regcache's target
10408 description.
10409 * i387-fp.h (num_xmm_registers): Delete.
10410 * inferiors.c (add_thread): Don't install the thread's regcache
10411 here.
10412 * proc-service.c (gregset_info): Fetch the current inferior's
10413 regs_info. Adjust to use it.
10414 * regcache.c: Include tdesc.h.
10415 (register_bytes, reg_defs, num_registers)
10416 (gdbserver_expedite_regs): Delete.
10417 (get_thread_regcache): If the thread doesn't have a regcache yet,
10418 create one, instead of aborting gdbserver.
10419 (regcache_invalidate_one): Rename to ...
10420 (regcache_invalidate_thread): ... this.
10421 (regcache_invalidate_one): New.
10422 (regcache_invalidate): Only invalidate registers of the current
10423 process.
10424 (init_register_cache): Add target_desc parameter, and use it.
10425 (new_register_cache): Ditto. Assert the target description has a
10426 non zero registers_size.
10427 (regcache_cpy): Add assertions. Adjust.
10428 (realloc_register_cache, set_register_cache): Delete.
10429 (registers_to_string, registers_from_string): Adjust.
10430 (find_register_by_name, find_regno, find_register_by_number)
10431 (register_cache_size): Add target_desc parameter, and use it.
10432 (free_register_cache_thread, free_register_cache_thread_one)
10433 (regcache_release, register_cache_size): New.
10434 (register_size): Add target_desc parameter, and use it.
10435 (register_data, supply_register, supply_register_zeroed)
10436 (supply_regblock, supply_register_by_name, collect_register)
10437 (collect_register_as_string, collect_register_by_name): Adjust.
10438 * regcache.h (struct target_desc): Forward declare.
10439 (struct regcache) <tdesc>: New field.
10440 (init_register_cache, new_register_cache): Add target_desc
10441 parameter.
10442 (regcache_invalidate_thread): Declare.
10443 (regcache_invalidate_one): Delete declaration.
10444 (regcache_release): Declare.
10445 (find_register_by_number, register_cache_size, register_size)
10446 (find_regno): Add target_desc parameter.
10447 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10448 declarations.
10449 * remote-utils.c: Include tdesc.h.
10450 (outreg, prepare_resume_reply): Adjust.
10451 * server.c: Include tdesc.h.
10452 (gdbserver_xmltarget): Delete declaration.
10453 (get_features_xml, process_serial_event): Adjust.
10454 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10455 declare.
10456 (struct process_info) <tdesc>: New field.
10457 (ipa_tdesc): Declare.
10458 * tdesc.c: New file.
10459 * tdesc.h: New file.
10460 * tracepoint.c: Include tdesc.h.
10461 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10462 (get_context_regcache): Adjust to pass ipa_tdesc down.
10463 (do_action_at_tracepoint): Adjust to get the register cache size
10464 from the context regcache's description.
10465 (traceframe_walk_blocks): Adjust to get the register cache size
10466 from the current trace frame's description.
10467 (traceframe_get_pc): Adjust to get current trace frame's
10468 description and pass it down.
10469 (gdb_collect): Adjust to get the register cache size from the
10470 IPA's description.
10471 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10472 (gdbserver_xmltarget): Delete.
10473 (initialize_low_tracepoint): Set the ipa's target description.
10474 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10475 (initialize_low_tracepoint): Set the ipa's target description.
10476 * linux-x86-low.c: Include tdesc.h.
10477 [__x86_64__] (is_64bit_tdesc): New.
10478 (ps_get_thread_area, x86_get_thread_area): Use it.
10479 (i386_cannot_store_register): Rename to ...
10480 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10481 (i386_cannot_fetch_register): Rename to ...
10482 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10483 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10484 to new interface.
10485 (target_regsets): Rename to ...
10486 (x86_regsets): ... this.
10487 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10488 interface.
10489 (x86_siginfo_fixup): Use is_64bit_tdesc.
10490 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10491 (tdesc_x32_avx_linux, tdesc_x32_linux)
10492 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10493 Declare.
10494 (x86_linux_update_xmltarget): Delete.
10495 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10496 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10497 (AMD64_LINUX_USER64_CS): New.
10498 (x86_linux_read_description): New, based on
10499 x86_linux_update_xmltarget.
10500 (same_process_callback): New.
10501 (x86_arch_setup_process_callback): New.
10502 (x86_linux_update_xmltarget): New.
10503 (x86_regsets_info): New.
10504 (amd64_linux_regs_info): New.
10505 (i386_linux_usrregs_info): New.
10506 (i386_linux_regs_info): New.
10507 (x86_linux_regs_info): New.
10508 (x86_arch_setup): Reimplement.
10509 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10510 (x86_emit_ops): Ditto.
10511 (the_low_target): Adjust. Install x86_linux_regs_info,
10512 x86_cannot_fetch_register, and x86_cannot_store_register.
10513 (initialize_low_arch): New.
10514 * linux-ia64-low.c (tdesc_ia64): Declare.
10515 (ia64_fetch_register): Adjust.
10516 (ia64_usrregs_info, regs_info): New globals.
10517 (ia64_regs_info): New function.
10518 (the_low_target): Adjust.
10519 (initialize_low_arch): New function.
10520 * linux-sparc-low.c (tdesc_sparc64): Declare.
10521 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10522 Adjust.
10523 (sparc_arch_setup): New function.
10524 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10525 (the_low_target): Adjust.
10526 (initialize_low_arch): New function.
10527 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10528 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10529 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10530 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10531 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10532 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10533 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10534 (tdesc_powerpc_isa205_vsx64l): Declare.
10535 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10536 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10537 (ppc_set_pc, ppc_get_hwcap): Adjust.
10538 (ppc_usrregs_info): Forward declare.
10539 (!__powerpc64__) ppc_regmap_adjusted: New global.
10540 (ppc_arch_setup): Adjust to the current process'es target
10541 description.
10542 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10543 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10544 (ppc_store_evrregset): Adjust.
10545 (target_regsets): Rename to ...
10546 (ppc_regsets): ... this, and make static.
10547 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10548 (ppc_regs_info): New function.
10549 (the_low_target): Adjust.
10550 (initialize_low_arch): New function.
10551 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10552 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10553 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10554 (tdesc_s390x_linux64v2): Declare.
10555 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10556 (s390_fill_gregset, s390_store_last_break): Adjust.
10557 (target_regsets): Rename to ...
10558 (s390_regsets): ... this, and make static.
10559 (s390_get_pc, s390_set_pc): Adjust.
10560 (s390_get_hwcap): New target_desc parameter, and use it.
10561 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10562 (s390_arch_setup): Adjust to set the current process'es target
10563 description. Don't adjust the regmap.
10564 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10565 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10566 (regs_info_3264): New globals.
10567 (s390_regs_info): New function.
10568 (the_low_target): Adjust.
10569 (initialize_low_arch): New function.
10570 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10571 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10572 [__mips64] (init_registers_mips_linux)
10573 (init_registers_mips_dsp_linux): Delete defines.
10574 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10575 (have_dsp): New global.
10576 (mips_read_description): New, based on mips_arch_setup.
10577 (mips_arch_setup): Reimplement.
10578 (get_usrregs_info): New function.
10579 (mips_cannot_fetch_register, mips_cannot_store_register)
10580 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10581 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10582 (target_regsets): Rename to ...
10583 (mips_regsets): ... this, and make static.
10584 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10585 (dsp_regs_info, regs_info): New globals.
10586 (mips_regs_info): New function.
10587 (the_low_target): Adjust.
10588 (initialize_low_arch): New function.
10589 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10590 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10591 Declare.
10592 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10593 (arm_read_description): New, with bits factored from
10594 arm_arch_setup.
10595 (arm_arch_setup): Reimplement.
10596 (target_regsets): Rename to ...
10597 (arm_regsets): ... this, and make static.
10598 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10599 (arm_regs_info): New function.
10600 (the_low_target): Adjust.
10601 (initialize_low_arch): New function.
10602 * linux-m68k-low.c (tdesc_m68k): Declare.
10603 (target_regsets): Rename to ...
10604 (m68k_regsets): ... this, and make static.
10605 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10606 (m68k_regs_info): New function.
10607 (m68k_arch_setup): New function.
10608 (the_low_target): Adjust.
10609 (initialize_low_arch): New function.
10610 * linux-sh-low.c (tdesc_sharch): Declare.
10611 (target_regsets): Rename to ...
10612 (sh_regsets): ... this, and make static.
10613 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10614 (sh_regs_info, sh_arch_setup): New functions.
10615 (the_low_target): Adjust.
10616 (initialize_low_arch): New function.
10617 * linux-bfin-low.c (tdesc_bfin): Declare.
10618 (bfin_arch_setup): New function.
10619 (bfin_usrregs_info, regs_info): New globals.
10620 (bfin_regs_info): New function.
10621 (the_low_target): Adjust.
10622 (initialize_low_arch): New function.
10623 * linux-cris-low.c (tdesc_cris): Declare.
10624 (cris_arch_setup): New function.
10625 (cris_usrregs_info, regs_info): New globals.
10626 (cris_regs_info): New function.
10627 (the_low_target): Adjust.
10628 (initialize_low_arch): New function.
10629 * linux-cris-low.c (tdesc_crisv32): Declare.
10630 (cris_arch_setup): New function.
10631 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10632 (cris_regs_info): New function.
10633 (the_low_target): Adjust.
10634 (initialize_low_arch): New function.
10635 * linux-m32r-low.c (tdesc_m32r): Declare.
10636 (m32r_arch_setup): New function.
10637 (m32r_usrregs_info, regs_info): New globals.
10638 (m32r_regs_info): Adjust.
10639 (initialize_low_arch): New function.
10640 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10641 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10642 (tic6x_usrregs_info): Forward declare.
10643 (tic6x_read_description): New function, based on ...
10644 (tic6x_arch_setup): ... this. Reimplement.
10645 (target_regsets): Rename to ...
10646 (tic6x_regsets): ... this, and make static.
10647 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10648 (tic6x_regs_info): New function.
10649 (the_low_target): Adjust.
10650 (initialize_low_arch): New function.
10651 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10652 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10653 (target_regsets): Rename to ...
10654 (xtensa_regsets): ... this, and make static.
10655 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10656 globals.
10657 (xtensa_arch_setup, xtensa_regs_info): New functions.
10658 (the_low_target): Adjust.
10659 (initialize_low_arch): New function.
10660 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10661 (nios2_arch_setup): Set the current process'es tdesc.
10662 (target_regsets): Rename to ...
10663 (nios2_regsets): ... this.
10664 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10665 (nios2_regs_info): New function.
10666 (the_low_target): Adjust.
10667 (initialize_low_arch): New function.
10668 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10669 (aarch64_arch_setup): Set the current process'es tdesc.
10670 (target_regsets): Rename to ...
10671 (aarch64_regsets): ... this.
10672 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10673 (aarch64_regs_info): New function.
10674 (the_low_target): Adjust.
10675 (initialize_low_arch): New function.
10676 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10677 globals.
10678 (target_regsets): Rename to ...
10679 (tile_regsets): ... this.
10680 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10681 (tile_regs_info): New function.
10682 (tile_arch_setup): Set the current process'es tdesc.
10683 (the_low_target): Adjust.
10684 (initialize_low_arch): New function.
10685 * spu-low.c (tdesc_spu): Declare.
10686 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10687 * win32-arm-low.c (tdesc_arm): Declare.
10688 (arm_arch_setup): New function.
10689 (the_low_target): Install arm_arch_setup instead of
10690 init_registers_arm.
10691 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10692 (init_windows_x86): Rename to ...
10693 (i386_arch_setup): ... this. Set `win32_tdesc'.
10694 (the_low_target): Adjust.
10695 * win32-low.c (win32_tdesc): New global.
10696 (child_add_thread): Don't create the thread cache here.
10697 (do_initial_child_stuff): Set the new process'es tdesc.
10698 * win32-low.h (struct target_desc): Forward declare.
10699 (win32_tdesc): Declare.
10700 * lynx-i386-low.c (tdesc_i386): Declare global.
10701 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10702 * lynx-low.c (lynx_tdesc): New global.
10703 (lynx_add_process): Set the new process'es tdesc.
10704 * lynx-low.h (struct target_desc): Forward declare.
10705 (lynx_tdesc): Declare global.
10706 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10707 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10708 * nto-low.c (nto_tdesc): New global.
10709 (do_attach): Set the new process'es tdesc.
10710 * nto-low.h (struct target_desc): Forward declare.
10711 (nto_tdesc): Declare.
10712 * nto-x86-low.c (tdesc_i386): Declare.
10713 (nto_x86_arch_setup): Set `nto_tdesc'.
10714
10715 2013-06-04 Gary Benson <gbenson@redhat.com>
10716
10717 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10718 to qSupported response when appropriate.
10719 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10720 with nonzero-length annex.
10721 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10722 arguments supplied in annex.
10723
10724 2013-05-31 Doug Evans <dje@google.com>
10725
10726 PR server/15594
10727 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10728 64 bits in 64-cross-32 environment.
10729
10730 2013-05-28 Pedro Alves <palves@redhat.com>
10731
10732 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10733 (aarch64-without-fpu.c): Delete rule.
10734 * configure.srv (aarch64*-*-linux*): Remove references to
10735 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10736 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10737 declaration.
10738
10739 2013-05-24 Pedro Alves <palves@redhat.com>
10740
10741 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10742 instead of strchr/decode_address. Error if the range isn't split
10743 with a ','. Don't assume there's be a ':' in the action.
10744
10745 2013-05-23 Yao Qi <yao@codesourcery.com>
10746 Pedro Alves <palves@redhat.com>
10747
10748 * linux-low.c (lwp_in_step_range): New function.
10749 (linux_wait_1): If the thread was range stepping and stopped
10750 outside the stepping range, report the stop to GDB. Otherwise,
10751 continue stepping. Add range stepping debug output.
10752 (linux_set_resume_request): Copy the step range from the resume
10753 request to the lwp.
10754 (linux_supports_range_stepping): New.
10755 (linux_target_ops) <supports_range_stepping>: Set to
10756 linux_supports_range_stepping.
10757 * linux-low.h (struct linux_target_ops)
10758 <supports_range_stepping>: New field.
10759 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10760 * linux-x86-low.c (x86_supports_range_stepping): New.
10761 (the_low_target) <supports_range_stepping>: Set to
10762 x86_supports_range_stepping.
10763 * server.c (handle_v_cont): Handle 'r' action.
10764 (handle_v_requests): Append ";r" if the target supports range
10765 stepping.
10766 * target.h (struct thread_resume) <step_range_start,
10767 step_range_end>: New fields.
10768 (struct target_ops) <supports_range_stepping>:
10769 New field.
10770 (target_supports_range_stepping): New macro.
10771
10772 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10773
10774 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10775 confusion in comment.
10776
10777 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10778
10779 * lynx-low.c (struct process_info_private): New type.
10780 (lynx_add_process): New function.
10781 (lynx_create_inferior, lynx_attach): Replace calls to
10782 add_process by calls to lynx_add_process.
10783 (lynx_resume): If PTID is null, then try using
10784 current_process()->private->last_wait_event_ptid.
10785 Add comments.
10786 (lynx_clear_inferiors): Delete. The contents of that function
10787 has been inlined in lynx_mourn;
10788 (lynx_wait_1): Save the ptid in the process's private data.
10789 (lynx_mourn): Free the process' private data. Replace call
10790 to lynx_clear_inferiors by call to clear_inferiors.
10791
10792 2013-05-17 Yao Qi <yao@codesourcery.com>
10793
10794 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10795 the right place.
10796
10797 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10798
10799 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10800 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10801 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10802 PT_TEXT_END_ADDR guards. Update comments.
10803 (linux_target_op) <read_offsets>: Conditionally define to
10804 linux_read_offsets if the target is UCLIBC and if it defines
10805 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10806
10807 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10808 Andrew Jenner <andrew@codesourcery.com>
10809
10810 * Makefile.in (SFILES): Add linux-nios2-low.c.
10811 (clean): Add action to delete nios2-linux.c.
10812 (nios2-linux.c): New rule.
10813 * configure.srv: Add nios2*-*-linux*.
10814 * linux-nios2-low.c: New.
10815
10816 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10817
10818 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10819
10820 2013-04-25 Hui Zhu <hui@codesourcery.com>
10821
10822 PR gdb/15186
10823 * ax.c (ax_printf): Add fflush.
10824
10825 2013-04-22 Tom Tromey <tromey@redhat.com>
10826
10827 * Makefile.in (SFILES): Add filestuff.c.
10828 (OBS): Add filestuff.o.
10829 (filestuff.o): New target.
10830 * config.in, configure: Rebuild.
10831 * configure.ac: Check for fdwalk, pipe2.
10832
10833 2013-04-17 Pedro Alves <palves@redhat.com>
10834
10835 * configure.ac (USE_THREAD_DB): Delete variable.
10836 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10837 Don't AC_SUBST USE_THREAD_DB.
10838 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10839 * config.in, configure: Regenerate.
10840
10841 2013-04-16 Pedro Alves <palves@redhat.com>
10842
10843 * linux-low.h (struct lwp_info) <thread_known>: Move under
10844 the USE_THREAD_DB #ifdef.
10845
10846 2013-04-16 Pedro Alves <palves@redhat.com>
10847
10848 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10849 (linux-low.o): Delete rule.
10850 * linux-low.h: Always include "gdb_thread_db.h" instead of
10851 conditionally including thread_db.h.
10852 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10853 HAVE_THREAD_DB_H.
10854
10855 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10856
10857 * Makefile.in (install-only): Fix make install regression.
10858
10859 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10860
10861 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10862 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10863 installation.
10864 * gdbserver.1: Remove.
10865
10866 2013-03-22 Pedro Alves <palves@redhat.com>
10867
10868 * linux-low.c (handle_extended_wait): Don't call
10869 linux_enable_event_reporting.
10870
10871 2013-03-15 Tony Theodore <tonyt@logyst.com>
10872
10873 PR build/9098:
10874 * Makefile.in (SHELL): Use @SHELL@.
10875
10876 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10877
10878 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10879 compiler warning.
10880
10881 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10882
10883 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10884 Remove extraneous NULL element.
10885
10886 2013-03-13 Yao Qi <yao@codesourcery.com>
10887
10888 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10889 'V' block in trace frame.
10890
10891 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10892
10893 * target.h (struct target_ops): Add btrace ops.
10894 (target_supports_btrace): New macro.
10895 (target_enable_btrace): New macro.
10896 (target_disable_btrace): New macro.
10897 (target_read_btrace): New macro.
10898 * gdbthread.h (struct thread_info): Add btrace field.
10899 * server.c: Include btrace-common.h.
10900 (handle_btrace_general_set): New function.
10901 (handle_btrace_enable): New function.
10902 (handle_btrace_disable): New function.
10903 (handle_general_set): Call handle_btrace_general_set.
10904 (handle_qxfer_btrace): New function.
10905 (struct qxfer qxfer_packets[]): Add btrace entry.
10906 * inferiors.c (remove_thread): Disable btrace.
10907 * linux-low: Include linux-btrace.h.
10908 (linux_low_enable_btrace): New function.
10909 (linux_low_read_btrace): New function.
10910 (linux_target_ops): Add btrace ops.
10911 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10912 Add srv_linux_btrace=yes.
10913 (x86_64-*-linux*): Add linux-btrace.o.
10914 Add srv_linux_btrace=yes.
10915 * configure.ac: Define HAVE_LINUX_BTRACE.
10916 * config.in: Regenerated.
10917 * configure: Regenerated.
10918
10919 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10920
10921 * server.c (handle_qxfer): Preserve error message if -3 is
10922 returned.
10923 (qxfer): Document the -3 return value.
10924
10925 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10926
10927 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10928 (linux_btrace_h): New variable.
10929 (linux-btrace.o): New rule.
10930
10931 2013-03-08 Stan Shebs <stan@codesourcery.com>
10932 Hafiz Abid Qadeer <abidh@codesourcery.com>
10933
10934 * tracepoint.c (trace_buffer_size): New global.
10935 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10936 (init_trace_buffer): Change to one-argument function. Allocate
10937 trace buffer memory.
10938 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10939 handle QTBuffer:size packet.
10940 (cmd_bigqtbuffer_size): New function.
10941 (initialize_tracepoint): Call init_trace_buffer with
10942 DEFAULT_TRACE_BUFFER_SIZE.
10943 * server.c (handle_query): Add QTBuffer:size in the
10944 supported packets.
10945
10946 2013-03-07 Yao Qi <yao@codesourcery.com>
10947
10948 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10949 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10950 of -1.
10951 (cmd_qtsp): Adjust condition. Do post increment.
10952 Set cur_action and cur_step_action back to 0.
10953
10954 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10955
10956 PR server/15236
10957 * linux-low.c (linux_write_memory): Return early success if LEN is
10958 zero.
10959
10960 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10961
10962 * configure.srv: Add x86_64-*-cygwin* as target.
10963
10964 2013-02-28 Tom Tromey <tromey@redhat.com>
10965
10966 * configure.ac: Invoke AC_SYS_LARGEFILE.
10967 * configure, config.in: Rebuild.
10968
10969 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10970
10971 * win32-low.c: Throughout, fix format strings and casts of
10972 printf-like functions to avoid type related warnings on all
10973 platforms.
10974 (get_child_debug_event): Print dwDebugEventCode as hex since
10975 that's how it's usually documented.
10976
10977 2013-02-28 Yao Qi <yao@codesourcery.com>
10978
10979 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10980 pulongest.
10981
10982 2013-02-27 Jiong Wang <jiwang@tilera.com>
10983
10984 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10985 (reg-tilegx32.c): New rule.
10986 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10987 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10988 different register info initializer according to elf class.
10989 (init_registers_tilgx32): New function. The tilegx32 register info
10990 initializer.
10991 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10992 (tile_store_gregset): Likewise.
10993
10994 2013-02-27 Yao Qi <yao@codesourcery.com>
10995
10996 * server.c (process_point_options): Print debug message when
10997 debug_threads is true.
10998
10999 2013-02-26 Yao Qi <yao@codesourcery.com>
11000
11001 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11002
11003 2013-02-19 Pedro Alves <palves@redhat.com>
11004 Kai Tietz <ktietz@redhat.com>
11005
11006 PR gdb/15161
11007
11008 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11009 instead of strtoul to extract address from packet.
11010 (process_serial_event) <'z'>: Likewise.
11011
11012 2013-02-18 Yao Qi <yao@codesourcery.com>
11013
11014 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11015
11016 2013-02-14 Pedro Alves <palves@redhat.com>
11017
11018 Plug memory leak.
11019
11020 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11021 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11022
11023 2013-02-14 Pedro Alves <palves@redhat.com>
11024
11025 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11026
11027 2013-02-14 Pedro Alves <palves@redhat.com>
11028
11029 * tracepoint.c (save_string): Delete.
11030 (add_tracepoint_action): Use savestring instead of save_string.
11031
11032 2013-02-12 Pedro Alves <palves@redhat.com>
11033
11034 * linux-xtensa-low.c: Ditto.
11035 * xtensa-xtregs.c: Ditto.
11036
11037 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11038
11039 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11040 thread_db.
11041
11042 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11043
11044 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11045 aarch64_num_wp_regs and aarch64_num_bp_regs to
11046 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11047
11048 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11049
11050 * linux-aarch64-low.c (ps_get_thread_area): Replace
11051 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11052
11053 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11054 Marcus Shawcroft <marcus.shawcroft@arm.com>
11055 Nigel Stephens <nigel.stephens@arm.com>
11056 Yufeng Zhang <yufeng.zhang@arm.com>
11057
11058 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11059 (aarch64.c, aarch64-without-fpu.c): New targets.
11060 * configure.srv (aarch64*-*-linux*): New.
11061 * linux-aarch64-low.c: New file.
11062
11063 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11064
11065 * linux-low.c (handle_extended_wait, linux_create_inferior)
11066 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11067 (dequeue_one_deferred_signal, linux_resume_one_thread)
11068 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11069 (linux_tracefork_grandchild, linux_test_for_tracefork)
11070 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11071 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11072 where the argument is 0.
11073
11074 2013-01-25 Yao Qi <yao@codesourcery.com>
11075
11076 * event-loop.c: Include "queue.h".
11077 (gdb_event_p): New typedef.
11078 (struct gdb_event) <next_event>: Remove.
11079 (event_queue): Change to QUEUE(gdb_event_p).
11080 (async_queue_event): Remove.
11081 (gdb_event_xfree): New.
11082 (initialize_event_loop): New.
11083 (process_event): Use API from QUEUE.
11084 (wait_for_event): Likewise.
11085 * server.c (main): Call initialize_event_loop.
11086 * server.h (initialize_event_loop): Declare.
11087
11088 2013-01-18 Yao Qi <yao@codesourcery.com>
11089
11090 * ax.h (struct eval_agent_expr_context): New.
11091 (gdb_eval_agent_expr): Update declaration.
11092 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11093 TFRAME. Add new argument CTX.
11094 * server.h (struct eval_agent_expr_context): Declare.
11095 (agent_mem_read, agent_tsv_read): Update declaration.
11096 (agent_mem_read_string): Likewise.
11097 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11098 (add_traceframe_block): Add new argument TPOINT.
11099 Increase TPOINT->traceframe_usage.
11100 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11101 eval_tracepoint_agent_expr.
11102 (condition_true_at_tracepoint): Likewise.
11103 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11104 (agent_mem_read_string, agent_tsv_read): Likewise.
11105
11106 2013-01-16 Yao Qi <yao@codesourcery.com>
11107
11108 * linux-low.c (linux_resume_one_lwp): Don't check
11109 'lwp->bp_reinsert != 0'.
11110
11111 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11112 Pedro Alves <palves@redhat.com>
11113
11114 * lynx-low.c (ptrace_request_to_str): Define a temporary
11115 macro and use it to simplify this function's implementation.
11116
11117 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11118
11119 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11120 sets errno.
11121
11122 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11123
11124 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11125
11126 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11127
11128 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11129
11130 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11131
11132 * lynx-low.c (lynx_resume): Use the resume_info parameter
11133 to determine the ptid for the lynx_ptrace call, unless
11134 it is equal to minus_one_ptid, in which case we use the
11135 ptid of the current_inferior.
11136 (lynx_wait_1): After having received a thread create/exit
11137 event, resume the inferior's execution using the signaling
11138 thread's ptid, rather than the old ptid.
11139
11140 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11141
11142 * lynx-low.c (lynx_resume): Delete variable ret.
11143
11144 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11145
11146 * gdbreplay.c (gdbreplay_version): Update copyright year.
11147 * server.c (gdbserver_version): Likewise.
11148
11149 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11150
11151 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11152 new thread.
11153
11154 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11155
11156 * lynx-low.c (ptrace_request_to_str): Add handling for
11157 PTRACE_GETTRACESIG.
11158
11159 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11160
11161 * lynx-low.c (lynx_attach): Delete variable new_process.
11162
11163 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11164
11165 * lynx-low.c (lynx_create_inferior): Delete variable
11166 new_process.
11167
11168 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11169
11170 * lynx-low.c (ptrace_request_to_str): Do not handle
11171 PTRACE_GETTHREADLIST if this macro does not exist.
11172
11173 2012-12-15 Yao Qi <yao@codesourcery.com>
11174
11175 * Makefile.in (OBS): Add notif.o.
11176 * notif.c, notif.h: New.
11177 * server.c: Include "notif.h".
11178 (struct vstop_notif) <next>: Remove.
11179 <base>: New field.
11180 (queue_stop_reply): Update.
11181 (push_event, send_next_stop_reply): Remove.
11182 (discard_queued_stop_replies): Update.
11183 (notif_stop): New variable.
11184 (handle_v_stopped): Remove.
11185 (handle_v_requests): Don't call handle_v_stopped. Call
11186 handle_ack_notif instead.
11187 (queue_stop_reply_callback): Call notif_event_enque instead
11188 of queue_stop_reply.
11189 (handle_status): Don't call send_next_stop_reply, call
11190 notif_write_event instead.
11191 (kill_inferior_callback): Likewise.
11192 (detach_or_kill_inferior_callback): Likewise.
11193 (main): Call initialize_notif.
11194 (process_serial_event): Call QUEUE_is_empty.
11195 (handle_target_event): Call notif_push instead of push event.
11196 * server.h (push_event): Remove declaration.
11197
11198 2012-12-10 Tom Tromey <tromey@redhat.com>
11199
11200 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11201 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11202 macros.
11203 (.c.o): Rewrite.
11204 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11205 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11206 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11207 (amd64-linux-ipa.o, ax.o): Rewrite.
11208 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11209 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11210 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11211 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11212 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11213 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11214 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11215 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11216 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11217 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11218 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11219 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11220 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11221 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11222 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11223 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11224 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11225 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11226 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11227 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11228 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11229 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11230 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11231 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11232 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11233 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11234 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11235 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11236 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11237 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11238 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11239 (reg-tilegx.o): Remove.
11240 (all_object_files): New macro.
11241 Include .deps files.
11242 * aclocal.m4, configure: Rebuild.
11243 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11244 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11245 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11246
11247 2012-12-05 Tom Tromey <tromey@redhat.com>
11248
11249 PR gdb/14917:
11250 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11251
11252 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11253
11254 * configure.ac: Check for linux/perf_event.h.
11255 * config.in: Regenerated.
11256 * configure: Regenerated.
11257
11258 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11259
11260 * hostio.c (handle_readlink): Decrease buffer size
11261 parameter passed to readlink by one byte.
11262
11263 2012-11-26 Yao Qi <yao@codesourcery.com>
11264
11265 * configure.ac (build_warnings): Append '-Wempty-body'.
11266 * configure: Regenerated.
11267 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11268 body.
11269
11270 2012-11-15 Pierre Muller <muller@sourceware.org>
11271
11272 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11273 * config.in: Regenerate.
11274 * configure: Regenerate.
11275 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11276 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11277 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11278 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11279 header.
11280 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11281 instead of <sys/wait.h> header.
11282 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11283
11284 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11285
11286 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11287 (various make rules): Remove -DGDBSERVER
11288
11289 2012-11-09 Yao Qi <yao@codesourcery.com>
11290
11291 * spu-low.c (current_ptid): Move it to ..
11292 * gdbthread.h: ... here. New.
11293 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11294 * server.c (myresume, process_serial_event): Likewise.
11295 * thread-db.c (thread_db_find_new_threads): Likewise.
11296 * tracepoint.c (run_inferior_command): Likewise.
11297
11298 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11299
11300 * server.c (handle_search_memory_1): Include access length in
11301 warning message.
11302
11303 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11304
11305 * linux-crisv32-low.c: Fix compile errors.
11306
11307 2012-09-04 Yao Qi <yao@codesourcery.com>
11308
11309 * tracepoint.c (cmd_qtsv): Adjust debug message.
11310 Don't check CUR_TPOINT.
11311
11312 2012-08-28 Yao Qi <yao@codesourcery.com>
11313
11314 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11315 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11316 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11317 Remove declarations of xmalloc, xreallloc, xstrdup and
11318 freeargv.
11319 * Makefile.in (libiberty_h): New.
11320 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11321 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11322
11323 2012-08-23 Yao Qi <yao@codesourcery.com>
11324
11325 * server.h: Remove declaration of 'xsnprintf'.
11326
11327 2012-08-22 Keith Seitz <keiths@redhat.com>
11328
11329 * server.h: Include build-gnulib-gbserver/config.h.
11330 * gdbreplay.c: Likewise.
11331
11332 2012-08-08 Doug Evans <dje@google.com>
11333
11334 * Makefile.in (SFILES): Add gdb_vecs.c.
11335 (OBS): Add gdb_vecs.o.
11336 (gdb_vecs_h, host_defs_h): New variables.
11337 (thread-db.o): Add $(gdb_vecs_h) dependency.
11338 (gdb_vecs.o): New rule.
11339 * thread-db.c: #include "gdb_vecs.h".
11340 (thread_db_load_search): Use a vector to iterate over path elements.
11341 Handle text appearing after "$pdir".
11342
11343 * configure.ac: Add check for strstr.
11344 * config.in: Regenerate.
11345 * configure: Regenerate.
11346
11347 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11348
11349 * hostio.c (handle_pread): If pread fails, fall back to attempting
11350 lseek/read.
11351 (handle_pwrite): Likewise for pwrite.
11352
11353 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11354
11355 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11356 between unsupported TYPE and unimplementable ADDR/LEN combination.
11357 (arm_insert_point): Act on new return value.
11358
11359 2012-07-31 Pedro Alves <palves@redhat.com>
11360
11361 * server.c (process_point_options): Only skip tokens if we find
11362 one that is unrecognized. Don't treat 'X' specially while
11363 skipping unrecognized tokens.
11364
11365 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11366
11367 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11368 to 4-byte-align HW breakpoint addresses for Thumb.
11369
11370 2012-07-27 Yao Qi <yao@codesourcery.com>
11371
11372 PR remote/14161.
11373
11374 * server.h: Declare gdb_agent_about_to_close.
11375 * target.c (kill_inferior): Include "agent.h".
11376 New. Send command 'kill'.
11377 * target.h (kill_inferior): Removed macro.
11378 * tracepoint.c (gdb_agent_about_to_close): New.
11379 (gdb_agent_helper_thread): Handle command 'close'.
11380 Wait endlessly until the inferior stops.
11381 Install gdb_agent_remove_socket to atexit hook.
11382 (agent_socket_name): New static variable.
11383 (gdb_agent_socket_init): Replace local variable 'name' with
11384 'agent_socket_name'.
11385 (gdb_agent_remove_socket): New.
11386
11387 2012-07-27 Yao Qi <yao@codesourcery.com>
11388
11389 * server.c (process_point_options): Stop at 'X' when parsing.
11390
11391 2012-07-19 Michael Eager <eager@eagercon.com>
11392
11393 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11394 to hw_execute.
11395 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11396 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11397 hardware breakpoint.
11398
11399 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11400
11401 * gdbserver/linux-low.c (initialize_low): Call
11402 linux_ptrace_init_warnings.
11403
11404 2012-07-02 Doug Evans <dje@google.com>
11405
11406 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11407 pointer to int.
11408
11409 2012-07-02 Stan Shebs <stan@codesourcery.com>
11410
11411 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11412 (ax.o): Add it to build rule.
11413 (ax-ipa.o): Ditto.
11414 (OBS): Add format.o.
11415 (IPA_OBS): Add format.o.
11416 * server.c (handle_query): Claim support for breakpoint commands.
11417 (process_point_options): Add command case.
11418 (process_serial_event): Leave running if there are printfs in
11419 effect.
11420 * mem-break.h (any_persistent_commands): Declare.
11421 (add_breakpoint_commands): Declare.
11422 (gdb_no_commands_at_breakpoint): Declare.
11423 (run_breakpoint_commands): Declare.
11424 * mem-break.c (struct point_command_list): New struct.
11425 (struct breakpoint): New field command_list.
11426 (any_persistent_commands): New function.
11427 (add_commands_to_breakpoint): New function.
11428 (add_breakpoint_commands): New function.
11429 (gdb_no_commands_at_breakpoint): New function.
11430 (run_breakpoint_commands): New function.
11431 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11432 locally.
11433 * ax.c: Include format.h.
11434 (ax_printf): New function.
11435 (gdb_eval_agent_expr): Add printf opcode.
11436
11437 2012-06-13 Yao Qi <yao@codesourcery.com>
11438
11439 * server.c (start_inferior): Remove duplicated writes to fields
11440 'last_resume_kind' and 'last_status' of 'current_inferior'.
11441
11442 2012-06-12 Yao Qi <yao@codesourcery.com>
11443 Pedro Alves <palves@redhat.com>
11444
11445 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11446 comment.
11447 * server.c (handle_v_cont): Extend comment.
11448
11449 2012-06-11 Yao Qi <yao@codesourcery.com>
11450
11451 * linux-low.c (linux_attach): Add 'static'.
11452
11453 2012-06-06 Yao Qi <yao@codesourcery.com>
11454
11455 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11456
11457 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11458
11459 Fix gcc -flto compilation warning.
11460 * server.c (main): Make variable multi_mode and attach volatile.
11461
11462 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11463
11464 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11465 if the platform doesn't know about it.
11466
11467 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11468
11469 * Makefile.in (SFILES): Add linux-tile-low.c.
11470 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11471 * configure.srv: Handle tilegx-*-linux*.
11472 * linux-tile-low.c: New file.
11473
11474 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11475
11476 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11477
11478 2012-05-24 Pedro Alves <palves@redhat.com>
11479
11480 PR gdb/7205
11481
11482 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11483
11484 2012-05-24 Pedro Alves <palves@redhat.com>
11485
11486 PR gdb/7205
11487
11488 Replace target_signal with gdb_signal throughout.
11489
11490 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11491
11492 * linux-low.c (linux_store_registers): Avoid the copying sequence
11493 when no data has been retrieved by ptrace.
11494
11495 2012-05-22 Will Deacon <will.deacon@arm.com>
11496
11497 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11498 Include asm/ptrace.h.
11499 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11500 already defined.
11501
11502 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11503
11504 * linux-low.c (linux_store_registers): Don't re-retrieve data
11505 with ptrace that has already been obtained from /proc. Always
11506 copy any data retrieved with ptrace to the buffer supplied.
11507
11508 2012-05-11 Yao Qi <yao@codesourcery.com>
11509 Pedro Alves <palves@redhat.com>
11510
11511 * linux-low.c (enum stopping_threads_kind): New.
11512 (stopping_threads): Change type to `enum stopping_threads_kind'.
11513 (handle_extended_wait): If stopping and suspending threads, leave
11514 the new_lwp suspended too.
11515 (linux_wait_for_event): Adjust.
11516 (stop_all_lwps): Set `stopping_threads' to
11517 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11518 whether we're suspending threads or just stopping them. Assert no
11519 recursion happens.
11520
11521 2012-04-29 Yao Qi <yao@codesourcery.com>
11522
11523 * server.h: Move some code to ...
11524 * gdbthread.h: ... here. New.
11525 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11526 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11527 (nto-low.o, win32-low.o): Likewise.
11528 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11529 * regcache.c, remote-utils.c, server.c: Likewise.
11530 * target.c, tracepoint.c, win32-low.c: Likewise.
11531
11532 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11533
11534 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11535 (PTRACE_ARG4_TYPE): Likewise.
11536 (PTRACE_XFER_TYPE): Likewise.
11537 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11538 ptrace to PTRACE_ARG3_TYPE.
11539 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11540 (PTRACE_ARG4_TYPE): Likewise.
11541 (PTRACE_XFER_TYPE): Likewise.
11542 (linux_detach_one_lwp): Cast fourth argument of
11543 ptrace to long then PTRACE_ARG4_TYPE.
11544 (regsets_fetch_inferior_registers): Cast third argument of
11545 ptrace to long then PTRACE_ARG3_TYPE.
11546 (regsets_store_inferior_registers): Likewise.
11547
11548 2012-04-20 Pedro Alves <palves@redhat.com>
11549
11550 * configure: Regenerate.
11551
11552 2012-04-19 Pedro Alves <palves@redhat.com>
11553
11554 * Makefile.in (GNULIB_BUILDDIR): New.
11555 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11556 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11557 (all, install-only, uninstall, clean-info, all-lib, clean): No
11558 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11559 (maintainer-clean realclean distclean): Use subdir_do.
11560 (subdir_do): New.
11561 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11562 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11563 * acinclude.m4: Include acx_configure_dir.m4.
11564 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11565 calls. Call AC_PROG_RANLIB. Configure gnulib using
11566 ACX_CONFIGURE_DIR.
11567 (GNULIB): New.
11568 (GNULIB_STDINT_H): Adjust.
11569 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11570 * gdbreplay.c: Include build-gnulib/config.h.
11571 * server.h: Likewise.
11572 * aclocal.m4: Regenerate.
11573 * config.in: Regenerate.
11574 * configure: Regenerate.
11575
11576 2012-04-19 Pedro Alves <palves@redhat.com>
11577
11578 * Makefile.in (LIBGNU, INCGNU): Adjust.
11579 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11580 (all, install-only, uninstall, clean-info, all-lib, clean)
11581 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11582 * configure.ac: Adjust AC_OUTPUT output.
11583 * aclocal.m4: Regenerate.
11584 * configure: Regenerate.
11585
11586 2012-04-19 Pedro Alves <palves@redhat.com>
11587
11588 * Makefile.in (generated_files): New.
11589 (server_h): Remove the explicit dependency on config.h, and depend
11590 on $generated_files.
11591
11592 2012-04-19 Pedro Alves <palves@redhat.com>
11593
11594 * Makefile.in (INCGNU): Add -Ignulib.
11595
11596 2012-04-19 Pedro Alves <palves@redhat.com>
11597
11598 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11599 (INCGNU): ... this, and spell out -I here.
11600 (GNULIB_LIB): Rename to ...
11601 (LIBGNU): ... this.
11602 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11603
11604 2012-04-19 Pedro Alves <palves@redhat.com>
11605
11606 * config.in: Regenerate.
11607
11608 2012-04-19 Pedro Alves <palves@redhat.com>
11609
11610 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11611 * server.h (memmem): Remove declaration.
11612 * config.in: Regenerate.
11613 * configure: Regenerate.
11614
11615 2012-04-19 Yao Qi <yao@codesourcery.com>
11616
11617 * Makefile.in (SFILES): Add common/vec.c.
11618 (OBS): Add vec.o.
11619 (vec.o): New rule.
11620
11621 2012-04-19 Yao Qi <yao@codesourcery.com>
11622
11623 * remote-utils.c (prepare_resume_reply): Replace with macro
11624 target_core_of_thread.
11625 * server.c (handle_qxfer_threads_proper): Likewise.
11626 * target.h (traget_core_of_thread): New macro.
11627
11628 2012-04-18 Pedro Alves <palves@redhat.com>
11629
11630 * aclocal.m4: Regenerate.
11631 * configure: Regenerate.
11632
11633 2012-04-16 Yao Qi <yao@codesourcery.com>
11634
11635 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11636 duplicated on address.
11637
11638 2012-04-16 Yao Qi <yao@codesourcery.com>
11639
11640 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11641 (struct tracepoint_action_ops) <send>: New field.
11642 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11643 (agent_expr_send, x_tracepoint_action_send): New.
11644 (l_tracepoint_action_send): New.
11645 (cmd_qtdp): Download and install tracepoint
11646 according to `use_agent'.
11647 (run_inferior_command): Add one more parameter `len'.
11648 Update callers.
11649 (tracepoint_send_agent): New.
11650 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11651
11652 2012-04-16 Yao Qi <yao@codesourcery.com>
11653
11654 * tracepoint.c (download_tracepoints): Moved to ...
11655 (cmd_qtstart): ... here.
11656
11657 2012-04-14 Yao Qi <yao@codesourcery.com>
11658
11659 * tracepoint.c: Include inttypes.h.
11660 (struct collect_memory_action): Use sized types.
11661 (struct tracepoint): Likewise.
11662 (cmd_qtdp, stop_tracing): Update print specifiers.
11663 (cmd_qtp, response_tracepoint): Likewise.
11664 (collect_data_at_tracepoint): Likewise.
11665 (collect_data_at_step): Likewise.
11666
11667 2012-04-14 Yao Qi <yao@codesourcery.com>
11668
11669 Import gnulib module inttypes.
11670 * aclocal.m4, config.in, configure: Regenerated.
11671
11672 2012-04-14 Yao Qi <yao@codesourcery.com>
11673
11674 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11675 Makefile and config.status at last.
11676
11677 2012-04-13 Yao Qi <yao@codesourcery.com>
11678
11679 * tracepoint.c: Include stdint.h unconditionally.
11680
11681 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11682
11683 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11684 on BFD_HAVE_SYS_PROCFS_TYPE.
11685 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11686 * configure: Regenerate.
11687 * config.in: Likewise.
11688
11689 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11690
11691 * Makefile.in (clean): Also remove x32.c x32-linux.c
11692 x32-avx.c x32-avx-linux.c.
11693 (x32.o): New target.
11694 (x32.c): Likewise.
11695 (x32-linux.o): Likewise.
11696 (x32-linux.c): Likewise.
11697 (x32-avx.o): Likewise.
11698 (x32-avx.c): Likewise.
11699 (x32-avx-linux.o): Likewise.
11700 (x32-avx-linux.c): Likewise.
11701
11702 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11703 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11704 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11705 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11706 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11707 i386/x32-avx-linux.xml.
11708
11709 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11710 (init_registers_x32_avx_linux): Likwise.
11711 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11712 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11713
11714 2012-04-13 Pedro Alves <palves@redhat.com>
11715
11716 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11717 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11718 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11719 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11720 the sub-make.
11721
11722 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11723
11724 * linux-x86-low.c (compat_x32_clock_t): New.
11725 (compat_x32_siginfo_t): Likewise.
11726 (compat_x32_siginfo_from_siginfo): Likewise.
11727 (siginfo_from_compat_x32_siginfo): Likewise.
11728 (linux_is_elf64): Likewise.
11729 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11730 and siginfo_from_compat_x32_siginfo for x32.
11731 (x86_arch_setup): Set linux_is_elf64.
11732
11733 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11734
11735 PR gdb/13969
11736 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11737 e_machine field.
11738 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11739 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11740 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11741 compatible with process.
11742
11743 2012-04-12 Yao Qi <yao@codesourcery.com>
11744
11745 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11746 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11747 (install-only, install-info, clean): Handle sub dir gnulib.
11748 (all-lib, am--refresh): New targets.
11749 (memmem.o): Remove target.
11750 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11751 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11752 (AC_REPLACE_FUNCS): Remove memmem.
11753 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11754 (AC_OUTPUT): Generate Makefile in gnulib/.
11755 * aclocal.m4, config.in, configure: Regenerated.
11756
11757 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11758
11759 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11760
11761 2012-04-05 Pedro Alves <palves@redhat.com>
11762
11763 -Werror=strict-aliasing
11764
11765 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11766 pointer.
11767
11768 2012-04-04 Pedro Alves <palves@redhat.com>
11769
11770 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11771 (sparc_store_gregset_from_stack, sparc_store_gregset)
11772 (sparc_breakpoint_at): Fix formatting.
11773
11774 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11775
11776 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11777 are available.
11778 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11779 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11780 * config.in: Regenerate.
11781 * configure: Likewise.
11782
11783 2012-03-29 Pedro Alves <palves@redhat.com>
11784
11785 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11786 Correct ptrace arguments.
11787
11788 2012-03-28 Pedro Alves <palves@redhat.com>
11789
11790 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11791 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11792 (IA64_FR1_REGNUM): New defines.
11793 (ia64_fetch_register): New.
11794 (the_low_target): Install it.
11795 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11796 field.
11797 * linux-low.c (linux_fetch_registers): Try the
11798 the_low_target.fetch_register hook first.
11799
11800 * linux-arm-low.c (the_low_target): Adjust.
11801 * linux-bfin-low.c (the_low_target): Adjust.
11802 * linux-cris-low.c (the_low_target): Adjust.
11803 * linux-crisv32-low.c (the_low_target): Adjust.
11804 * linux-m32r-low.c (the_low_target): Adjust.
11805 * linux-m68k-low.c (the_low_target): Adjust.
11806 * linux-mips-low.c (the_low_target): Adjust.
11807 * linux-ppc-low.c (the_low_target): Adjust.
11808 * linux-s390-low.c (the_low_target): Adjust.
11809 * linux-sh-low.c (the_low_target): Adjust.
11810 * linux-sparc-low.c (the_low_target): Adjust.
11811 * linux-tic6x-low.c (the_low_target): Adjust.
11812 * linux-x86-low.c (the_low_target): Adjust.
11813 * linux-xtensa-low.c (the_low_target): Adjust.
11814
11815 2012-03-26 Pedro Alves <palves@redhat.com>
11816
11817 * server.c (handle_qxfer_libraries): Don't bail early if
11818 the_target->qxfer_libraries_svr4 is not NULL.
11819
11820 2012-03-26 Pedro Alves <palves@redhat.com>
11821
11822 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11823
11824 2012-03-23 Pedro Alves <palves@redhat.com>
11825
11826 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11827 "library-list-svr4" element's start tag when the the DSO list is
11828 empty.
11829
11830 2012-03-23 Pedro Alves <palves@redhat.com>
11831
11832 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11833 a variable whose type size is the same as the inferior's pointer
11834 size.
11835
11836 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11837
11838 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11839 struct siginfo.
11840 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11841 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11842 * linux-low.h: Include <signal.h>.
11843 (struct siginfo): Remove forward declaration.
11844 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11845 struct siginfo.
11846
11847 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11848
11849 * .gitignore: Ignore more files.
11850
11851 2012-03-19 Pedro Alves <palves@redhat.com>
11852 Jan Kratochvil <jan.kratochvil@redhat.com>
11853
11854 * server.c (cont_thread, general_thread): Add describing comments.
11855 (start_inferior): Clear `cont_thread'.
11856 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11857 of a process.
11858
11859 2012-03-15 Yao Qi <yao@codesourcery.com>
11860
11861 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11862 handling to ...
11863 (cmd_qtdp): ... here.
11864
11865 2012-03-15 Yao Qi <yao@codesourcery.com>
11866
11867 * tracepoint.c (struct tracepoint_action_ops): New.
11868 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11869 (m_tracepoint_action_download): New.
11870 (r_tracepoint_action_download): New.
11871 (x_tracepoint_action_download): New.
11872 (l_tracepoint_action_download): New.
11873 (add_tracepoint_action): Install `action->ops' according type.
11874 (download_tracepoint_1): Move code `download' function pointer
11875 of various tracepoint_action_ops.
11876
11877 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11878
11879 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11880 linux_ptrace_attach_warnings.
11881
11882 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11883
11884 * Makefile.in (linux-ptrace.o): New.
11885 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11886 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11887 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11888 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11889 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11890 of these targets.
11891 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11892
11893 2012-03-08 Yao Qi <yao@codesourcery.com>
11894 Pedro Alves <palves@redhat.com>
11895
11896 Fix PR server/13392.
11897 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11898 offset of JMP insn.
11899 * tracepoint.c (remove_tracepoint): New.
11900 (cmd_qtdp): Call remove_tracepoint when failed to install.
11901
11902 2012-03-07 Pedro Alves <palves@redhat.com>
11903
11904 * linux-low.c (get_detach_signal): New.
11905 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11906 Pass on pending signals to PTRACE_DETACH. Check the result of the
11907 ptrace call.
11908 * server.c (program_signals, program_signals_p): New.
11909 (handle_general_set): Handle QProgramSignals.
11910 * server.h (program_signals, program_signals_p): Declare.
11911
11912 2012-03-05 Pedro Alves <palves@redhat.com>
11913 Jan Kratochvil <jan.kratochvil@redhat.com>
11914
11915 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11916 New comment why.
11917
11918 2012-03-03 Yao Qi <yao@codesourcery.com>
11919
11920 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11921 agent_look_up_symbols.
11922
11923 2012-03-03 Yao Qi <yao@codesourcery.com>
11924
11925 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11926 (linux-x86-low.o): Likewise.
11927 * server.h: Remove in_process_agent_loaded.
11928 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11929 common/agent.c.
11930 Update callers.
11931
11932 2012-03-03 Yao Qi <yao@codesourcery.com>
11933
11934 * tracepoint.c (gdb_agent_capability): New global.
11935 (in_process_agent_loaded_ust): Renamed to
11936 `in_process_agent_supports_ust'.
11937 Update callers.
11938 (in_process_agent_supports_ust): Call agent_capability_check.
11939 (clear_installed_tracepoints): Assert that agent supports
11940 agent.
11941
11942 2012-03-03 Yao Qi <yao@codesourcery.com>
11943
11944 * linux-low.c (linux_supports_agent): New.
11945 (linux_target_ops): Initialize field `supports_agent' with
11946 linux_supports_agent.
11947 * target.h (struct target_ops) <supports_agent>: New.
11948 (target_supports_agent): New macro.
11949 * server.c (handle_general_set): Handle packet 'QAgent'.
11950 (handle_query): Send `QAgent+'.
11951 * Makefile.in (server.o): Depends on agent.h.
11952
11953 2012-03-03 Yao Qi <yao@codesourcery.com>
11954
11955 * Makefile.in (OBS): Add agent.o.
11956 Add new rule for agent.o.
11957 Track dependence of tracepoint.c on agent.h.
11958 * tracepoint.c (run_inferior_command_1):
11959 (run_inferior_command): Call agent_run_command.
11960 (gdb_ust_connect_sync_socket): Deleted. Move it to
11961 common/agent.c.
11962 (resume_thread, stop_thread): Likewise.
11963 (gdb_ust_socket_init): Renamed to ...
11964 (gdb_agent_socket_init): ... New.
11965 (gdb_ust_thread): Renamed to ...
11966 (gdb_agent_helper_thread): ... New.
11967 (gdb_ust_init): Move some code to ...
11968 (gdb_agent_init): ... here. New.
11969 [HAVE_UST]: Call gdb_ust_init.
11970 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11971 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11972 * config.in, configure: Regenerated.
11973
11974 2012-03-02 Pedro Alves <palves@redhat.com>
11975
11976 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11977 * linux-low.c (struct simple_pid_list): New.
11978 (stopped_pids): New a struct simple_pid_list pointer.
11979 (add_to_pid_list, pull_pid_from_list): New.
11980 (handle_extended_wait): Don't assume the first signal new children
11981 report is SIGSTOP. Adjust call to pull_pid_from_list.
11982 (linux_wait_for_lwp): Adjust.
11983
11984 2012-03-02 Yao Qi <yao@codesourcery.com>
11985
11986 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11987 debug log.
11988
11989 2012-03-02 Yao Qi <yao@codesourcery.com>
11990
11991 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11992 `stop_pc' and `tpoint'. Update caller.
11993
11994 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11995
11996 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11997 * linux-low.c (use_linux_regsets): New macro.
11998 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11999 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12000 (linux_register_in_regsets): New function.
12001 (usr_fetch_inferior_registers): Skip registers covered by
12002 regsets.
12003 (usr_store_inferior_registers): Likewise.
12004 (usr_fetch_inferior_registers): New macro.
12005 (usr_store_inferior_registers): Likewise.
12006 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12007 (linux_store_registers): Likewise.
12008 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12009 prototype.
12010 (init_registers_mips64_dsp_linux): Likewise.
12011 (init_registers_mips_linux): New macro.
12012 (init_registers_mips_dsp_linux): Likewise.
12013 (mips_dsp_num_regs): Likewise.
12014 (DSP_BASE, DSP_CONTROL): New fallback macros.
12015 (mips_base_regs): New macro.
12016 (mips_regmap): Use it. Fix the size.
12017 (mips_dsp_regmap): New variable.
12018 (mips_dsp_regset_bitmap): Likewise.
12019 (mips_arch_setup): New function.
12020 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12021 than mips_regmap.
12022 (mips_cannot_store_register): Likewise.
12023 (the_low_target): Update .arch_setup, .num_regs and .regmap
12024 initializers. Add .regset_bitmap initializer.
12025 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12026 initializer.
12027 * linux-bfin-low.c (the_low_target): Likewise.
12028 * linux-cris-low.c (the_low_target): Likewise.
12029 * linux-crisv32-low.c (the_low_target): Likewise.
12030 * linux-ia64-low.c (the_low_target): Likewise.
12031 * linux-m32r-low.c (the_low_target): Likewise.
12032 * linux-m68k-low.c (the_low_target): Likewise.
12033 * linux-ppc-low.c (the_low_target): Likewise.
12034 * linux-s390-low.c (the_low_target): Likewise.
12035 * linux-sh-low.c (the_low_target): Likewise.
12036 * linux-sparc-low.c (the_low_target): Likewise.
12037 * linux-tic6x-low.c (the_low_target): Likewise.
12038 * linux-x86-low.c (the_low_target): Likewise.
12039 * linux-xtensa-low.c (the_low_target): Likewise.
12040 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12041 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12042 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12043 srv_xmlfiles.
12044 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12045 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12046
12047 2012-02-29 Yao Qi <yao@codesourcery.com>
12048 Pedro Alves <palves@redhat.com>
12049
12050 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12051 `step_over_finished' is true.
12052
12053 2012-02-27 Pedro Alves <palves@redhat.com>
12054
12055 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12056 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12057
12058 2012-02-27 Pedro Alves <palves@redhat.com>
12059
12060 PR server/9684
12061 * linux-low.c (pid_is_stopped): New.
12062 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12063
12064 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12065
12066 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12067 of conditions.
12068
12069 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12070
12071 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12072
12073 2012-02-24 Luis Machado <lgustavo@codesourcery>
12074
12075 * server.c (handle_query): Advertise support for target-side
12076 breakpoint condition evaluation.
12077 (process_point_options): New function.
12078 (process_serial_event): When inserting a breakpoint, check for
12079 a target-side condition that should be evaluated.
12080
12081 * mem-break.c: Include regcache.h and ax.h.
12082 (point_cond_list_t): New data structure.
12083 (breakpoint) <cond_list>: New field.
12084 (find_gdb_breakpoint_at): Make non-static.
12085 (delete_gdb_breakpoint_at): Clear any target-side
12086 conditions.
12087 (clear_gdb_breakpoint_conditions): New function.
12088 (add_condition_to_breakpoint): Likewise.
12089 (add_breakpoint_condition): Likewise.
12090 (gdb_condition_true_at_breakpoint): Likewise.
12091 (gdb_breakpoint_here): Return result directly instead
12092 of going through a local variable.
12093
12094 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12095 (clear_gdb_breakpoint_conditions): Likewise.
12096 (add_breakpoint_condition): Likewise.
12097 (gdb_condition_true_at_breakpoint): Likewise.
12098
12099 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12100 (need_step_over_p): Take target-side breakpoint condition into
12101 consideration.
12102
12103 2012-02-24 Luis Machado <lgustavo@codesourcery>
12104
12105 * server.h: Include tracepoint.h.
12106 (agent_mem_read, agent_get_trace_state_variable_value,
12107 agent_set_trace_state_variable_value,
12108 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12109 get_set_tsv_func_addr): New prototypes.
12110
12111 * ax.h: New include file.
12112 * ax.c: New source file.
12113
12114 * tracepoint.c: Include ax.h.
12115 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12116 agent_expr, eval_result_type): Move to ax.h.
12117 (parse_agent_expr): Rename to ...
12118 (gdb_parse_agent_expr): ... this, make it non-static and move
12119 to ax.h.
12120 (unparse_agent_expr) Rename to ...
12121 (gdb_unparse_agent_expr): ... this, make it non-static and move
12122 to ax.h.
12123 (eval_agent_expr): Rename to ...
12124 (eval_tracepoint_agent_expr): ... this.
12125 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12126 forward declarations.
12127 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12128 (agent_get_trace_state_variable_value): New function.
12129 (agent_set_trace_state_variable_value): New function.
12130 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12131 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12132 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12133 (condition_true_at_tracepoint): Likewise.
12134 (parse_agent_expr): Rename to ...
12135 (gdb_parse_agent_expr): ... this and move to ax.c.
12136 (unparse_agent_expr): Rename to ...
12137 (gdb_unparse_agent_expr): ... this and move to ax.c.
12138 (gdb_agent_op_name): Move to ax.c.
12139 (eval_agent_expr): Rename to ...
12140 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12141 and move to ax.c.
12142 (eval_tracepoint_agent_expr): New function.
12143 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12144 non-static.
12145 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12146 ax.c.
12147 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12148 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12149 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12150 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12151 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12152 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12153 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12154 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12155 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12156 (compile_bytecodes): Remove forward declaration.
12157 (is_goto_target): Move to ax.c.
12158 (compile_bytecodes): Move to ax.c and call
12159 agent_get_trace_state_variable_value (...) and
12160 agent_set_trace_state_variable_value (...).
12161
12162 * Makefile.in: Update ax.c and IPA dependencies.
12163
12164 2012-02-24 Pedro Alves <palves@redhat.com>
12165
12166 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12167 (cmd_bigqtbuffer_circular): ... this. Only handle
12168 'QTBuffer:circular:'.
12169 (handle_tracepoint_general_set): Adjust.
12170
12171 2012-02-16 Yao Qi <yao@codesourcery.com>
12172
12173 * inferiors.c: Move code to ...
12174 * dll.c: .... here. New.
12175 * server.h: Declare clear_dlls.
12176 * Makefile.in (SFILES): Add dll.c.
12177 (OBS): Add dll.o
12178 (dll.o): New rule.
12179
12180 2012-02-11 Yao Qi <yao@codesourcery.com>
12181
12182 * server.c: (handle_monitor_command): Add a new parameter
12183 `own_buf'.
12184 (handle_query): Update caller.
12185
12186 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12187
12188 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12189 * configure, config.in: Regenerate.
12190 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12191 is not defined.
12192
12193 2012-02-02 Pedro Alves <palves@redhat.com>
12194
12195 Try SIGKILL first, then PTRACE_KILL.
12196 * linux-low.c (linux_kill_one_lwp): New.
12197 (linux_kill_one_lwp): Rename to ...
12198 (kill_one_lwp_callback): ... this. Use the new
12199 linux_kill_one_lwp.
12200
12201 2012-02-02 Pedro Alves <palves@redhat.com>
12202
12203 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12204 inferior.
12205
12206 2012-01-27 Pedro Alves <palves@redhat.com>
12207
12208 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12209 (elf_64_file_p): Make static.
12210 (linux_pid_exe_is_elf_64_file): New.
12211 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12212 Delete declarations.
12213 (linux_pid_exe_is_elf_64_file): Declare.
12214 * linux-x86-low.c (x86_arch_setup): Use
12215 linux_pid_exe_is_elf_64_file.
12216
12217 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12218
12219 * linux-low.c (linux_wait_for_event_1): Rename to ...
12220 (linux_wait_for_event): ... here and merge it with former
12221 linux_wait_for_event - new variable wait_ptid, use it.
12222 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12223
12224 2012-01-23 Pedro Alves <palves@redhat.com>
12225
12226 * server.c (main): Avoid yet another case of infinite loop while
12227 detaching/killing after a longjmp.
12228
12229 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12230
12231 Code cleanup.
12232 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12233
12234 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12235
12236 * hostio.c (handle_readlink): New function.
12237 (handle_vFile): Call it to handle "vFile:readlink" packets.
12238
12239 2012-01-20 Pedro Alves <palves@redhat.com>
12240 Ulrich Weigand <ulrich.weigand@linaro.org>
12241
12242 * server.c (handle_v_requests): Only support vAttach and vRun to
12243 start multiple processes when in extended protocol mode.
12244
12245 2012-01-17 Pedro Alves <palves@redhat.com>
12246
12247 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12248 memalign plus mprotect to allocate the scratch buffer.
12249
12250 2012-01-13 Pedro Alves <palves@redhat.com>
12251
12252 * server.c (attach_inferior): Clear `cont_thread'.
12253
12254 2012-01-13 Pedro Alves <palves@redhat.com>
12255
12256 * server.c (main): Avoid infinite loop while detaching/killing
12257 after a longjmp.
12258
12259 2012-01-09 Doug Evans <dje@google.com>
12260
12261 * server.c (start_inferior): Set last_ptid in --wrapper case.
12262
12263 2012-01-06 Yao Qi <yao@codesourcery.com>
12264
12265 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12266 defined.
12267 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12268
12269 2012-01-04 Yao Qi <yao@codesourcery.com>
12270
12271 * tracepoint.c (cmd_qtdp): Print debug message
12272 for static tracepoint.
12273
12274 2012-01-04 Yao Qi <yao@codesourcery.com>
12275
12276 * tracepoint.c (trace_vdebug): Differentiate debug message
12277 between gdbserver and IPA.
12278
12279 2012-01-03 Yao Qi <yao@codesourcery.com>
12280
12281 * tracepoint.c (tracepoint_was_hit): Don't collect for
12282 static tracepoint.
12283
12284 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12285
12286 * terminal.h: Reformat copyright header.
12287
12288 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12289
12290 * server.c (gdbserver_version): Update copyright year.
12291 * gdbreplay.c (gdbreplay_version): Likewise.
12292
12293 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12294
12295 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12296
12297 Revert:
12298 2011-12-18 Hui Zhu <teawater@gmail.com>
12299 * linux-low.c (linux_create_inferior): Save return value to ret.
12300
12301 2011-12-18 Hui Zhu <teawater@gmail.com>
12302
12303 * linux-low.c (linux_create_inferior): Save return value to ret.
12304
12305 2011-12-16 Doug Evans <dje@google.com>
12306
12307 * linux-low.c (linux_create_inferior): If stdio connection,
12308 redirect stdin from /dev/null, stdout to stderr.
12309 * remote-utils.c (remote_is_stdio): New static global.
12310 (remote_connection_is_stdio): New function.
12311 (remote_prepare): Handle stdio connection.
12312 (remote_open): Ditto.
12313 (remote_close): Don't close stdin for stdio connections.
12314 (read_prim,write_prim): New functions. Replace all calls to
12315 read/write to these.
12316 * server.c (main): Watch for "-" argument. Move call to
12317 remote_prepare before start_inferior.
12318 * server.h (STDIO_CONNECTION_NAME): New macro.
12319 (remote_connection_is_stdio): Declare.
12320
12321 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12322 in debugging output.
12323
12324 2011-12-15 Yao Qi <yao@codesourcery.com>
12325
12326 * tracepoint.c: Include sys/syscall.h.
12327 (gdb_ust_thread): Remove preprocessor conditional.
12328
12329 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12330
12331 * linux-low.c (linux_detach_one_lwp): Call
12332 the_low_target.prepare_to_resume before detaching.
12333
12334 2011-12-14 Yao Qi <yao@codesourcery.com>
12335
12336 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12337 of write.
12338
12339 2011-12-14 Yao Qi <yao@codesourcery.com>
12340
12341 * i386-low.c (i386_low_stopped_data_address): Initialize local
12342 variable `control'.
12343
12344 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12345
12346 PR remote/13492
12347
12348 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12349 DR_CONTROL unless necessary. Extend comments.
12350 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12351 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12352
12353 2011-12-13 Yao Qi <yao@codesourcery.com>
12354
12355 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12356 macros.
12357 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12358
12359 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12360
12361 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12362 Print new debug message for such case.
12363
12364 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12365
12366 Fix overlapping memcpy.
12367 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12368 the read_inferior_memory transfer.
12369 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12370 write_inferior_memory transfer.
12371 (set_fast_tracepoint_jump): New variable buf. Use it for the
12372 read_inferior_memory and write_inferior_memory transfers.
12373 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12374 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12375 Use it for the write_inferior_memory transfer.
12376 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12377 buffers.
12378
12379 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12380
12381 * linux-low.c (fetch_register, store_register): Make code
12382 consistent, fix formatting.
12383
12384 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12385
12386 * linux-low.c (usr_store_inferior_registers): Factor out code
12387 to handle individual registers into...
12388 (store_register): ... this new function.
12389
12390 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12391
12392 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12393 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12394 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12395 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12396 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12397 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12398 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12399 (srv_xmlfiles): Add new XML files.
12400
12401 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12402 and <sys/uio.h>.
12403 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12404 (init_registers_s390_linux32v1): Add prototype.
12405 (init_registers_s390_linux32v2): Likewise.
12406 (init_registers_s390_linux64v1): Likewise.
12407 (init_registers_s390_linux64v2): Likewise.
12408 (init_registers_s390x_linux64v1): Likewise.
12409 (init_registers_s390x_linux64v2): Likewise.
12410 (s390_num_regs): Increment to 52.
12411 (s390_regmap): Add orig_r2 register.
12412 (s390_num_regs_3264): Increment to 68.
12413 (s390_regmap_3264): Add orig_r2 register.
12414 (s390_collect_ptrace_register): Handle orig_r2 register.
12415 (s390_supply_ptrace_register): Likewise.
12416 (s390_fill_last_break): New function.
12417 (s390_store_last_break): Likewise.
12418 (s390_fill_system_call): New function.
12419 (s390_store_system_call): Likewise.
12420 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12421 register sets.
12422 (s390_check_regset): New function.
12423 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12424 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12425 Update target_regsets for available register sets.
12426
12427 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12428 Jan Kratochvil <jan.kratochvil@redhat.com>
12429
12430 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12431 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12432 New.
12433 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12434 * linux-low.h (struct process_info_private): New member r_debug.
12435 * server.c (handle_qxfer_libraries): Call
12436 the_target->qxfer_libraries_svr4.
12437 (handle_qxfer_libraries_svr4): New function.
12438 (qxfer_packets): New entry "libraries-svr4".
12439 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12440 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12441 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12442 PACKET_qXfer_libraries_svr4.
12443
12444 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12445
12446 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12447 PSW address/mask between 8-byte and 16-byte formats.
12448 (s390_supply_ptrace_register): Likewise.
12449 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12450 basic addressing mode bit.
12451
12452 2011-11-24 Stan Shebs <stan@codesourcery.com>
12453
12454 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12455
12456 2011-11-17 Stan Shebs <stan@codesourcery.com>
12457
12458 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12459 (tracing_start_time): New global.
12460 (tracing_stop_time): New global.
12461 (tracing_user_name): New global.
12462 (tracing_notes): New global.
12463 (tracing_stop_note): New global.
12464 (cmd_qtstart): Set traceframe_usage, start_time.
12465 (stop_tracing): Set stop_time.
12466 (cmd_qtstatus): Report additional status.
12467 (cmd_qtp): New function.
12468 (handle_tracepoint_query): Call it.
12469 (cmd_qtnotes): New function.
12470 (handle_tracepoint_general_set): Call it.
12471 (get_timestamp): Rename from tsv_get_timestamp.
12472
12473 2011-11-14 Stan Shebs <stan@codesourcery.com>
12474 Kwok Cheung Yeung <kcy@codesourcery.com>
12475
12476 * linux-x86-low.c (small_jump_insn): New.
12477 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12478 trampoline and error message, build a trampoline and issue a small
12479 jump instruction to it.
12480 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12481 trampoline and error message.
12482 (x86_get_min_fast_tracepoint_insn_len): New.
12483 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12484 * linux-low.h (struct linux_target_ops): Add arguments to
12485 install_fast_tracepoint_jump_pad operation, add new operation.
12486 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12487 arguments.
12488 (linux_get_min_fast_tracepoint_insn_len): New function.
12489 (linux_target_op): Add new operation.
12490 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12491 (gdb_trampoline_buffer_end): Ditto.
12492 (gdb_trampoline_buffer_error): Ditto.
12493 (struct ipa_sym_addresses): Add fields for new IPA variables.
12494 (symbol_list): Add entries for new IPA variables.
12495 (struct tracepoint): Add fields to hold the address range of the
12496 trampoline used by the tracepoint.
12497 (trampoline_buffer_head): New static variable.
12498 (trampoline_buffer_tail): Ditto.
12499 (claim_trampoline_space): New function.
12500 (have_fast_tracepoint_trampoline_buffer): New function.
12501 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12502 structure.
12503 (install_fast_tracepoint): Ditto, also add error buffer argument.
12504 (cmd_qtminftpilen): New function.
12505 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12506 (fast_tracepoint_from_trampoline_address): New function.
12507 (fast_tracepoint_collecting): Handle trampoline as part of jump
12508 pad space.
12509 (set_trampoline_buffer_space): New function.
12510 (initialize_tracepoint): Initialize new IPA variables.
12511 * target.h (struct target_ops): Add arguments to
12512 install_fast_tracepoint_jump_pad operation, add new
12513 get_min_fast_tracepoint_insn_len operation.
12514 (target_get_min_fast_tracepoint_insn_len): New.
12515 (install_fast_tracepoint_jump_pad): Add arguments.
12516 * server.h (IPA_BUFSIZ): Define.
12517 * linux-i386-ipa.c: Include extra header files.
12518 (initialize_fast_tracepoint_trampoline_buffer): New function.
12519 (initialize_low_tracepoint): Call it.
12520 * server.h (set_trampoline_buffer_space): Declare.
12521 (claim_trampoline_space): Ditto.
12522 (have_fast_tracepoint_trampoline_buffer): Ditto.
12523
12524 2011-11-14 Yao Qi <yao@codesourcery.com>
12525
12526 * server.c (handle_query): Handle InstallInTrace for qSupported.
12527 * tracepoint.c (add_tracepoint): Sort list.
12528 (install_tracepoint, download_tracepoint): New.
12529 (cmd_qtdp): Call them to install and download tracepoints.
12530 (sort_tracepoints): Removed.
12531 (cmd_qtstart): Update.
12532
12533 2011-11-14 Yao Qi <yao@codesourcery.com>
12534
12535 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12536 * mem-break.h: Declare.
12537 * tracepoint.c (cmd_qtstart): Move some code to ...
12538 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12539 New.
12540 (download_tracepoints): Move some code to ...
12541 (download_tracepoint_1): ... here. New.
12542
12543 2011-11-08 Yao Qi <yao@codesourcery.com>
12544
12545 * remote-utils.c (relocate_instruction): A comment fix.
12546
12547 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12548
12549 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12550 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12551 dr_status_mirror and dr_control_mirror from debug_reg_state.
12552 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12553 (i386_initial_stuff): Remove use of deleted globals.
12554 (i386_get_thread_context, i386_set_thread_context,
12555 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12556 from debug_reg_state.
12557
12558 2011-11-05 Yao Qi <yao@codesourcery.com>
12559
12560 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12561 address as TPOINT's.
12562
12563 2011-11-02 Stan Shebs <stan@codesourcery.com>
12564
12565 * tracepoint.c (agent_mem_read_string): New function.
12566 (eval_agent_expr): Call it for tracenz.
12567 * server.c (handle_query): Report support for tracenz.
12568
12569 2011-11-02 Yao Qi <yao@codesourcery.com>
12570
12571 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12572
12573 2011-11-02 Yao Qi <yao@codesourcery.com>
12574
12575 * target.h: Fix a typo in comment.
12576
12577 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12578
12579 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12580 clobber the breakpoints' shadows with fast tracepoint jumps.
12581 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12582 * target.c (write_inferior_memory): Also pass MYADDR down to
12583 check_mem_write.
12584
12585 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12586
12587 * configure.ac: Check support for personality routine.
12588 * configure: Regenerate.
12589 * config.in: Likewise.
12590 * linux-low.c: Include <sys/personality.h>.
12591 Define ADDR_NO_RANDOMIZE if necessary.
12592 (linux_create_inferior): Disable address space randomization when
12593 forking inferior, if requested.
12594 (linux_supports_disable_randomization): New function.
12595 (linux_target_ops): Install it.
12596 * server.h (disable_randomization): Declare.
12597 * server.c (disable_randomization): New global variable.
12598 (handle_general_set): Handle QDisableRandomization.
12599 (handle_query): Likewise for qSupported.
12600 (main): Support --disable-randomization and --no-disable-randomization
12601 command line arguments.
12602 * target.h (struct target_ops): Add supports_disable_randomization.
12603 (target_supports_disable_randomization): New macro.
12604
12605 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12606
12607 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12608 ifdef check.
12609 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12610 [!PT_GETDSBT] (target_loadmap): New definition.
12611 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12612 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12613 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12614 and PT_GETDSBT to LINUX_LOADMAP.
12615 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12616 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12617
12618 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12619
12620 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12621 (arm_linux_hwbp_cap): New static variable.
12622 (arm_linux_get_hwbp_cap): Replace by ...
12623 (arm_linux_init_hwbp_cap): ... this new function.
12624 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12625 (arm_linux_get_hw_watchpoint_count): Likewise.
12626 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12627 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12628 (arm_prepare_to_resume): Use perror_with_name instead of error.
12629
12630 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12631
12632 * linux-arm-low.c: Include <signal.h>.
12633 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12634 (struct arm_linux_hwbp_cap): New data type.
12635 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12636 (struct arm_linux_hw_breakpoint): New data type.
12637 (MAX_BPTS, MAX_WPTS): Define.
12638 (struct arch_process_info, struct arch_lwp_info): New data types.
12639 (arm_linux_get_hwbp_cap): New function.
12640 (arm_linux_get_hw_breakpoint_count): Likewise.
12641 (arm_linux_get_hw_watchpoint_count): Likewise.
12642 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12643 (arm_hwbp_control_initialize): Likewise.
12644 (arm_hwbp_control_is_enabled): Likewise.
12645 (arm_hwbp_control_is_initialized): Likewise.
12646 (arm_hwbp_control_disable): Likewise.
12647 (arm_linux_hw_breakpoint_equal): Likewise.
12648 (arm_linux_hw_point_initialize): Likewise.
12649 (struct update_registers_data): New data structure.
12650 (update_registers_callback: New function.
12651 (arm_insert_point): Likewise.
12652 (arm_remove_point): Likewise.
12653 (arm_stopped_by_watchpoint): Likewise.
12654 (arm_stopped_data_address): Likewise.
12655 (arm_new_process): Likewise.
12656 (arm_new_thread): Likewise.
12657 (arm_prepare_to_resume): Likewise.
12658 (the_low_target): Register arm_insert_point, arm_remove_point,
12659 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12660 arm_new_thread, and arm_prepare_to_resume.
12661
12662 2011-09-15 Stan Shebs <stan@codesourcery.com>
12663
12664 * server.h (struct emit_ops): Add compare-goto fields.
12665 * tracepoint.c (gdb_agent_op_sizes): New table.
12666 (emit_eq_goto): New function.
12667 (emit_ne_goto): New function.
12668 (emit_lt_goto): New function.
12669 (emit_le_goto): New function.
12670 (emit_gt_goto): New function.
12671 (emit_ge_goto): New function.
12672 (is_goto_target): New function.
12673 (compile_bytecodes): Recognize special cases of compare-goto
12674 combinations and call specialized emitters for them.
12675 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12676 (amd64_emit_ne_goto): New function.
12677 (amd64_emit_lt_goto): New function.
12678 (amd64_emit_le_goto): New function.
12679 (amd64_emit_gt_goto): New function.
12680 (amd64_emit_ge_goto): New function.
12681 (amd64_emit_ops): Add the new functions.
12682 (i386_emit_eq_goto): New function.
12683 (i386_emit_ne_goto): New function.
12684 (i386_emit_lt_goto): New function.
12685 (i386_emit_le_goto): New function.
12686 (i386_emit_gt_goto): New function.
12687 (i386_emit_ge_goto): New function.
12688 (i386_emit_ops): Add the new functions.
12689
12690 2011-09-08 Stan Shebs <stan@codesourcery.com>
12691
12692 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12693 (i386_emit_epilogue): Restore %ebx.
12694
12695 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12696
12697 * server.c (step_thread): Remove definition.
12698 (process_serial_event): Don't handle Hs.
12699 * server.h (step_thread): Remove declaration.
12700 * target.c (set_desired_inferior): Remove use of step_thread.
12701
12702 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12703
12704 * linux-low.c: Include linux-procfs.h.
12705 (linux_attach_lwp_1): Update comments.
12706 (linux_attach): Scan for existing threads when attaching to a
12707 process that is the tgid.
12708 * Makefile.in: Update dependencies.
12709
12710 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12711
12712 * configure.srv: Add linux-procfs.o dependencies.
12713
12714 2011-08-14 Yao Qi <yao@codesourcery.com>
12715
12716 * target.h (struct target_ops): Fix indent.
12717 * win32-low.c (win32_target_ops): Fix comment.
12718
12719 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12720 Yao Qi <yao@codesourcery.com>
12721
12722 * Makefile.in (clean): Remove tic6x-*.c files.
12723 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12724 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12725 (tic6x-c64xp-linux.c): Likewise.
12726 * configure.srv: Add support for tic6x-*-uclinux.
12727 * linux-tic6x-low.c: New.
12728 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12729
12730 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12731 Yao Qi <yao@codesourcery.com>
12732
12733 * target.h (struct target_ops): Add read_loadmap.
12734 * linux-low.c (struct target_loadseg): New type.
12735 (struct target_loadmap): New type.
12736 (linux_read_loadmap): New function.
12737 (linux_target_ops): Add linux_read_loadmap.
12738 * server.c (handle_query): Support qXfer:fdpic:read packet.
12739 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12740 to NULL.
12741
12742 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12743
12744 * win32-low.c: Include <stdint.h>.
12745
12746 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12747
12748 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12749 to the inferior here.
12750 (i386_remove_aligned_watchpoint): Ditto.
12751 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12752 fit part of the watchpoint in the debug registers.
12753 (i386_update_inferior_debug_regs): New.
12754 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12755 registers, and only update the inferior on success.
12756 (i386_low_remove_watchpoint): Ditto.
12757
12758 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12759
12760 * linux-low.c (compare_ints, unique, list_threads, show_process,
12761 linux_core_of_thread): Delete.
12762 (linux_target_ops): Change linux_core_of_thread to
12763 linux_common_core_of_thread.
12764 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12765 * utils.c (malloc_failure): Change type of argument.
12766 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12767 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12768 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12769 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12770 (IPA_OBJS): Add common-utils-ipa.o.
12771 (ptid_h, linux_osdata_h): New macros.
12772 (server_h): Add common/common-utils.h, common/xml-utils.h,
12773 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12774 common/ptid.h.
12775 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12776 ptid.o, buffer.o): New rules.
12777 (linux-low.o): Add common/linux-osdata.h as a dependency.
12778 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12779 * configure.ac: Add AC_HEADER_DIRENT check.
12780 * config.in: Regenerate.
12781 * configure: Regenerate.
12782 * remote-utils.c (xml_escape_text): Delete.
12783 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12784 buffer_xml_printf): Move to common/buffer.c.
12785 * server.c (main): Remove call to initialize_inferiors.
12786 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12787 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12788 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12789 internal_error, gdb_assert, gdb_assert_fail): Delete.
12790 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12791 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12792 common/buffer.h.
12793 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12794 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12795 initialize_inferiors): Delete.
12796
12797 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12798
12799 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12800 symbol error.
12801
12802 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12803
12804 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12805 assertion.
12806 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12807
12808 2011-05-26 Yao Qi <yao@codesourcery.com>
12809
12810 * Makefile.in (thread-db.o): Track dependence to
12811 common/gdb_thread_db.h.
12812 * thread-db.c: include gdb_thread_db.h from right place.
12813
12814 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12815
12816 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12817 __FILE__ and __LINE__ to internal_error.
12818
12819 2011-05-13 Doug Evans <dje@google.com>
12820
12821 * thread-db.c (try_thread_db_load_from_sdir): New function.
12822 (try_thread_db_load_from_dir): New function.
12823 (thread_db_load_search): Handle $sdir, ignore $pdir.
12824 Remove trying of system directories if search of
12825 libthread-db-search-path fails, that is now done via $sdir.
12826
12827 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12828
12829 * server.c (handle_query): Add EnableDisableTracepoints to the list
12830 of supported features.
12831 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12832 tracepoints.
12833 (cmd_qtenable_disable): New.
12834 (cmd_qtstart): Install tracepoints even if disabled.
12835 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12836 receiving a QTEnable or QTDisable packet.
12837 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12838 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12839 tracepoints.
12840 (gdb_probe): Skip data collection if static tracepoint is disabled.
12841
12842 2011-05-10 Doug Evans <dje@google.com>
12843
12844 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12845
12846 2011-05-04 Doug Evans <dje@google.com>
12847
12848 * linux-low.c (linux_join): Skip process lookup.
12849 * spu-low.c (spu_join): Ditto.
12850 * server.c (join_inferiors_callback): Delete.
12851 (process_serial_event): For 'D' packet (detach) call join_inferior
12852 directly.
12853
12854 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12855
12856 * README: Don't mention xscale*-*-linux*.
12857 * configure.srv (xscale*-*-linux*): Don't handle target.
12858
12859 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12860
12861 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12862 casting pointers.
12863 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12864 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12865 (i386_emit_void_call_2): Likewise.
12866
12867 2011-04-26 Yao Qi <yao@codesourcery.com>
12868
12869 * linux-low.c: Move common macros to linux-ptrace.h.
12870 Include linux-ptrace.h.
12871 * Makefile.in (linux_ptrace_h): New.
12872 (linux-low.o): Depends on linux-ptrace.h.
12873
12874 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12875
12876 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12877 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12878 (remote_prepare): New function with most of the TCP code from ...
12879 (remote_open): ... here. Detect PORT here unconditionally. Move also
12880 setting transport_is_reliable.
12881 * server.c (run_once): New variable.
12882 (gdbserver_usage): Document it.
12883 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12884 the first run if RUN_ONCE.
12885 * server.h (run_once, remote_prepare): New declarations.
12886
12887 2011-04-19 Tom Tromey <tromey@redhat.com>
12888
12889 * win32-low.c (handle_load_dll): Remove duplicate "the".
12890
12891 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12892
12893 Remove support for old Cygwin 1.5 versions.
12894 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12895 function to avoid warning.
12896 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12897 warning.
12898
12899 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12900
12901 * gdbserver/server.h (Macro _): Define it if not available.
12902
12903 2011-03-14 Michael Snyder <msnyder@vmware.com>
12904
12905 * hostio.c (handle_close): Remove unnecessary null test.
12906
12907 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12908
12909 * Makefile.in (maintainer-clean realclean distclean): Remove
12910 "make ... subdir_do" command.
12911
12912 2011-03-10 Michael Snyder <msnyder@vmware.com>
12913
12914 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12915
12916 * server.c (handle_v_run): Free alloced buffer on early return.
12917
12918 2011-03-09 Yao Qi <yao@codesourcery.com>
12919
12920 Revert:
12921 2011-03-04 Yao Qi <yao@codesourcery.com>
12922
12923 * Makefile.in: Remove GNU make feature --directory.
12924
12925 2011-03-05 Yao Qi <yao@codesourcery.com>
12926
12927 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12928 (subdir_do): New make target. Copied from gdb/Makefile.
12929 (maintainer-clean, realclean, distclean, clean): Call corresponding
12930 make targets in common/Makefile.
12931
12932 2011-02-11 Yao Qi <yao@codesourcery.com>
12933
12934 * configure.ac: Call AC_PROG_RANLIB.
12935 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12936 * configure: Regenerate.
12937
12938 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12939
12940 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12941
12942 2011-03-06 Yao Qi <yao@codesourcery.com>
12943
12944 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12945
12946 2011-03-05 Yao Qi <yao@codesourcery.com>
12947
12948 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12949 (subdir_do): New make target. Copied from gdb/Makefile.
12950 (maintainer-clean, realclean, distclean, clean): Call corresponding
12951 make targets in common/Makefile.
12952
12953 2011-03-04 Yao Qi <yao@codesourcery.com>
12954
12955 * Makefile.in: Remove GNU make feature --directory.
12956
12957 2011-03-04 Michael Snyder <msnyder@vmware.com>
12958
12959 * server.c (queue_stop_reply): Call xmalloc not malloc.
12960
12961 2011-03-02 Michael Snyder <msnyder@vmware.com>
12962
12963 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12964
12965 2011-02-28 Michael Snyder <msnyder@vmware.com>
12966
12967 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12968 (cmd_qtframe): Ditto.
12969 (cmd_qtbuffer): Ditto.
12970 (cmd_bigqtbuffer): Ditto.
12971
12972 * utils.c (decimal2str): Initialize 'width' to nine, then
12973 don't mess with it.
12974
12975 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12976
12977 * hostio.c (require_data): Free *data, not data.
12978
12979 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12980
12981 * hostio.c (require_data): Use free, not xfree.
12982
12983 2011-02-27 Michael Snyder <msnyder@vmware.com>
12984
12985 * server.c (handle_query): Discard unused value.
12986
12987 * hostio.c (require_data): Free malloc memory before returning
12988 error.
12989
12990 2011-02-26 Michael Snyder <msnyder@vmware.com>
12991
12992 * linux-low.c (list_threads): Call closedir for dirent.
12993
12994 2011-02-27 Michael Snyder <msnyder@vmware.com>
12995
12996 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12997 a case statement falls through.
12998
12999 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13000
13001 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13002 in comparison.
13003
13004 2011-02-26 Michael Snyder <msnyder@vmware.com>
13005
13006 * utils.c (decimal2str): Eliminate dead code and dead param.
13007 (pulongest): Drop dead param from call to decimal2str.
13008 (plongest): Ditto.
13009
13010 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13011
13012 Revert the following patch (not approved yet):
13013 2011-02-21 Hui Zhu <teawater@gmail.com>
13014 * tracepoint.c (tp_printf): New function.
13015 (eval_agent_expr): Handle gdb_agent_op_printf.
13016
13017 2011-02-21 Hui Zhu <teawater@gmail.com>
13018
13019 * tracepoint.c (tp_printf): New function.
13020 (eval_agent_expr): Handle gdb_agent_op_printf.
13021
13022 2011-02-18 Tom Tromey <tromey@redhat.com>
13023
13024 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13025 (tracepoint.o): Likewise.
13026 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13027 (gdb_agent_op_names): Likewise.
13028
13029 2011-02-18 Tom Tromey <tromey@redhat.com>
13030
13031 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13032 gdb_agent_op_rot>: New constants.
13033 (gdb_agent_op_names): Add pick and roll.
13034 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13035 cases.
13036
13037 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13038
13039 * aclocal.m4: Regenerated with aclocal-1.11.1.
13040
13041 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13042
13043 * server.c (handle_qxfer_traceframe_info): New.
13044 (qxfer_packets): Register "traceframe-info".
13045 (handle_query): Report support for qXfer:traceframe-info:read+.
13046 * tracepoint.c (match_blocktype): New.
13047 (traceframe_find_block_type): Rename to ...
13048 (traceframe_walk_blocks): ... this. Add callback filter argument,
13049 and use it.
13050 (traceframe_find_block_type): New, reimplemented on top of
13051 traceframe_walk_blocks.
13052 (build_traceframe_info_xml): New.
13053 (traceframe_read_info): New.
13054 * server.h (traceframe_read_info): Declare.
13055
13056 2011-02-11 Yao Qi <yao@codesourcery.com>
13057
13058 * configure.ac: Call AC_PROG_RANLIB.
13059 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13060 * configure: Regenerate.
13061
13062 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13063
13064 * server.c (gdb_read_memory): Change return semantics to allow
13065 partial transfers.
13066 (handle_search_memory_1): Adjust.
13067 (process_serial_event) <'m' packet>: Handle partial transfers.
13068 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13069
13070 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13071
13072 * regcache.c (init_register_cache): Initialize
13073 regcache->register_status.
13074 (free_register_cache): Release regcache->register_status.
13075 (regcache_cpy): Copy register_status.
13076 (registers_to_string): Print 'x's for unavailable registers.
13077 (supply_register): Mark the register's status valid or
13078 unavailable, depending on whether a buffer was passed in or not.
13079 (supply_register_zeroed): New.
13080 (supply_regblock): Mark the registers' status valid or
13081 unavailable, depending on whether a buffer was passed in or not.
13082 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13083 (struct regcache): New `register_status' field.
13084 (supply_register_zeroed): Declare.
13085 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13086 supply_register_zeroed, rather than passing a NULL buffer to
13087 supply_register.
13088 * tracepoint.c (fetch_traceframe_registers): Update comment.
13089
13090 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13091
13092 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13093 buffer explicit.
13094
13095 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13096
13097 * server.h (decode_xfer_write): Change prototype.
13098 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13099 and don't extract the annex here.
13100 * server.c (decode_xfer_read): Remove `annex' parameter,
13101 and don't extract the annex here.
13102 (decode_xfer): New.
13103 (struct qxfer): New.
13104 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13105 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13106 (handle_qxfer_statictrace): New functions, abstracted out from
13107 handle_query, and made to use the struct qxfer interface.
13108 (handle_threads_qxfer_proper): Rename to ...
13109 (handle_qxfer_threads_proper): ... this.
13110 (handle_threads_qxfer): Rename to ...
13111 (handle_qxfer_threads): ... this. Adjust.
13112 (qxfer_packets): New array.
13113 (handle_qxfer): New function.
13114 (handle_query): Use handle_qxfer.
13115
13116 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13117
13118 * gdbreplay.c: Shorten lines of >= 80 columns.
13119 * linux-low.c: Ditto.
13120 * linux-ppc-low.c: Ditto.
13121 * linux-s390-low.c: Ditto.
13122 * linux-sparc-low.c: Ditto.
13123 * linux-x86-low.c: Ditto.
13124 * linux-xtensa-low.c: Ditto.
13125 * mem-break.c: Ditto.
13126 * nto-low.c: Ditto.
13127 * regcache.h: Ditto.
13128 * remote-utils.c: Ditto.
13129 * server.c: Ditto.
13130 * server.h: Ditto.
13131 * thread-db.c: Ditto.
13132 * tracepoint.c: Ditto.
13133 * utils.c: Ditto.
13134 * win32-low.h: Ditto.
13135
13136 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13137
13138 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13139 update.
13140
13141 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13142
13143 * server.c (gdbserver_version): Update copyright year in version
13144 output.
13145 * gdbreplay.c (gdbreplay_version): Ditto.
13146
13147 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13148
13149 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13150 * linux-bfin-low.c: New file.
13151 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13152 PT_DATA_ADDR for BFIN targets.
13153 * Makefile.in (SFILES): Add linux-bfin-low.c.
13154 (clean): Remove reg-bfin.c.
13155 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13156 * README: Mention supported Blackfin targets.
13157
13158 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13159
13160 * .gitignore: New file.
13161
13162 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13163
13164 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13165
13166 2010-10-22 Jie Zhang <jie@codesourcery.com>
13167
13168 * Makefile.in: Add FLAGS_TO_PASS variable.
13169 (install): Remove dependency of install-only and recursively
13170 invoke make for install-only.
13171
13172 2010-10-04 Doug Evans <dje@google.com>
13173
13174 * Makefile.in (uninstall): Use $(DESTDIR).
13175
13176 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13177
13178 PR gdb/11842
13179
13180 * linux-x86-low.c (compat_siginfo_from_siginfo)
13181 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13182 si_code is < 0. Check for si_code == SI_TIMER before checking for
13183 si_code < 0.
13184
13185 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13186
13187 * lynx-i386-low.c: New file.
13188 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13189
13190 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13191
13192 * lynx-low.c (ptrace_request_to_str): Remove handling for
13193 request values that have been removed in LynxOS 5.x.
13194
13195 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13196
13197 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13198 <ptrace.h>
13199
13200 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13201
13202 * configure.ac: Add --enable-inprocess-agent option.
13203 * configure: Rebuilt.
13204
13205 2010-09-06 Yao Qi <yao@codesourcery.com>
13206
13207 * linux-low.c (linux_kill): Remove unused variable.
13208 (linux_stabilize_threads): Likewise.
13209 * server.c (start_inferior): Likewise.
13210 (queue_stop_reply_callback): Likewise.
13211 * tracepoint.c (do_action_at_tracepoint): Likewise.
13212
13213 2010-09-06 Yao Qi <yao@codesourcery.com>
13214
13215 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13216 on return.
13217
13218 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13219
13220 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13221
13222 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13223
13224 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13225 "$(IPA_DEPFILES)".
13226
13227 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13228
13229 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13230 gdbserver/lynx-ppc-low.c: New files.
13231 * Makefile.in (lynx_low_h): New variable.
13232 (lynx-low.o, lynx-ppc-low.o): New rules.
13233 * configure.ac: On LynxOS, link with -lnetinet.
13234 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13235 * configure: regenerate.
13236
13237 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13238
13239 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13240 * configure.ac: Add check for vasprintf and vsnprintf.
13241 * configure, config.in: Regenerate.
13242 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13243
13244 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13245
13246 * gdbreplay.c: Move include of alloca.h up, next to include of
13247 malloc.h.
13248 * server.h: Add include of malloc.h.
13249 * mem-break.c: Remove include of malloc.h.
13250 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13251
13252 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13253
13254 * Makefile.in (memmem.o): Build with -Wno-error.
13255
13256 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13257
13258 * utils.c (xsnprintf): Make non-static.
13259 * server.h: Add xsnprintf declaration.
13260 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13261 replace calls to snprintf by calls to xsnprintf throughout.
13262
13263 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13264
13265 * configure.ac: Add configure check for alloca.
13266 * configure, config.in: Regenerate.
13267 * server.h: Include alloca.h if it exists.
13268 * gdbreplay.c: Include alloca.h if it exists.
13269
13270 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13271
13272 * linux-low.c (__SIGRTMIN): Define if not already defined.
13273 (linux_create_inferior): Check for __ANDROID__ rather than
13274 __SIGRTMIN.
13275 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13276 are already deferred.
13277 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13278 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13279 stopped and already has a pending signal to report.
13280 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13281 a pending signal to report or is moving out of a jump pad.
13282 (linux_init_signals): Check for __ANDROID__ rather than
13283 __SIGRTMIN.
13284
13285 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13286
13287 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13288 debug_threads check. Avoid a linear search when not doing debug
13289 output.
13290
13291 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13292
13293 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13294 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13295 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13296 (process_event): Change local fd's type to gdb_fildes_t.
13297 (create_file_handler): Adjust prototype.
13298 (delete_file_handler): Adjust prototype.
13299 (handle_file_event): Adjust prototype. Use pfildes.
13300 (create_file_event): Adjsut prototype.
13301 * remote-utils.c (remote_desc, listen_desc): Change type to
13302 gdb_fildes_t.
13303 * server.h: New gdb_fildes_t typedef.
13304 [USE_WIN32API]: Include winsock2.h.
13305 (delete_file_handler, add_file_handler): Adjust prototypes.
13306 (pfildes): Declare.
13307 * utils.c (pfildes): New.
13308
13309 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13310
13311 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13312 * configure: Regenerate.
13313
13314 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13315
13316 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13317 (linux_done_accessing_memory): ... this.
13318 (linux_target_ops): Adjust.
13319 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13320 * nto-low.c (nto_target_ops): Adjust comment.
13321 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13322 * spu-low.c (spu_target_ops): Adjust comment.
13323 * target.h (target_ops): Rename unprepare_to_access_memory field
13324 to done_accessing_memory.
13325 (unprepare_to_access_memory): Rename to ...
13326 (done_accessing_memory): ... this.
13327
13328 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13329
13330 * linux-low.c (linux_prepare_to_access_memory): New.
13331 (linux_unprepare_to_access_memory): New.
13332 (linux_target_ops): Install them.
13333 * server.c (read_memory): Rename to ...
13334 (gdb_read_memory): ... this. Use
13335 prepare_to_access_memory/prepare_to_access_memory.
13336 (write_memory): Rename to ...
13337 (gdb_write_memory): ... this. Use
13338 prepare_to_access_memory/prepare_to_access_memory.
13339 (handle_search_memory_1): Adjust.
13340 (process_serial_event): Adjust.
13341 * target.h (struct target_ops): New fields
13342 prepare_to_access_memory and unprepare_to_access_memory.
13343 (prepare_to_access_memory, unprepare_to_access_memory): New.
13344 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13345 prepare_to_access_memory/prepare_to_access_memory.
13346 * nto-low.c (nto_target_ops): Adjust.
13347 * spu-low.c (spu_target_ops): Adjust.
13348 * win32-low.c (win32_target_ops): Adjust.
13349
13350 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13351
13352 * Makefile.in (WARN_CFLAGS): Get it from configure.
13353 (WERROR_CFLAGS): New.
13354 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13355 * configure.ac: Introduce --enable-werror, which adds -Werror to
13356 the compiler command line. Enabled by default. Disable with
13357 --disable-werror. Add -Wdeclaration-after-statement
13358 Wpointer-arith and -Wformat-nonliteral to warning flags.
13359 * configure: Regenerate.
13360
13361 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13362
13363 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13364
13365 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13366
13367 * gdbreplay.c (remote_error): New.
13368 (gdbchar): New.
13369 (expect): Use gdbchar. Check for error reading from GDB.
13370 Clarify sync error output.
13371 (play): Check for errors writing to GDB.
13372 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13373 * remote-utils.c (getpkt): Check for errors writing to the remote
13374 descriptor.
13375
13376 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13377
13378 * linux-low.c (linux_wait_1): Move non-debugging code out of
13379 `debug_threads' control.
13380
13381 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13382
13383 * linux-low.c (linux_wait_1): Don't set last_status here.
13384 * server.c (push_event, queue_stop_reply_callback): Assert we're
13385 not pushing a TARGET_WAITKIND_IGNORE event.
13386 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13387 (myresume, handle_target_event): Set the thread's last_resume_kind
13388 and last_status from the target returned status.
13389
13390 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13391
13392 PR threads/10729
13393
13394 * linux-x86-low.c (update_debug_registers_callback): New.
13395 (i386_dr_low_set_addr): Use it.
13396 (i386_dr_low_get_addr): New.
13397 (i386_dr_low_set_control): Use update_debug_registers_callback.
13398 (i386_dr_low_get_control): New.
13399 (i386_dr_low_get_status): Adjust.
13400 * linux-low.c (linux_stop_lwp): New.
13401 * linux-low.h (linux_stop_lwp): Declare.
13402
13403 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13404 argument instead of a i386_debug_reg_state.
13405 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13406 a i386_debug_reg_state.
13407 (i386_insert_aligned_watchpoint): Adjust.
13408 (i386_remove_aligned_watchpoint): Adjust.
13409 (i386_low_stopped_data_address): Read the debug registers from the
13410 inferior instead of from the mirrors.
13411 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13412 (i386_dr_low_get_addr): Declare.
13413 (i386_dr_low_get_control): Declare.
13414 (i386_dr_low_get_status): Change prototype.
13415
13416 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13417 (i386_dr_low_get_addr): New.
13418 (i386_dr_low_get_control): New.
13419 (i386_dr_low_get_status): Adjust prototype. Return
13420 dr_status_mirror.
13421 (i386_initial_stuff): Clear dr_status_mirror and
13422 dr_control_mirror.
13423 (i386_get_thread_context): Adjust.
13424 (i386_set_thread_context): Adjust.
13425 (i386_thread_added): Adjust.
13426
13427 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13428
13429 * linux-low.h (linux_thread_area): Delete declaration.
13430
13431 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13432
13433 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13434 after its termination.
13435
13436 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13437
13438 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13439 (gdb_wants_all_stopped): Delete.
13440 (linux_wait_1): Don't call them.
13441 * server.c (handle_v_cont): Tag all threads as want-stopped.
13442 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13443 stopped as "client-wants-stopped".
13444
13445 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13446
13447 * Makefile.in (signals_h): New.
13448 (server_h): Depend on it.
13449 (server.o): Don't depend on $(signals_def).
13450 (signals.o): Depend on $(signals_def).
13451
13452 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13453
13454 * Makefile.in (signals_def): New.
13455 (server_h): Append include/gdb/signals.h and signals_def.
13456 (server.o): Append signals_def.
13457
13458 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13459
13460 * server.c (handle_target_event): Use target_signal_to_host for
13461 resume_info.sig initialization.
13462 * target.h (struct thread_resume) <sig>: New comment.
13463
13464 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13465
13466 * server.c (handle_query): strcpy() the returned string from paddress()
13467 instead of sprintf().
13468 * utils.c (paddress): Return phex_nz().
13469
13470 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13471
13472 * server.c (handle_v_cont): Call mourn_inferior if process
13473 just exited.
13474 (myresume): Likewise.
13475
13476 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13477
13478 Static tracepoints, and integration with UST.
13479
13480 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13481 * mem-break.c (uninsert_all_breakpoints)
13482 (reinsert_all_breakpoints): New.
13483 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13484 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13485 (gdb_agent_ust_loaded, helper_thread_id)
13486 (gdb_agent_helper_thread_id): New macros.
13487 (struct ipa_sym_addresses): Add addr_ust_loaded,
13488 addr_helper_thread_id, addr_cmd_buf.
13489 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13490 (in_process_agent_loaded_ust): New.
13491 (write_e_ust_not_loaded): New.
13492 (maybe_write_ipa_ust_not_loaded): New.
13493 (struct collect_static_trace_data_action): New.
13494 (enum tracepoint_type) <static_tracepoint>: New.
13495 (struct tracepoint) <handle>: Mention static tracepoints.
13496 (struct static_tracepoint_ctx): New.
13497 (CMD_BUF_SIZE): New.
13498 (add_tracepoint_action): Handle static tracepoint actions.
13499 (unprobe_marker_at): New.
13500 (clear_installed_tracepoints): Handle static tracepoints.
13501 (cmd_qtdp): Handle static tracepoints.
13502 (probe_marker_at): New.
13503 (cmd_qtstart): Handle static tracepoints.
13504 (response_tracepoint): Handle static tracepoints.
13505 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13506 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13507 (get_context_regcache): Handle static tracepoints.
13508 (do_action_at_tracepoint): Handle static tracepoint actions.
13509 (traceframe_find_block_type): Handle static trace data blocks.
13510 (traceframe_read_sdata): New.
13511 (download_tracepoints): Download static tracepoint actions.
13512 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13513 (GDB_PROBE_NAME): New.
13514 (ust_ops): New.
13515 (GET_UST_SYM): New.
13516 (USTF): New.
13517 (dlsym_ust): New.
13518 (ust_marker_to_static_tracepoint): New.
13519 (gdb_probe): New.
13520 (collect_ust_data_at_tracepoint): New.
13521 (gdb_ust_probe): New.
13522 (UNIX_PATH_MAX, SOCK_DIR): New.
13523 (gdb_ust_connect_sync_socket): New.
13524 (resume_thread, stop_thread): New.
13525 (run_inferior_command): New.
13526 (init_named_socket): New.
13527 (gdb_ust_socket_init): New.
13528 (cstr_to_hexstr): New.
13529 (next_st): New.
13530 (first_marker, next_marker): New.
13531 (response_ust_marker): New.
13532 (cmd_qtfstm, cmd_qtsstm): New.
13533 (unprobe_marker_at, probe_marker_at): New.
13534 (cmd_qtstmat, gdb_ust_thread): New.
13535 (gdb_ust_init): New.
13536 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13537 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13538 (ST_REGENTRY): New.
13539 (x86_64_st_collect_regmap): New.
13540 (X86_64_NUM_ST_COLLECT_GREGS): New.
13541 (AMD64_RIP_REGNUM): New.
13542 (supply_static_tracepoint_registers): New.
13543 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13544 (ST_REGENTRY): New.
13545 (i386_st_collect_regmap): New.
13546 (i386_NUM_ST_COLLECT_GREGS): New.
13547 (supply_static_tracepoint_registers): New.
13548 * server.c (handle_query): Handle qXfer:statictrace:read.
13549 <qSupported>: Report support for StaticTracepoints, and
13550 qXfer:statictrace:read features.
13551 * server.h (traceframe_read_sdata)
13552 (supply_static_tracepoint_registers): Declare.
13553 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13554 (unpack_varlen_hex): Include in IPA build.
13555 * Makefile.in (ustlibs, ustinc): New.
13556 (IPA_OBJS): Add remote-utils-ipa.o.
13557 ($(IPA_LIB)): Link -ldl and -lpthread.
13558 (UST_CFLAGS): New.
13559 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13560 * config.in, configure: Regenerate.
13561
13562 2010-06-20 Ian Lance Taylor <iant@google.com>
13563 Pedro Alves <pedro@codesourcery.com>
13564
13565 * linux-x86-low.c (always_true): Delete.
13566 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13567 trying to fool the compiler with always_true.
13568
13569 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13570
13571 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13572 conditions in gdbserver.
13573
13574 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13575
13576 * spu-low.c (spu_read_memory): Wrap around local store limit.
13577 (spu_write_memory): Likewise.
13578
13579 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13580
13581 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13582 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13583 LONGEST uses.
13584 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13585 uses.
13586 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13587 uses with LONGEST uses.
13588
13589 2010-06-14 Stan Shebs <stan@codesourcery.com>
13590 Pedro Alves <pedro@codesourcery.com>
13591
13592 Bytecode compiler.
13593
13594 * linux-x86-low.c: Include limits.h.
13595 (add_insns): New.
13596 (always_true): New.
13597 (EMIT_ASM): New.
13598 (EMIT_ASM32): New.
13599 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13600 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13601 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13602 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13603 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13604 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13605 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13606 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13607 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13608 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13609 (amd64_emit_void_call_2): New.
13610 (amd64_emit_ops): New.
13611 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13612 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13613 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13614 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13615 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13616 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13617 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13618 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13619 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13620 (i386_emit_stack_adjust, i386_emit_int_call_1)
13621 (i386_emit_void_call_2): New.
13622 (i386_emit_ops): New.
13623 (x86_emit_ops): New.
13624 (the_low_target): Install x86_emit_ops.
13625 * server.h (struct emit_ops): New.
13626 (get_raw_reg_func_addr): Declare.
13627 (current_insn_ptr, emit_error): Declare.
13628 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13629 (set_trace_state_variable_value): New defines.
13630 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13631 addr_get_trace_state_variable_value and
13632 addr_set_trace_state_variable_value.
13633 (symbol_list): New fields for get_raw_reg,
13634 get_trace_state_variable_value and set_trace_state_variable_value.
13635 (condfn): New typedef.
13636 (struct tracepoint): New field `compiled_cond'.
13637 (do_action_at_tracepoint): Clear compiled_cond.
13638 (get_trace_state_variable_value, set_trace_state_variable_value):
13639 Export in the IPA.
13640 (condition_true_at_tracepoint): If there's a compiled condition,
13641 run that.
13642 (current_insn_ptr, emit_error): New globals.
13643 (struct bytecode_address): New.
13644 (get_raw_reg_func_addr): New.
13645 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13646 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13647 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13648 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13649 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13650 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13651 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13652 (compile_tracepoint_condition, compile_bytecodes): New.
13653 * target.h (emit_ops): Forward declare.
13654 (struct target_ops): New field emit_ops.
13655 (target_emit_ops): New.
13656 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13657 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13658 * linux-low.c (linux_emit_ops): New.
13659 (linux_target_ops): Install it.
13660 * linux-low.h (struct linux_target_ops): New field emit_ops.
13661
13662 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13663
13664 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13665 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13666
13667 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13668 Stan Shebs <stan@codesourcery.com>
13669
13670 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13671 (all): Depend on $(extra_libraries).
13672 (install-only): Install the IPA.
13673 (IPA_OBJS, IPA_LIB): New.
13674 (clean): Remove the IPA lib.
13675 (IPAGENT_CFLAGS): New.
13676 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13677 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13678 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13679 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13680 * configure.ac: Check for atomic builtins support in the compiler.
13681 (IPA_DEPFILES, extra_libraries): Define.
13682 * configure.srv (ipa_obj): Add description.
13683 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13684 (i[34567]86-*-linux*): Set ipa_obj.
13685 (x86_64-*-linux*): Set ipa_obj.
13686 * linux-low.c (stabilizing_threads): New.
13687 (supports_fast_tracepoints): New.
13688 (linux_detach): Stabilize threads before detaching.
13689 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13690 the lwp is either not stabilizing, or is moving out of a jump pad.
13691 (linux_fast_tracepoint_collecting): New.
13692 (maybe_move_out_of_jump_pad): New.
13693 (enqueue_one_deferred_signal): New.
13694 (dequeue_one_deferred_signal): New.
13695 (linux_wait_for_event_1): If moving out of a jump pad, defer
13696 pending signals to later.
13697 (linux_stabilize_threads): New.
13698 (linux_wait_1): Check if threads need moving out of jump pads, and
13699 do it if so.
13700 (stuck_in_jump_pad_callback): New.
13701 (move_out_of_jump_pad_callback): New.
13702 (lwp_running): New.
13703 (linux_resume_one_lwp): Handle moving out of jump pads.
13704 (linux_set_resume_request): Dequeue deferred signals.
13705 (need_step_over_p): Also step over fast tracepoint jumps.
13706 (start_step_over): Also uninsert fast tracepoint jumps.
13707 (finish_step_over): Also reinsert fast tracepoint jumps.
13708 (linux_install_fast_tracepoint_jump): New.
13709 (linux_target_ops): Install linux_stabilize_threads and
13710 linux_install_fast_tracepoint_jump_pad.
13711 * linux-low.h (linux_target_ops) <get_thread_area,
13712 install_fast_tracepoint_jump_pad>: New fields.
13713 (struct lwp_info) <collecting_fast_tracepoint,
13714 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13715 (linux_get_thread_area): Declare.
13716 * linux-x86-low.c (jump_insn): New.
13717 (x86_get_thread_area): New.
13718 (append_insns): New.
13719 (push_opcode): New.
13720 (amd64_install_fast_tracepoint_jump_pad): New.
13721 (i386_install_fast_tracepoint_jump_pad): New.
13722 (x86_install_fast_tracepoint_jump_pad): New.
13723 (the_low_target): Install x86_get_thread_area and
13724 x86_install_fast_tracepoint_jump_pad.
13725 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13726 (struct fast_tracepoint_jump): New.
13727 (fast_tracepoint_jump_insn): New.
13728 (fast_tracepoint_jump_shadow): New.
13729 (find_fast_tracepoint_jump_at): New.
13730 (fast_tracepoint_jump_here): New.
13731 (delete_fast_tracepoint_jump): New.
13732 (set_fast_tracepoint_jump): New.
13733 (uninsert_fast_tracepoint_jumps_at): New.
13734 (reinsert_fast_tracepoint_jumps_at): New.
13735 (set_breakpoint_at): Use write_inferior_memory.
13736 (uninsert_raw_breakpoint): Use write_inferior_memory.
13737 (check_mem_read): Mask out fast tracepoint jumps.
13738 (check_mem_write): Mask out fast tracepoint jumps.
13739 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13740 (set_fast_tracepoint_jump): Declare.
13741 (delete_fast_tracepoint_jump)
13742 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13743 (reinsert_fast_tracepoint_jumps_at): Declare.
13744 * regcache.c: Don't compile many functions when building the
13745 in-process agent library.
13746 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13747 the register buffer in the heap.
13748 (free_register_cache): If the register buffer isn't owned by the
13749 regcache, don't free it.
13750 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13751 pre-existing register caches.
13752 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13753 type.
13754 (convert_ascii_to_int): : Constify `from' parameter type.
13755 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13756 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13757 the needed buffer in-place.
13758 (relocate_instruction): New.
13759 * server.c (handle_query) <qSymbols>: If the target supports
13760 tracepoints, give it a chance of looking up symbols. Report
13761 support for fast tracepoints.
13762 (handle_status): Stabilize threads.
13763 (process_serial_event): Adjust.
13764 * server.h (struct fast_tracepoint_jump): Forward declare.
13765 (struct process_info) <fast_tracepoint_jumps>: New field.
13766 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13767 (decode_X_packet, decode_M_packet): Adjust.
13768 (relocate_instruction): Declare.
13769 (in_process_agent_loaded): Declare.
13770 (tracepoint_look_up_symbols): Declare.
13771 (struct fast_tpoint_collect_status): Declare.
13772 (fast_tracepoint_collecting): Declare.
13773 (force_unlock_trace_buffer): Declare.
13774 (handle_tracepoint_bkpts): Declare.
13775 (initialize_low_tracepoint)
13776 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13777 * target.h (struct target_ops) <stabilize_threads,
13778 install_fast_tracepoint_jump_pad>: New fields.
13779 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13780 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13781 [HAVE_STDINT_H]: Include stdint.h.
13782 (trace_debug_1): Rename to ...
13783 (trace_vdebug): ... this.
13784 (trace_debug): Rename to ...
13785 (trace_debug_1): ... this. Add `level' parameter.
13786 (trace_debug): New.
13787 (ATTR_USED, ATTR_NOINLINE): New.
13788 (IP_AGENT_EXPORT): New.
13789 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13790 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13791 (about_to_request_buffer_space, trace_buffer_is_full)
13792 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13793 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13794 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13795 (traceframe_write_count, traceframes_created)
13796 (trace_state_variables)
13797 New renaming defines.
13798 (struct ipa_sym_addresses): New.
13799 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13800 (symbol_list): New.
13801 (ipa_sym_addrs): New.
13802 (all_tracepoint_symbols_looked_up): New.
13803 (in_process_agent_loaded): New.
13804 (write_e_ipa_not_loaded): New.
13805 (maybe_write_ipa_not_loaded): New.
13806 (tracepoint_look_up_symbols): New.
13807 (debug_threads) [IN_PROCESS_AGENT]: New.
13808 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13809 (UNKNOWN_SIDE_EFFECTS): New.
13810 (stop_tracing): New.
13811 (flush_trace_buffer): New.
13812 (stop_tracing_bkpt): New.
13813 (flush_trace_buffer_bkpt): New.
13814 (read_inferior_integer): New.
13815 (read_inferior_uinteger): New.
13816 (read_inferior_data_pointer): New.
13817 (write_inferior_data_pointer): New.
13818 (write_inferior_integer): New.
13819 (write_inferior_uinteger): New.
13820 (struct collect_static_trace_data_action): Delete.
13821 (enum tracepoint_type): New.
13822 (struct tracepoint) <type>: New field `type'.
13823 <actions_str, step_actions, step_actions_str>: Only include in
13824 GDBserver.
13825 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13826 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13827 (tracepoints): Use IP_AGENT_EXPORT.
13828 (last_tracepoint): Don't include in the IPA.
13829 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13830 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13831 (alloced_trace_state_variables): New.
13832 (trace_state_variables): Use IP_AGENT_EXPORT.
13833 (traceframe_t): Delete unused variable.
13834 (circular_trace_buffer): Don't include in the IPA.
13835 (trace_buffer_start): Delete.
13836 (struct trace_buffer_control): New.
13837 (trace_buffer_free): Delete.
13838 (struct ipa_trace_buffer_control): New.
13839 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13840 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13841 New.
13842 (trace_buffer_ctrl): New.
13843 (TRACE_BUFFER_CTRL_CURR): New.
13844 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13845 Reimplement as macros.
13846 (trace_buffer_wrap): Delete.
13847 (traceframe_write_count, traceframe_read_count)
13848 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13849 (struct tracepoint_hit_ctx) <type>: New field.
13850 (struct fast_tracepoint_ctx): New.
13851 (memory_barrier): New.
13852 (cmpxchg): New.
13853 (record_tracepoint_error): Update atomically in the IPA.
13854 (clear_inferior_trace_buffer): New.
13855 (about_to_request_buffer_space): New.
13856 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13857 updating the same buffer.
13858 (add_tracepoint): Default the tracepoint's type to trap
13859 tracepoint, and orig_size to -1.
13860 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13861 internal variables.
13862 (create_trace_state_variable): New parameter `gdb'. Handle it.
13863 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13864 (cmd_qtdp): Handle fast tracepoints.
13865 (cmd_qtdv): Adjust.
13866 (max_jump_pad_size): New.
13867 (gdb_jump_pad_head): New.
13868 (get_jump_space_head): New.
13869 (claim_jump_space): New.
13870 (sort_tracepoints): New.
13871 (MAX_JUMP_SIZE): New.
13872 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13873 IPA.
13874 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13875 support. Upload fast traceframes, and delete internal IPA
13876 breakpoints.
13877 (stop_tracing_handler): New.
13878 (flush_trace_buffer_handler): New.
13879 (cmd_qtstop): Upload fast tracepoints.
13880 (response_tracepoint): Handle fast tracepoints.
13881 (tracepoint_finished_step): Upload fast traceframes. Set the
13882 tracepoint hit context's tracepoint type.
13883 (handle_tracepoint_bkpts): New.
13884 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13885 type. Add comment about fast tracepoints.
13886 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13887 non-existing action_str field.
13888 (get_context_regcache): Handle fast tracepoints.
13889 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13890 to the regcache.
13891 (fast_tracepoint_from_jump_pad_address): New.
13892 (fast_tracepoint_from_ipa_tpoint_address): New.
13893 (collecting_t): New.
13894 (force_unlock_trace_buffer): New.
13895 (fast_tracepoint_collecting): New.
13896 (collecting): New.
13897 (gdb_collect): New.
13898 (write_inferior_data_ptr): New.
13899 (target_tp_heap): New.
13900 (target_malloc): New.
13901 (download_agent_expr): New.
13902 (UALIGN): New.
13903 (download_tracepoints): New.
13904 (download_trace_state_variables): New.
13905 (upload_fast_traceframes): New.
13906 (IPA_FIRST_TRACEFRAME): New.
13907 (IPA_NEXT_TRACEFRAME_1): New.
13908 (IPA_NEXT_TRACEFRAME): New.
13909 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13910 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13911 (gdb_jump_pad_buffer_end): New.
13912 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13913 (initialize_tracepoint): Adjust.
13914 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13915 buffer. Initialize the low module.
13916 * utils.c (PREFIX, TOOLNAME): New.
13917 (malloc_failure): Use PREFIX.
13918 (error): In the IPA, an error causes an exit.
13919 (fatal, warning): Use PREFIX.
13920 (internal_error): Use TOOLNAME.
13921 (NUMCELLS): Increase to 10.
13922 * configure, config.in: Regenerate.
13923
13924 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13925
13926 * server.c (handle_query) <qSupported>: Do two passes over the
13927 qSupported string to avoid nesting strtok.
13928
13929 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13930
13931 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13932 (CDEPS): New.
13933 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13934 -Wl,--dynamic-list.
13935 * configure: Regenerate.
13936 * proc-service.list: New.
13937
13938 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13939
13940 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13941 New comment.
13942
13943 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13944
13945 * gdbreplay.c (remote_open): Check error return from socket() call by
13946 its equality to -1 not by it being negative.
13947 * remote-utils.c (remote_open): Likewise.
13948
13949 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13950
13951 * config.h: Regenerate.
13952
13953 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13954
13955 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13956 doesn't provide PTRACE_GET_THREAD_AREA.
13957
13958 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13959
13960 * linux-m68k-low.c: Include <asm/ptrace.h>
13961 (ps_get_thread_area): Implement.
13962
13963 2010-05-03 Doug Evans <dje@google.com>
13964
13965 * event-loop.c (struct callback_event): New struct.
13966 (callback_list): New global.
13967 (append_callback_event, delete_callback_event): New functions.
13968 (process_callback): New function.
13969 (start_event_loop): Call it.
13970 * remote-utils.c (NOT_SCHEDULED): Define.
13971 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13972 moved out of readchar.
13973 (readchar): Rewrite. Call reschedule before returning.
13974 (reset_readchar): New function.
13975 (remote_close): Call it.
13976 (process_remaining, reschedule): New functions.
13977 * server.h (callback_handler_func): New typedef.
13978 (append_callback_event, delete_callback_event): Declare.
13979
13980 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13981
13982 * proc-service.c (ps_pglobal_lookup): Use
13983 thread_db_look_up_one_symbol.
13984 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13985 parameter. Use it instead of all_symbols_looked_up.
13986 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13987 field.
13988 (all_symbols_looked_up): Don't declare.
13989 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13990 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13991 field.
13992 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13993 Set all_symbols_looked_up here.
13994 (thread_db_look_up_one_symbol): New.
13995 (thread_db_get_tls_address): Adjust.
13996 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13997 thread_db object on the heap, and tentatively set it in the
13998 process structure.
13999 (thread_db_init): Don't set all_symbols_looked_up here.
14000 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14001
14002 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14003
14004 * linux-low.c (linux_kill, linux_detach): Adjust.
14005 (status_pending_p_callback): Remove redundant statement. Check
14006 for !TARGET_WAITIKIND_IGNORE, instead of
14007 TARGET_WAITKIND_STOPPED.
14008 (handle_tracepoints): Make sure LWP is locked. Adjust.
14009 (linux_wait_for_event_1): Adjust.
14010 (linux_cancel_breakpoints): New.
14011 (unsuspend_one_lwp): New.
14012 (unsuspend_all_lwps): New.
14013 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14014 (send_sigstop_callback): Change return type to int, add new
14015 `except' parameter and handle it.
14016 (suspend_and_send_sigstop_callback): New.
14017 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14018 pass them down. If SUSPEND, also increment the lwp's suspend
14019 count.
14020 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14021 (need_step_over_p): Don't consider suspended LWPs.
14022 (start_step_over): Adjust.
14023 (proceed_one_lwp): Change return type to int, add new `except'
14024 parameter and handle it.
14025 (unsuspend_and_proceed_one_lwp): New.
14026 (proceed_all_lwps): Use find_inferior instead of
14027 for_each_inferior.
14028 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14029 also decrement the suspend count of LWPs. Pass `except' down,
14030 instead of hacking its suspend count.
14031 (linux_pause_all): Add `freeze' parameter. Adjust.
14032 (linux_unpause_all): New.
14033 (linux_target_ops): Install linux_unpause_all.
14034 * server.c (handle_status): Adjust.
14035 * target.h (struct target_ops): New fields `unpause_all' and
14036 `cancel_breakpoints'. Add new parameter to `pause_all'.
14037 (pause_all): Add new `freeze' parameter.
14038 (unpause_all): New.
14039 (cancel_breakpoints): New.
14040 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14041 cancel breakpoints.
14042 (cmd_qtstart): Pause threads.
14043 (stop_tracing): Pause threads, and cancel breakpoints.
14044 * win32-low.c (win32_target_ops): Adjust.
14045
14046 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14047
14048 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14049 the inferior right away from here...
14050 (linux_wait_1): ... to here, and adjust to check the thread's
14051 last_resume_kind instead of the lwp's step or stop_expected flags.
14052
14053 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14054
14055 * README: Use consistent `GDB' and `GDBserver' spellings.
14056
14057 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14058
14059 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14060 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14061 (linux_detach_one_lwp): Assume the lwp is stopped.
14062 (any_thread_of): Delete.
14063 (linux_detach): Stop all lwps here. Don't blindly delete all
14064 breakpoints.
14065 (delete_lwp_callback): New.
14066 (linux_mourn): Delete all lwps of the process that is gone.
14067 (linux_wait_1): Don't delete the last lwp of the process here.
14068 * mem-break.h (mark_breakpoints_out): Declare.
14069 * mem-break.c (mark_breakpoints_out): New.
14070 (free_all_breakpoints): Use it.
14071 * server.c (handle_target_event): If the process is gone, mark
14072 breakpoints out.
14073 * thread-db.c (struct thread_db) <create_bp>: New field.
14074 (thread_db_enable_reporting): Fix prototype. Store a thread event
14075 breakpoint reference in the thread_db struct.
14076 (thread_db_load_search): Clear the thread_db object.
14077 (try_thread_db_load_1): Ditto.
14078 (switch_to_process): New.
14079 (disable_thread_event_reporting): Use it.
14080 (remove_thread_event_breakpoints): New.
14081 (thread_db_detach, thread_db_mourn): Use it.
14082
14083 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14084
14085 * linux-low.c (linux_enable_event_reporting): New.
14086 (linux_wait_for_event_1, handle_extended_wait): Use it.
14087
14088 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14089
14090 * linux-low.c (linux_kill_one_lwp, linux_kill)
14091 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14092 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14093 SIGSTOP even if the LWP is stopped.
14094 (send_sigstop_callback): New.
14095 (stop_all_lwps): Use send_sigstop_callback instead.
14096 (linux_resume_one_thread): Adjust.
14097 (proceed_one_lwp): Still proceed an LWP that the client has
14098 requested to stop, if we haven't reported it as stopped yet. Make
14099 sure that LWPs the client want stopped, have a pending SIGSTOP.
14100
14101 2010-04-26 Doug Evans <dje@google.com>
14102
14103 * server.c (handle_general_set): Make static.
14104
14105 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14106 Print received char after testing for error/eof instead of before.
14107 (input_interrupt): Tweak comment.
14108
14109 2010-04-23 Doug Evans <dje@google.com>
14110
14111 * server.c (start_inferior): Print inferior argv if --debug.
14112
14113 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14114
14115 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14116 * nto-x86-low.c: Include server.h
14117
14118 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14119
14120 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14121 be consistent with other sources of this directory.
14122 (init_registers_amd64): Correct name of source file of this function
14123 in the comment.
14124
14125 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14126
14127 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14128 64-bit executables.
14129
14130 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14131
14132 * win32-i386-low.c: Add 64-bit support.
14133 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14134 (init_registers_amd64): Declare.
14135 (mappings): Add 64-bit version of array.
14136 (init_windows_x86): New function.
14137 (the_low_target): Change init_arch field to init_windows_x86.
14138
14139 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14140
14141 * win32-low.c: Adapt to support also 64-bit architecture.
14142 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14143 (get_image_name): Use SIZE_T type for local variable `done'.
14144 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14145 (toolhelp_get_dll_name): Idem.
14146 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14147 Use uintptr_t typecast to avoid warning.
14148 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14149 (handle_exception): Use phex_nz to avoid warning.
14150 (win32_wait): Remove unused local variable `process'.
14151
14152 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14153
14154 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14155 `amd64-avx.o'.
14156
14157 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14158
14159 * configure.ac: Use `ws2_32' library for srv_mingw.
14160 * configure: Regenerate.
14161 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14162 * remote-utils.c: Likewise.
14163
14164 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14165
14166 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14167 if __x86_64__ is defined.
14168
14169 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14170
14171 * configure: Regenerate.
14172
14173 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14174
14175 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14176 * target.h (target_ops): New get_tib_address field.
14177 * win32-low.h (win32_thread_info): Add thread_local_base field.
14178 * win32-low.c (child_add_thread): Add tlb argument.
14179 Set thread_local_base field to TLB.
14180 (get_child_debug_event): Adapt to child_add_thread change.
14181 (win32_get_tib_address): New function.
14182 (win32_target_ops): Set get_tib_address field to
14183 win32_get_tib_address.
14184 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14185
14186 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14187
14188 * linux-low.c (linux_mourn): Also remove the process.
14189 * server.c (handle_target_event): Don't remove the process here.
14190 * nto-low.c (nto_mourn): New.
14191 (nto_target_ops): Install it.
14192 * spu-low.c (spu_mourn): New.
14193 (spu_target_ops): Install it.
14194 * win32-low.c (win32_mourn): New.
14195 (win32_target_ops): Install it.
14196
14197 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14198
14199 * server.h (buffer_xml_printf): Remove redundant `;'.
14200
14201 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14202
14203 * regcache.c (set_register_cache): Invalidate regcaches before
14204 changing the register cache layout.
14205 (regcache_invalidate_one): Allow a NULL regcache.
14206 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14207 regcaches before changing the register cache layout or the target
14208 regsets.
14209
14210 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14211
14212 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14213 variable warning on Linux/x86-64.
14214
14215 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14216
14217 GDBserver disconnected tracing support.
14218
14219 * linux-low.c (linux_remove_process): Delete.
14220 (add_lwp): Don't set last_resume_kind here.
14221 (linux_kill): Use `mourn'.
14222 (linux_detach): Use `thread_db_detach', and `mourn'.
14223 (linux_mourn): New.
14224 (linux_attach_lwp_1): Adjust comment.
14225 (linux_attach): last_resume_kind moved the thread_info; adjust.
14226 (status_pending_p_callback): Adjust.
14227 (linux_wait_for_event_1): Adjust.
14228 (count_events_callback, select_singlestep_lwp_callback)
14229 (select_event_lwp_callback, cancel_breakpoints_callback)
14230 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14231 (proceed_one_lwp): Adjust.
14232 (linux_async): Add debug output.
14233 (linux_thread_stopped): New.
14234 (linux_pause_all): New.
14235 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14236 linux_pause_all.
14237 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14238 (thread_db_free): Delete declaration.
14239 (thread_db_detach, thread_db_mourn): Declare.
14240 * thread-db.c (thread_db_init): Use thread_db_mourn.
14241 (thread_db_free): Delete, split in two.
14242 (disable_thread_event_reporting): New.
14243 (thread_db_detach): New.
14244 (thread_db_mourn): New.
14245
14246 * server.h (struct thread_info) <last_resume_kind>: New field.
14247 <attached>: Add comment.
14248 <gdb_detached>: New field.
14249 (handler_func): Change return type to int.
14250 (handle_serial_event, handle_target_event): Ditto.
14251 (gdb_connected): Declare.
14252 (tracing): Delete.
14253 (disconnected_tracing): Declare.
14254 (stop_tracing): Declare.
14255
14256 * server.c (handle_query) <qSupported>: Report support for
14257 disconnected tracing.
14258 (queue_stop_reply_callback): Account for running threads.
14259 (gdb_wants_thread_stopped): New.
14260 (gdb_wants_all_threads_stopped): New.
14261 (gdb_reattached_process): New.
14262 (handle_status): Clear the `gdb_detached' flag of all processes.
14263 In all-stop, stop all threads.
14264 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14265 (process_serial_event): If the remote connection breaks, or if an
14266 exit was forced with "monitor exit", force an event loop exit.
14267 Handle disconnected tracing on detach.
14268 (handle_serial_event): Adjust.
14269 (handle_target_event): If GDB isn't connected, forward events back
14270 to the inferior, unless the last process exited, in which case,
14271 exit gdbserver. Adjust interface.
14272
14273 * remote-utils.c (remote_open): Don't block in accept. Instead
14274 register an event loop source on the listen socket file
14275 descriptor. Refactor bits into ...
14276 (listen_desc): ... this new global.
14277 (gdb_connected): ... this new function.
14278 (enable_async_notification): ... this new function.
14279 (handle_accept_event): ... this new function.
14280 (remote_close): Clear remote_desc.
14281
14282 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14283
14284 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14285 New fields.
14286 (mourn_inferior): Define.
14287 (target_process_qsupported): Avoid the dangling else problem.
14288 (thread_stopped): Define.
14289 (pause_all): Define.
14290 (target_waitstatus_to_string): Declare.
14291 * target.c (target_waitstatus_to_string): New.
14292
14293 * tracepoint.c (tracing): Make extern.
14294 (disconnected_tracing): New.
14295 (stop_tracing): Make extern. Handle tracing stops due to GDB
14296 disconnecting.
14297 (cmd_qtdisconnected): New.
14298 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14299 (handle_tracepoint_general_set): Handle QTDisconnected.
14300
14301 * event-loop.c (event_handler_func): Change return type to int.
14302 (process_event): Bail out if the event handler wants the event
14303 loop to stop.
14304 (handle_file_event): Ditto.
14305 (start_event_loop): Bail out if the event handler wants the event
14306 loop to stop.
14307
14308 * nto-low.c (nto_target_ops): Adjust.
14309 * spu-low.c (spu_wait): Don't remove the process here.
14310 (spu_target_ops): Adjust.
14311 * win32-low.c (win32_wait): Don't remove the process here.
14312 (win32_target_ops): Adjust.
14313
14314 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14315
14316 * regcache.c (realloc_register_cache): Invalidate inferior's
14317 regcache before recreating it.
14318
14319 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14320
14321 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14322
14323 2010-04-09 Stan Shebs <stan@codesourcery.com>
14324 Pedro Alves <pedro@codesourcery.com>
14325
14326 * server.h (LONGEST): New.
14327 (struct thread_info) <while_stepping>: New field.
14328 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14329 Declare.
14330 (initialize_tracepoint, handle_tracepoint_general_set)
14331 (handle_tracepoint_query, tracepoint_finished_step)
14332 (tracepoint_was_hit, release_while_stepping_state_list):
14333 (current_traceframe): Declare.
14334 * server.c (handle_general_set): Handle tracepoint packets.
14335 (read_memory): New.
14336 (write_memory): New.
14337 (handle_search_memory_1): Use read_memory.
14338 (handle_query): Report support for conditional tracepoints, trace
14339 state variables, and tracepoint sources. Handle tracepoint
14340 queries.
14341 (main): Initialize the tracepoints module.
14342 (process_serial_event): Handle traceframe reads/writes.
14343
14344 * linux-low.c (handle_tracepoints): New.
14345 (linux_wait_1): Call it.
14346 (linux_resume_one_lwp): Handle while-stepping.
14347 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14348 (linux_target_ops): Install them.
14349 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14350 New field.
14351 * linux-x86-low.c (x86_supports_tracepoints): New.
14352 (the_low_target). Install it.
14353
14354 * mem-break.h (delete_breakpoint): Declare.
14355 * mem-break.c (delete_breakpoint): Make external.
14356
14357 * target.h (struct target_ops): Add `supports_tracepoints',
14358 `read_pc', and `write_pc' fields.
14359 (target_supports_tracepoints): Define.
14360 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14361 (phex_nz): New.
14362
14363 * regcache.h (struct regcache) <registers_owned>: New field.
14364 (init_register_cache, regcache_cpy): Declare.
14365 (regcache_read_pc, regcache_write_pc): Declare.
14366 (register_cache_size): Declare.
14367 (supply_regblock): Declare.
14368 * regcache.c (init_register_cache): New.
14369 (new_register_cache): Use it.
14370 (regcache_cpy): New.
14371 (register_cache_size): New.
14372 (supply_regblock): New.
14373 (regcache_read_pc, regcache_write_pc): New.
14374
14375 * tracepoint.c: New.
14376
14377 * Makefile.in (OBS): Add tracepoint.o.
14378 (tracepoint.o): New rule.
14379
14380 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14381
14382 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14383 (i386-mmx.o): New.
14384 (i386-mmx.c): Likewise.
14385 (i386-mmx-linux.o): Likewise.
14386 (i386-mmx-linux.c): Likewise.
14387
14388 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14389 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14390 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14391 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14392
14393 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14394 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14395 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14396
14397 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14398
14399 * Makefile.in (clean): Updated.
14400 (i386-avx.o): New.
14401 (i386-avx.c): Likewise.
14402 (i386-avx-linux.o): Likewise.
14403 (i386-avx-linux.c): Likewise.
14404 (amd64-avx.o): Likewise.
14405 (amd64-avx.c): Likewise.
14406 (amd64-avx-linux.o): Likewise.
14407 (amd64-avx-linux.c): Likewise.
14408
14409 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14410 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14411 (srv_amd64_regobj): Add amd64-avx.o.
14412 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14413 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14414 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14415 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14416 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14417 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14418 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14419
14420 * i387-fp.c: Include "i386-xstate.h".
14421 (i387_xsave): New.
14422 (i387_cache_to_xsave): Likewise.
14423 (i387_xsave_to_cache): Likewise.
14424 (x86_xcr0): Likewise.
14425
14426 * i387-fp.h (i387_cache_to_xsave): Likewise.
14427 (i387_xsave_to_cache): Likewise.
14428 (x86_xcr0): Likewise.
14429
14430 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14431 * linux-crisv32-low.c (target_regsets): Likewise.
14432 * linux-m68k-low.c (target_regsets): Likewise.
14433 * linux-mips-low.c (target_regsets): Likewise.
14434 * linux-ppc-low.c (target_regsets): Likewise.
14435 * linux-s390-low.c (target_regsets): Likewise.
14436 * linux-sh-low.c (target_regsets): Likewise.
14437 * linux-sparc-low.c (target_regsets): Likewise.
14438 * linux-xtensa-low.c (target_regsets): Likewise.
14439
14440 * linux-low.c: Include <sys/uio.h>.
14441 (regsets_fetch_inferior_registers): Support nt_type.
14442 (regsets_store_inferior_registers): Likewise.
14443 (linux_process_qsupported): New.
14444 (linux_target_ops): Add linux_process_qsupported.
14445
14446 * linux-low.h (regset_info): Add nt_type.
14447 (linux_target_ops): Add process_qsupported.
14448
14449 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14450 and <sys/uio.h>.
14451 (init_registers_i386_avx_linux): New.
14452 (init_registers_amd64_avx_linux): Likewise.
14453 (xmltarget_i386_linux_no_xml): Likewise.
14454 (xmltarget_amd64_linux_no_xml): Likewise.
14455 (PTRACE_GETREGSET): Likewise.
14456 (PTRACE_SETREGSET): Likewise.
14457 (x86_fill_xstateregset): Likewise.
14458 (x86_store_xstateregset): Likewise.
14459 (use_xml): Likewise.
14460 (x86_linux_update_xmltarget): Likewise.
14461 (x86_linux_process_qsupported): Likewise.
14462 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14463 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14464 init_registers_i386_linux here. Call
14465 x86_linux_update_xmltarget.
14466 (the_low_target): Add x86_linux_process_qsupported.
14467
14468 * server.c (handle_query): Call target_process_qsupported.
14469
14470 * target.h (target_ops): Add process_qsupported.
14471 (target_process_qsupported): New.
14472
14473 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14474
14475 * inferiors.c (add_thread): Set last_status kind to
14476 TARGET_WAITKIND_IGNORE.
14477 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14478 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14479 (linux_wait_1): Move `thread' local definition to block that uses
14480 it. Don't NULL initialize `event_child'.
14481 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14482 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14483 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14484
14485 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14486
14487 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14488 an extended waitstatus, or by a watchpoint.
14489 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14490 thread was stepping or has been stopped by a watchpoint.
14491
14492 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14493
14494 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14495 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14496 of another, then delete the previous, and validate all
14497 breakpoints.
14498 (validate_inserted_breakpoint): New.
14499 (delete_disabled_breakpoints): New.
14500 (validate_breakpoints): New.
14501 (check_mem_read): Validate breakpoints before trusting their
14502 shadow. Delete disabled breakpoints.
14503 (check_mem_write): Validate breakpoints before trusting they
14504 should be inserted. Delete disabled breakpoints.
14505 * mem-break.h (validate_breakpoints):
14506 * server.c (handle_query): Validate breakpoints when we see a
14507 qSymbol query.
14508
14509 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14510
14511 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14512 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14513 if we could tell there's a GDB breakpoint at stop_pc.
14514 (need_step_over_p): Don't do a step over if we find a GDB
14515 breakpoint at the resume PC.
14516
14517 * mem-break.c (struct raw_breakpoint): New.
14518 (enum bkpt_type): New type `gdb_breakpoint'.
14519 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14520 fields. New field `raw'.
14521 (find_raw_breakpoint_at): New.
14522 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14523 breakpoint instead.
14524 (set_breakpoint_at): Adjust.
14525 (delete_raw_breakpoint): New.
14526 (release_breakpoint): New.
14527 (delete_breakpoint): Rename to...
14528 (delete_breakpoint_1): ... this. Add proc parameter. Use
14529 release_breakpoint. Return ENOENT.
14530 (delete_breakpoint): Reimplement.
14531 (find_breakpoint_at): Delete.
14532 (find_gdb_breakpoint_at): New.
14533 (delete_breakpoint_at): Delete.
14534 (set_gdb_breakpoint_at): New.
14535 (delete_gdb_breakpoint_at): New.
14536 (gdb_breakpoint_here): New.
14537 (set_reinsert_breakpoint): Use release_breakpoint.
14538 (uninsert_breakpoint): Rename to ...
14539 (uninsert_raw_breakpoint): ... this.
14540 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14541 (reinsert_raw_breakpoint): Change parameter type to
14542 raw_breakpoint.
14543 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14544 instead.
14545 (check_breakpoints): Adjust. Use release_breakpoint.
14546 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14547 (breakpoint_inserted_here): Ditto.
14548 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14549 Don't trust the breakpoint's shadow if it is not inserted.
14550 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14551 (delete_all_breakpoints): Adjust.
14552 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14553 use delete_breakpoint_1.
14554
14555 * mem-break.h (breakpoints_supported): Delete declaration.
14556 (set_gdb_breakpoint_at): Declare.
14557 (gdb_breakpoint_here): Declare.
14558 (delete_breakpoint_at): Delete.
14559 (delete_gdb_breakpoint_at): Declare.
14560
14561 * server.h (struct raw_breakpoint): Forward declare.
14562 (struct process_info): New field `raw_breakpoints'.
14563
14564 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14565 breakpoints.
14566
14567 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14568
14569 * linux-low.c (status_pending_p_callback): Fix comment.
14570 (linux_wait_for_event_1): Move most of the internal breakpoint
14571 handling from here...
14572 (linux_wait_1): ... to here.
14573 (count_events_callback): New.
14574 (select_singlestep_lwp_callback): New.
14575 (select_event_lwp_callback): New.
14576 (cancel_breakpoints_callback): New.
14577 (select_event_lwp): New.
14578 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14579 priority to all LWPs that have had events that should be reported
14580 to the client. Cancel breakpoints when about to reporting the
14581 event to the client, not while stopping lwps. No longer cancel
14582 finished single-steps here.
14583 (cancel_finished_single_step): Delete.
14584 (cancel_finished_single_steps): Delete.
14585
14586 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14587
14588 * mem-break.c (enum bkpt_type): New.
14589 (struct breakpoint): New field `type'.
14590 (set_breakpoint_at): Change return type to struct breakpoint
14591 pointer. Set type to `other_breakpoint' by default.
14592 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14593 in the breakpoint list.
14594 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14595 (reinsert_breakpoint): Rename to ...
14596 (reinsert_raw_breakpoint): ... this.
14597 (reinsert_breakpoints_at): Adjust.
14598 * mem-break.h (struct breakpoint): Declare.
14599 (set_breakpoint_at): Change return type to struct breakpoint
14600 pointer.
14601
14602 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14603
14604 * server.c (handle_query): Assign, not compare.
14605
14606 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14607
14608 Teach linux gdbserver to step-over-breakpoints.
14609
14610 * linux-low.c (can_hardware_single_step): New.
14611 (supports_breakpoints): New.
14612 (handle_extended_wait): If stopping threads, read the stop pc of
14613 the new cloned LWP.
14614 (get_pc): New.
14615 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14616 low target doesn't support retrieving the PC.
14617 (add_lwp): Set last_resume_kind to resume_continue.
14618 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14619 (linux_attach): Don't clear stop_expected. Set the lwp's
14620 last_resume_kind to resume_stop.
14621 (linux_detach_one_lwp): Don't check for removed breakpoints.
14622 (check_removed_breakpoint): Delete.
14623 (status_pending_p): Rename to ...
14624 (status_pending_p_callback): ... this. Don't check for removed
14625 breakpoints. Don't consider threads that are stopped from GDB's
14626 perspective.
14627 (linux_wait_for_lwp): Always read the stop_pc here.
14628 (cancel_breakpoint): New.
14629 (step_over_bkpt): New global.
14630 (linux_wait_for_event_1): Implement stepping over breakpoints.
14631 (gdb_wants_lwp_stopped): New.
14632 (gdb_wants_all_stopped): New.
14633 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14634 single-step traps here. Store the thread's last reported target
14635 wait status.
14636 (send_sigstop): Don't clear stop_expected. Always set it,
14637 instead.
14638 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14639 (cancel_finished_single_step): New.
14640 (cancel_finished_single_steps): New.
14641 (wait_for_sigstop): Don't cancel finished single-step traps here.
14642 (linux_resume_one_lwp): Don't check for removed breakpoints.
14643 Don't set `step' on non-hardware step archs.
14644 (linux_set_resume_request): Ignore resume_stop requests if already
14645 stopping or stopped. Set the lwp's last_resume_kind.
14646 (resume_status_pending_p): Don't check for removed breakpoints.
14647 (need_step_over_p): New.
14648 (start_step_over): New.
14649 (finish_step_over): New.
14650 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14651 requests. Clear the thread's last reported target waitstatus.
14652 Don't use the `suspended' flag. Don't consider pending breakpoints.
14653 (linux_resume): Start a step-over if necessary.
14654 (proceed_one_lwp): New.
14655 (proceed_all_lwps): New.
14656 (unstop_all_lwps): New.
14657 * linux-low.h (struct lwp_info): Rewrite comment for the
14658 `suspended' flag. Add the `stop_pc' field. Delete the
14659 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14660 Add `'last_resume_kind' and `need_step_over' fields.
14661 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14662 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14663 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14664 (set_raw_breakpoint_at): New.
14665 (set_breakpoint_at): Rewrite to use it.
14666 (reinsert_breakpoint_handler): Delete.
14667 (set_reinsert_breakpoint): New.
14668 (reinsert_breakpoint_by_bp): Delete.
14669 (delete_reinsert_breakpoints): New.
14670 (uninsert_breakpoint): Rewrite.
14671 (uninsert_breakpoints_at): New.
14672 (reinsert_breakpoint): Rewrite.
14673 (reinsert_breakpoints_at): New.
14674 (check_breakpoints): Rewrite.
14675 (breakpoint_here): New.
14676 (breakpoint_inserted_here): New.
14677 (check_mem_read): Adjust.
14678 * mem-break.h (breakpoints_supported, breakpoint_here)
14679 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14680 (reinsert_breakpoint_by_bp): Delete declaration.
14681 (delete_reinsert_breakpoints): Declare.
14682 (reinsert_breakpoint): Delete declaration.
14683 (reinsert_breakpoints_at): Declare.
14684 (uninsert_breakpoint): Delete declaration.
14685 (uninsert_breakpoints_at): Declare.
14686 (check_breakpoints): Adjust prototype.
14687 * server.h: Adjust include order.
14688 (struct thread_info): Declare here. Add a `last_status' field.
14689
14690 2010-03-23 Michael Snyder <msnyder@vmware.com>
14691
14692 * server.c (crc32): New function.
14693 (handle_query): Add handling for 'qCRC:' request.
14694
14695 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14696
14697 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14698 lwp had been stopped by a watchpoint.
14699
14700 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14701
14702 * server.h (internal_error): Declare.
14703 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14704 * utils.c (internal_error): New function.
14705
14706 2010-03-15 Andreas Schwab <schwab@redhat.com>
14707
14708 * configure.srv: Fix typo setting srv_regobj.
14709
14710 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14711
14712 * linux-low.c (fetch_register): Avoid passing a non string literal
14713 format to `error'.
14714 (usr_store_inferior_registers): Ditto.
14715
14716 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14717
14718 * linux-low.c (linux_write_memory): Bail out early if peeking
14719 memory failed.
14720
14721 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14722
14723 * linux-low.h (struct lwp_info): New fields
14724 `stopped_by_watchpoint' and `stopped_data_address'.
14725 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14726 here, and cache them in the lwp object.
14727 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14728 directly.
14729 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14730 field.
14731 (linux_stopped_by_watchpoint): Rewrite.
14732 (linux_stopped_data_address): Rewrite.
14733
14734 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14735
14736 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14737 switching the current inferior, not before.
14738
14739 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14740
14741 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14742 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14743 i386-linux.c and amd64-linux.c.
14744 (reg-i386.o): Removed.
14745 (reg-i386.c): Likewise.
14746 (reg-i386-linux.o): Likewise.
14747 (reg-i386-linux.c): Likewise.
14748 (reg-x86-64.o): Likewise.
14749 (reg-x86-64.c): Likewise.
14750 (reg-x86-64-linux.o): Likewise.
14751 (reg-x86-64-linux.c): Likewise.
14752 (i386.o): New.
14753 (i386.c): Likewise.
14754 (i386-linux.o): Likewise.
14755 (i386-linux.c): Likewise.
14756 (amd64.o): Likewise.
14757 (amd64.c): Likewise.
14758 (amd64-linux.o): Likewise.
14759 (amd64-linux.c): Likewise.
14760
14761 * configure.srv (srv_i386_regobj): New.
14762 (srv_i386_linux_regobj): Likewise.
14763 (srv_amd64_regobj): Likewise.
14764 (srv_amd64_linux_regobj): Likewise.
14765 (srv_i386_32bit_xmlfiles): Likewise.
14766 (srv_i386_64bit_xmlfiles): Likewise.
14767 (srv_i386_xmlfiles): Likewise.
14768 (srv_amd64_xmlfiles): Likewise.
14769 (srv_i386_linux_xmlfiles): Likewise.
14770 (srv_amd64_linux_xmlfiles): Likewise.
14771 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14772 srv_xmlfiles to $srv_i386_xmlfiles.
14773 (i[34567]86-*-mingw32ce*): Likewise.
14774 (i[34567]86-*-mingw*): Likewise.
14775 (i[34567]86-*-nto*): Likewise.
14776 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14777 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14778 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14779 (x86_64-*-linux*): Likewise.
14780
14781 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14782 (init_registers_amd64_linux): New.
14783 (x86_arch_setup): Replace init_registers_x86_64_linux with
14784 init_registers_amd64_linux.
14785
14786 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14787
14788 * configure.ac: Check for libdl. If it is not available link against
14789 static libthread_db.
14790 * configure: Regenerate.
14791
14792 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14793
14794 PR9605
14795
14796 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14797 handing a read watchpoint.
14798 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14799
14800 2010-02-12 Doug Evans <dje@google.com>
14801
14802 * linux-low.c (linux_supports_tracefork_flag): Document.
14803 (linux_look_up_symbols): Add comment.
14804
14805 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14806
14807 * regcache.c (supply_register): Clear regcache if buf is NULL.
14808
14809 2010-02-02 Nicolas Roche <roche@sourceware.org>
14810 Joel Brobecker <brobecker@adacore.com>
14811
14812 * inferiors.c (find_inferior): Add function documentation.
14813 (unloaded_dll): Handle the case where the unloaded dll has not
14814 been previously registered in the dll list.
14815
14816 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14817
14818 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14819 (thumb2_breakpoint): New.
14820 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14821
14822 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14823
14824 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14825 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14826 breakpoints.
14827
14828 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14829
14830 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14831
14832 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14833
14834 * linux-s390-low.c (s390_collect_ptrace_register)
14835 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14836
14837 2010-01-21 Doug Evans <dje@google.com>
14838
14839 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14840 (PTRACE_ARG4_TYPE): New macro.
14841 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14842 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14843 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14844 (usr_store_inferior_registers): Ditto.
14845 (linux_read_memory, linux_write_memory): Ditto.
14846 (linux_test_for_tracefork): Ditto.
14847
14848 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14849 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14850
14851 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14852
14853 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14854 target.
14855
14856 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14857
14858 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14859 prototype to take a regcache. Adjust.
14860
14861 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14862
14863 * regcache.h (struct thread_info): Forward declare.
14864 (struct regcache): New.
14865 (new_register_cache): Adjust prototype.
14866 (get_thread_regcache): Declare.
14867 (free_register_cache): Adjust prototype.
14868 (registers_to_string, registers_from_string): Ditto.
14869 (supply_register, supply_register_by_name, collect_register)
14870 (collect_register_as_string, collect_register_by_name): Ditto.
14871 * regcache.c (struct inferior_regcache_data): Delete.
14872 (get_regcache): Rename to ...
14873 (get_thread_regcache): ... this. Adjust. Switch inferior before
14874 fetching registers.
14875 (regcache_invalidate_one): Adjust.
14876 (regcache_invalidate): Fix prototype.
14877 (new_register_cache): Return the new register cache.
14878 (free_register_cache): Change prototype.
14879 (realloc_register_cache): Adjust.
14880 (registers_to_string): Change prototype to take a regcache. Adjust.
14881 (registers_from_string): Ditto.
14882 (register_data): Ditto.
14883 (supply_register): Ditto.
14884 (supply_register_by_name): Ditto.
14885 (collect_register): Ditto.
14886 (collect_register_as_string): Ditto.
14887 (collect_register_by_name): Ditto.
14888 * server.c (process_serial_event): Adjust.
14889 * linux-low.h (regset_fill_func, regset_store_func): Change
14890 prototype.
14891 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14892 Change prototype.
14893 * linux-low.c (get_stop_pc): Adjust.
14894 (check_removed_breakpoint): Adjust.
14895 (linux_wait_for_event): Adjust.
14896 (linux_resume_one_lwp): Adjust.
14897 (fetch_register): Add regcache parameter. Adjust.
14898 (usr_store_inferior_registers): Ditto.
14899 (regsets_fetch_inferior_registers): Ditto.
14900 (regsets_store_inferior_registers): Ditto.
14901 (linux_fetch_registers, linux_store_registers): Ditto.
14902 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14903 regcache. Adjust.
14904 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14905 Ditto.
14906 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14907 prototype to take a regcache.
14908 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14909 * remote-utils.c (convert_ascii_to_int, outreg)
14910 (prepare_resume_reply): Change prototype to take a regcache.
14911 Adjust.
14912 * target.h (struct target_ops) <fetch_registers, store_registers>:
14913 Change prototype to take a regcache.
14914 (fetch_inferior_registers, store_inferior_registers): Change
14915 prototype to take a regcache. Adjust.
14916 * proc-service.c (ps_lgetregs): Adjust.
14917 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14918 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14919 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14920 take a regcache. Adjust.
14921 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14922 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14923 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14924 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14925 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14926 (cris_cannot_fetch_register):
14927 (cris_breakpoint_at): Change prototype to take a regcache.
14928 Adjust.
14929 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14930 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14931 to take a regcache. Adjust.
14932 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14933 Adjust.
14934 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14935 take a regcache. Adjust.
14936 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14937 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14938 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14939 * linux-mips-low.c (mips_get_pc):
14940 (mips_set_pc): Change prototype to take a regcache. Adjust.
14941 (mips_reinsert_addr): Adjust.
14942 (mips_collect_register): Change prototype to take a regcache.
14943 Adjust.
14944 (mips_supply_register):
14945 (mips_collect_register_32bit, mips_supply_register_32bit)
14946 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14947 (mips_store_fpregset): Ditto.
14948 * linux-ppc-low.c (ppc_supply_ptrace_register)
14949 (ppc_supply_ptrace_register): Ditto.
14950 (parse_spufs_run): Adjust.
14951 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14952 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14953 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14954 take a regcache. Adjust.
14955 * linux-s390-low.c (s390_collect_ptrace_register)
14956 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14957 (s390_set_pc): Change prototype to take a regcache. Adjust.
14958 (s390_arch_setup): Adjust.
14959 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14960 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14961 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14962 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14963 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14964 regcache. Adjust.
14965 (sparc_breakpoint_at): Adjust.
14966 * linux-xtensa-low.c (xtensa_fill_gregset):
14967 (xtensa_store_gregset):
14968 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14969 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14970 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14971 prototype to take a regcache. Adjust.
14972 * win32-arm-low.c (arm_fetch_inferior_register)
14973 (arm_store_inferior_register): Change prototype to take a
14974 regcache. Adjust.
14975 * win32-i386-low.c (i386_fetch_inferior_register)
14976 (i386_store_inferior_register): Change prototype to take a
14977 regcache. Adjust.
14978 * win32-low.c (child_fetch_inferior_registers)
14979 (child_store_inferior_registers): Change prototype to take a
14980 regcache. Adjust.
14981 (win32_wait): Adjust.
14982 (win32_fetch_inferior_registers): Change prototype to take a
14983 regcache. Adjust.
14984 (win32_store_inferior_registers): Adjust.
14985 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14986 store_inferior_register>: Change prototype to take a regcache.
14987
14988 2010-01-20 Doug Evans <dje@google.com>
14989
14990 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14991 #ifdef.
14992 (linux_wait_for_event1, linux_init_signals): Ditto.
14993 (W_STOPCODE): Provide definition if missing.
14994
14995 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14996
14997 * linux-low.c (linux_core_of_thread): New.
14998 (compare_ints, show_process, list_threads): New.
14999 (linux_qxfer_osdata): Report threads and cores.
15000 (linux_target_op): Register linux_core_of_thread.
15001 * remote-utils.c (prepare_resume_reply): Report the core.
15002 (buffer_xml_printf): Support %d specifier.
15003 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15004 New.
15005 (handle_query): Handle qXfer:threads. Announce availability
15006 thereof.
15007 * target.h (struct target_ops): New field core_of_thread.
15008
15009 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15010
15011 * Makefile.in (clean): Remove new generated files.
15012 (reg-s390.o, reg-s390.c): Remove rules.
15013 (reg-s390x.o, reg-s390x.c): Likewise.
15014 (s390-linux32.o, s390-linux32.c): Add rules.
15015 (s390-linux64.o, s390-linux64.c): Likewise.
15016 (s390x-linux64.o, s390x-linux64.c): Likewise.
15017 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15018 * linux-s390-low.c: Include <elf.h>.
15019 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15020 (init_registers_s390): Remove prototype.
15021 (init_registers_s390x): Likewise.
15022 (init_registers_s390_linux32): Add prototype.
15023 (init_registers_s390_linux64): Likewise.
15024 (init_registers_s390x_linux64): Likewise.
15025 (s390_num_regs_3264): New define.
15026 (s390_regmap_3264): New global variable.
15027 (s390_cannot_fetch_register): Remove obsolete check.
15028 (s390_cannot_store_register): Likewise.
15029 (s390_collect_ptrace_register): Handle upper/lower register halves.
15030 (s390_supply_ptrace_register): Likewise.
15031 (s390_fill_gregset): Update to register number changes.
15032 (s390_get_hwcap): New routine.
15033 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15034 Install appropriate regmap and register set.
15035
15036 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15037
15038 * server.c (gdbserver_version): Update copyright year to 2010.
15039 * gdbreplay.c (gdbreplay_version): Likewise.
15040
15041 2009-12-28 Doug Evans <dje@google.com>
15042
15043 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15044 elf/external.h. Include <elf.h> instead but only if necessary.
15045
15046 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15047
15048 * linux-low.c (linux_remove_process): Remove `detaching'
15049 parameter. Don't release/detach from thread_db here.
15050 (linux_kill): Release/detach from thread_db here, ...
15051 (linux_detach): ... and here, before actually detaching.
15052 (linux_wait_1): ... and here, when a process exits.
15053 * thread-db.c (any_thread_of): New.
15054 (thread_db_free): Switch the current inferior to a thread of the
15055 passed in process.
15056
15057 2009-12-21 Doug Evans <dje@google.com>
15058
15059 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15060
15061 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15062 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15063 warning ifndef __NR_tkill. Move setting of errno there too.
15064 Delete unnecessary resetting of errno after syscall.
15065 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15066
15067 * configure.ac: Check for dladdr.
15068 * config.in: Regenerate.
15069 * configure: Regenerate.
15070 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15071 (try_thread_db_load): Update.
15072
15073 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15074
15075 2009-12-18 Doug Evans <dje@google.com>
15076
15077 * event-loop.c: Include unistd.h if it exists.
15078
15079 * linux-low.c (my_waitpid): Move definition away from being in
15080 between linux_tracefork_child/linux_test_for_tracefork.
15081
15082 * gdb_proc_service.h (psaddr_t): Fix type.
15083 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15084 signature to match glibc.
15085
15086 2009-12-16 Doug Evans <dje@google.com>
15087
15088 * linux-low.c (linux_read_memory): Fix argument to read.
15089
15090 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15091
15092 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15093 events, don't leave current_inferior pointing at null.
15094
15095 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15096
15097 * win32-low.c (LOG): Delete.
15098 (OUTMSG): Output to stderr.
15099 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15100 on compile time LOG macro.
15101 (win32_wait): Fix debug output.
15102
15103 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15104
15105 * win32-low.c (win32_add_one_solib): If the dll name is
15106 "ntdll.dll", prepend the system directory to the dll path.
15107
15108 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15109
15110 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15111
15112 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15113 Vladimir Prus <vladimir@codesourcery.com>
15114
15115 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15116 * configure.ac: Check for __mcoldfire__ and set
15117 gdb_cv_m68k_is_coldfire.
15118 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15119 reg-cf.o and reg-m68k.o.
15120 * configure: Regenerated.
15121
15122 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15123
15124 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15125 Pass it to thread_db_free.
15126 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15127 proper `detaching' argument to linux_remove_process.
15128 * linux-low.h (thread_db_free): Add `detaching' parameter.
15129 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15130 to thread_db_free.
15131 (thread_db_free): Add `detaching' parameter. Only
15132 call td_ta_clear_event if detaching from process.
15133
15134 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15135
15136 * thread-db.c (thread_db_free): Fix typo.
15137
15138 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15139
15140 PR gdb/10838
15141 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15142
15143 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15144
15145 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15146 with an i686 compiler.
15147 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15148 needed.
15149 * configure: Rebuilt.
15150
15151 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15152
15153 PR gdb/10783
15154
15155 * server.c (handle_search_memory_1): Correct read_addr initialization
15156 in loop for searching subsequent chunks.
15157
15158 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15159
15160 * configure.ac: New --with-libthread-db option.
15161 * thread-db.c: Allow direct dependence on libthread_db.
15162 (thread_db_free): Adjust.
15163 * config.in: Regenerate.
15164 * configure: Likewise.
15165
15166 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15167
15168 PR gdb/10757
15169 * thread-db.c (attach_thread): New function.
15170 (maybe_attach_thread): Return success/failure.
15171 (find_new_threads_callback): Adjust.
15172 (thread_db_find_new_threads): Loop until no new threads.
15173
15174 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15175
15176 * proc-service.c (ps_lgetregs): Formatting.
15177
15178 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15179
15180 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15181 * configure.ac: Adjust.
15182 * linux-low.h (struct process_info_private): Move members to struct
15183 thread_db.
15184 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15185 * linux-low.c (linux_remove_process): Adjust.
15186 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15187 * server.c (handle_query): Move code ...
15188 (handle_monitor_command): ... here. New function.
15189 * target.h (struct target_ops): New member.
15190 * thread-db.c (struct thread_db): New.
15191 (libthread_db_search_path): New variable.
15192 (thread_db_create_event, thread_db_enable_reporting)
15193 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15194 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15195 (try_thread_db_load_1, dladdr_to_soname): New functions.
15196 (try_thread_db_load, thread_db_load_search): New functions.
15197 (thread_db_init): Search for libthread_db.
15198 (thread_db_free): New function.
15199 (thread_db_handle_monitor_command): Likewise.
15200 * config.in: Regenerate.
15201 * configure: Regenerate.
15202
15203 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15204
15205 * spu-low.c (spu_kill): Wait for inferior to terminate.
15206 Call clear_inferiors.
15207 (spu_detach): Call clear_inferiors.
15208
15209 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15210
15211 * aclocal.m4: Regenerate.
15212 * config.in: Likewise.
15213 * configure: Likewise.
15214
15215 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15216
15217 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15218 (parse_spufs_run): New function.
15219 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15220 (ppc_breakpoint_at): Handle SPU breakpoints.
15221
15222 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15223
15224 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15225 (SPUFS_MAGIC): Define.
15226 (spu_enumerate_spu_ids): New function.
15227 (linux_qxfer_spu): New function.
15228 (linux_target_ops): Install linux_qxfer_spu.
15229
15230 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15231
15232 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15233 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15234 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15235 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15236 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15237 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15238 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15239 (init_registers_powerpc_cell32l): Add prototype.
15240 (init_registers_powerpc_cell64l): Likewise.
15241 (ppc_arch_setup): Detect Cell/B.E. architecture.
15242
15243 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15244
15245 * Makefile.in (datarootdir): New variable.
15246
15247 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15248
15249 * linux-low.c (linux_write_memory): Update debugging output.
15250 * Makefile.in (clean): Add new descriptions.
15251 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15252 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15253 * configure.srv: Add new files for arm*-*-linux*.
15254 * linux-arm-low.c: Add new declarations.
15255 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15256 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15257 (HWCAP_VFPv3D16): New.
15258 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15259 instead of __IWMMXT__.
15260 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15261 (arm_arch_setup): New.
15262 (target_regsets): Remove #ifdef. Add VFP regset.
15263 (the_low_target): Use arm_arch_setup.
15264
15265 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15266
15267 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15268 the main thread again.
15269
15270 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15271
15272 Adding Neutrino gdbserver.
15273 * configure: Regenerated.
15274 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15275 * configure.srv (i[34567]86-*-nto*): New target.
15276 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15277 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15278 (nto_comctrl) [__QNX__]: New function.
15279 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15280
15281 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15282
15283 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15284 srv_tgtobj.
15285
15286 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15287 Pedro Alves <pedro@codesourcery.com>
15288
15289 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15290 don't support CONTEXT_EXTENDED_REGISTERS.
15291 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15292 (the_low_target): Install them.
15293 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15294 failing with ERROR_PIPE_NOT_CONNECTED.
15295
15296 2009-06-30 Doug Evans <dje@google.com>
15297 Pierre Muller <muller@ics.u-strasbg.fr>
15298
15299 Add h/w watchpoint support to x86-linux, win32-i386.
15300 * Makefile.in (SFILES): Add i386-low.c
15301 (i386_low_h): Define.
15302 (i386-low.o): Add dependencies.
15303 (linux-x86-low.o): Add i386-low.h dependency.
15304 (win32-i386-low.o): Ditto.
15305 * i386-low.c: New file.
15306 * i386-low.h: New file.
15307 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15308 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15309 * linux-low.c (linux_add_process): Initialize arch_private.
15310 (linux_remove_process): Free arch_private.
15311 (add_lwp): Initialize arch_private.
15312 (delete_lwp): Free arch_private.
15313 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15314 provided.
15315 * linux-low.h (process_info_private): New member arch_private.
15316 (lwp_info): New member arch_private.
15317 (linux_target_ops): New members new_process, new_thread,
15318 prepare_to_resume.
15319 (ptid_of): New macro.
15320 * linux-x86-low.c: Include stddef.h, i386-low.h.
15321 (arch_process_info): New struct.
15322 (arch_lwp_info): New struct.
15323 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15324 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15325 (i386_dr_low_get_status): New function.
15326 (x86_insert_point, x86_remove_point): New functions.
15327 (x86_stopped_by_watchpoint): New function.
15328 (x86_stopped_data_address): New function.
15329 (x86_linux_new_process, x86_linux_new_thread): New functions.
15330 (x86_linux_prepare_to_resume): New function.
15331 (the_low_target): Add entries for insert_point, remove_point,
15332 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15333 prepare_to_resume.
15334 * server.c (debug_hw_points): New global.
15335 (monitor_show_help): Document set debug-hw-points.
15336 (handle_query): Process "set debug-hw-points".
15337 * server.h (debug_hw_points): Declare.
15338 (paddress): Declare.
15339 * utils.c (NUMCELLS, CELLSIZE): New macros.
15340 (get_sell, xsnprintf, paddress): New functions.
15341 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15342 remove_point, stopped_by_watchpoint, stopped_data_address.
15343 * win32-i386-low.c: Include i386-low.h.
15344 (debug_reg_state): Replaces dr.
15345 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15346 (i386_dr_low_get_status): New function.
15347 (i386_insert_point, i386_remove_point): New functions.
15348 (i386_stopped_by_watchpoint): New function.
15349 (i386_stopped_data_address): New function.
15350 (i386_initial_stuff): Update.
15351 (get_thread_context,set_thread_context,i386_thread_added): Update.
15352 (the_low_target): Add entries for insert_point,
15353 remove_point, stopped_by_watchpoint, stopped_data_address.
15354 * win32-low.c (win32_insert_watchpoint): New function.
15355 (win32_remove_watchpoint): New function.
15356 (win32_stopped_by_watchpoint): New function.
15357 (win32_stopped_data_address): New function.
15358 (win32_target_ops): Add entries for insert_watchpoint,
15359 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15360 * win32-low.h (win32_target_ops): New members insert_point,
15361 remove_point, stopped_by_watchpoint, stopped_data_address.
15362
15363 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15364
15365 * server.c (process_serial_event): Re-return unsupported, not
15366 error, if the type isn't recognized. Re-allow supporting only
15367 insert or remove packets. Also call require_running for
15368 breakpoints. Add missing break statement to default case. Tidy.
15369 * target.h (struct target_ops): Rename insert_watchpoint to
15370 insert_point, and remove_watchpoint to remove_point.
15371
15372 * linux-low.h (struct linux_target_ops): Likewise.
15373 * linux-low.c (linux_insert_watchpoint): Rename to ...
15374 (linux_insert_point): ... this. Adjust.
15375 (linux_remove_watchpoint): Rename to ...
15376 (linux_remove_point): ... this. Adjust.
15377 (linux_target_ops): Adjust.
15378 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15379 (cris_insert_point): ... this.
15380 (cris_remove_watchpoint): Rename to ...
15381 (cris_remove_point): ... this.
15382 (the_low_target): Adjust.
15383
15384 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15385
15386 * server.c (handle_v_kill): Pass signal_pid to
15387 kill_inferior if multi_process is zero.
15388
15389 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15390
15391 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15392 * target.h (target_ops): Comment for *_watchpoint to make it clear
15393 the functions can get types '0' and '1'.
15394
15395 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15396
15397 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15398 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15399 * regcache.c (get_regcache): Likewise.
15400 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15401 * win32-low.c (child_fetch_inferior_registers): Remove check for
15402 regno 0.
15403
15404 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15405 Pedro Alves <pedro@codesourcery.com>
15406
15407 * target.h (struct target_ops) <supports_multi_process>: New
15408 callback.
15409 (target_supports_multi_process): New.
15410 * server.c (handle_query): Even if GDB reports support, only
15411 enable multi-process if the target also supports it. Report
15412 multi-process support only if the target backend supports it.
15413 * linux-low.c (linux_supports_multi_process): New function.
15414 (linux_target_ops): Install it as target_supports_multi_process
15415 callback.
15416
15417 2009-05-24 Doug Evans <dje@google.com>
15418
15419 Global renaming of find_thread_pid to find_thread_ptid.
15420 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15421 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15422 All callers updated.
15423
15424 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15425 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15426 directly.
15427
15428 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15429 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15430 (linux_resume_one_lwp): Ditto.
15431
15432 2009-05-23 Doug Evans <dje@google.com>
15433
15434 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15435 from struct inferior_list_entry * to struct lwp_info *.
15436 All callers updated.
15437
15438 2009-05-13 Doug Evans <dje@google.com>
15439
15440 * linux-x86-low.c: Don't include assert.h.
15441 (x86_siginfo_fixup): Use fatal, not assert.
15442 (x86_arch_setup): Fix comment.
15443
15444 2009-05-12 Doug Evans <dje@google.com>
15445
15446 Biarch support for i386/amd64 gdbserver.
15447 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15448 Add linux-x86-low.c.
15449 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15450 (linux-x86-low.o): Add.
15451 * linux-x86-64-low.c: Delete.
15452 * linux-i386-low.c: Delete.
15453 * linux-x86-low.c: New file.
15454 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15455 linux-x86-low.o.
15456 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15457 linux-x86-low.o.
15458 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15459 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15460 (linux_child_pid_to_exec_file): New function.
15461 (elf_64_header_p, elf_64_file_p): New functions.
15462 (siginfo_fixup): New function.
15463 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15464 give target a chance to convert layout.
15465 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15466 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15467
15468 2009-05-07 Doug Evans <dje@google.com>
15469
15470 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15471 (regsets_store_inferior_registers): Ditto.
15472
15473 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15474
15475 PR server/10048
15476
15477 * linux-low.c (must_set_ptrace_flags): Delete.
15478 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15479 of the global.
15480 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15481 `lwp->must_set_ptrace_flags' instead.
15482 (linux_wait_for_event_1): Set ptrace options here.
15483 (linux_wait_1): ... not here.
15484
15485 2009-04-30 Doug Evans <dje@google.com>
15486
15487 * inferiors.c (started_inferior_callback): New function.
15488 (attached_inferior_callback): New function.
15489 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15490 * server.c (print_started_pid, print_attached_pid): New functions.
15491 (detach_or_kill_for_exit): New function.
15492 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15493 * server.h (have_started_inferiors_p): Declare.
15494 (have_attached_inferiors_p): Declare.
15495
15496 * inferiors.c (remove_process): Fix memory leak, free process.
15497 * linux-low.c (linux_remove_process): New function.
15498 (linux_kill): Call it instead of remove_process.
15499 (linux_detach, linux_wait_1): Ditto.
15500
15501 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15502
15503 * configure.srv: Add x86 Windows CE target.
15504
15505 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15506
15507 * inferiors.c (get_thread_process): Make global.
15508 * server.h (get_thread_process): Add prototype.
15509 * thread-db.c (find_one_thread): Use get_thread_process
15510 instead of current_process.
15511 (thread_db_get_tls_address): Do not crash if called when
15512 thread layer is not yet initialized.
15513
15514 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15515
15516 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15517 * spu-low.c (current_tid): Rename to ...
15518 (current_ptid): ... this.
15519 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15520 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15521 ptid_get_lwp (current_ptid) instead of current_tid.
15522 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15523 instead of current_tid. Use find_process_pid to verify pid
15524 argument is valid. Pass proper argument to remove_process.
15525 (spu_thread_alive): Compare current_ptid instead of current_tid.
15526 (spu_resume): Likewise.
15527
15528 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15529
15530 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15531 variable.
15532
15533 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15534
15535 Implement the multiprocess extensions, and add linux multiprocess
15536 support.
15537
15538 * server.h (ULONGEST): Declare.
15539 (struct ptid, ptid_t): New.
15540 (minus_one_ptid, null_ptid): Declare.
15541 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15542 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15543 (struct inferior_list_entry): Change `id' type from unsigned from
15544 to ptid_t.
15545 (struct sym_cache, struct breakpoint, struct
15546 process_info_private): Forward declare.
15547 (struct process_info): Declare.
15548 (current_process): Declare.
15549 (all_processes): Declare.
15550 (initialize_inferiors): Declare.
15551 (add_thread): Adjust to use ptid_t.
15552 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15553 (add_process, remove_process, find_thread_pid): Declare.
15554 (find_inferior_id): Adjust to use ptid_t.
15555 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15556 (multi_process): Declare.
15557 (push_event): Adjust to use ptid_t.
15558 (read_ptid, write_ptid): Declare.
15559 (prepare_resume_reply): Adjust to use ptid_t.
15560 (clear_symbol_cache): Declare.
15561 * inferiors.c (all_processes): New.
15562 (null_ptid, minus_one_ptid): New.
15563 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15564 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15565 (add_thread): Change unsigned long to ptid. Remove gdb_id
15566 parameter. Adjust.
15567 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15568 (gdb_id_to_thread): Rename to ...
15569 (find_thread_pid): ... this. Change unsigned long to ptid.
15570 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15571 (loaded_dll, pull_pid_from_list): Adjust.
15572 (add_process, remove_process, find_process_pid)
15573 (get_thread_process, current_process, initialize_inferiors): New.
15574 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15575 (struct target_waitstatus) <related_pid>: Ditto.
15576 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15577 return type to int.
15578 (struct target_ops) <join>: Add `pid' argument.
15579 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15580 (struct target_ops) <wait>: Add `ptid' field. Change return type
15581 to ptid.
15582 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15583 (mywait): Add `ptid' argument. Change return type to ptid_t.
15584 (target_pid_to_str): Declare.
15585 * target.c (set_desired_inferior): Adjust to use ptids.
15586 (mywait): Add new `ptid' argument. Adjust.
15587 (target_pid_to_str): New.
15588 * mem-break.h (free_all_breakpoints): Declare.
15589 * mem-break.c (breakpoints): Delelete.
15590 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15591 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15592 to use per-process breakpoint list.
15593 (free_all_breakpoints): New.
15594 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15595 (symbol_cache, all_symbols_looked_up): Delete.
15596 (hexchars): New.
15597 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15598 read_ptid): New.
15599 (prepare_resume_reply): Change ptid argument's type from unsigned
15600 long to ptid_t. Adjust. Implement W;process and X;process.
15601 (free_sym_cache, clear_symbol_cache): New.
15602 (look_up_one_symbol): Adjust to per-process symbol cache. *
15603 * server.c (cont_thread, general_thread, step_thread): Change type
15604 to ptid_t.
15605 (attached): Delete.
15606 (multi_process): New.
15607 (last_ptid): Change type to ptid_t.
15608 (struct vstop_notif) <ptid>: Change type to ptid_t.
15609 (queue_stop_reply, push_event): Change `ptid' argument's type to
15610 ptid_t.
15611 (discard_queued_stop_replies): Add `pid' argument.
15612 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15613 changes. Don't reference the `attached' global.
15614 (attach_inferior): Adjust to mywait interface changes.
15615 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15616 features. Handle and report "multiprocess+". Handle
15617 "qAttached:PID".
15618 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15619 changes.
15620 (handle_v_kill): New.
15621 (handle_v_stopped): Adjust to use target_pid_to_str.
15622 (handle_v_requests): Allow multiple attaches and runs when
15623 multiprocess extensions are in effect. Handle "vKill".
15624 (myresume): Adjust to use ptids.
15625 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15626 (handle_status): Adjust to discard_queued_stop_replies interface
15627 change.
15628 (first_thread_of, kill_inferior_callback)
15629 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15630 (main): Call initialize_inferiors. Adjust to use ptids, killing
15631 and detaching from all inferiors. Handle multiprocess packet
15632 variants.
15633 * linux-low.h: Include gdb_proc_service.h.
15634 (struct process_info_private): New.
15635 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15636 <lwpid_of>: Use ptid_get_lwp.
15637 (get_lwp_thread): Adjust.
15638 (struct lwp_info): Add `dead' member.
15639 (find_lwp_pid): Declare.
15640 * linux-low.c (thread_db_active): Delete.
15641 (new_inferior): Adjust comment.
15642 (inferior_pid): Delete.
15643 (linux_add_process): New.
15644 (handle_extended_wait): Adjust.
15645 (add_lwp): Change unsigned long to ptid.
15646 (linux_create_inferior): Add process to processes table. Adjust
15647 to use ptids. Don't set new_inferior here.
15648 (linux_attach_lwp): Rename to ...
15649 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15650 it. Adjust to use ptids.
15651 (linux_attach_lwp): New.
15652 (linux_attach): Add process to processes table. Don't set
15653 new_inferior here.
15654 (struct counter): New.
15655 (second_thread_of_pid_p, last_thread_of_process_p): New.
15656 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15657 multiple processes.
15658 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15659 processes. Remove process from process table.
15660 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15661 to multiple processes.
15662 (any_thread_of): New.
15663 (linux_detach): Add `pid' argument, and handle it. Remove process
15664 from processes table.
15665 (linux_join): Add `pid' argument. Handle it.
15666 (linux_thread_alive): Change unsighed long argument to ptid_t.
15667 Consider dead lwps as not being alive.
15668 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15669 threads we're not interested in.
15670 (same_lwp, find_lwp_pid): New.
15671 (linux_wait_for_lwp): Change `pid' argument's type from int to
15672 ptid_t. Adjust.
15673 (linux_wait_for_event): Rename to ...
15674 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15675 from int to ptid_t. Adjust.
15676 (linux_wait_for_event): New.
15677 (linux_wait_1): Add `ptid' argument. Change return type to
15678 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15679 that exit from the process table.
15680 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15681 Adjust.
15682 (mark_lwp_dead): New.
15683 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15684 stopping all threads, mark its main lwp as dead.
15685 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15686 ptids.
15687 (fetch_register, usr_store_inferior_registers)
15688 (regsets_fetch_inferior_registers)
15689 (regsets_store_inferior_registers, linux_read_memory)
15690 (linux_write_memory): Inline `inferior_pid'.
15691 (linux_look_up_symbols): Adjust to use per-process
15692 `thread_db_active'.
15693 (linux_request_interrupt): Adjust to use ptids.
15694 (linux_read_auxv): Inline `inferior_pid'.
15695 (initialize_low): Don't reference thread_db_active.
15696 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15697 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15698 (ps_getpid): Return the pid of the current inferior.
15699 * thread-db.c (proc_handle, thread_agent): Delete.
15700 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15701 per-process data.
15702 (find_one_thread): Change argument type to ptid_t. Adjust to
15703 per-process data.
15704 (maybe_attach_thread): Adjust to per-process data and ptids.
15705 (thread_db_find_new_threads): Ditto.
15706 (thread_db_init): Ditto.
15707 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15708 processes table. Adjust to use ptids.
15709 (spu_kill, spu_detach): Adjust interface. Remove process from
15710 processes table.
15711 (spu_join, spu_thread_alive): Adjust interface.
15712 (spu_wait): Adjust interface. Remove process from processes
15713 table. Adjust to use ptids.
15714 * win32-low.c (current_inferior_tid): Delete.
15715 (current_inferior_ptid): New.
15716 (debug_event_ptid): New.
15717 (thread_rec): Take a ptid. Adjust.
15718 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15719 (child_delete_thread): Ditto.
15720 (do_initial_child_stuff): Add `attached' argument. Add process to
15721 processes table.
15722 (child_fetch_inferior_registers, child_store_inferior_registers):
15723 Adjust.
15724 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15725 (win32_attach): Pass 1 to do_initial_child_stuff.
15726 (win32_kill): Adjust interface. Remove process from processes
15727 table.
15728 (win32_detach): Ditto.
15729 (win32_join): Adjust interface.
15730 (win32_thread_alive): Take a ptid.
15731 (win32_resume): Adjust to use ptids.
15732 (get_child_debug_event): Ditto.
15733 (win32_wait): Adjust interface. Remove exiting process from
15734 processes table.
15735
15736 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15737
15738 Non-stop mode support.
15739
15740 * server.h (non_stop): Declare.
15741 (gdb_client_data, handler_func): Declare.
15742 (delete_file_handler, add_file_handler, start_event_loop):
15743 Declare.
15744 (handle_serial_event, handle_target_event, push_event)
15745 (putpkt_notif): Declare.
15746 * target.h (enum resume_kind): New.
15747 (struct thread_resume): Replace `step' field by `kind' field.
15748 (TARGET_WNOHANG): Define.
15749 (struct target_ops) <wait>: Add `options' argument.
15750 <supports_non_stop, async, start_non_stop>: New fields.
15751 (target_supports_non_stop, target_async): New.
15752 (start_non_stop): Declare.
15753 (mywait): Add `options' argument.
15754 * target.c (mywait): Add `options' argument. Print child exit
15755 notifications here.
15756 (start_non_stop): New.
15757 * server.c (non_stop, own_buf, mem_buf): New globals.
15758 (struct vstop_notif): New.
15759 (notif_queue): New global.
15760 (queue_stop_reply, push_event, discard_queued_stop_replies)
15761 (send_next_stop_reply): New.
15762 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15763 interface changes.
15764 (attach_inferior): In non-stop mode, don't wait for the target
15765 here.
15766 (handle_general_set): Handle QNonStop.
15767 (handle_query): When handling qC, return the current general
15768 thread, instead of the first thread of the list.
15769 (handle_query): If the backend supports non-stop mode, include
15770 QNonStop+ in the qSupported query response.
15771 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15772 and non-stop mode.
15773 (handle_v_attach, handle_v_run): Handle non-stop mode.
15774 (handle_v_stopped): New.
15775 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15776 (myresume): Adjust to use resume_kind. Handle non-stop.
15777 (queue_stop_reply_callback): New.
15778 (handle_status): Handle non-stop mode.
15779 (main): Clear non_stop flag on reconnection. Use the event-loop.
15780 Refactor serial protocol handling from here ...
15781 (process_serial_event): ... to this new function. When GDB
15782 selects any thread, select one here. In non-stop mode, wait until
15783 GDB acks all pending events before exiting.
15784 (handle_serial_event, handle_target_event): New.
15785 * remote-utils.c (remote_open): Install remote_desc in the event
15786 loop.
15787 (remote_close): Remove remote_desc from the event loop.
15788 (putpkt_binary): Rename to...
15789 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15790 (putpkt_binary): New as wrapper around putpkt_binary_1.
15791 (putpkt_notif): New.
15792 (prepare_resume_reply): In non-stop mode, don't change the
15793 general_thread.
15794 * event-loop.c: New.
15795 * Makefile.in (OBJ): Add event-loop.o.
15796 (event-loop.o): New rule.
15797
15798 * linux-low.h (pid_of): Moved here.
15799 (lwpid_of): New.
15800 (get_lwp_thread): Use lwpid_of.
15801 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15802 * linux-low.c (pid_of): Delete.
15803 (inferior_pid): Use lwpid_of.
15804 (linux_event_pipe): New.
15805 (target_is_async_p): New.
15806 (delete_lwp): New.
15807 (handle_extended_wait): Use lwpid_of.
15808 (add_lwp): Don't set lwpid field.
15809 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15810 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15811 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15812 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15813 first. Adjust to linux_wait_for_event interface changes. Use
15814 lwpid_of.
15815 (linux_detach): Don't delete the main lwp here.
15816 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15817 (status_pending_p): Don't consider explicitly suspended lwps.
15818 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15819 pointer. Add OPTIONS argument. Change return type to int. Use
15820 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15821 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15822 pointer. Add status pointer argument. Return a pid instead of a
15823 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15824 changes. In non-stop mode, don't switch to a random thread.
15825 (linux_wait): Rename to...
15826 (linux_wait_1): ... this. Add target_options argument, and handle
15827 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15828 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15829 clean exit and signal exit code. Don't stop all threads in
15830 non-stop mode. In all-stop mode, only stop all threads when
15831 reporting a stop to GDB. Handle explicit thread stop requests.
15832 (async_file_flush, async_file_mark): New.
15833 (linux_wait): New.
15834 (send_sigstop): Use lwpid_of.
15835 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15836 interface changes. In non-stop mode, don't switch to a random
15837 thread.
15838 (linux_resume_one_lwp): Use lwpid_of.
15839 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15840 (linux_resume_one_thread): ... this. Handle resume_stop. In
15841 non-stop mode, don't look for pending flag in all threads.
15842 (resume_status_pending_p): Don't consider explicitly suspended
15843 threads.
15844 (my_waitpid): Reimplement. Emulate __WALL.
15845 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15846 Use lwpid_of.
15847 (sigchld_handler, linux_supports_non_stop, linux_async)
15848 (linux_start_non_stop): New.
15849 (linux_target_ops): Register linux_supports_non_stop, linux_async
15850 and linux_start_non_stop.
15851 (initialize_low): Install SIGCHLD handler.
15852 * thread-db.c (thread_db_create_event, find_one_thread)
15853 (thread_db_get_tls_address): Use lwpid_of.
15854 * win32-low.c (win32_detach): Adjust to use resume_kind.
15855 (win32_wait): Add `options' argument.
15856 * spu-low.c (spu_resume): Adjust to use resume_kind.
15857 (spu_wait): Add `options' argument.
15858
15859 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15860
15861 Decouple target code from remote protocol.
15862
15863 * target.h (enum target_waitkind): New.
15864 (struct target_waitstatus): New.
15865 (struct target_ops) <wait>: Return an unsigned long. Take a
15866 target_waitstatus pointer instead of a char pointer.
15867 (mywait): Likewise.
15868 * target.c (mywait): Change prototype to return an unsigned long.
15869 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15870 * server.h (thread_from_wait, old_thread_from_wait): Delete
15871 declarations.
15872 (prepare_resume_reply): Change prototype to take a
15873 target_waitstatus.
15874 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15875 (last_status, last_ptid): New.
15876 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15877 pid instead of a signal.
15878 (attach_inferior): Remove "status" and "signal" parameters.
15879 Adjust.
15880 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15881 not as an address.
15882 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15883 (handle_v_requests, myresume): Remove "status" and "signal"
15884 parameters. Adjust.
15885 (handle_status): New.
15886 (main): Delete local `status'. Adjust.
15887 * remote-utils.c: Include target.h.
15888 (prepare_resume_reply): Change prototype to take a
15889 target_waitstatus. Adjust.
15890
15891 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15892 interface.
15893 * spu-low.c (spu_wait): Adjust.
15894 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15895 Delete.
15896 (win32_wait): Adjust.
15897
15898 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15899
15900 * target.h (struct thread_resume): Delete leave_stopped member.
15901 (struct target_ops): Add a `n' argument to the `resume' callback.
15902 * server.c (start_inferior): Adjust.
15903 (handle_v_cont, myresume): Adjust.
15904 * linux-low.c (check_removed_breakpoint): Adjust to resume
15905 interface change, and to removed leave_stopped field.
15906 (resume_ptr): Delete.
15907 (struct thread_resume_array): New.
15908 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15909 resume interface change.
15910 (linux_continue_one_thread, linux_queue_one_thread)
15911 (resume_status_pending_p): Check if the resume field is NULL
15912 instead of checking the leave_stopped member.
15913 (linux_resume): Adjust to the target resume interface change.
15914 * spu-low.c (spu_resume): Adjust to the target resume interface
15915 change.
15916 * win32-low.c (win32_detach, win32_resume): Ditto.
15917
15918 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15919
15920 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15921 flag.
15922 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15923 pending.
15924 (linux_continue_one_thread): Only preserve the stepping flag if
15925 there's a pending breakpoint.
15926
15927 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15928
15929 * server.c (main): After the inferior having exited, call
15930 remote_close before exiting gdbserver.
15931
15932 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15933
15934 Fix size of FPSCR in Power 7 processors.
15935 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15936 (PPC_FEATURE_HAS_DFP): New #define.
15937 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15938 size of the FPSCR.
15939
15940 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15941
15942 * server.c (handle_query) Whitespace and formatting.
15943
15944 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15945
15946 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15947 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15948 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15949 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15950 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15951 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15952 Makefile.in, configure.ac: Fix whitespace throughout.
15953 * configure: Regenerate.
15954
15955 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15956
15957 * inferiors.c (find_inferior): Make it safe for the callback
15958 function to delete the currently iterated inferior.
15959
15960 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15961
15962 * Makefile.in (linuw_low_h): Move higher.
15963 (thread-db.o): Depend on $(linux_low_h).
15964
15965 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15966
15967 Rename "process" to "lwp" throughout.
15968
15969 * linux-low.c (all_processes): Rename to...
15970 (all_lwps): ... this.
15971 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15972 (add_process): Rename to ...
15973 (add_lwp): ... this. Adjust.
15974 (linux_create_inferior): Adjust.
15975 (linux_attach_lwp): Adjust.
15976 (linux_attach): Adjust.
15977 (linux_kill_one_process): Rename to ...
15978 (linux_kill_one_lwp): ... this. Adjust.
15979 (linux_kill): Adjust.
15980 (linux_detach_one_process): Rename to ...
15981 (linux_detach_one_lwp): ... this. Adjust.
15982 (linux_detach): Adjust.
15983 (check_removed_breakpoint): Adjust.
15984 (status_pending_p): Adjust.
15985 (linux_wait_for_process): Rename to ...
15986 (linux_wait_for_lwp): ... this. Adjust.
15987 (linux_wait_for_event): Adjust.
15988 (send_sigstop): Adjust.
15989 (wait_for_sigstop): Adjust.
15990 (stop_all_processes): Rename to ...
15991 (stop_all_lwps): ... this.
15992 (linux_resume_one_process): Rename to ...
15993 (linux_resume_one_lwp): ... this. Adjust.
15994 (linux_set_resume_request, linux_continue_one_thread)
15995 (linux_queue_one_thread, resume_status_pending_p)
15996 (usr_store_inferior_registers, regsets_store_inferior_registers)
15997 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15998 Adjust.
15999 * linux-low.h (get_process): Rename to ...
16000 (get_lwp): ... this. Adjust.
16001 (get_thread_process): Rename to ...
16002 (get_thread_lwp): ... this. Adjust.
16003 (get_process_thread): Rename to ...
16004 (get_lwp_thread): ... this. Adjust.
16005 (struct process_info): Rename to ...
16006 (struct lwp_info): ... this.
16007 (all_processes): Rename to ...
16008 (all_lwps): ... this.
16009 * proc-service.c (ps_lgetregs): Adjust.
16010 * thread-db.c (thread_db_create_event, find_one_thread)
16011 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16012
16013 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16014
16015 * server.c (handle_query): Handle "qAttached".
16016
16017 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16018
16019 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16020 GPLv3, update license URL.
16021
16022 2009-03-01 Doug Evans <dje@google.com>
16023
16024 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16025 (server_h): Add gdb_signals.h.
16026 (signals.o): Update.
16027 * server.h (target_signal_from_host,target_signal_to_host_p)
16028 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16029
16030 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16031
16032 * remote-utils.c (getpkt): Also generate remote-debug
16033 information if noack_mode is set.
16034
16035 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16036
16037 * server.c (handle_query): Report qXfer:siginfo:read and
16038 qXfer:siginfo:write as supported and handle them.
16039 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16040 * linux-low.c (linux_xfer_siginfo): New.
16041 (linux_target_ops): Set it.
16042
16043 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16044
16045 * server.c (gdbserver_usage): Mention --remote-debug.
16046 (main): Accept '--remote-debug' switch.
16047
16048 2009-01-18 Doug Evans <dje@google.com>
16049
16050 * regcache.c (new_register_cache): No need to check result of xcalloc.
16051 * server.c (handle_search_memory): Back out calls to xmalloc,
16052 result is checked and error is returned to user upon failure.
16053 (handle_query): Ditto. Add more checks for result of malloc.
16054 (handle_v_cont): Check result of malloc, report error back to
16055 user upon failure.
16056 (handle_v_run): Ditto. Call freeargv.
16057 * server.h (freeargv): Declare.
16058 * utils.c (freeargv): New fn.
16059
16060 2009-01-15 Doug Evans <dje@google.com>
16061
16062 * gdbreplay.c (perror_with_name): Make arg const char *.
16063 * server.h (target_signal_to_name): Make return type const char *.
16064 * thread-db.c (thread_db_err_str): Make return type const char *.
16065 * utils.c (perror_with_name): Make arg const char *.
16066
16067 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16068
16069 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16070 when handling a EXIT_PROCESS_DEBUG_EVENT.
16071
16072 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16073
16074 * gdbreplay.c (gdbreplay_version): Update copyright year.
16075 * server.c (gdbserver_version): Likewise.
16076
16077 2009-01-05 Doug Evans <dje@google.com>
16078
16079 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16080 (handle_extended_wait): Improve comment.
16081
16082 2008-12-13 Doug Evans <dje@google.com>
16083
16084 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16085 * server.h (ATTR_MALLOC): New macro.
16086 (xmalloc,xcalloc,xstrdup): Declare.
16087 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16088 * inferiors.c: Ditto.
16089 * linux-low.c: Ditto.
16090 * mem-break.c: Ditto.
16091 * regcache.c: Ditto.
16092 * remote-utils.c: Ditto.
16093 * server.c: Ditto.
16094 * target.c: Ditto.
16095 * win32-low.c: Ditto.
16096
16097 2008-12-12 Doug Evans <dje@google.com>
16098
16099 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16100 in debugging printf.
16101
16102 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16103
16104 2008-12-09 Doug Evans <dje@google.com>
16105
16106 * linux-low.h (struct process_info): Delete member tid, unused.
16107 * thread-db.c (find_one_thread): Update.
16108 (maybe_attach_thread): Update.
16109
16110 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16111
16112 * target.h (struct target_ops): Add qxfer_osdata member.
16113 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16114 and dirent.h.
16115 (linux_qxfer_osdata): New functions.
16116 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16117 callback.
16118 * server.c (handle_query): Handle "qXfer:osdata:read:".
16119 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16120 (buffer_xml_printf): New functions.
16121 * server.h (struct buffer): New.
16122 (buffer_grow_str, buffer_grow_str0): New macros.
16123 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16124 (buffer_xml_printf): Declare.
16125
16126 2008-11-24 Doug Evans <dje@google.com>
16127
16128 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16129
16130 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16131
16132 * server.c (handle_v_run): Always use the supplied argument list.
16133
16134 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16135
16136 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16137 (xtensa_regmap_table): Add entry for scompare1.
16138
16139 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16140
16141 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16142 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16143 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16144 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16145 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16146 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16147 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16148 XML target descriptions.
16149 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16150 when inferior is running on an ISA 2.05 or later processor. Add
16151 special case to return offset for full 64-bit slot of FPSCR when
16152 in 32-bits.
16153
16154 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16155
16156 * Makefile.in (SFILES, clean): Added sparc64 files.
16157 (reg-sparc64.o, reg-sparc64.c): New.
16158 * configure.srv (sparc*-*-linux*): New configuration.
16159 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16160 syscall arguments for SPARC.
16161 (regsets_store_inferior_registers): Likewise.
16162 * linux-sparc-low.c: New file.
16163
16164 2008-10-21 Doug Evans <dje@google.com>
16165
16166 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16167 (READLINE_DIR,READLINE_DEP): Delete.
16168 (INTERNAL_CFLAGS): Update.
16169 (LINTFLAGS): Update.
16170
16171 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16172
16173 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16174 whole argv from the last run, not just argv[0].
16175
16176 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16177
16178 * regcache.c (new_register_cache): Return NULL if the register
16179 cache size isn't known yet.
16180 (free_register_cache): Avoid dereferencing a NULL regcache.
16181
16182 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16183
16184 * configure.srv: Merge MIPS and MIPS64.
16185
16186 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16187
16188 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16189
16190 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16191
16192 * Makefile.in: Add required vsx dependencies.
16193
16194 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16195 Declare init_registers_powerpc_vsx32l.
16196 Declare init_registers_powerpc_vsx64l.
16197 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16198 (ppc_arch_setup): Check for VSX in hwcap.
16199 (ppc_fill_vsxregset): New function.
16200 (ppc_store_vsxregset): New function.
16201 Add new VSX entry in regset_info target_regsets.
16202
16203 * configure.srv: Add new VSX dependencies.
16204
16205 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16206
16207 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16208 (remote_open): Set or clear transport_is_reliable.
16209 (putpkt_binary): Don't expect acks in noack mode.
16210 (getpkt): Don't send ack/nac in noack mode.
16211 * server.c (handle_general_set): Handle QStartNoAckMode.
16212 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16213 qSupported.
16214 (main): Reset noack_mode on every connection.
16215 * server.h (noack_mode): Declare.
16216
16217 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16218
16219 * Makefile.in (GDBREPLAY_OBS): New variable.
16220 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16221
16222 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16223 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16226 (usr_store_inferior_registers): Likewise.
16227 (regsets_store_inferior_registers): Likewise.
16228
16229 2008-07-31 Rolf Jansen <rj@surtec.com>
16230 Pedro Alves <pedro@codesourcery.com>
16231
16232 * configure.ac: Check for memmem declaration.
16233 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16234 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16235 (disable_packet_qfThreadInfo): Unconditionally compile.
16236 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16237 * configure, config.in: Regenerate.
16238
16239 2008-07-28 Doug Kwan <dougkwan@google.com>
16240
16241 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16242 (linux_write_memory): Remove declaration of errno.
16243
16244 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16245
16246 * linux-low.c (handle_extended_wait): Do not use "status"
16247 variable uninitialized.
16248
16249 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16250
16251 * server.c (handle_v_attach): Inhibit reporting dll changes.
16252
16253 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16254
16255 * remote-utils.c (prepare_resume_reply): If requested, don't
16256 output "thread:TID" in the T stop reply.
16257
16258 * server.c (disable_packet_vCont, disable_packet_Tthread)
16259 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16260 (handle_query): If requested, disable support for qC, qfThreadInfo
16261 and qsThreadInfo.
16262 (handle_v_requests): If requested, disable support for vCont.
16263 (gdbserver_show_disableable): New.
16264 (main): Handle --disable-packet and --disable-packet=LIST.
16265
16266 * server.h (disable_packet_vCont, disable_packet_Tthread)
16267 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16268
16269 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16270
16271 * server.c (gdbserver_usage): Mention --version.
16272
16273 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16274
16275 * Makefile.in (gdbreplay.o): New rule.
16276
16277 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16278
16279 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16280 message, not gdbserver.
16281
16282 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16283 Nathan Sidwell <nathan@codesourcery.com>
16284 Joseph Myers <joseph@codesourcery.com>
16285
16286 * acinclude.m4: Include ../../config/acx.m4.
16287 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16288 * configure, config.in: Regenerate.
16289 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16290 * server.c (gdbserver_version): Print PKGVERSION.
16291 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16292 (main): Adjust gdbserver_usage calls.
16293 * gdbreplay.c (version, host_name): Add declarations.
16294 (gdbreplay_version, gdbreplay_usage): New.
16295 (main): Accept --version and --help options.
16296
16297 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16298
16299 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16300 (arm_breakpoint_at): Handle Thumb.
16301 (the_low_target): Add comment.
16302
16303 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16304
16305 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16306
16307 2008-05-09 Doug Evans <dje@google.com>
16308
16309 * server.h (decode_search_memory_packet): Declare.
16310 * remote-utils.c (decode_search_memory_packet): New fn.
16311 * server.c (handle_search_memory_1): New fn.
16312 (handle_search_memory): New fn.
16313 (handle_query): Process qSearch:memory packets.
16314
16315 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16316
16317 * regcache.c (registers_length): Remove.
16318 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16319 full register packet.
16320 * regcache.h (registers_length): Remove prototype.
16321 * server.h (PBUFSIZ): Define to 16384.
16322
16323 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16324
16325 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16326 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16327 powerpc-64l.o, and powerpc-altivec64l.o.
16328 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16329 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16330 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16331 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16332 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16333 to srv_xmlfiles.
16334
16335 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16336 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16337 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16338 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16339 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16340 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16341 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16342 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16343 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16344 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16345 (clean): Update.
16346
16347 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16348 (init_registers_powerpc_32l): ... this new prototype.
16349 (init_registers_powerpc_32): Remove, replace by ...
16350 (init_registers_powerpc_altivec32l): ... this new prototype.
16351 (init_registers_powerpc_e500): Remove, replace by ...
16352 (init_registers_powerpc_e500l): ... this new prototype.
16353 (init_registers_ppc64): Remove, replace by ...
16354 (init_registers_powerpc_64l): ... this new prototype.
16355 (init_registers_powerpc_64): Remove, replace by ...
16356 (init_registers_powerpc_altivec64l): ... this new prototype.
16357 (ppc_num_regs): Set to 73.
16358 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16359 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16360 (ppc_cannot_store_register): Handle orig_r3 and trap.
16361 (ppc_arch_setup): Update init_registers_... calls.
16362 (ppc_fill_gregset): Handle orig_r3 and trap.
16363
16364 * inferiors.c (clear_inferiors): Reset current_inferior.
16365
16366 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16367
16368 * acinclude.m4: Add override.m4.
16369 * configure: Regenerate.
16370
16371 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16372
16373 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16374 initial call to init_register_ppc64.
16375
16376 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16377
16378 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16379 single powerpc*-*-linux* case.
16380 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16381
16382 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16383
16384 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16385 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16386 from reg_xmlfiles.
16387 * linux-ppc-low.c: Include <elf.h>.
16388 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16389 (ppc_hwcap): New global variable.
16390 (ppc_regmap): Remove __SPE__ #ifdef sections.
16391 (ppc_regmap_e500): New global variable.
16392 (ppc_cannot_store_register): Update __SPE__ special case.
16393 (ppc_get_hwcap): New function.
16394 (ppc_arch_setup): Use it to determine whether inferior supports
16395 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16396 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16397 Do not access registers if target does not support AltiVec.
16398 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16399 Do not access registers if target does not support SPE.
16400 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16401
16402 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16403
16404 * linux-low.c (disabled_regsets, num_regsets): New.
16405 (use_regsets_p): Delete.
16406 (linux_wait_for_process): Clear disabled_regsets.
16407 (regsets_fetch_inferior_registers): Check and set it.
16408 (regsets_store_inferior_registers): Likewise.
16409 (linux_fetch_registers, linux_store_registers): Do not use
16410 use_regsets_p.
16411 (initialize_low): Allocate disabled_regsets.
16412
16413 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16414
16415 * Makefile.in (LIBOBJS): New.
16416 (OBS): Use LIBOBJS.
16417 (memmem.o): New rule.
16418 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16419 * configure: Regenerated.
16420
16421 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16422
16423 * server.c (handle_query): Never return "unsupported" for
16424 qXfer:features:read queries.
16425
16426 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16427
16428 * server.c (get_features_xml): Fix inverted condition.
16429 (handle_query): Always support qXfer:feature:read.
16430
16431 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16432
16433 * server.c (wrapper_argv): New.
16434 (start_inferior): Handle wrapper_argv. If set, expect an extra
16435 trap.
16436 (gdbserver_usage): Document --wrapper.
16437 (main): Parse --wrapper.
16438
16439 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16440
16441 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16442 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16443 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16444 (ppc_set_pc): Likewise.
16445 (ppc_arch_setup): New function.
16446 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16447 of collect_register.
16448 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16449
16450 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16451
16452 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16453 instead of linux-ppc64-low.o.
16454 * linux-ppc64-low.c: Remove file.
16455 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16456 (linux-ppc64-low.o): Remove rule.
16457
16458 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16459 (init_registers_powerpc_64): Likewise.
16460 (ppc_regmap): Conditionally define depending on __powerpc64__.
16461 (ppc_cannot_store_register): Do not special-case "fpscr" when
16462 compiled on __powerpc64__.
16463 (ppc_collect_ptrace_register): New function.
16464 (ppc_supply_ptrace_register): New function.
16465 (ppc_breakpoint): Change type to "unsigned int".
16466 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16467 (the_low_target): Conditionally provide initializers for the
16468 arch_setup member depending on __powerpc64__. Install
16469 collect_ptrace_register and supply_ptrace_register members.
16470
16471 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16472
16473 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16474 * server.c (gdbserver_xmltarget): Define.
16475 (get_features_xml): Use it to replace "target.xml" and arch_string.
16476
16477 * configure.srv: Remove srv_xmltarget. Add XML files that were
16478 mentioned there to srv_xmlfiles instead. Remove conditional tests
16479 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16480 srv_xmlfiles and srv_regobj to include all possible choices.
16481 * configure.ac (srv_xmltarget): Remove.
16482 (srv_xmlfiles): Do not add "target.xml".
16483 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16484 checks for supplementary target information.
16485 * configure: Regenerate.
16486 * Makefile.in (XML_TARGET): Remove.
16487 (target.xml): Remove rule.
16488 (clean): Do not clean up target.xml.
16489 (.PRECIOUS): Do not mention target.xml.
16490
16491 * target.h (struct target_ops): Remove arch_string member.
16492 * linux-low.c (linux_arch_string): Remove.
16493 (linux_target_ops): Remove arch_string initializer.
16494 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16495 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16496 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16497 * spu-low.c (spu_arch_string): Remove.
16498 (spu_target_ops): Remove arch_string initializer.
16499 * win32-low.c (win32_arch_string): Remove.
16500 (win32_target_ops): Remove arch_string initializer.
16501 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16502 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16503 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16504
16505 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16506
16507 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16508 by collect_ptrace_register and supply_ptrace_register hooks.
16509 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16510 instead of checking for the_low_target.left_pad_xfer.
16511 (usr_store_inferior_registers): Use collect_ptrace_register callback
16512 instead of checking for the_low_target.left_pad_xfer.
16513
16514 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16515 (s390_supply_ptrace_register): Likewise.
16516 (s390_fill_gregset): Call s390_collect_ptrace_register.
16517 (the_low_target): Update.
16518
16519 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16520 (ppc_supply_ptrace_register): Likewise.
16521 (the_low_target): Update.
16522
16523 * linux-i386-low.c (the_low_target): Update.
16524 * linux-x86-64-low.c (the_low_target): Update.
16525
16526 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16527
16528 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16529 reg-s390.o and reg-s390x.o.
16530
16531 * linux-low.c (new_inferior): New global variable.
16532 (linux_create_inferior, linux_attach): Set it.
16533 (linux_wait_for_process): Call the_low_target.arch_setup after the
16534 target has stopped for the first time.
16535 (initialize_low): Do not call the_low_target.arch_setup.
16536
16537 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16538 (s390_set_pc): Likewise.
16539 (s390_arch_setup): New function.
16540 (the_low_target): Use s390_arch_setup as arch_setup routine.
16541
16542 * regcache.c (realloc_register_cache): New function.
16543 (set_register_cache): Call it for each existing regcache.
16544
16545 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16546
16547 * server.h (init_registers): Remove prototype.
16548
16549 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16550 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16551 instead of init_registers ().
16552 * linux-arm-low.c (init_registers_arm): Add prototype.
16553 (init_registers_arm_with_iwmmxt): Likewise.
16554 (the_low_target): Add initializer for arch_setup field.
16555 * linux-cris-low.c (init_registers_cris): Add prototype.
16556 (the_low_target): Add initializer for arch_setup field.
16557 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16558 (the_low_target): Add initializer for arch_setup field.
16559 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16560 (the_low_target): Add initializer for arch_setup field.
16561 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16562 (the_low_target): Add initializer for arch_setup field.
16563 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16564 (the_low_target): Add initializer for arch_setup field.
16565 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16566 (the_low_target): Add initializer for arch_setup field.
16567 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16568 (init_registers_mips64_linux): Likewise.
16569 (the_low_target): Add initializer for arch_setup field.
16570 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16571 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16572 (the_low_target): Add initializer for arch_setup field.
16573 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16574 (init_registers_powerpc_64): Likewise.
16575 (the_low_target): Add initializer for arch_setup field.
16576 * linux-s390-low.c (init_registers_s390): Add prototype.
16577 (init_registers_s390x): Likewise.
16578 (the_low_target): Add initializer for arch_setup field.
16579 * linux-sh-low.c (init_registers_sh): Add prototype.
16580 (the_low_target): Add initializer for arch_setup field.
16581 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16582 (the_low_target): Add initializer for arch_setup field.
16583 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16584 (the_low_target): Add initializer for arch_setup field.
16585
16586 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16587 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16588 instead of init_registers ().
16589 * win32-arm-low.c (init_registers_arm): Add prototype.
16590 (the_low_target): Add initializer for arch_setup field.
16591 * win32-i386-low.c (init_registers_i386): Add prototype.
16592 (the_low_target): Add initializer for arch_setup field.
16593
16594 * spu-low.c (init_registers_spu): Add prototype.
16595 (initialize_low): Call initialie_registers_spu () instead of
16596 initialize_registers ().
16597
16598 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16599
16600 * server.c (handle_v_requests): When handling the vRun and vAttach
16601 packets, if already debugging a process, don't kill it. Return an
16602 error instead.
16603
16604 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * server.c (handle_query): Correct length check.
16607
16608 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16609
16610 * win32-low.c (do_initial_child_stuff): Add process handle
16611 parameter. Set current_process_handle and current_process_id from the
16612 parameters. Clear globals.
16613 (win32_create_inferior): Don't set current_process_handle and
16614 current_process_id here. Instead pass them on the call to
16615 do_initial_child_stuff.
16616 (win32_attach): Likewise.
16617 (win32_clear_inferiors): New.
16618 (win32_kill): Don't close the current process handle or the
16619 current thread handle here. Instead call win32_clear_inferiors.
16620 (win32_detach): Don't open a new handle to the process. Call
16621 win32_clear_inferiors.
16622 (win32_join): Don't rely on current_process_handle; open a new
16623 handle using the process id.
16624 (win32_wait): Call win32_clear_inferiors when the inferior process
16625 has exited.
16626
16627 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16628
16629 * server.c (monitor_show_help): Add "exit".
16630
16631 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16632
16633 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16634 (clean): Add reg-xtensa.c.
16635 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16636 * configure.srv (xtensa*-*-linux*) New target.
16637 * linux-xtensa-low.c: New.
16638 * xtensa-xtregs.c: New.
16639
16640 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16641
16642 * hostio.c: Don't include errno.h.
16643 (errno_to_fileio_errno): Move to hostio-errno.
16644 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16645 error number outputting to the target->hostio_last_error callback.
16646 (hostio_packet_error): Use FILEIO_EINVAL directly.
16647 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16648 calls to hostio_error.
16649 * hostio-errno.c: New.
16650 * server.h (hostio_last_error_from_errno): Declare.
16651 * target.h (target_ops): Add hostio_last_error member.
16652 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16653 as hostio_last_error handler.
16654 * spu-low.c (spu_target_ops): Likewise.
16655 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16656 (wince_hostio_last_error): New functions.
16657 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16658 as hostio_last_error handler.
16659 (win32_target_ops) [!_WIN32_WCE]: Register
16660 hostio_last_error_from_errno as hostio_last_error handler.
16661 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16662 (hostio-errno.o): New rule.
16663 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16664 * configure.srv (srv_hostio_err_objs): New variable. Default to
16665 hostio-errno.o.
16666 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16667 * configure: Regenerate.
16668
16669 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16672 (linux_kill, linux_detach): Clean up the process list.
16673 * remote-utils.c (remote_open): Improve port number parsing.
16674 (putpkt_binary, input_interrupt): Only send interrupts if the target
16675 is running.
16676 * server.c (extended_protocol): Make static.
16677 (attached): Define earlier.
16678 (exit_requested, response_needed, program_argv): New variables.
16679 (target_running): New.
16680 (start_inferior): Clear attached here.
16681 (attach_inferior): Set attached here.
16682 (require_running): Define.
16683 (handle_query): Use require_running and target_running. Implement
16684 "monitor exit".
16685 (handle_v_attach, handle_v_run): New.
16686 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16687 (gdbserver_usage): Update.
16688 (main): Redo argument parsing. Handle --debug and --multi. Handle
16689 --attach along with other options or after the port. Save
16690 program_argv. Support no initial program. Resynchronize
16691 communication with GDB after an error. Handle "monitor exit".
16692 Use require_running and target_running. Always allow the extended
16693 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16694 restart in extended mode.
16695 * README: Refer to the GDB manual. Update --attach usage.
16696
16697 2007-12-20 Andreas Schwab <schwab@suse.de>
16698
16699 * linux-low.c (STACK_SIZE): Define.
16700 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16701 (linux_test_for_tracefork): Likewise.
16702
16703 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16704
16705 * linux-low.c (linux_wait_for_event): Update messages. Do not
16706 reinsert auto-delete breakpoints.
16707 * mem-break.c (struct breakpoint): Change return type of handler to
16708 int.
16709 (set_breakpoint_at): Update handler type.
16710 (reinsert_breakpoint_handler): Return 1 instead of calling
16711 delete_breakpoint.
16712 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16713 setting a new one.
16714 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16715 * mem-break.h (set_breakpoint_at): Update handler type.
16716 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16717 * win32-low.c (auto_delete_breakpoint): New.
16718 (get_child_debug_event): Use it.
16719
16720 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16721
16722 * configure.ac: Check for pread and pwrite.
16723 * hostio.c (handle_pread): Fall back to lseek and read.
16724 (handle_pwrite): Fall back to lseek and write.
16725 * config.in, configure: Regenerated.
16726
16727 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16728
16729 * server.c (myresume): Add own_buf argument.
16730 (main): Update calls.
16731
16732 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16733
16734 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16735 * remote-utils.c (remote_open): Do not call disable_async_io.
16736 (block_async_io): Delete.
16737 (unblock_async_io): Make static.
16738 (initialize_async_io): New.
16739 * server.c (handle_v_cont): Handle async I/O here.
16740 (myresume): Likewise. Move other common resume tasks here...
16741 (main): ... from here. Call initialize_async_io. Disable async
16742 I/O before the main loop.
16743 * server.h (initialize_async_io): Declare.
16744 (block_async_io, unblock_async_io): Delete prototypes.
16745 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16746
16747 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16748
16749 * remote-utils.c (readchar): Allow binary data in received messages.
16750
16751 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16752
16753 * win32-low.c (attaching): New global.
16754 (win32_create_inferior): Clear the `attaching' global.
16755 (win32_attach): Set the `attaching' global.
16756 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16757 attaching. Only set a breakpoint at the entry point if not
16758 attaching.
16759
16760 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16761
16762 * server.c (main): Don't report dll events on the initial
16763 connection on attaches.
16764
16765 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16766
16767 * server.c (main): Relax numerical bases supported for the pid of
16768 the --attach command line argument.
16769
16770 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16771
16772 * win32-low.c (win32_attach): Call OpenProcess before
16773 DebugActiveProcess, not after. Add last error output to error
16774 call.
16775
16776 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16777
16778 * win32-low.c (win32_get_thread_context)
16779 (win32_set_thread_context): New functions.
16780 (thread_rec): Use win32_get_thread_context.
16781 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16782 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16783 field.
16784
16785 2007-12-03 Leo Zayas
16786 Pedro Alves <pedro_alves@portugalmail.pt>
16787
16788 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16789 global variables.
16790 (child_add_thread): Minor cleanup.
16791 (child_continue): Resume artificially suspended threads before
16792 calling ContinueDebugEvent.
16793 (suspend_one_thread): New.
16794 (fake_breakpoint_event): New.
16795 (get_child_debug_event): Change return type to int. Check here if
16796 gdb sent an interrupt request. If a soft interrupt was requested,
16797 fake a breakpoint event. Return 0 if there is no event to handle,
16798 and 1 otherwise.
16799 (win32_wait): Don't check here if gdb sent an interrupt request.
16800 Ensure there is a valid event to handle.
16801 (win32_request_interrupt): Add soft interruption method as last
16802 resort.
16803
16804 2007-12-03 Leo Zayas
16805 Pedro Alves <pedro_alves@portugalmail.pt>
16806
16807 * win32-low.h (win32_thread_info): Add descriptions to the
16808 structure members. Replace `suspend_count' counter by a
16809 `suspended' flag.
16810 * win32-low.c (thread_rec): Update condition of when to get the
16811 context from the inferior. Rely on ContextFlags being set if it
16812 has already been retrieved. Only suspend the inferior thread if
16813 we haven't already. Warn if that fails.
16814 (continue_one_thread): s/suspend_count/suspended/. Only call
16815 ResumeThread once. Warn if that fails.
16816
16817 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16818
16819 * win32-low.c (win32_wait): Don't read from the inferior when it
16820 has already exited.
16821
16822 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16823
16824 * Makefile.in (win32_low_h): New variable.
16825 (win32-low.o): Add dependency on $(win32_low_h).
16826 (win32-arm-low.o, win32-i386-low.o): New rules.
16827
16828 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16829
16830 * hostio.c: Correct copyright year.
16831
16832 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16833
16834 * Makefile.in (OBS): Add hostio.o.
16835 (hostio.o): New rule.
16836 * server.h (handle_vFile): Declare.
16837 * hostio.c: New file.
16838 * server.c (handle_v_requests): Take packet_len and new_packet_len
16839 for binary packets. Call handle_vFile.
16840 (main): Update call to handle_v_requests.
16841
16842 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16843
16844 * linux-low.c: Include <sched.h>.
16845
16846 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16847
16848 * linux-low.c (linux_tracefork_grandchild): New.
16849 (linux_tracefork_child): Use clone.
16850 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16851
16852 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16853
16854 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16855
16856 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16857
16858 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16859
16860 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16861
16862 * inferiors.c (change_inferior_id): Delete.
16863 (add_pid_to_list, pull_pid_from_list): New.
16864 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16865 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16866 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16867 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16868 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16869 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16870 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16871 (using_threads): Always set to 1.
16872 (handle_extended_wait): New.
16873 (add_process): Do not set TID.
16874 (linux_create_inferior): Set must_set_ptrace_flags.
16875 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16876 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16877 (linux_thread_alive): Rename TID argument to LWPID.
16878 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16879 (linux_wait_for_event): Do not use TID or check using_threads. Update
16880 call to dead_thread_notify. Call handle_extended_wait.
16881 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16882 (send_sigstop): Delete sigstop_sent.
16883 (wait_for_sigstop): Avoid TID.
16884 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16885 (linux_test_for_tracefork): New.
16886 (linux_lookup_signals): Use thread_db_active and
16887 linux_supports_tracefork_flag.
16888 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16889 * linux-low.h (get_process_thread): Avoid TID.
16890 (struct process_ifo): Move thread_known and tid to the end. Remove
16891 sigstop_sent.
16892 (linux_attach_lwp, thread_db_init): Update prototypes.
16893 * server.h (change_inferior_id): Delete prototype.
16894 (add_pid_to_list, pull_pid_from_list): New prototypes.
16895 * thread-db.c (thread_db_use_events): New.
16896 (find_first_thread): Rename to...
16897 (find_one_thread): ...this. Update callers and messages. Do not
16898 call fatal. Check thread_db_use_events. Do not call
16899 change_inferior_id or new_thread_notify.
16900 (maybe_attach_thread): Update. Do not call new_thread_notify.
16901 (thread_db_init): Set thread_db_use_events. Check use_events.
16902 * utils.c (fatal, warning): Correct message prefix.
16903
16904 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16905
16906 * Makefile.in (clean): Remove new files.
16907 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16908 (powerpc-64.o, powerpc-64.c): New rules.
16909 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16910 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16911 with SPE.
16912 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16913 SPE targets.
16914 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16915 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16916 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16917 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16918 (target_regsets): Add AltiVec and SPE register sets.
16919 * configure.ac: Check for AltiVec and SPE.
16920 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16921 (ppc_fill_vrregset, ppc_store_vrregset): New.
16922 (target_regsets): Add AltiVec register set.
16923 * configure: Regenerated.
16924
16925 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16926
16927 * linux-low.c (O_LARGEFILE): Define.
16928 (linux_read_memory): Use /proc/PID/mem.
16929 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16930 * configure, config.in: Regenerated.
16931
16932 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16933
16934 * linux-low.c (linux_wait_for_event): Do not pass signals while
16935 single-stepping.
16936
16937 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16938
16939 * win32-low.c (create_process): New.
16940 (win32_create_inferior): Use create_process instead of
16941 CreateProcess. If create_process failed retry appending an ".exe"
16942 suffix. Store the GetLastError result immediatelly after
16943 create_process calls and use it on the call to error.
16944
16945 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16946
16947 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16948
16949 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16950
16951 * configure.ac: Switch license to GPLv3.
16952
16953 2007-08-01 Michael Snyder <msnyder@access-company.com>
16954
16955 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16956
16957 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16958
16959 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16960 typedef.
16961 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16962 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16963 CloseToolhelp32Snapshot.
16964 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16965 CloseToolhelp32Snapshot.
16966
16967 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16968
16969 * server.c (main): Check for inferior exit before main loop.
16970
16971 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16972
16973 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16974 instead of on tmp_desc.
16975
16976 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16977 Daniel Jacobowitz <dan@codesourcery.com>
16978
16979 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16980 (add_thread): Minor cleanups.
16981 (clear_inferiors): Move lower in the file. Clear the DLL
16982 list.
16983 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16984 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16985 (xml_escape_text): New.
16986 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16987 for qSupported.
16988 (handle_v_cont): Report errors.
16989 (gdbserver_version): Update.
16990 (main): Correct size of own_buf. Do not report initial DLL events.
16991 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16992 (unloaded_dll, xml_escape_text): New.
16993 * win32-low.c (enum target_waitkind): Update comments.
16994 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16995 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16996 (win32_EnumProcessModules, win32_GetModuleInformation)
16997 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16998 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16999 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17000 (win32_Module32First, win32_Module32Next, load_toolhelp)
17001 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17002 (get_child_debug_event): Handle DLL events.
17003 (win32_wait): Likewise.
17004
17005 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17006
17007 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17008 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17009
17010 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17011
17012 * win32-low.c (handle_output_debug_string): Ignore event if not
17013 waiting.
17014
17015 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17016
17017 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17018
17019 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17020
17021 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17022
17023 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17024
17025 * inferiors.c (change_inferior_id): Add comment.
17026 * linux-low.c (check_removed_breakpoint): Add an early
17027 prototype. Improve debug output.
17028 (linux_attach): Doc update.
17029 (linux_detach_one_process, linux_detach): Clean up before releasing
17030 each process.
17031 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17032 * linux-low.h (struct process_info): Doc improvement.
17033 * mem-break.c (delete_all_breakpoints): New.
17034 * mem-break.h (delete_all_breakpoints): New prototype.
17035 * thread-db.c (find_first_thread): New.
17036 (thread_db_create_event): Call it instead of
17037 thread_db_find_new_threads. Clean up unused variables.
17038 (maybe_attach_thread): Remove first thread handling.
17039 (thread_db_find_new_threads): Use find_first_thread.
17040 (thread_db_get_tls_address): Likewise.
17041
17042 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17043
17044 * thread-db.c (thread_db_find_new_threads): Add prototype.
17045 (thread_db_create_event): Check for the main thread before adding
17046 a new thread.
17047 (maybe_attach_thread): Only enable event reporting if TID == 0.
17048 (thread_db_get_tls_address): Check for new threads.
17049
17050 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17051
17052 * linux-low.c (linux_create_inferior): Try execv before execvp.
17053 * spu-low.c (spu_create_inferior): Likewise.
17054
17055 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17056
17057 * linux-low.c (linux_create_inferior): Change execv to execvp.
17058 * spu-low.c (spu_create_inferior): Likewies.
17059
17060 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17061
17062 * Makefile.in (clean): Clean new files instead of deleted ones.
17063 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17064 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17065 rules.
17066 * configure.srv: Specify XML files and new regformats for MIPS and
17067 MIPS64 GNU/Linux.
17068 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17069 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17070 an entry for the restart register.
17071 (mips_cannot_fetch_register, mips_cannot_store_register)
17072 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17073 register names to match the XML descriptions.
17074 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17075 restart register instead of $0.
17076
17077 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17078 Markus Deuling <deuling@de.ibm.com>
17079
17080 * remote-utils.c (decode_xfer_write): New function.
17081 * server.h (decode_xfer_write): Add prototype.
17082 * server.c (handle_query): Add PACKET_LEN argument. Support
17083 qXfer:spu:read and qXfer:spu:write packets.
17084 (main): Pass packet_len to handle_query.
17085 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17086 * target.h (target_ops): Add qxfer_spu.
17087
17088 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17089
17090 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17091 accessing non-seekable spufs files.
17092
17093 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17094
17095 * server.c (handle_query): Add reply for qC packet.
17096
17097 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17098 Leo Zayas <lerele@champenstudios@com>
17099
17100 * server.h (check_remote_input_interrupt_request): New function.
17101 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17102 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17103 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17104 (check_remote_input_interrupt_request): New function.
17105 * server.h (check_remote_input_interrupt_request): Declare.
17106 * win32-low.c (winapi_DebugBreakProcess,
17107 winapi_GenerateConsoleCtrlEvent): New typedefs.
17108 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17109 to 250 ms.
17110 (win32_wait): Check for remote interrupt request
17111 with check_remote_input_interrupt_request.
17112 (win32_request_interrupt): New function.
17113 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17114
17115 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17116
17117 * win32-low.c (debug_registers_changed,
17118 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17119 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17120 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17121 (thread_rec): Get context using the low target.
17122 (child_add_thread): Call thread_added on the low target,
17123 which does the same thing.
17124 (regptr): Delete.
17125 (do_initial_child_stuff): Remove debug registers references.
17126 Set context using the low target. Resume threads after
17127 setting the contexts.
17128 (child_continue): Remove dead variable. Remove debug
17129 registers references.
17130 (child_fetch_inferior_registers): Go through the low target.
17131 (do_child_store_inferior_registers): Remove.
17132 (child_store_inferior_registers): Go through the low target.
17133 (win32_resume): Remove debug registers references.
17134 Set context using the low target.
17135 (handle_exception): Change return type to void. Don't record
17136 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17137 first chance exception.
17138 (get_child_debug_event): Change return type to void. Remove
17139 goto loop. Always return after waiting for debug event.
17140 (win32_wait): Convert to switch statement. Handle spurious
17141 events.
17142
17143 * win32-i386-low.c (debug_registers_changed,
17144 debug_registers_used): New.
17145 (initial_stuff): Rename to ...
17146 (i386_initial_stuff): ... this. Clear debug registers
17147 state variables.
17148 (store_debug_registers): Delete.
17149 (i386_get_thread_context): New.
17150 (load_debug_registers): Delete.
17151 (i386_set_thread_context): New.
17152 (i386_thread_added): New.
17153 (single_step): Rename to ...
17154 (i386_single_step): ... this.
17155 (do_fetch_inferior_registers): Rename to ...
17156 (i386_fetch_inferior_register): ... this.
17157 (i386_store_inferior_register): New.
17158 (the_low_target): Adapt to new interface.
17159
17160 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17161 (arm_get_thread_context): New.
17162 (arm_set_thread_context): New.
17163 (regptr): New.
17164 (do_fetch_inferior_registers): Rename to ...
17165 (arm_fetch_inferior_register): ... this.
17166 (arm_store_inferior_register): New.
17167 (arm_wince_breakpoint): Reimplement as unsigned long.
17168 (arm_wince_breakpoint_len): Define.
17169 (the_low_target): Adapt to new interface.
17170
17171 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17172 load_debug_registers. Add get_thread_context, set_thread_context,
17173 thread_added and store_inferior_register. Rename
17174 fetch_inferior_registers to fetch_inferior_register.
17175 (regptr): Remove declaration.
17176
17177 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17178
17179 * linux-low.c (linux_detach): Change return type to int. Return 0.
17180 * spu-low.c (spu_detach): Likewise.
17181
17182 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17183
17184 * target.h (target_ops): Change return type of detach to int.
17185 Add join.
17186 (join_inferior): New.
17187 * server.c (main): Don't skip detach support on mingw32.
17188 If the inferior doesn't support detaching return error.
17189 Call join_inferior instead of using waitpid.
17190 * linux-low.c (linux_join): New.
17191 (linux_target_op): Add linux_join.
17192 * spu-low.c (spu_join): New.
17193 (spu_target_ops): Add spu_join.
17194 * win32-low.c (win32_detach): Adapt to new interface.
17195 Reopen current_process_handle before detaching. Issue a child
17196 resume before detaching.
17197 (win32_join): New.
17198 (win32_target_op): Add win32_join.
17199
17200 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17201
17202 * win32-low.c (win32-attach): Fix return value.
17203 * target.h (target_ops): Describe ATTACH return values.
17204
17205 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17206
17207 * win32-low.c (GETPROCADDRESS): Define.
17208 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17209 (winapi_DebugSetProcessKillOnExit): Likewise.
17210 (win32_create_inferior): Force usage of ansi CreateProcessA.
17211 (win32_attach): Use GETPROCADDRESS.
17212 (win32_detach): Likewise.
17213
17214 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17215
17216 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17217
17218 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17219
17220 * win32-low.c: Commit leftover changes from 2007-03-29.
17221
17222 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17223
17224 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17225 fields short instead of int. Add explicit padding.
17226 (i387_cache_to_fsave): Remove unnecessary casts.
17227 (i387_fsave_to_cache): Doc fix.
17228 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17229
17230 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17231
17232 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17233 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17234
17235 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17236
17237 * configure.srv (arm*-*-mingw32ce*): Move near the other
17238 arm targets.
17239
17240 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17241
17242 * configure.ac: Add errno checking.
17243 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17244 sys/file.h and malloc.h.
17245 (AC_CHECK_DECLS): Add perror.
17246 (srv_mingwce): Handle.
17247 * configure.srv (i[34567]86-*-cygwin*): Add
17248 win32-i386-low.o to srv_tgtobj.
17249 (i[34567]86-*-mingw*): Likewise.
17250 (arm*-*-mingw32ce*): Add case.
17251 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17252 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17253 [__MINGW32CE__] (strerror): New function.
17254 [__MINGW32CE__] (errno): Define to GetLastError.
17255 [__MINGW32CE__] (COUNTOF): New macro.
17256 (remote_open): Remove extra close call.
17257 * mem-break.c (delete_breakpoint_at): New function.
17258 * mem-break.h (delete_breakpoint_at): Declare.
17259 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17260 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17261 [USE_WIN32API] (read, write): Add char* casts.
17262 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17263 * server.h: Include wincecompat.h on Windows CE.
17264 [HAVE_ERRNO_H]: Check.
17265 (perror): Declare if not declared.
17266 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17267 (perror_with_name): Remove errno declaration.
17268 * wincecompat.h: New.
17269 * wincecompat.c: New.
17270 * win32-low.h: New.
17271 * win32-arm-low.c: New.
17272 * win32-i386-low.c: New.
17273 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17274 (OUTMSG2): Make it safe.
17275 (_T): New macro.
17276 (COUNTOF): New macro.
17277 (NUM_REGS): Get it from the low target.
17278 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17279 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17280 (thread_rec): Let low target handle debug registers.
17281 (child_add_thread): Likewise.
17282 (child_init_thread_list): Likewise.
17283 (continue_one_thread): Likewise.
17284 (regptr): New.
17285 (do_child_fetch_inferior_registers): Move to ...
17286 * win32-i386-low.c: ... here, and rename to ...
17287 (do_fetch_inferior_registers): ... this.
17288 * win32-low.c (child_fetch_inferior_registers):
17289 Go through the low target.
17290 (do_child_store_inferior_registers): Use regptr.
17291 (strwinerror): New function.
17292 (win32_create_inferior): Handle Windows CE.
17293 Use strwinerror instead of strerror on Windows error
17294 codes. Add program to the error output.
17295 Don't close the main thread handle on Windows CE.
17296 (win32_attach): Use coredll.dll on Windows CE.
17297 (win32_kill): Close current process and current
17298 thread handles.
17299 (win32_detach): Use coredll.dll on Windows CE.
17300 (win32_resume): Let low target handle debug registers, and
17301 step request.
17302 (handle_exception): Add/Remove initial breakpoint. Avoid
17303 non-existant WSTOPSIG on Windows CE.
17304 (win32_read_inferior_memory): Cast to remove warning.
17305 (win32_arch_string): Go through the low target.
17306 (initialize_low): Call set_breakpoint_data with the low
17307 target's breakpoint.
17308 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17309 FOP_REGNUM, mappings): Move to ...
17310 * win32-i386-low.c: ... here.
17311 * win32-low.c (win32_thread_info): Move to ...
17312 * win32-low.h: ... here.
17313 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17314 win32-arm-low.c and wincecompat.c.
17315 (all:): Add $EXEEXT.
17316 (install-only:): Likewise.
17317 (gdbserver:): Likewise.
17318 (gdbreplay:): Likewise.
17319 * config.in: Regenerate.
17320 * configure: Regenerate.
17321
17322 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17323
17324 * win32-low.c: Rename typedef thread_info to
17325 win32_thread_info throughout.
17326
17327 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17328
17329 * win32-i386-low.c: Rename to ...
17330 * win32-low.c: ... this.
17331 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17332 * Makefile.in: Likewise.
17333
17334 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17335
17336 * remote-utils.c (monitor_output): Constify msg parameter.
17337 * server.h (monitor_output): Likewise.
17338 * win32-i386-low.c (handle_output_debug_string): New.
17339 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17340 handle_output_debug_string.
17341 (get_child_debug_event): Likewise.
17342
17343 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17344
17345 * server.c (main): Correct strtoul check.
17346
17347 2007-03-27 Jon Ringle <jon@ringle.org>
17348
17349 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17350
17351 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17352
17353 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17354
17355 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17356
17357 * terminal.h: Check HAVE_SGTTY_H.
17358
17359 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17360
17361 * remote-utils.c (remote_open): Print out the assigned port number.
17362
17363 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17364
17365 * remote-utils.c (monitor_output): New function.
17366 * server.c (debug_threads): Define here.
17367 (monitor_show_help): New function.
17368 (handle_query): Handle qRcmd.
17369 (main): Do not handle 'd' packet.
17370 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17371 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17372 of debug_threads.
17373
17374 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17375
17376 * Makefile.in (EXEEXT): New.
17377 (clean): Use $(EXEEXT).
17378
17379 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17380
17381 * target.h (target_ops): Rename send_signal to request_interrupt,
17382 and remove enum target_signal parameter.
17383 * linux-low.c (linux_request_interrupt): Rename from
17384 linux_send_signal, and always send SIGINT.
17385 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17386 and always send SIGINT.
17387 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17388 of send_signal.
17389 (input_interrupt): Likewise.
17390
17391 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17392
17393 * server.c (get_features_xml): Check if target implemented
17394 arch_string.
17395 * win32-i386-low.c (win32_arch_string): New.
17396 (win32_target_ops): Add win32_arch_string as arch_string member.
17397
17398 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17399
17400 * spu-low.c (spu_arch_string): New.
17401 (spu_target_ops): Add spu_arch_string.
17402
17403 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17404
17405 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17406 * configure.ac: Do not check for terminal.h.
17407 * configure, config.in: Regenerated.
17408
17409 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17410
17411 * Makefile.in (OBS): Add $(XML_BUILTIN).
17412 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17413 (clean): Update.
17414 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17415 (arm-with-iwmmxt.c): New.
17416 * config.in, configure: Regenerate.
17417 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17418 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17419 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17420 (arm*-*-linux*): Add iWMMXt and regset support.
17421 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17422 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17423 (arm_store_wmmxregset, target_regsets): New.
17424 * server.c (get_features_xml): Take annex argument. Check builtin
17425 XML documents.
17426 (handle_query): Handle multiple annexes.
17427
17428 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17429
17430 * remote-utils.c [USE_WIN32API] (read, write): Define.
17431 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17432 write.
17433
17434 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17435
17436 * linux-i386-low.c (the_low_target): Set arch_string.
17437 * linux-x86-64-low.c (the_low_target): Likewise.
17438 * linux-low.c (linux_arch_string): New.
17439 (linux_target_ops): Add it.
17440 * linux-low.h (struct linux_target_ops): Add arch_string.
17441 * server.c (write_qxfer_response): Use const void * for DATA.
17442 (get_features_xml): New.
17443 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17444 * target.h (struct target_ops): Add arch_string method.
17445
17446 2007-01-03 Denis Pilat <denis.pilat@st.com>
17447 Daniel Jacobowitz <dan@codesourcery.com>
17448
17449 * linux-low.c (linux_kill): Handle being called with no threads.
17450 * win32-i386-low.c (win32_kill): Likewise.
17451 (get_child_debug_event): Clear current_process_handle.
17452
17453 2006-12-30 Denis PILAT <denis.pilat@st.com>
17454 Daniel Jacobowitz <dan@codesourcery.com>
17455
17456 * remote-utils.c (remote_open): Check the type of specified
17457 serial port devices before opening them.
17458 * server.c (main): Kill the inferior if an error occurs during
17459 the first remote_open.
17460
17461 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17462
17463 * README: Update supported targets.
17464
17465 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17466
17467 * Makefile.in (clean): Remove reg-mips64.c.
17468 (reg-mips64.c, reg-mips64.o): New rules.
17469 * configure.srv: Handle mips64. Include regset support for mips.
17470 * linux-mips-low.c (union mips_register): New.
17471 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17472 (mips_breakpoint, mips_breakpoint_at): Use int.
17473 (mips_collect_register, mips_supply_register)
17474 (mips_collect_register_32bit, mips_supply_register_32bit)
17475 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17476 (mips_store_fpregset, target_regsets): New.
17477 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17478
17479 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17480
17481 * configure.srv: Add target "spu*-*-*".
17482 * Makefile.in (clean): Remove reg-spu.c.
17483 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17484 * spu-low.c: New file.
17485
17486 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17487
17488 * configure.ac: Correct td_thr_tls_get_addr test.
17489 * configure: Regenerated.
17490
17491 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17492
17493 * linux-low.c (linux_wait_for_event): Reformat. Use the
17494 pass_signals array.
17495 * remote-utils.c (decode_address_to_semicolon): New.
17496 * server.c (pass_signals, handle_general_set): New.
17497 (handle_query): Mention QPassSignals for qSupported.
17498 (main): Call handle_general_set.
17499 * server.h (pass_signals, decode_address_to_semicolon): New.
17500
17501 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17502
17503 * server.c (handle_query): Correct error handling for read_auxv.
17504
17505 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17506
17507 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17508 and srv_linux_thread_db to yes.
17509 * linux-s390-low.c (s390_fill_gregset): New function.
17510 (target_regsets): Define data structure.
17511
17512 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17513
17514 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17515 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17516 * config.in, configure: Regenerated.
17517 * inferiors.c (gdb_id_to_thread): New function.
17518 (gdb_id_to_thread_id): Use it.
17519 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17520 * linux-low.h (struct process_info): Add th member.
17521 (thread_db_get_tls_address): New prototype.
17522 * remote-utils.c (decode_address): Make non-static.
17523 * server.c (handle_query): Handle qGetTLSAddr.
17524 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17525 * target.h (struct target_ops): Add get_tls_address.
17526 * thread-db.c (maybe_attach_thread): Save the thread handle.
17527 (thread_db_get_tls_address): New.
17528
17529 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17530
17531 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17532 (linux_resume_one_process): Take a siginfo_t *. Update all
17533 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17534 (struct pending_signals): Add a siginfo_t.
17535 (linux_wait_for_process): Always set last_status.
17536 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17537 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17538 * linux-low.h (struct process_info): Add last_status.
17539
17540 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17541
17542 * remote-utils.c (try_rle): New function.
17543 (putpkt_binary): Use it.
17544
17545 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17546
17547 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17548 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17549 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17550 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17551 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17552 point registers.
17553
17554 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17555
17556 * server.c (terminal_fd): New variable.
17557 (old_foreground_pgrp): Likewise.
17558 (restore_old_foreground_pgrp): New function.
17559 (start_inferior): Record the terminal file descriptor in terminal_fd
17560 and its original foreground group in old_foreground_pgrp. Register
17561 restore_old_foreground_pgrp with atexit().
17562
17563 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17564
17565 * server.c (handle_query): Correct qPart to qXfer.
17566
17567 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17568
17569 * configure.ac: Check for more headers which are missing on
17570 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17571 * configure.srv: Add Cygwin and mingw32.
17572 * remote-utils.c: Don't include headers unconditionally which
17573 are missing on mingw32. Include <winsock.h> for mingw32.
17574 (remote_open): Adjust for mingw32 support. Flush
17575 standard error after writing to it.
17576 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17577 (unblock_async_io, enable_async_io, disable_async_io)
17578 (readchar, getpkt): Update for Winsock support.
17579 (prepare_resume_reply): Expect a protocol signal number.
17580 * server.c: Disable <sys/wait.h> on mingw32.
17581 (start_inferior): Adjust for mingw32 support. Flush
17582 standard error after writing to it.
17583 (attach_inferior): Likewise. Use protocol signal
17584 numbers.
17585 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17586 and names.
17587 * win32-i386-low.c: New file.
17588 * Makefile.in (XM_CLIBS): Set.
17589 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17590 (win32-i386-low.o): New dependency rule.
17591 * linux-low.c (linux_wait): Use target signal numbers.
17592 * target.h (struct target_ops): Doc fix.
17593 * server.h (target_signal_to_name): New prototype.
17594 * gdbreplay.c: Don't include headers unconditionally which
17595 are missing on mingw32. Include <winsock.h> for mingw32.
17596 (remote_close, remote_open): Adjust for Winsock support.
17597 * configure, config.in: Regenerated.
17598
17599 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17600
17601 * server.c (decode_xfer_read, write_qxfer_response): New.
17602 (handle_query): Take a packet length argument. Handle
17603 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17604 the qSupported response.
17605 (main): Update call to handle_query.
17606
17607 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17608
17609 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17610 (putpkt_binary): Renamed from putpkt and adjusted for binary
17611 data.
17612 (putpkt): New wrapper for putpkt_binary.
17613 (readchar): Don't mask off the high bit.
17614 (decode_X_packet): New function.
17615 * server.c (main): Call putpkt_binary if a handler sets the packet
17616 length. Save the length of the incoming packet. Handle 'X'.
17617 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17618
17619 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17620
17621 * server.c (handle_query): Handle qSupported.
17622
17623 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17624
17625 * remote-utils.c (all_symbols_looked_up): New variable.
17626 (look_up_one_symbol): Check it.
17627 * server.h (look_up_one_symbol): New declaration.
17628 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17629
17630 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17631
17632 * Makefile.in (linux-arm-low.o): Update dependencies.
17633 * linux-arm-low.c: Include "gdb_proc_service.h".
17634 (PTRACE_GET_THREAD_AREA): Define.
17635 (ps_get_thread_area): New function.
17636
17637 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17638
17639 * configure.srv (m68k*-*-uclinux*): New target.
17640 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17641 (linux_resume_one_process): Remove extraneous cast.
17642 (linux_read_offsets): New.
17643 (linux_target_op): Add linux_read_offsets on mmuless systems.
17644 * server.c (handle_query): Add qOffsets logic.
17645 * target.h (struct target_ops): Add read_offsets.
17646
17647 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17648
17649 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17650 (PTRACE_GET_THREAD_AREA): Define.
17651 (ps_get_thread_area): New function.
17652 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17653 (linux-x86-64-low.o): Update.
17654
17655 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17656
17657 * configure.ac: Remove checks for prfpregset_t.
17658 * gdb_proc_service.h: New file.
17659 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17660 new "gdb_proc_service.h".
17661 * proc-service.c: Likewise.
17662 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17663 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17664 * Makefile.in (gdb_proc_service_h): Updated.
17665 * configure, config.in: Regenerated.
17666
17667 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17668
17669 * remote-utils.c (prepare_resume_reply): Move declaration
17670 of gdb_id_from_wait to the top of the block.
17671
17672 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17673
17674 * linux-low.c (regsets_store_inferior_registers): Read the regset
17675 from the target before filling it.
17676
17677 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17678
17679 * server.c (attach_inferior): Return SIGTRAP for a successful
17680 attach.
17681
17682 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17683
17684 * Makefile.in (OBS): Add version.o.
17685 (STAGESTUFF): Delete.
17686 (version.o): Add dependencies.
17687 (version.c): Replace rule.
17688 (clean): Remove version.c.
17689 * server.c (gdbserver_version): New.
17690 (gdbserver_usage): Use printf.
17691 (main): Handle --version and --help.
17692 * server.h (version, host_name): Add declarations.
17693
17694 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17695
17696 * linux-arm-low.c:
17697 * linux-arm-low.c:
17698 * inferiors.c:
17699 * i387-fp.h:
17700 * i387-fp.c:
17701 * gdbreplay.c:
17702 * regcache.c:
17703 * proc-service.c:
17704 * mem-break.h:
17705 * mem-break.c:
17706 * linux-x86-64-low.c:
17707 * linux-sh-low.c:
17708 * linux-s390-low.c:
17709 * linux-ppc64-low.c:
17710 * linux-ppc-low.c:
17711 * linux-mips-low.c:
17712 * linux-m68k-low.c:
17713 * linux-m32r-low.c:
17714 * linux-low.h:
17715 * linux-low.c:
17716 * linux-ia64-low.c:
17717 * linux-i386-low.c:
17718 * linux-crisv32-low.c:
17719 * thread-db.c:
17720 * terminal.h:
17721 * target.h:
17722 * target.c:
17723 * server.h:
17724 * server.c:
17725 * remote-utils.c:
17726 * regcache.h:
17727 * utils.c:
17728 * Makefile.in:
17729 * configure.ac:
17730 * gdbserver.1: Add (C) after Copyright. Update the FSF
17731 address.
17732
17733 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17734
17735 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17736 (arm_breakpoint_at): Recognize both breakpoints.
17737 (the_low_target): Use the correct breakpoint instruction.
17738
17739 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17740
17741 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17742 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17743 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17744 (the_low_target): Update.
17745
17746 2005-10-25 Andreas Schwab <schwab@suse.de>
17747
17748 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17749
17750 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17751 (ia64_num_regs): Reduce to 462.
17752
17753 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17754
17755 * acinclude.m4: Correct quoting.
17756 * aclocal.m4: Regenerated.
17757
17758 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17759 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17760 (thread_db_init): Call thread_db_err_str.
17761 * configure.ac: Check for TD_VERSION.
17762 * config.in, configure: Regenerated.
17763
17764 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17765
17766 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17767
17768 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17769
17770 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17771 is not available. Define HAVE_PTRACE_GETREGS if it is.
17772 * config.in, configure: Regenerated.
17773 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17774 * linux-i386-low.c, linux-m68k-low.c: Update to use
17775 HAVE_PTRACE_GETREGS.
17776 * linux-low.c (regsets_fetch_inferior_registers)
17777 (regsets_store_inferior_registers): Only return 0 if we processed
17778 GENERAL_REGS.
17779 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17780 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17781
17782 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17783
17784 * inferiors.c (struct thread_info): Add gdb_id.
17785 (add_thread): Add gdb_id argument.
17786 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17787 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17788 calls to add_thread.
17789 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17790 * server.c (handle_query): Use thread_to_gdb_id.
17791 (handle_v_cont, main): Use gdb_id_to_thread_id.
17792 * server.h (add_thread): Update prototype.
17793 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17794 prototypes.
17795
17796 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17797
17798 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17799 left-padded registers.
17800 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17801 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17802
17803 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17804
17805 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17806 * configure: Regenerate.
17807 * config.in: Regenerate.
17808 * server.h (NEED_DECLARATION_STRERROR):
17809 Replace with !HAVE_DECL_STRERROR.
17810
17811 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17812
17813 * linux-low.c (linux_wait, linux_send_signal): Don't test
17814 an unsigned long variable for > 0 if it could be MAX_ULONG.
17815 * server.c (myresume): Likewise.
17816 * target.c (set_desired_inferior): Likewise.
17817
17818 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17819
17820 * configure.ac: Simplify and improve check for socklen_t.
17821 * configure, config.in: Regenerate.
17822
17823 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17824
17825 * acconfig.h: Remove.
17826 * configure.ac: Add a test for socklen_t. Use three-argument
17827 AC_DEFINE throughout.
17828 * config.in: Regenerated using autoheader 2.59.
17829 * configure: Regenerated.
17830
17831 * gdbreplay.c (socklen_t): Provide a default.
17832 (remote_open): Use socklen_t.
17833 * remote-utils.c (socklen_t): Provide a default.
17834 (remote_open): Use socklen_t.
17835 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17836 unsigned char.
17837
17838 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17839 char for buffers.
17840 * linux-low.c (linux_read_memory, linux_write_memory)
17841 (linux_read_auxv): Likewise.
17842 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17843 (check_mem_write): Likewise.
17844 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17845 Likewise.
17846 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17847 (registers_from_string, register_data): Likewise.
17848 * server.c (handle_query, main): Likewise.
17849 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17850 (decode_M_packet): Likewise.
17851 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17852 * target.h (struct target_ops): Update read_memory, write_memory,
17853 and read_auxv.
17854 (read_inferior_memory, write_inferior_memory): Update.
17855 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17856 to unsigned char *.
17857 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17858 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17859 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17860 linux-s390-low.c, linux-sh-low.c: Update for changes in
17861 read_inferior_memory and the_low_target->breakpoint.
17862
17863 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17864
17865 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17866 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17867 * configure.srv: Add powerpc64-*-linux*.
17868 * linux-ppc64-low.c: New file.
17869
17870 2005-05-23 Orjan Friberg <orjanf@axis.com>
17871
17872 * linux-cris-low.c: New file with support for CRIS.
17873 * linux-crisv32-low.c: Ditto for CRISv32.
17874 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17875 (clean): Add reg-cris.c and reg-crisv32.c.
17876 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17877 reg-crisv32.o, and reg-crisv32.c to make rules.
17878 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17879 recognized targets.
17880
17881 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17882
17883 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17884 of sizeof (PTRACE_XFER_TYPE).
17885 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17886
17887 2005-05-12 Orjan Friberg <orjanf@axis.com>
17888
17889 * target.h (struct target_ops): Add insert_watchpoint,
17890 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17891 pointers for hardware watchpoint support.
17892 * linux-low.h (struct linux_target_ops): Ditto.
17893 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17894 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17895 to linux_target_ops.
17896 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17897 reply packet.
17898 * server.c (main): Recognize 'Z' and 'z' packets.
17899
17900 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17901
17902 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17903 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17904 (the_low_target): Add new members.
17905
17906 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17907
17908 * proc-service.c (ps_lgetregs): Search all_processes instead of
17909 all_threads.
17910
17911 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17912
17913 * server.c (start_inferior): Change return type to int.
17914 (attach_inferior): Change sigptr to int *.
17915 (handle_v_cont, handle_v_requests): Change signal to int *.
17916 (main): Change signal to int.
17917
17918 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17919
17920 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17921 * configure.srv: Add m32r*-*-linux*.
17922 * linux-m32r-low.c: New file.
17923
17924 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17925
17926 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17927
17928 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17929
17930 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17931 Take unsigned long arguments for PIDs.
17932 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17933 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17934 (wait_for_sigstop, linux_resume_one_process)
17935 (regsets_fetch_inferior_registers, linux_send_signal)
17936 (linux_read_auxv): Likewise. Update the types of variables holding
17937 PIDs. Update format string specifiers.
17938 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17939 * remote-utils.c (prepare_resume_reply): Likewise.
17940 * server.c (cont_thread, general_thread, step_thread)
17941 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17942 unsigned long.
17943 (handle_query): Update format specifiers.
17944 (handle_v_cont, main): Use strtoul for thread IDs.
17945 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17946 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17947 (general_thread, step_thread, thread_from_wait)
17948 (old_thread_from_wait): Update.
17949 * target.h (struct thread_resume): Use unsigned long for THREAD.
17950 (struct target_ops): Use unsigned long for arguments to attach and
17951 thread_alive.
17952
17953 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17954
17955 * acinclude.m4: Include bfd/bfd.m4 directly.
17956 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17957 <agriffis@toolchain.org>.
17958 * aclocal.m4, configure: Regenerated.
17959
17960 2005-01-07 Andrew Cagney <cagney@gnu.org>
17961
17962 * configure.ac: Rename configure.in, require autoconf 2.59.
17963 * configure: Re-generate.
17964
17965 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17966
17967 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17968 LIBS when finished.
17969 * aclocal.m4: Regenerated.
17970 * configure: Regenerated.
17971
17972 2004-11-21 Andreas Schwab <schwab@suse.de>
17973
17974 * linux-m68k-low.c (m68k_num_gregs): Define.
17975 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17976 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17977 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17978 (m68k_breakpoint_at): New. Add to the_low_target.
17979
17980 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17981 srv_linux_thread_db to yes.
17982
17983 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17984
17985 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17986 (ARCH_SET_FS): Likewise.
17987 (ARCH_GET_FS): Likewise.
17988 (ARCH_GET_GS): Likewise.
17989
17990 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17991
17992 * linux-i386-low.c (ps_get_thread_area): New.
17993 * linux-x86-64-low.c (ps_get_thread_area): New.
17994 * linux-low.c: Include <sys/syscall.h>.
17995 (linux_kill_one_process): Don't kill the first thread here.
17996 (linux_kill): Kill the first thread here.
17997 (kill_lwp): New function.
17998 (send_sigstop, linux_send_signal): Use it.
17999 * proc-service.c: Clean up #ifdefs.
18000 (fpregset_info): Delete.
18001 (ps_lgetregs): Update and enable implementation.
18002 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18003 implementations.
18004 * remote-utils.c (struct sym_cache, symbol_cache): New.
18005 (input_interrupt): Print a clearer message.
18006 (async_io_enabled): New variable.
18007 (enable_async_io, disable_async_io): Use it. Update comments.
18008 (look_up_one_symbol): Use the symbol cache.
18009 * thread-db.c (thread_db_look_up_symbols): New function.
18010 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18011
18012 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18013
18014 * configure.in: Test for -rdynamic.
18015 * configure: Regenerated.
18016 * Makefile (INTERNAL_LDFLAGS): New.
18017 (gdbserver, gdbreplay): Use it.
18018
18019 2004-09-02 Andrew Cagney <cagney@gnu.org>
18020
18021 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18022
18023 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18024
18025 * linux-low.c (linux_wait): Clear all_processes list also.
18026
18027 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18028
18029 * linux-low.c: Include <errno.h>. Remove extern declaration of
18030 errno.
18031
18032 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18033
18034 * gdbreplay.c, server.h, utils.c: Update copyright years.
18035
18036 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18037
18038 * server.c (main): Print child status or termination signal from
18039 variable 'signal', not 'sig'.
18040
18041 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18042
18043 * linux-low.c (linux_read_memory): Change return type to
18044 int. Check for and return error from ptrace().
18045 * target.c (read_inferior_memory): Change return type to int. Pass
18046 back return status from the_target->read_memory().
18047 * target.h (struct target_ops): Adapt *read_memory() prototype.
18048 Update comment.
18049 (read_inferior_memory): Adapt prototype.
18050 * server.c (main): Return an error packet if
18051 read_inferior_memory() returns an error.
18052
18053 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18054
18055 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18056 Unify with other clean targets.
18057
18058 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18059
18060 * server.c (handle_v_cont): Call set_desired_inferior.
18061
18062 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18063
18064 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18065
18066 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18067
18068 * linux-low.c (linux_wait): Unblock async I/O.
18069 (linux_resume): Block and enable async I/O.
18070 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18071 * server.h (block_async_io, unblock_async_io): Add prototypes.
18072
18073 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18074
18075 * remote-utils.c (remote_open): Print a status notice after
18076 opening a TCP port.
18077 * server.c (attach_inferior): Print a status notice after
18078 attaching.
18079
18080 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18081
18082 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18083
18084 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18085
18086 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18087 error packet.
18088 * server.c, target.h: Update copyright years.
18089
18090 2004-02-25 Roland McGrath <roland@redhat.com>
18091
18092 * target.h (struct target_ops): New member `read_auxv'.
18093 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18094 * linux-low.c (linux_read_auxv): New function.
18095 (linux_target_ops): Initialize `read_auxv' member to that.
18096
18097 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18098
18099 Committed by Jim Blandy <jimb@redhat.com>.
18100
18101 * linux-s390-low.c (s390_num_regs): Update.
18102 (s390_regmap): Remove control registers. Use __s390x__ predefine
18103 instead of GPR_SIZE to distiguish s390 and s390x targets.
18104
18105 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18106
18107 * linux-low.c: Update copyright year.
18108 (check_removed_breakpoint): Clear pending_is_breakpoint.
18109 (linux_set_resume_request, linux_queue_one_thread)
18110 (resume_status_pending_p): New functions.
18111 (linux_continue_one_thread): Use process->resume.
18112 (linux_resume): Only resume threads if there are no pending events.
18113 * linux-low.h (struct process_info): Add resume request
18114 pointer.
18115
18116 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18117
18118 * regcache.c (new_register_cache): Clear the allocated register
18119 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18120
18121 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18122
18123 * linux-low.c (linux_resume): Take a struct thread_resume *
18124 argument.
18125 (linux_wait): Update call.
18126 (resume_ptr): New static variable.
18127 (linux_continue_one_thread): Renamed from
18128 linux_continue_one_process. Use resume_ptr.
18129 (linux_resume): Use linux_continue_one_thread.
18130 * server.c (handle_v_cont, handle_v_requests): New functions.
18131 (myresume): New function.
18132 (main): Handle 'v' case.
18133 * target.h (struct thread_resume): New type.
18134 (struct target_ops): Change argument of "resume" to struct
18135 thread_resume *.
18136 (myresume): Delete macro.
18137
18138 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18139
18140 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18141 (uninstall): Support DESTDIR.
18142
18143 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18144
18145 * configure.srv: Add xscale*linux copy of arm*linux entry.
18146
18147 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18148
18149 * linux-arm-low.c (arm_reinsert_addr): New function.
18150 (the_low_target): Add arm_reinsert_addr.
18151
18152 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18153
18154 * mem-break.c: Remove whitespace at end of file.
18155
18156 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18157
18158 * configure.in: Check whether we need to prototype strerror.
18159 * server.h: Optionally prototype strerror.
18160 * gdbreplay.c (perror_with_name): Use strerror.
18161 * linux-low.c (linux_attach_lwp): Use strerror.
18162 * utils.c (perror_with_name): Use strerror.
18163 * config.in, configure: Regenerated.
18164
18165 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18166
18167 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18168 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18169
18170 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18171
18172 * Makefile.in (SFILES): Update.
18173 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18174 low-sun3.c: Remove files.
18175
18176 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18177
18178 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18179 (linux_detach_one_process, linux_detach): New functions.
18180 (linux_target_ops): Add linux_detach.
18181 * server.c (main): Handle 'D' packet.
18182 * target.h (struct target_ops): Add "detach" member.
18183 (detach_inferior): Define.
18184
18185 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18186
18187 From Kelley Cook <kelleycook@wideopenwest.com>:
18188 * configure.srv: Accept i[34567]86 variants.
18189
18190 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18191
18192 * linux-low.c (linux_wait_for_event): Correct comment typos.
18193 (linux_resume_one_process): Call check_removed_breakpoint.
18194 (linux_send_signal): New function.
18195 (linux_target_ops): Add linux_send_signal.
18196 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18197 of kill.
18198 * target.h (struct target_ops): Add send_signal.
18199
18200 2003-05-29 Jim Blandy <jimb@redhat.com>
18201
18202 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18203 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18204 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18205 away part of the register's value.
18206
18207 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18208
18209 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18210 (linux_wait_for_event, linux_init_signals): Likewise.
18211
18212 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18213
18214 * configure.in: Check for stdlib.h.
18215 * configure: Regenerated.
18216 * config.in: Regenerated.
18217
18218 2003-01-04 Andreas Schwab <schwab@suse.de>
18219
18220 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18221
18222 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18223
18224 * Makefile.in: Remove obsolete code.
18225
18226 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18227
18228 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18229 defined(PT_FPR0_HI).
18230
18231 2002-11-17 Stuart Hughes <seh@zee2.com>
18232
18233 * linux-arm-low.c (arm_num_regs): Increase.
18234 (arm_regmap): Include status register.
18235
18236 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18237
18238 * linux-low.c (register_addr): Remove incorrect -1 check.
18239
18240 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18241
18242 * linux-low.c (linux_create_inferior): Call setpgid. Return
18243 the new PID.
18244 (unstopped_p, linux_signal_pid): Remove.
18245 (linux_target_ops): Remove linux_signal_pid.
18246 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18247 global instead of target method.
18248 * target.h (struct target_ops): Remove signal_pid. Update comment
18249 for create_inferior.
18250 * server.c (signal_pid): New variable.
18251 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18252 gdbserver. Set the child to be the foreground process group.
18253 (attach_inferior): Set signal_pid.
18254
18255 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18256
18257 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18258
18259 2002-08-20 Jim Blandy <jimb@redhat.com>
18260
18261 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18262 default for this.
18263
18264 2002-08-01 Andrew Cagney <cagney@redhat.com>
18265
18266 * Makefile.in: Make chill references obsolete.
18267
18268 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18269
18270 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18271 * configure: Regenerate.
18272 * config.in: Regenerate.
18273
18274 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18275
18276 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18277 (perror_with_name, remote_close, remote_open, expect, play): Static.
18278
18279 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18280
18281 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18282 byte offsets instead of an array of indexes.
18283 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18284
18285 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18286
18287 * regcache.c: Add comment.
18288
18289 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18290
18291 * thread-db.c: New file.
18292 * proc-service.c: New file.
18293 * acinclude.m4: New file.
18294 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18295 proc-service.o, and thread-db.o.
18296 (linux-low.o): Add USE_THREAD_DB.
18297 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18298 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18299 * aclocal.m4: Regenerated.
18300 * config.in: Regenerated.
18301 * configure: Regenerated.
18302 * configure.in: Check for proc_service.h, sys/procfs.h,
18303 thread_db.h, and linux/elf.h headrs.
18304 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18305 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18306 Check for -lthread_db and thread support.
18307 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18308 PowerPC, and SuperH.
18309 * i387-fp.c: Constify arguments.
18310 * i387-fp.h: Likewise.
18311 * inferiors.c: (struct thread_info): Renamed from
18312 `struct inferior_info'. Remove PID member. Use generic inferior
18313 list header. All uses updated.
18314 (inferiors, signal_pid): Removed.
18315 (all_threads): New variable.
18316 (get_thread): Define.
18317 (add_inferior_to_list): New function.
18318 (for_each_inferior): New function.
18319 (change_inferior_id): New function.
18320 (add_inferior): Removed.
18321 (remove_inferior): New function.
18322 (add_thread): New function.
18323 (free_one_thread): New function.
18324 (remove_thread): New function.
18325 (clear_inferiors): Use for_each_inferior and free_one_thread.
18326 (find_inferior): New function.
18327 (find_inferior_id): New function.
18328 (inferior_target_data): Update argument type.
18329 (set_inferior_target_data): Likewise.
18330 (inferior_regcache_data): Likewise.
18331 (set_inferior_regcache_data): Likewise.
18332 * linux-low.c (linux_bp_reinsert): Remove.
18333 (all_processes, stopping_threads, using_thrads)
18334 (struct pending_signals, debug_threads, pid_of): New.
18335 (inferior_pid): Replace with macro.
18336 (struct inferior_linux_data): Remove.
18337 (get_stop_pc, add_process): New functions.
18338 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18339 Use add_process and add_thread.
18340 (linux_attach_lwp): New function, based on old linux_attach. Use
18341 add_process and add_thread. Set stop_expected for new threads.
18342 (linux_attach): New function.
18343 (linux_kill_one_process): New function.
18344 (linux_kill): Kill all LWPs.
18345 (linux_thread_alive): Use find_inferior_id.
18346 (check_removed_breakpoints, status_pending_p): New functions.
18347 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18348 Update. Use WNOHANG. Wait for cloned processes also. Update process
18349 struct for the found process.
18350 (linux_wait_for_event): New function.
18351 (linux_wait): Use it. Support LWPs.
18352 (send_sigstop, wait_for_sigstop, stop_all_processes)
18353 (linux_resume_one_process, linux_continue_one_process): New functions.
18354 (linux_resume): Support LWPs.
18355 (REGISTER_RAW_SIZE): Remove.
18356 (fetch_register): Use register_size instead. Call supply_register.
18357 (usr_store_inferior_registers): Likewise. Call collect_register.
18358 Fix recursive case.
18359 (regsets_fetch_inferior_registers): Improve error message.
18360 (regsets_store_inferior_registers): Add debugging.
18361 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18362 (unstopped_p, linux_signal_pid): New functions.
18363 (linux_target_ops): Add linux_signal_pid.
18364 (linux_init_signals): New function.
18365 (initialize_low): Call it. Initialize using_threads.
18366 * regcache.c (inferior_regcache_data): Add valid
18367 flag.
18368 (get_regcache): Fetch registers lazily. Add fetch argument
18369 and update all callers.
18370 (regcache_invalidate_one, regcache_invalidate): New
18371 functions.
18372 (new_register_cache): Renamed from create_register_cache.
18373 Return the new regcache.
18374 (free_register_cache): Change argument to a void *.
18375 (registers_to_string, registers_from_string): Call get_regcache
18376 with fetch flag set.
18377 (register_data): Make static. Pass fetch flag to get_regcache.
18378 (supply_register): Call get_regcache with fetch flag clear.
18379 (collect_register): Call get_regcache with fetch flag set.
18380 (collect_register_as_string): New function.
18381 * regcache.h: Update.
18382 * remote-utils.c (putpkt): Flush after debug output and use
18383 stderr.
18384 Handle input interrupts while waiting for an ACK.
18385 (input_interrupt): Use signal_pid method.
18386 (getpkt): Flush after debug output and use stderr.
18387 (outreg): Use collect_register_as_string.
18388 (new_thread_notify, dead_thread_notify): New functions.
18389 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18390 and general_thread.
18391 (look_up_one_symbol): Flush after debug output.
18392 * server.c (step_thread, server_waiting): New variables.
18393 (start_inferior): Don't use signal_pid. Update call to mywait.
18394 (attach_inferior): Update call to mywait.
18395 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18396 (main): Don't fetch/store registers explicitly. Use
18397 set_desired_inferior. Support proposed ``Hs'' packet. Update
18398 calls to mywait.
18399 * server.h: Update.
18400 (struct inferior_list, struct_inferior_list_entry): New.
18401 * target.c (set_desired_inferior): New.
18402 (write_inferior_memory): Constify.
18403 (mywait): New function.
18404 * target.h: Update.
18405 (struct target_ops): New signal_pid method.
18406 (mywait): Removed macro, added prototype.
18407
18408 * linux-low.h (regset_func): Removed.
18409 (regset_fill_func, regset_store_func): New.
18410 (enum regset_type): New.
18411 (struct regset_info): Add type field. Use new operation types.
18412 (struct linux_target_ops): stop_pc renamed to get_pc.
18413 Add decr_pc_after_break and breakpoint_at.
18414 (get_process, get_thread_proess, get_process_thread)
18415 (strut process_info, all_processes, linux_attach_lwp)
18416 (thread_db_init): New.
18417
18418 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18419 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18420 (the_low_target): Add new members.
18421 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18422 (i386_store_fpxregset): Constify.
18423 (target_regsets): Add new kind identifier.
18424 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18425 (i386_set_pc): Add debugging.
18426 (i386_breakpoint_at): New function.
18427 (the_low_target): Add new members.
18428 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18429 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18430 (mips_breakpoint_at): New.
18431 (the_low_target): Add new members.
18432 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18433 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18434 (the_low_target): Add new members.
18435 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18436 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18437 (the_low_target): Add new members.
18438 * linux-x86-64-low.c (target_regsets): Add new kind
18439 identifier.
18440
18441 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18442
18443 From Martin Pool <mbp@samba.org>:
18444 * server.c (gdbserver_usage): New function.
18445 (main): Call it.
18446
18447 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18448
18449 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18450 stop_at -> stop_pc.
18451
18452 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18453
18454 * Makefile.in: Remove obsolete code.
18455
18456 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18457
18458 * linux-low.c (regsets_fetch_inferior_registers),
18459 (regsets_store_inferior_registers): Removed cast to int from
18460 ptrace() calls.
18461 * regcache.h: Added declaration of struct inferior_info.
18462
18463 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18464
18465 * inferiors.c (struct inferior_info): Add regcache_data.
18466 (add_inferior): Call create_register_cache.
18467 (clear_inferiors): Call free_register_cache.
18468 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18469 * regcache.c (struct inferior_regcache_data): New.
18470 (registers): Remove.
18471 (get_regcache): New function.
18472 (create_register_cache, free_register_cache): New functions.
18473 (set_register_cache): Don't initialize the register cache here.
18474 (registers_to_string, registers_from_string, register_data): Call
18475 get_regcache.
18476 * regcache.h: Add prototypes.
18477 * server.h: Likewise.
18478
18479 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18480
18481 * mem-break.c: New file.
18482 * mem-break.h: New file.
18483 * Makefile.in: Add mem-break.o rule; update server.h
18484 dependencies.
18485 * inferiors.c (struct inferior_info): Add target_data
18486 member.
18487 (clear_inferiors): Free target_data member if set.
18488 (inferior_target_data, set_inferior_target_data): New functions.
18489 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18490 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18491 * linux-low.c (linux_bp_reinsert): New variable.
18492 (struct inferior_linux_data): New.
18493 (linux_create_inferior): Use set_inferior_target_data.
18494 (linux_attach): Likewise. Call add_inferior.
18495 (linux_wait_for_one_inferior): New function.
18496 (linux_wait): Call it.
18497 (linux_write_memory): Add const.
18498 (initialize_low): Call set_breakpoint_data.
18499 * linux-low.h (struct linux_target_ops): Add breakpoint
18500 handling members.
18501 * server.c (attach_inferior): Remove extra add_inferior
18502 call.
18503 * server.h: Include mem-break.h. Update inferior.c
18504 prototypes.
18505 * target.c (read_inferior_memory)
18506 (write_inferior_memory): New functions.
18507 * target.h (read_inferior_memory)
18508 (write_inferior_memory): Change macros to prototypes.
18509 (struct target_ops): Update comments. Add const to write_memory
18510 definition.
18511
18512 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18513
18514 * linux-low.c (usr_store_inferior_registers): Support
18515 registers which are allowed to fail to store.
18516 * linux-low.h (linux_target_ops): Likewise.
18517 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18518 (ppc_cannot_store_register): FPSCR may not be storable.
18519
18520 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18521
18522 * server.h: Include <string.h> if HAVE_STRING_H.
18523 * ChangeLog: Correct paths in last ChangeLog entry.
18524
18525 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18526
18527 * linux-low.h: Remove obsolete prototypes.
18528 (struct linux_target_ops): New.
18529 (extern the_low_target): New.
18530 * linux-low.c (num_regs, regmap): Remove declarations.
18531 (register_addr): Use the_low_target explicitly.
18532 (fetch_register): Likewise.
18533 (usr_fetch_inferior_registers): Likewise.
18534 (usr_store_inferior_registers): Likewise.
18535 * linux-arm-low.c (num_regs): Remove.
18536 (arm_num_regs): Define.
18537 (arm_regmap): Renamed from regmap, made static.
18538 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18539 made static.
18540 (arm_cannot_store_register): Renamed from cannot_store_register,
18541 made static.
18542 (the_low_target): New.
18543 * linux-i386-low.c (num_regs): Remove.
18544 (i386_num_regs): Define.
18545 (i386_regmap): Renamed from regmap, made static.
18546 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18547 made static.
18548 (i386_cannot_store_register): Renamed from cannot_store_register,
18549 made static.
18550 (the_low_target): New.
18551 * linux-ia64-low.c (num_regs): Remove.
18552 (ia64_num_regs): Define.
18553 (ia64_regmap): Renamed from regmap, made static.
18554 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18555 made static.
18556 (ia64_cannot_store_register): Renamed from cannot_store_register,
18557 made static.
18558 (the_low_target): New.
18559 * linux-m68k-low.c (num_regs): Remove.
18560 (m68k_num_regs): Define.
18561 (m68k_regmap): Renamed from regmap, made static.
18562 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18563 made static.
18564 (m68k_cannot_store_register): Renamed from cannot_store_register,
18565 made static.
18566 (the_low_target): New.
18567 * linux-mips-low.c (num_regs): Remove.
18568 (mips_num_regs): Define.
18569 (mips_regmap): Renamed from regmap, made static.
18570 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18571 made static.
18572 (mips_cannot_store_register): Renamed from cannot_store_register,
18573 made static.
18574 (the_low_target): New.
18575 * linux-ppc-low.c (num_regs): Remove.
18576 (ppc_num_regs): Define.
18577 (ppc_regmap): Renamed from regmap, made static.
18578 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18579 made static.
18580 (ppc_cannot_store_register): Renamed from cannot_store_register,
18581 made static.
18582 (the_low_target): New.
18583 * linux-s390-low.c (num_regs): Remove.
18584 (s390_num_regs): Define.
18585 (s390_regmap): Renamed from regmap, made static.
18586 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18587 made static.
18588 (s390_cannot_store_register): Renamed from cannot_store_register,
18589 made static.
18590 (the_low_target): New.
18591 * linux-sh-low.c (num_regs): Remove.
18592 (sh_num_regs): Define.
18593 (sh_regmap): Renamed from regmap, made static.
18594 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18595 made static.
18596 (sh_cannot_store_register): Renamed from cannot_store_register,
18597 made static.
18598 (the_low_target): New.
18599 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18600 (the_low_target): New.
18601
18602 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18603
18604 * Makefile.in: Add stamp-h target.
18605 * configure.in: Create stamp-h.
18606 * configure: Regenerated.
18607
18608 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18609
18610 * inferiors.c: New file.
18611 * target.c: New file.
18612 * target.h: New file.
18613 * Makefile.in: Add target.o and inferiors.o. Update
18614 dependencies.
18615 * linux-low.c (inferior_pid): New static variable,
18616 moved from server.c.
18617 (linux_create_inferior): Renamed from create_inferior.
18618 Call add_inferior. Return 0 on success instead of a PID.
18619 (linux_attach): Renamed from myattach.
18620 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18621 (linux_thread_alive): Renamed from mythread_alive.
18622 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18623 child dies.
18624 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18625 (regsets_store_inferior_registers): Correct error message.
18626 Add missing ``return 0''.
18627 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18628 (linux_store_registers): Renamed from store_inferior_registers.
18629 (linux_read_memory): Renamed from read_inferior_memory.
18630 (linux_write_memory): Renamed from write_inferior_memory.
18631 (linux_target_ops): New structure.
18632 (initialize_low): Call set_target_ops ().
18633 * remote-utils.c (unhexify): New function.
18634 (hexify): New function.
18635 (input_interrupt): Send signals to ``signal_pid''.
18636 * server.c (inferior_pid): Remove.
18637 (start_inferior): Update create_inferior call.
18638 (attach_inferior): Call add_inferior.
18639 (handle_query): New function.
18640 (main): Call handle_query for `q' packets.
18641 * server.h: Include "target.h". Remove obsolete prototypes.
18642 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18643
18644 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18645
18646 * Makefile.in: Add WARN_CFLAGS. Update configury
18647 dependencies.
18648 * configure.in: Check for <string.h>
18649 * configure: Regenerate.
18650 * config.in: Regenerate.
18651 * gdbreplay.c: Include needed system headers.
18652 (remote_open): Remove strchr prototype.
18653 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18654 * regcache.c (supply_register): Change buf argument to const void *.
18655 (supply_register_by_name): Likewise.
18656 (collect_register): Change buf argument to void *.
18657 (collect_register_by_name): Likewise.
18658 * regcache.h: Add missing prototypes.
18659 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18660 * server.c (handle_query): New function.
18661 (attached): New static variable, moved out of main.
18662 (main): Quiet longjmp clobber warnings.
18663 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18664 * utils.c (error): Remove NORETURN.
18665 (fatal): Likewise.